3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-09 16:55:49 +00:00

Merge pull request #5085 from YosysHQ/krys/fix_5069

verilog_parser.y: Delete unused TOK_ID
This commit is contained in:
Emil J 2025-05-05 10:39:43 +02:00 committed by GitHub
commit f60bbe64ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View file

@ -2249,7 +2249,8 @@ cell_parameter:
node->children.push_back($1);
} |
'.' TOK_ID '(' ')' {
// just ignore empty parameters
// delete unused TOK_ID
delete $2;
} |
'.' TOK_ID '(' expr ')' {
AstNode *node = new AstNode(AST_PARASET);

View file

@ -0,0 +1,24 @@
logger -expect-no-warnings
read_verilog << EOF
module bar (
input portname
);
parameter paramname = 7;
endmodule
module empty (
);
bar #() barinstance ();
endmodule
module implicit (
);
bar #(.paramname()) barinstance (.portname());
endmodule
module explicit (
input a
);
bar #(.paramname(3)) barinstance (.portname(a));
endmodule
EOF