* 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:
Paul Eggert
2005-10-13 19:38:46 +00:00
parent 7625ec2c83
commit 302c0aeeba
3 changed files with 18 additions and 2 deletions

View File

@@ -1,8 +1,13 @@
2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
* src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2005-10-13 Akim Demaille <akim@epita.fr>
* src/scan-skel.l: Output the base name parts of the parser and
header file names.
* tests/output.at (AT_CHECK_OUTPUT): Support subdirectorioes, and
* tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
additional checks.
Use this to exercise C++ outputs in subdirs.
Reported by Oleg Smolsky.

4
NEWS
View File

@@ -3,7 +3,7 @@ Bison News
Changes in version 2.1a:
* DJGPP support added.
* Bison now warns if it finds a stray `$' or `@' in an action.
* %require "VERSION"
To specify that the grammar file depends on features implemented in
@@ -23,6 +23,8 @@ Changes in version 2.1a:
If you wish to update, then make sure older version of Bison will
fail using `%require "2.1a"'.
* DJGPP support added.
Changes in version 2.1, 2005-09-16:
* Bison-generated parsers now support the translation of diagnostics like

View File

@@ -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;
}