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:
Akim Demaille
2005-09-30 17:57:05 +00:00
parent 55f0c7b1f2
commit fb9712a962
10 changed files with 394 additions and 336 deletions

View File

@@ -202,6 +202,7 @@ declaration:
grammar_declaration
| PROLOGUE { prologue_augment ($1, @1); }
| "%debug" { debug_flag = true; }
| "%define" string_content { muscle_insert ($2, "1"); }
| "%define" string_content string_content { muscle_insert ($2, $3); }
| "%defines" { defines_flag = true; }
| "%error-verbose" { error_verbose = true; }