tc/lexer: let quotes actually start strings

The lexer will go with the longest match, so previously
the starting double quotes of a string would be swallowed by
the [^ \t\r\n()]+ pattern leaving the user no way to
actually use strings with escape sequences.
Fix this by not allowing this case to start with double
quotes.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2018-01-22 11:53:46 +01:00 committed by Stephen Hemminger
parent 7a14358b16
commit 7ac29190db
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@
")" {
return yylval.i = *yytext;
}
[^ \t\r\n()]+ {
[^" \t\r\n()][^ \t\r\n()]* {
yylval.b = bstr_alloc(yytext);
if (yylval.b == NULL)
return ERROR;