GCJ's parser requires the tokens to be defined before the prologue.

* data/bison.simple: Output the token definition before the user's
prologue.
* tests/regression.at (Braces parsing, Duplicate string)
(Mixing %token styles): Check the output from bison.
(Early token definitions): New.
This commit is contained in:
Akim Demaille
2002-06-11 08:01:41 +00:00
parent 0624954c7e
commit 69078d4b3b
3 changed files with 57 additions and 7 deletions

View File

@@ -175,6 +175,8 @@ m4_if(b4_prefix[], [yy], [],
/* Copy the first part of user declarations. */
b4_pre_prologue
b4_token_defines(b4_tokens)
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG b4_debug
@@ -312,8 +314,6 @@ union yyalloc
#endif
b4_token_defines(b4_tokens)
/* YYFINAL -- State number of the termination state. */
#define YYFINAL b4_final
#define YYFLAG b4_flag