+ Bison no longer executes user-specified M4 code when processing a grammar.
+
+** Future Changes
+
+ In addition to the removal of the features announced in Bison 2.6, the
+ next major release will remove the "Temporary hack for adding a semicolon
+ to the user action", as announced in the release 2.5. Instead of:
+
+ exp: exp "+" exp { $$ = $1 + $3 };
+
+ write:
+
+ exp: exp "+" exp { $$ = $1 + $3; };
+
+** Bug fixes
+
+*** Type names are now properly escaped.
+
+*** glr.cc: set_debug_level and debug_level work as expected.
+
+*** Stray @ or $ in actions
+
+ While Bison used to warn about stray $ or @ in action rules, it did not
+ for other actions such as printers, destructors, or initial actions. It
+ now does.
+
+** Type names in printers and destructors
+
+ For consistency with rule actions, it is now possible to qualify $$ by a
+ type-name in printers and destructors. For instance:
+
+ %printer { fprintf (yyo, "(%d, %f)", $<ival>$, $<fval>$); } <*> <>;
+
+ will display two values for each typed and untyped symbol (provided
+ that YYSTYPE supports it).
+
+* Noteworthy changes in release 2.6 (2012-07-19) [stable]
+
+** Future Changes
+
+ The next major release of Bison will drop support for the following
+ deprecated features. Please report disagreements to bug-bison@gnu.org.
+
+*** K&R C parsers
+
+ Support for generating parsers in K&R C will be removed. Parsers
+ generated for C support ISO C90, and are tested with ISO C99 and ISO C11
+ compilers.
+
+*** Features deprecated since Bison 1.875
+
+ The definitions of yystype and yyltype will be removed; use YYSTYPE and
+ YYLTYPE.
+
+ YYPARSE_PARAM and YYLEX_PARAM, deprecated in favor of %parse-param and
+ %lex-param, will no longer be supported.
+
+ Support for the preprocessor symbol YYERROR_VERBOSE will be removed, use
+ %error-verbose.
+
+*** The generated header will be included (yacc.c)
+
+ Instead of duplicating the content of the generated header (definition of
+ YYSTYPE, yyparse declaration etc.), the generated parser will include it,
+ as is already the case for GLR or C++ parsers. This change is deferred
+ because existing versions of ylwrap (e.g., Automake 1.12.1) do not support
+ it.
+
+** Generated Parser Headers
+
+*** Guards (yacc.c, glr.c, glr.cc)
+
+ The generated headers are now guarded, as is already the case for C++
+ parsers (lalr1.cc). For instance, with --defines=foo.h:
+
+ #ifndef YY_FOO_H
+ # define YY_FOO_H
+ ...
+ #endif /* !YY_FOO_H */
+
+*** New declarations (yacc.c, glr.c)
+
+ The generated header now declares yydebug and yyparse. Both honor
+ --name-prefix=bar_, and yield
+
+ int bar_parse (void);
+
+ rather than
+
+ #define yyparse bar_parse
+ int yyparse (void);
+
+ in order to facilitate the inclusion of several parser headers inside a
+ single compilation unit.
+
+*** Exported symbols in C++
+
+ The symbols YYTOKEN_TABLE and YYERROR_VERBOSE, which were defined in the
+ header, are removed, as they prevent the possibility of including several
+ generated headers from a single compilation unit.
+
+*** YYLSP_NEEDED
+
+ For the same reasons, the undocumented and unused macro YYLSP_NEEDED is no
+ longer defined.
+
+** New %define variable: api.prefix
+
+ Now that the generated headers are more complete and properly protected
+ against multiple inclusions, constant names, such as YYSTYPE are a
+ problem. While yyparse and others are properly renamed by %name-prefix,
+ YYSTYPE, YYDEBUG and others have never been affected by it. Because it
+ would introduce backward compatibility issues in projects not expecting
+ YYSTYPE to be renamed, instead of changing the behavior of %name-prefix,
+ it is deprecated in favor of a new %define variable: api.prefix.
+
+ The following examples compares both:
+
+ %name-prefix "bar_" | %define api.prefix "bar_"
+ %token <ival> FOO %token <ival> FOO
+ %union { int ival; } %union { int ival; }
+ %% %%
+ exp: 'a'; exp: 'a';
+
+ bison generates:
+
+ #ifndef BAR_FOO_H #ifndef BAR_FOO_H
+ # define BAR_FOO_H # define BAR_FOO_H
+
+ /* Enabling traces. */ /* Enabling traces. */
+ # ifndef YYDEBUG | # ifndef BAR_DEBUG
+ > # if defined YYDEBUG
+ > # if YYDEBUG
+ > # define BAR_DEBUG 1
+ > # else
+ > # define BAR_DEBUG 0
+ > # endif
+ > # else
+ # define YYDEBUG 0 | # define BAR_DEBUG 0
+ > # endif
+ # endif | # endif
+
+ # if YYDEBUG | # if BAR_DEBUG
+ extern int bar_debug; extern int bar_debug;
+ # endif # endif
+
+ /* Tokens. */ /* Tokens. */
+ # ifndef YYTOKENTYPE | # ifndef BAR_TOKENTYPE
+ # define YYTOKENTYPE | # define BAR_TOKENTYPE
+ enum yytokentype { | enum bar_tokentype {
+ FOO = 258 FOO = 258
+ }; };
+ # endif # endif
+
+ #if ! defined YYSTYPE \ | #if ! defined BAR_STYPE \
+ && ! defined YYSTYPE_IS_DECLARED | && ! defined BAR_STYPE_IS_DECLARED
+ typedef union YYSTYPE | typedef union BAR_STYPE
+ { {
+ int ival; int ival;
+ } YYSTYPE; | } BAR_STYPE;
+ # define YYSTYPE_IS_DECLARED 1 | # define BAR_STYPE_IS_DECLARED 1
+ #endif #endif
+
+ extern YYSTYPE bar_lval; | extern BAR_STYPE bar_lval;
+
+ int bar_parse (void); int bar_parse (void);
+
+ #endif /* !BAR_FOO_H */ #endif /* !BAR_FOO_H */
+
+* Noteworthy changes in release 2.5.1 (2012-06-05) [stable]
+
+** Future changes:
+
+ The next major release will drop support for generating parsers in K&R C.
+
+** yacc.c: YYBACKUP works as expected.
+
+** glr.c improvements:
+
+*** Location support is eliminated when not requested:
+
+ GLR parsers used to include location-related code even when locations were
+ not requested, and therefore not even usable.
+
+*** __attribute__ is preserved:
+
+ __attribute__ is no longer disabled when __STRICT_ANSI__ is defined (i.e.,
+ when -std is passed to GCC).
+
+** lalr1.java: several fixes:
+
+ The Java parser no longer throws ArrayIndexOutOfBoundsException if the
+ first token leads to a syntax error. Some minor clean ups.
+
+** Changes for C++:
+
+*** C++11 compatibility:
+
+ C and C++ parsers use "nullptr" instead of "0" when __cplusplus is 201103L
+ or higher.
+
+*** Header guards
+
+ The header files such as "parser.hh", "location.hh", etc. used a constant
+ name for preprocessor guards, for instance:
+
+ #ifndef BISON_LOCATION_HH
+ # define BISON_LOCATION_HH
+ ...
+ #endif // !BISON_LOCATION_HH
+
+ The inclusion guard is now computed from "PREFIX/FILE-NAME", where lower
+ case characters are converted to upper case, and series of
+ non-alphanumerical characters are converted to an underscore.
+
+ With "bison -o lang++/parser.cc", "location.hh" would now include:
+
+ #ifndef YY_LANG_LOCATION_HH
+ # define YY_LANG_LOCATION_HH
+ ...
+ #endif // !YY_LANG_LOCATION_HH
+
+*** C++ locations:
+
+ The position and location constructors (and their initialize methods)
+ accept new arguments for line and column. Several issues in the
+ documentation were fixed.
+
+** liby is no longer asking for "rpl_fprintf" on some platforms.
+
+** Changes in the manual:
+
+*** %printer is documented
+
+ The "%printer" directive, supported since at least Bison 1.50, is finally
+ documented. The "mfcalc" example is extended to demonstrate it.
+
+ For consistency with the C skeletons, the C++ parsers now also support
+ "yyoutput" (as an alias to "debug_stream ()").
+
+*** Several improvements have been made:
+
+ The layout for grammar excerpts was changed to a more compact scheme.
+ Named references are motivated. The description of the automaton
+ description file (*.output) is updated to the current format. Incorrect
+ index entries were fixed. Some other errors were fixed.
+
+** Building bison:
+
+*** Conflicting prototypes with recent/modified Flex.
+
+ Fixed build problems with the current, unreleased, version of Flex, and
+ some modified versions of 2.5.35, which have modified function prototypes.
+
+*** Warnings during the build procedure have been eliminated.
+
+*** Several portability problems in the test suite have been fixed:
+
+ This includes warnings with some compilers, unexpected behavior of tools
+ such as diff, warning messages from the test suite itself, etc.
+
+*** The install-pdf target works properly:
+
+ Running "make install-pdf" (or -dvi, -html, -info, and -ps) no longer
+ halts in the middle of its course.
+
+* Changes in version 2.5 (2011-05-14):
+
+** Grammar symbol names can now contain non-initial dashes:
+
+ Consistently with directives (such as %error-verbose) and with
+ %define variables (e.g. push-pull), grammar symbol names may contain
+ dashes in any position except the beginning. This is a GNU
+ extension over POSIX Yacc. Thus, use of this extension is reported
+ by -Wyacc and rejected in Yacc mode (--yacc).
+
+** Named references:
+
+ Historically, Yacc and Bison have supported positional references
+ ($n, $$) to allow access to symbol values from inside of semantic
+ actions code.
+
+ Starting from this version, Bison can also accept named references.
+ When no ambiguity is possible, original symbol names may be used
+ as named references:
+
+ if_stmt : "if" cond_expr "then" then_stmt ';'
+ { $if_stmt = mk_if_stmt($cond_expr, $then_stmt); }
+
+ In the more common case, explicit names may be declared:
+
+ stmt[res] : "if" expr[cond] "then" stmt[then] "else" stmt[else] ';'
+ { $res = mk_if_stmt($cond, $then, $else); }
+
+ Location information is also accessible using @name syntax. When
+ accessing symbol names containing dots or dashes, explicit bracketing
+ ($[sym.1]) must be used.
+
+ These features are experimental in this version. More user feedback
+ will help to stabilize them.
+
+** IELR(1) and canonical LR(1):