doc: java: SymbolKind, etc.

Why didn't I think about this before???  symbolName should be a method
of SymbolKind.

* data/skeletons/lalr1.java (YYParser::yysymbolName): Move as...
* data/skeletons/java.m4 (SymbolKind::getName): this.
Make the table a static final table, not a local variable.
Adjust dependencies.
* doc/bison.texi (Java Parser Interface): Document i18n.
(Java Parser Context Interface): Document SymbolKind.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
This commit is contained in:
Akim Demaille
2020-04-13 16:12:36 +02:00
parent 9a33570493
commit 258c2c967f
6 changed files with 151 additions and 121 deletions

View File

@@ -121,12 +121,12 @@ class CalcLexer implements Calc.Lexer {
int n = ctx.getExpectedTokens(arg, TOKENMAX);
for (int i = 0; i < n; ++i)
System.err.print((i == 0 ? ": expected " : " or ")
+ ctx.yysymbolName(arg[i]));
+ arg[i].getName());
}
{
Calc.SymbolKind lookahead = ctx.getToken();
if (lookahead != null)
System.err.print(" before " + ctx.yysymbolName(lookahead));
System.err.print(" before " + lookahead.getName());
}
System.err.println("");
}