mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Simplify union and prologue handling, and escape union and lex/parse
params with digraphs.
* data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
values to the empty string since these are no longer guaranteed
initialized by the front-end.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
braces around b4_user_stype since this is no longer done by the
front-end.
* src/files.c, src/files.h (pre_prologue_obstack,
post_prologue_obstack): Remove.
* src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
with digraphs. This fixes lex params and parse params.
* src/muscle_tab.h (muscle_pair_list_grow): Update comments.
* src/output.c (prepare): Remove muscle insertion of the prologues.
(output): Remove freeing of pre_prologue_obstack and
post_prologue_obstack.
* src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
than prologue_augment for prologue parsing so you don't need prologue
obstacks.
(grammar_declaration): Use `braceless' instead of "{...}" so that
braces are already stripped and code is escaped with digraphs.
* src/reader.c (prologue_augment): Remove.
(reader): Remove initialization of pre_prologue_obstack and
post_prologue_obstack.
* src/reader.h (prologue_augment): Remove.
* data/c.m4: Remove stray parenthesis.
This commit is contained in:
@@ -100,72 +100,14 @@
|
||||
PERCENT_UNION = 313
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define GRAM_EOF 0
|
||||
#define STRING 258
|
||||
#define INT 259
|
||||
#define PERCENT_TOKEN 260
|
||||
#define PERCENT_NTERM 261
|
||||
#define PERCENT_TYPE 262
|
||||
#define PERCENT_DESTRUCTOR 263
|
||||
#define PERCENT_PRINTER 264
|
||||
#define PERCENT_LEFT 265
|
||||
#define PERCENT_RIGHT 266
|
||||
#define PERCENT_NONASSOC 267
|
||||
#define PERCENT_PREC 268
|
||||
#define PERCENT_DPREC 269
|
||||
#define PERCENT_MERGE 270
|
||||
#define PERCENT_CODE 271
|
||||
#define PERCENT_DEBUG 272
|
||||
#define PERCENT_DEFAULT_PREC 273
|
||||
#define PERCENT_DEFINE 274
|
||||
#define PERCENT_DEFINES 275
|
||||
#define PERCENT_ERROR_VERBOSE 276
|
||||
#define PERCENT_EXPECT 277
|
||||
#define PERCENT_EXPECT_RR 278
|
||||
#define PERCENT_FILE_PREFIX 279
|
||||
#define PERCENT_GLR_PARSER 280
|
||||
#define PERCENT_INITIAL_ACTION 281
|
||||
#define PERCENT_LANGUAGE 282
|
||||
#define PERCENT_LEX_PARAM 283
|
||||
#define PERCENT_LOCATIONS 284
|
||||
#define PERCENT_NAME_PREFIX 285
|
||||
#define PERCENT_NO_DEFAULT_PREC 286
|
||||
#define PERCENT_NO_LINES 287
|
||||
#define PERCENT_NONDETERMINISTIC_PARSER 288
|
||||
#define PERCENT_OUTPUT 289
|
||||
#define PERCENT_PARSE_PARAM 290
|
||||
#define PERCENT_PURE_PARSER 291
|
||||
#define PERCENT_PUSH_PARSER 292
|
||||
#define PERCENT_PUSH_PULL_PARSER 293
|
||||
#define PERCENT_REQUIRE 294
|
||||
#define PERCENT_SKELETON 295
|
||||
#define PERCENT_START 296
|
||||
#define PERCENT_TOKEN_TABLE 297
|
||||
#define PERCENT_VERBOSE 298
|
||||
#define PERCENT_YACC 299
|
||||
#define BRACED_CODE 300
|
||||
#define CHAR 301
|
||||
#define EPILOGUE 302
|
||||
#define EQUAL 303
|
||||
#define ID 304
|
||||
#define ID_COLON 305
|
||||
#define PERCENT_PERCENT 306
|
||||
#define PIPE 307
|
||||
#define PROLOGUE 308
|
||||
#define SEMICOLON 309
|
||||
#define TYPE 310
|
||||
#define TYPE_TAG_ANY 311
|
||||
#define TYPE_TAG_NONE 312
|
||||
#define PERCENT_UNION 313
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 1535 of yacc.c */
|
||||
|
||||
/* Line 1537 of yacc.c */
|
||||
#line 97 "parse-gram.y"
|
||||
|
||||
symbol *symbol;
|
||||
@@ -176,11 +118,12 @@ typedef union YYSTYPE
|
||||
assoc assoc;
|
||||
uniqstr uniqstr;
|
||||
unsigned char character;
|
||||
}
|
||||
|
||||
/* Line 1535 of yacc.c */
|
||||
#line 183 "parse-gram.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
/* Line 1537 of yacc.c */
|
||||
#line 126 "parse-gram.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
|
||||
Reference in New Issue
Block a user