From 6fee37a6401cdbe38b5869cd6aafe7020f32cd35 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Sep 2015 10:21:49 +0200 Subject: [PATCH] vhdlpp: Simplified regex to detect string literals. --- vhdlpp/lexor.lex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vhdlpp/lexor.lex b/vhdlpp/lexor.lex index 1cbda23c9..98916b05c 100644 --- a/vhdlpp/lexor.lex +++ b/vhdlpp/lexor.lex @@ -111,9 +111,7 @@ time {integer}{W}*([fFpPnNuUmM]?[sS]) 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); assert(yylval.text); return STRING_LITERAL;