mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-10-18 05:33:26 +00:00
java: don't expose the Context's members
* data/skeletons/lalr1.java (Context): Make data members private. (Context.getLocation): New. * examples/java/calc/Calc.y, tests/java.at, tests/local.at: Adjust.
This commit is contained in:
1 parent
8637f2c7d6
commit
126252333d
4 files changed
+19
-12
No files matched your search
@@ -111,7 +111,7 @@ class CalcLexer implements Calc.Lexer {
|
||||
final int ARGMAX = 10;
|
||||
int[] arg = new int[ARGMAX];
|
||||
int n = ctx.yysyntaxErrorArguments (arg, ARGMAX);
|
||||
System.err.print (ctx.yylocation + ": syntax error");
|
||||
System.err.print (ctx.getLocation () + ": syntax error");
|
||||
for (int i = 1; i < n; ++i)
|
||||
System.err.print ((i == 1 ? ": expected " : " or ")
|
||||
+ ctx.yysymbolName (arg[i]));
|
||||
|
||||
Reference in new issue
Block a user