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:
Akim Demaille
2020-04-15 08:34:48 +02:00
parent c4c25e091c
commit caadfc552b
4 changed files with 12 additions and 12 deletions

View File

@@ -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.