kinds: also define the possibly qualified symbol kinds

* data/skeletons/bison.m4 (b4_symbol_kind): Rename as...
(b4_symbol_kind_base): this.
(b4_symbol_kind): New, for fully qualified kind name.
* data/skeletons/lalr1.cc (b4_symbol_kind): New.
Adjust to use b4_symbol_kind where appropriate.
* src/parse-gram.h, src/parse-gram.c: regen.
This commit is contained in:
Akim Demaille
2020-05-23 13:18:59 +02:00
parent 3ff248ebfe
commit 23f7554188
10 changed files with 113 additions and 80 deletions

View File

@@ -572,7 +572,7 @@ m4_define([b4_symbol_translate],
m4_define([b4_symbol_enum],
[m4_format([ %-40s %s],
m4_format([[%s = %s%s%s]],
b4_symbol([$1], [kind]),
b4_symbol([$1], [kind_base]),
[$1],
m4_if([$1], b4_last_symbol, [], [[,]])),
[b4_symbol_tag_comment([$1])])])
@@ -587,7 +587,7 @@ m4_define([b4_declare_symbol_enum],
[[/* Symbol kind. */
enum yysymbol_kind_t
{
]b4_symbol_kind([-2])[ = -2,
]b4_symbol([-2], kind_base)[ = -2,
]b4_symbol_foreach([b4_symbol_enum])dnl
[};
typedef enum yysymbol_kind_t yysymbol_kind_t;