mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Alexandre Duret-Lutz <adl@gnu.org>
Move the token type and YYSTYPE in the parser class. * data/lalr1.cc (stack.hh, location.hh): Include earlier. (parser::token): New, from the moved free definition of tokens. (parser::semantic_value): Now a full definition instead of an indirection to YYSTYPE. (b4_post_prologue): No longer included in the header file, but in the implementation file. * doc/bison.texi (C+ Language Interface): Update. * src/parse-gram.y: Support unary %define. * tests/actions.at: Define global_tokens_and_yystype for backward compatibility until we update the tests. * tests/calc.at: Idem. (first_line, first_column, last_line, last_column): Define for lalr1.cc to simplify the code.
This commit is contained in:
11
NEWS
11
NEWS
@@ -3,6 +3,17 @@ Bison News
|
||||
|
||||
Changes in version 2.1a:
|
||||
|
||||
* lalr1.cc: The token and value types are now class members.
|
||||
The tokens where defined as free form enums and cpp macros. YYSTYPE
|
||||
was defined as a free form union. Both are now class members:
|
||||
tokens are enumerations of the `yy::parser::token' struct, and the
|
||||
semantic values have the `yy::parser::semantic_type' type.
|
||||
|
||||
If you do not want or can update to this scheme, the directive
|
||||
`%define "global_tokens_and_yystype" "1"' triggers the global
|
||||
definition of tokens and YYSTYPE.
|
||||
|
||||
|
||||
Changes in version 2.1, 2005-09-16:
|
||||
|
||||
* Bison-generated parsers now support the translation of diagnostics like
|
||||
|
||||
Reference in New Issue
Block a user