mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-19 04:13:39 +00:00
Merge pull request #5160 from garytwong/fast-lex
verilog: improve string literal matching speed (fixes #5076)
This commit is contained in:
commit
67f8de54dc
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||||
|
@ -376,7 +376,6 @@ TIME_SCALE_SUFFIX [munpf]?s
|
||||||
free(yystr);
|
free(yystr);
|
||||||
return TOK_STRING;
|
return TOK_STRING;
|
||||||
}
|
}
|
||||||
<STRING>. { yymore(); real_location = old_location; }
|
|
||||||
|
|
||||||
and|nand|or|nor|xor|xnor|not|buf|bufif0|bufif1|notif0|notif1 {
|
and|nand|or|nor|xor|xnor|not|buf|bufif0|bufif1|notif0|notif1 {
|
||||||
yylval->string = new std::string(yytext);
|
yylval->string = new std::string(yytext);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue