mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Remove quotes from variables names in %define directives and from
qualifiers in %code directives, and restrict the characters that are allowed in them to M4-friendly ones. For %define, continue to support the quoted form as a deprecated feature. Discussed starting at <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>. * NEWS (2.3a+): Add entry for the change to %define. Update entry for %code. * doc/bison.texinfo (Prologue Alternatives): Update. (Bison Declaration Summary): In %defines entry, update mention of `%code requires' and `%code provides'. (C++ Location Values): Update %define uses. (Calc++ Parser Interface): Likewise. (Calc++ Parser): Likewise, and update `%code requires' uses. (Bison Symbols): Update %code documentation. * src/parse-gram.y (prologue_declaration): For %define variables, use `variable' instead of `STRING'. (grammar_declaration): For %code qualifiers, use `ID' instead of `STRING'. (variable): New nonterminal that takes an `ID' or a `STRING'. * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code and %define uses. * tests/calc.at (_AT_DATA_CALC_Y): Update %define use. * tests/input.at (Reject unused %code qualifiers): Update %code uses. (%define errors): Update %define uses.
This commit is contained in:
15
NEWS
15
NEWS
@@ -16,23 +16,28 @@ Changes in version 2.3a+ (????-??-??):
|
||||
|
||||
%defines "parser.h"
|
||||
|
||||
* The `=' that used to be required in the following declarations is now
|
||||
* The `=' that used to be required in the following directives is now
|
||||
deprecated:
|
||||
|
||||
%file-prefix "parser"
|
||||
%name-prefix "c_"
|
||||
%output "parser.c"
|
||||
|
||||
* The quotes around NAME that used to be required in the following directive
|
||||
are now deprecated:
|
||||
|
||||
%define NAME "VALUE"
|
||||
|
||||
* Bison 2.3a provided a new set of directives as a more flexible alternative to
|
||||
the traditional Yacc prologue blocks. Those have now been consolidated into
|
||||
a single %code directive with an optional qualifier field, which identifies
|
||||
the purpose of the code and thus the location(s) where Bison should generate
|
||||
it:
|
||||
|
||||
1. `%code {CODE}' replaces `%after-header {CODE}'
|
||||
2. `%code "requires" {CODE}' replaces `%start-header {CODE}'
|
||||
3. `%code "provides" {CODE}' replaces `%end-header {CODE}'
|
||||
4. `%code "top" {CODE}' replaces `%before-header {CODE}'
|
||||
1. `%code {CODE}' replaces `%after-header {CODE}'
|
||||
2. `%code requires {CODE}' replaces `%start-header {CODE}'
|
||||
3. `%code provides {CODE}' replaces `%end-header {CODE}'
|
||||
4. `%code top {CODE}' replaces `%before-header {CODE}'
|
||||
|
||||
See the %code entries in `Appendix A Bison Symbols' in the Bison manual for a
|
||||
summary of the new functionality. See the new section `Prologue
|
||||
|
||||
Reference in New Issue
Block a user