From 26e378596382e654f5e39e17e6bc61942feb55c2 Mon Sep 17 00:00:00 2001 From: Quentin Corradi <12198691+dwRchyngqxs@users.noreply.github.com> Date: Sat, 21 Oct 2023 07:43:49 +0100 Subject: [PATCH] Fix PLI/DPI user defined system task/function grammar (#4587) (#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. --- docs/CONTRIBUTORS | 1 + src/verilog.l | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index 09c1ae87b0..80b58a622c 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -137,6 +137,7 @@ Pierre-Henri Horrein Pieter Kapsenberg Piotr Binkowski Qingyao Sun +Quentin Corradi Rafal Kapuscik Raynard Qiao Richard Myers diff --git a/src/verilog.l b/src/verilog.l index 8bb6c07bdb..7d43128b04 100644 --- a/src/verilog.l +++ b/src/verilog.l @@ -630,7 +630,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} /* Default PLI rule */ { - "$"[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; }