X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b50d2359d7608270561abd5c3cbf6e84834c2019..302c0aeeba0264be6031b48540ae4f2108a3d799:/src/scan-gram.l diff --git a/src/scan-gram.l b/src/scan-gram.l index 1b44f513..3c7d37c4 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -24,6 +24,11 @@ %option prefix="gram_" outfile="lex.yy.c" %{ +/* Work around a bug in flex 2.5.31. See Debian bug 333231 + . */ +#undef gram_wrap +#define gram_wrap() 1 + #include "system.h" #include @@ -613,6 +618,15 @@ splice (\\[ \f\t\v]*\n)* "$"("<"{tag}">")?(-?[0-9]+|"$") handle_dollar (token_type, yytext, *loc); "@"(-?[0-9]+|"$") handle_at (token_type, yytext, *loc); + "$" { + warn_at (*loc, _("stray `$'")); + obstack_sgrow (&obstack_for_string, "$]["); + } + "@" { + warn_at (*loc, _("stray `@'")); + obstack_sgrow (&obstack_for_string, "@@"); + } + <> unexpected_eof (code_start, "}"); BEGIN INITIAL; }