mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
skeletons: use symbol(-2, kind)
Not all the symbols have a fixed symbol code. UNDEF's one is fixed: -2. * data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/lalr1.d, * data/skeletons/yacc.c: here.
This commit is contained in:
@@ -430,7 +430,7 @@ b4_locations_if([, ref ]b4_location_type[ yylocationp])[)
|
||||
{
|
||||
/// Lookahead and lookahead in internal form.
|
||||
int yychar = TokenKind.YYEMPTY;
|
||||
SymbolKind yytoken = SymbolKind.]b4_symbol_prefix[YYEMPTY;
|
||||
SymbolKind yytoken = SymbolKind.]b4_symbol(-2, kind)[;
|
||||
|
||||
/* State. */
|
||||
int yyn = 0;
|
||||
@@ -574,7 +574,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
{
|
||||
++yynerrs_;
|
||||
if (yychar == TokenKind.YYEMPTY)
|
||||
yytoken = SymbolKind.]b4_symbol_prefix[YYEMPTY;
|
||||
yytoken = SymbolKind.]b4_symbol(-2, kind)[;
|
||||
yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
will still contain any token that will not be accepted due
|
||||
to an error action in a later state.
|
||||
*/
|
||||
if (tok != SymbolKind.]b4_symbol_prefix[YYEMPTY)
|
||||
if (tok != SymbolKind.]b4_symbol(-2, kind)[)
|
||||
{
|
||||
// FIXME: This method of building the message is not compatible
|
||||
// with internationalization.
|
||||
|
||||
Reference in New Issue
Block a user