vhdlpp: Simplified regex to detect string literals.
This commit is contained in:
parent
925827d2c2
commit
6fee37a640
|
|
@ -111,9 +111,7 @@ time {integer}{W}*([fFpPnNuUmM]?[sS])
|
||||||
return CHARACTER_LITERAL;
|
return CHARACTER_LITERAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
(\"([^\"]|(\"\"))*?\")|(\"[^\"]*\") {
|
(\"([^\"]|(\"\"))*?\") {
|
||||||
/* first pattern: string literals with doubled quotation mark */
|
|
||||||
/* second pattern: string literals without doubled quotation */
|
|
||||||
yylval.text = escape_quot_and_dup(yytext);
|
yylval.text = escape_quot_and_dup(yytext);
|
||||||
assert(yylval.text);
|
assert(yylval.text);
|
||||||
return STRING_LITERAL;
|
return STRING_LITERAL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue