Add better error reporting for port declarations.

Add an error message for NULL port declarations and for a ';'
that could be left over from building a port declaration from
an old style declaration.
This commit is contained in:
Cary R 2007-12-28 23:47:20 -08:00 committed by Stephen Williams
parent fea1febf54
commit ef1739dbec
1 changed files with 10 additions and 0 deletions

10
parse.y
View File

@ -1446,6 +1446,16 @@ list_of_port_declarations
*/
$$ = tmp;
}
| list_of_port_declarations ','
{
yyerror(@2, "error: NULL port declarations are not "
"allowed.");
}
| list_of_port_declarations ';'
{
yyerror(@2, "error: ';' is an invalid port declaration "
"separator.");
}
;
port_declaration