mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
* NEWS: Bison now warns if it finds a stray $' or @' in an action.
* src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
This commit is contained in:
@@ -618,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, "@@");
|
||||
}
|
||||
|
||||
<<EOF>> unexpected_eof (code_start, "}"); BEGIN INITIAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user