Bugfix: Fix the WANT_QSTRING state

This commit is contained in:
Michael Stapelberg 2011-05-13 17:03:15 +02:00
parent b0e871e0cf
commit 62e977102b
1 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,15 @@ EOL (\r?\n)
cmdyylval.string = copy;
return STR;
}
<WANT_QSTRING>\"[^\"]+\" {
BEGIN(INITIAL);
/* strip quotes */
char *copy = sstrdup(yytext+1);
copy[strlen(copy)-1] = '\0';
cmdyylval.string = copy;
return STR;
}
<WANT_STRING>[^;\n]+ { BEGIN(INITIAL); cmdyylval.string = sstrdup(yytext); return STR; }
[ \t]* { return WHITESPACE; }