Fix GitHub issue 310 - improve port declaration error message.

This commit is contained in:
Martin Whitaker 2020-02-15 12:02:15 +00:00
parent 387d18d222
commit 8b85064341
1 changed files with 3 additions and 4 deletions

View File

@ -1873,7 +1873,7 @@ modport_ports_list
delete[] $3; delete[] $3;
} }
| modport_ports_list ',' | modport_ports_list ','
{ yyerror(@2, "error: NULL port declarations are not allowed"); } { yyerror(@2, "error: Superfluous comma in port declaration list."); }
; ;
modport_ports_declaration modport_ports_declaration
@ -2585,7 +2585,7 @@ tf_port_item_list
$$ = $3; $$ = $3;
} }
| tf_port_item_list ',' | tf_port_item_list ','
{ yyerror(@2, "error: NULL port declarations are not allowed."); { yyerror(@2, "error: Superfluous comma in port declaration list.");
$$ = $1; $$ = $1;
} }
| tf_port_item_list ';' | tf_port_item_list ';'
@ -4542,8 +4542,7 @@ list_of_port_declarations
} }
| list_of_port_declarations ',' | list_of_port_declarations ','
{ {
yyerror(@2, "error: NULL port declarations are not " yyerror(@2, "error: Superfluous comma in port declaration list.");
"allowed.");
} }
| list_of_port_declarations ';' | list_of_port_declarations ';'
{ {