mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
@@ -193,7 +193,7 @@ m4_define([b4_declare_symbol_enum],
|
||||
[[enum symbol_kind_type
|
||||
{
|
||||
YYNTOKENS = ]b4_tokens_number[, ///< Number of tokens.
|
||||
]b4_symbol_kind([-2])[ = -2,
|
||||
]b4_symbol(-2, kind_base)[ = -2,
|
||||
]b4_symbol_foreach([ b4_symbol_enum])dnl
|
||||
[ };]])
|
||||
|
||||
@@ -507,7 +507,7 @@ m4_define([b4_public_types_define],
|
||||
bool
|
||||
]b4_parser_class[::basic_symbol<Base>::empty () const YY_NOEXCEPT
|
||||
{
|
||||
return this->kind () == symbol_kind::]b4_symbol_prefix[YYEMPTY;
|
||||
return this->kind () == ]b4_symbol(-2, kind)[;
|
||||
}
|
||||
|
||||
template <typename Base>
|
||||
@@ -523,7 +523,7 @@ m4_define([b4_public_types_define],
|
||||
|
||||
// by_kind.
|
||||
]b4_inline([$1])b4_parser_class[::by_kind::by_kind ()
|
||||
: kind_ (symbol_kind::]b4_symbol_prefix[YYEMPTY)
|
||||
: kind_ (]b4_symbol(-2, kind)[)
|
||||
{}
|
||||
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
@@ -545,7 +545,7 @@ m4_define([b4_public_types_define],
|
||||
]b4_inline([$1])[void
|
||||
]b4_parser_class[::by_kind::clear ()
|
||||
{
|
||||
kind_ = symbol_kind::]b4_symbol_prefix[YYEMPTY;
|
||||
kind_ = ]b4_symbol(-2, kind)[;
|
||||
}
|
||||
|
||||
]b4_inline([$1])[void
|
||||
|
||||
Reference in New Issue
Block a user