Skip to content

Commit

Permalink
Fix PLI/DPI user defined system task/function grammar (verilator#4587) (
Browse files Browse the repository at this point in the history
verilator#4588)

According to 1800-2017 36.3, 1800-2017 A.9.3, 1364-2005 20.2 and 1364-2005 A.9.3, user defined system task and function identifiers can use the same character set for the second character as all the following characters.
  • Loading branch information
dwRchyngqxs authored Oct 21, 2023
1 parent f8b7fb7 commit 26e3785
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Pierre-Henri Horrein
Pieter Kapsenberg
Piotr Binkowski
Qingyao Sun
Quentin Corradi
Rafal Kapuscik
Raynard Qiao
Richard Myers
Expand Down
2 changes: 1 addition & 1 deletion src/verilog.l
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}

/* Default PLI rule */
<V95,V01NC,V01C,V05,VA5,S05,S09,S12,S17,SAX>{
"$"[a-zA-Z_$][a-zA-Z0-9_$]* { const string str (yytext, yyleng);
"$"[a-zA-Z0-9_$]+ { const string str (yytext, yyleng);
yylval.strp = PARSEP->newString(AstNode::encodeName(str));
FL; return yaD_PLI;
}
Expand Down

0 comments on commit 26e3785

Please sign in to comment.