verilog: fix string literal regular expression (#5187)
* 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. * verilog: add regression test for string literal regex bug. Test for bug triggered by escaped backslash immediately before closing quote (introduced inca7d94afand fixed by40aa7eaf).
This commit is contained in:
committed by
Emil J. Tywoniak
parent
0a5aa4c78b
commit
105a3cd32d
@@ -372,7 +372,7 @@ TIME_SCALE_SUFFIX [munpf]?s
|
||||
}
|
||||
|
||||
\" { BEGIN(STRING); }
|
||||
<STRING>([^\"]|\\.)+ { yymore(); }
|
||||
<STRING>([^\\"]|\\.)+ { yymore(); }
|
||||
<STRING>\" {
|
||||
BEGIN(0);
|
||||
char *yystr = strdup(YYText());
|
||||
|
||||
Reference in New Issue
Block a user