mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +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:
@@ -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