mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
c++: provide yy::parser::symbol_type::name
* data/skeletons/c++.m4 (yy::parser::basic_symbol::name): New. * data/skeletons/lalr1.cc (yy_print_): Use it. * doc/bison.texi: Document. * tests/c++.at: Check.
This commit is contained in:
@@ -12154,6 +12154,8 @@ values, which is always less than @code{YYNTOKENS}.
|
||||
|
||||
@deftypemethod {parser} {const char *} symbol_name (@code{symbol_kind_t} @var{symbol}) @code{const}
|
||||
The name of the symbol whose kind is @var{symbol}, possibly translated.
|
||||
|
||||
Returns a @code{std::string} when @code{parse.error} is @code{verbose}.
|
||||
@end deftypemethod
|
||||
|
||||
A custom syntax error function looks as follows. This implementation is
|
||||
@@ -12286,6 +12288,12 @@ applicable) location.
|
||||
The kind of this symbol.
|
||||
@end deftypemethod
|
||||
|
||||
@deftypemethod {symbol_type} {const char *} name () @code{const}
|
||||
The name of the kind of this symbol.
|
||||
|
||||
Returns a @code{std::string} when @code{parse.error} is @code{verbose}.
|
||||
@end deftypemethod
|
||||
|
||||
@sp 1
|
||||
|
||||
For each token kind, Bison generates named constructors as follows.
|
||||
|
||||
Reference in New Issue
Block a user