Relax the requirement on list of port declarations for implicit ports.

Previously list of port declarations were considered a complete
definition of the port. This caused problems for some, so this patch
allows implicitly defined ports (no wire/reg/etc.) to have net
declarations in the body.
This commit is contained in:
Cary R 2007-08-23 19:15:47 -07:00 committed by Stephen Williams
parent 35df445db1
commit 3fda7e323a
1 changed files with 16 additions and 3 deletions

19
parse.y
View File

@ -1411,14 +1411,23 @@ list_of_port_declarations
{ svector<Module::port_t*>*tmp
= new svector<Module::port_t*>(1);
(*tmp)[0] = $1;
pform_set_net_range($1[0].name);
/*
* Uncommenting this makes lopd always fully specified.
* Some wanted an implicit net to not be fully defined.
*
* pform_set_net_range($1[0].name);
*/
$$ = tmp;
}
| list_of_port_declarations ',' port_declaration
{ svector<Module::port_t*>*tmp
= new svector<Module::port_t*>(*$1, $3);
delete $1;
pform_set_net_range($3[0].name);
/*
* Same as above.
*
* pform_set_net_range($3[0].name);
*/
$$ = tmp;
}
| list_of_port_declarations ',' IDENTIFIER
@ -1437,7 +1446,11 @@ list_of_port_declarations
port_declaration_context.sign_flag,
port_declaration_context.range, 0);
delete $1;
pform_set_net_range($3);
/*
* Same as above.
*
* pform_set_net_range($3);
*/
$$ = tmp;
}
;