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

@@ -129,7 +129,7 @@ class CalcLexer implements Calc.Lexer {
}
{
Calc.SymbolKind lookahead = ctx.getToken ();
if (lookahead != Calc.SymbolKind.YYSYMBOL_YYEMPTY)
if (lookahead != null)
System.err.print (" before " + ctx.yysymbolName (lookahead));
}
System.err.println ("");