mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 07:43:03 +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:
@@ -135,7 +135,7 @@
|
||||
|
||||
|
||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||
#line 79 "parse-gram.y"
|
||||
#line 79 "../../src/parse-gram.y"
|
||||
typedef union YYSTYPE {
|
||||
symbol *symbol;
|
||||
symbol_list *list;
|
||||
@@ -145,7 +145,7 @@ typedef union YYSTYPE {
|
||||
uniqstr uniqstr;
|
||||
} YYSTYPE;
|
||||
/* Line 1505 of yacc.c. */
|
||||
#line 149 "parse-gram.h"
|
||||
#line 149 "../../src/parse-gram.h"
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
|
||||
Reference in New Issue
Block a user