mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
* tests/calc.at: Exercise prologue splitting.
* data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and `b4_post_prologue' instead of `b4_prologue'. * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' muscles. (output): Free pre_prologue_obstack and post_prologue_obstack. * src/files.h, src/files.c (attrs_obstack): Remove. (pre_prologue_obstack, post_prologue_obstack): New. * src/reader.c (copy_definition): Add a parameter to specify the obstack to fill, instead of using attrs_obstack unconditionally. (read_declarations): Pass pre_prologue_obstack to copy_definition if `%union' has not yet been seen, pass post_prologue_obstack otherwise.
This commit is contained in:
@@ -113,7 +113,8 @@ b4_copyright
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED b4_locations_flag
|
||||
|
||||
b4_prologue
|
||||
/* Copy the first part of user declarations. */
|
||||
b4_pre_prologue
|
||||
|
||||
/* Tokens. */
|
||||
b4_token_defines(b4_tokens)
|
||||
@@ -137,6 +138,9 @@ yystype;
|
||||
# define YYSTYPE yystype
|
||||
#endif
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
b4_post_prologue
|
||||
|
||||
#line __oline__ "__ofile__"
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
|
||||
@@ -120,8 +120,8 @@ m4_if(b4_prefix[], [yy], [],
|
||||
#endif
|
||||
])
|
||||
|
||||
/* Copy the user declarations. */
|
||||
b4_prologue
|
||||
/* Copy the first part of user declarations. */
|
||||
b4_pre_prologue
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
@@ -155,6 +155,9 @@ typedef struct yyltype
|
||||
# define YYLTYPE b4_ltype
|
||||
#endif
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
b4_post_prologue
|
||||
|
||||
/* Line __line__ of __file__. */
|
||||
#line __oline__ "__ofile__"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user