From 62e977102b71941f83e267754459bdc93d696c89 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 13 May 2011 17:03:15 +0200 Subject: [PATCH] Bugfix: Fix the WANT_QSTRING state --- src/cmdparse.l | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cmdparse.l b/src/cmdparse.l index f07420d3..3e5dc889 100644 --- a/src/cmdparse.l +++ b/src/cmdparse.l @@ -74,6 +74,15 @@ EOL (\r?\n) cmdyylval.string = copy; return STR; } +\"[^\"]+\" { + BEGIN(INITIAL); + /* strip quotes */ + char *copy = sstrdup(yytext+1); + copy[strlen(copy)-1] = '\0'; + cmdyylval.string = copy; + return STR; + } + [^;\n]+ { BEGIN(INITIAL); cmdyylval.string = sstrdup(yytext); return STR; } [ \t]* { return WHITESPACE; } -- 2.39.5