3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-20 21:03:40 +00:00

verilog: fix string literal regular expression.

A backslash was improperly quoted, causing string literal matching
to fail when the final token before a closing quote was an escaped
backslash.
This commit is contained in:
Gary Wong 2025-06-18 20:48:20 -06:00
parent cd71f190cd
commit 40aa7eaf93

View file

@ -336,7 +336,7 @@ TIME_SCALE_SUFFIX [munpf]?s
} }
\" { BEGIN(STRING); } \" { BEGIN(STRING); }
<STRING>([^\"]|\\.)+ { yymore(); real_location = old_location; } <STRING>([^\\"]|\\.)+ { yymore(); real_location = old_location; }
<STRING>\" { <STRING>\" {
BEGIN(0); BEGIN(0);
char *yystr = strdup(yytext); char *yystr = strdup(yytext);