From 17acead581306a47622213c3ff949bb237b1268f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 12 Oct 2002 23:20:23 +0000 Subject: [PATCH] Output token definitions before the first part of user declarations. --- data/glr.c | 6 +++--- data/lalr1.cc | 5 ++--- data/yacc.c | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/data/glr.c b/data/glr.c index 6824d2bf..0868f025 100644 --- a/data/glr.c +++ b/data/glr.c @@ -136,10 +136,10 @@ b4_copyright([Skeleton parser for GLR parsing with Bison], [2002]) #define yynerrs b4_prefix[]nerrs b4_location_if([#define yylloc b4_prefix[]lloc])]) -/* Copy the first part of user declarations. */ -b4_pre_prologue +b4_token_defines(b4_tokens) -b4_token_defines(b4_tokens)[ +/* Copy the first part of user declarations. */ +b4_pre_prologue[ /* Enabling traces. */ #ifndef YYDEBUG diff --git a/data/lalr1.cc b/data/lalr1.cc index 5f1490a5..2e4d47da 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -104,15 +104,14 @@ b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], /* Using locations. */ #define YYLSP_NEEDED b4_locations_flag +b4_token_defines(b4_tokens) + /* Copy the first part of user declarations. */ b4_pre_prologue /* Line __line__ of __file__. */ #line __oline__ "__ofile__" -/* Tokens. */ -b4_token_defines(b4_tokens) - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG b4_debug diff --git a/data/yacc.c b/data/yacc.c index aa6cdf6a..31ee8436 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -166,11 +166,11 @@ m4_if(b4_prefix[], [yy], [], #define yynerrs b4_prefix[]nerrs b4_location_if([#define yylloc b4_prefix[]lloc])]) +b4_token_defines(b4_tokens) + /* Copy the first part of user declarations. */ b4_pre_prologue -b4_token_defines(b4_tokens) - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG b4_debug -- 2.47.2