mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
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:
@@ -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("");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user