summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--data/skeletons/c.m47
2 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 32671d01..399d560d 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ In Yacc mode, all the tokens are defined twice: once as an enum, and then
+ as a macro. YYEMPTY was missing its macro.
* Noteworthy changes in release 3.7.3 (2020-10-13) [stable]
diff --git a/data/skeletons/c.m4 b/data/skeletons/c.m4
index 2452ed2e..c8689038 100644
--- a/data/skeletons/c.m4
+++ b/data/skeletons/c.m4
@@ -509,10 +509,11 @@ m4_define([b4_token_define],
# ----------------
# Output the definition of the tokens.
m4_define([b4_token_defines],
-[b4_any_token_visible_if([/* Token kinds. */
-m4_join([
+[[/* Token kinds. */
+#define ]b4_symbol([-2], [id])[ -2
+]m4_join([
], b4_symbol_map([b4_token_define]))
-])])
+])
# b4_token_enum(TOKEN-NUM)