diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-04-13 16:12:36 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-04-13 16:54:48 +0200 |
commit | 258c2c967fe085e2ff04030fa8e598942f82f347 (patch) | |
tree | 88cf424f556d98f4c19b775d58b6f1e835d8f18f /examples | |
parent | 9a33570493e8c6fa78880a24b556b7d13c188dec (diff) | |
download | bison-258c2c967fe085e2ff04030fa8e598942f82f347.tar.gz |
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.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/java/calc/Calc.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/java/calc/Calc.y b/examples/java/calc/Calc.y index 948c7f1c..8070e0c1 100644 --- a/examples/java/calc/Calc.y +++ b/examples/java/calc/Calc.y @@ -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(""); } |