java: prefer null to YYSYMBOL_YYEMPTY

That's one nice benefit from using enums.

* data/skeletons/lalr1.java (YYSYMBOL_YYEMPTY): No longer define it.
Use 'null' instead.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
This commit is contained in:
Akim Demaille
2020-04-06 15:13:19 +02:00
parent c0ccb8e5b4
commit 3dcfb4fd88
4 changed files with 9 additions and 6 deletions

View File

@@ -982,7 +982,7 @@ m4_define([AT_YYERROR_DEFINE(java)],
+ )["syntax error");
{
Calc.SymbolKind token = ctx.getToken ();
if (token != Calc.SymbolKind.YYSYMBOL_YYEMPTY)
if (token != null)
System.err.print (" on token @<:@" + ctx.yysymbolName (token) + "@:>@");
}
{