[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Shame on me
From: |
Akim Demaille |
Subject: |
FYI: Shame on me |
Date: |
03 May 2002 18:22:37 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
I can't believe I had not run the test suite :(
Index: ChangeLog
from Akim Demaille <address@hidden>
* data/bison.simple (m4_if): Don't output empty enums.
And actually, output valid enum definitions :(.
Index: data/bison.simple
===================================================================
RCS file: /cvsroot/bison/bison/data/bison.simple,v
retrieving revision 1.20
diff -u -u -r1.20 bison.simple
--- data/bison.simple 3 May 2002 08:42:48 -0000 1.20
+++ data/bison.simple 3 May 2002 16:22:07 -0000
@@ -82,14 +82,16 @@
# ---------------------------------------
# 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(address@hidden, [[]], [],
+[/* Tokens. */
+#ifndef YYTOKENTYPE
# if defined (__STDC__) || defined (__cplusplus)
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
@@ -101,8 +103,10 @@
/* POSIX requires `int' for tokens in interfaces. */
# define YYTOKENTYPE int
# endif
-#endif
-m4_map([b4_token_define], address@hidden)])
+#endif /* !YYTOKENTYPE */
+m4_map([b4_token_define], address@hidden)
+])
+])
m4_divert(0)dnl
@@ -310,7 +314,6 @@
#endif
-/* Tokens. */
b4_token_defines(b4_tokens)
/* YYFINAL -- State number of the termination state. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Shame on me,
Akim Demaille <=