* src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst

['"/] too eagerly.
* tests/input.at (Torturing the Scanner): New.
This commit is contained in:
Akim Demaille
2002-06-12 12:50:22 +00:00
parent 3420246357
commit 6c35d22c39
4 changed files with 287 additions and 258 deletions

View File

@@ -440,7 +440,7 @@ blanks [ \t\f]+
"$"("<".*">")?(-?[0-9]+|"$") { handle_dollar (yytext); }
"@"(-?[0-9]+|"$") { handle_at (yytext); }
[^\[\]$/\'\"@\{\}\n\r]+ YY_OBS_GROW;
[^$@\[\]/\'\"\{\}\n\r]+ YY_OBS_GROW;
{eols} YY_OBS_GROW; YY_LINES;
/* A lose $, or /, or etc. */
@@ -471,7 +471,7 @@ blanks [ \t\f]+
return PROLOGUE;
}
[^\[\]%\n\r]+ YY_OBS_GROW;
[^%\[\]/\'\"\n\r]+ YY_OBS_GROW;
"%"+[^%\}\n\r]+ YY_OBS_GROW;
{eols} YY_OBS_GROW; YY_LINES;