Index: ChangeLog
from  Akim  <akim@epita.fr>

	* data/c.m4 (b4_token_enums): New.
	(b4_token_defines): Rename as...
	(b4_token_enums_defines): this.
	(b4_token_defines): New, output only the #defines.
	* data/yacc.c, data/glr.c: Adjust.
	* data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
	* data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
	as default values.

Index: data/c.m4
===================================================================
RCS file: /cvsroot/bison/bison/data/c.m4,v
retrieving revision 1.31
diff -u -r1.31 c.m4
--- data/c.m4 9 Sep 2005 23:12:09 -0000 1.31
+++ data/c.m4 16 Sep 2005 19:03:23 -0000
@@ -169,6 +169,16 @@
 ])
 
 
+# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -------------------------------------------------------
+# Output the definition of the tokens (if there are) as #defines.
+m4_define([b4_token_defines],
+[m4_if([$@], [[]], [],
+[/* Tokens.  */
+m4_map([b4_token_define], [$@])])
+])
+
+
 # b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
 # ---------------------------------------
 # Output the definition of this token as an enum.
@@ -176,10 +186,10 @@
 [$1 = $2])
 
 
-# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
-# -------------------------------------------------------
-# Output the definition of the tokens (if there are) as enums and #define.
-m4_define([b4_token_defines],
+# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -----------------------------------------------------
+# Output the definition of the tokens (if there are) as enums.
+m4_define([b4_token_enums],
 [m4_if([$@], [[]], [],
 [/* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -192,8 +202,14 @@
            [$@])
    };
 #endif
-m4_map([b4_token_define], [$@])
-])
+])])
+
+
+# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -------------------------------------------------------------
+# Output the definition of the tokens (if there are) as enums and #defines.
+m4_define([b4_token_enums_defines],
+[b4_token_enums($@)b4_token_defines($@)
 ])
 
 
@@ -348,7 +364,7 @@
 # Generate the "yydestruct" function, which declaration is issued using
 # FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
 # or "b4_c_function_def" for K&R.
-m4_define([b4_yydestruct_generate],
+m4_define_default([b4_yydestruct_generate],
 [[/*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
 `-----------------------------------------------*/
@@ -383,7 +399,7 @@
 # Generate the "yysymprint" function, which declaration is issued using
 # FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
 # or "b4_c_function_def" for K&R.
-m4_define([b4_yysymprint_generate],
+m4_define_default([b4_yysymprint_generate],
 [[/*--------------------------------.
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
Index: data/glr.c
===================================================================
RCS file: /cvsroot/bison/bison/data/glr.c,v
retrieving revision 1.122
diff -u -r1.122 glr.c
--- data/glr.c 15 Sep 2005 18:02:03 -0000 1.122
+++ data/glr.c 16 Sep 2005 19:03:24 -0000
@@ -154,7 +154,7 @@
 #define yynerrs b4_prefix[]nerrs
 #define yylloc b4_prefix[]lloc])
 
-b4_token_defines(b4_tokens)
+b4_token_enums_defines(b4_tokens)
 
 /* Copy the first part of user declarations.  */
 b4_pre_prologue[
@@ -2321,7 +2321,7 @@
 b4_copyright([Skeleton parser for GLR parsing with Bison],
   [2002, 2003, 2004, 2005])
 
-b4_token_defines(b4_tokens)
+b4_token_enums_defines(b4_tokens)
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
 m4_ifdef([b4_stype],
Index: data/lalr1.cc
===================================================================
RCS file: /cvsroot/bison/bison/data/lalr1.cc,v
retrieving revision 1.96
diff -u -r1.96 lalr1.cc
--- data/lalr1.cc 16 Sep 2005 12:12:36 -0000 1.96
+++ data/lalr1.cc 16 Sep 2005 19:03:24 -0000
@@ -133,7 +133,7 @@
   class location;
 }
 
-]b4_token_defines(b4_tokens)[
+]b4_token_enums(b4_tokens)[
 
 /* Copy the first part of user declarations.  */
 ]b4_pre_prologue[
Index: data/yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.103
diff -u -r1.103 yacc.c
--- data/yacc.c 9 Sep 2005 22:42:15 -0000 1.103
+++ data/yacc.c 16 Sep 2005 19:03:25 -0000
@@ -164,7 +164,7 @@
 #define yynerrs b4_prefix[]nerrs
 b4_location_if([#define yylloc b4_prefix[]lloc])])[
 
-]b4_token_defines(b4_tokens)[
+]b4_token_enums_defines(b4_tokens)[
 
 /* Copy the first part of user declarations.  */
 ]b4_pre_prologue[
@@ -1410,7 +1410,7 @@
    This special exception was added by the Free Software Foundation
    in version 1.24 of Bison.  */
 
-b4_token_defines(b4_tokens)
+b4_token_enums_defines(b4_tokens)
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
 m4_ifdef([b4_stype],
