+2002-05-03 Akim Demaille <akim@epita.fr>
+
+ * data/bison.simple (m4_if): Don't output empty enums.
+ And actually, output valid enum definitions :(.
+
2002-05-03 Akim Demaille <akim@epita.fr>
* configure.bat: Remove, completely obsolete.
# ---------------------------------------
# Output the definition of this token as an enum.
m4_define([b4_token_enum],
-[enum $1 = $2])
+[$1 = $2])
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -------------------------------------------------------
-# Output the definition of the tokens as #define.
+# Output the definition of the tokens (if there are) as enums and #define.
m4_define([b4_token_defines],
-[#ifndef YYTOKENTYPE
+[m4_if([$@], [[]], [],
+[/* Tokens. */
+#ifndef YYTOKENTYPE
# if defined (__STDC__) || defined (__cplusplus)
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
/* POSIX requires `int' for tokens in interfaces. */
# define YYTOKENTYPE int
# endif
-#endif
-m4_map([b4_token_define], [$@])])
+#endif /* !YYTOKENTYPE */
+m4_map([b4_token_define], [$@])
+])
+])
m4_divert(0)dnl
#endif
-/* Tokens. */
b4_token_defines(b4_tokens)
/* YYFINAL -- State number of the termination state. */