* 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:
Robert Anisko
2002-04-24 16:22:57 +00:00
parent b98ec53ee4
commit 0dd1580afc
8 changed files with 66 additions and 19 deletions

View File

@@ -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) \

View File

@@ -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__"