diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-02-08 15:36:18 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-02-08 16:17:53 +0100 |
commit | 80a43893774263ad5db12883eb35af2d882898e6 (patch) | |
tree | 65e9773c9bda5ddf06049cb5ce114d07c11de63a /tests | |
parent | ef097719eaf5ca80c18c101f21d57741f8178be9 (diff) | |
download | bison-80a43893774263ad5db12883eb35af2d882898e6.tar.gz |
java: provide Context with a more OO interface
* data/skeletons/lalr1.java (yyexpectedTokens)
(yysyntaxErrorArguments): Make them methods of Context.
(Context.yysymbolName): New.
* tests/local.at: Adjust.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/local.at | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/local.at b/tests/local.at index 097197d5..d35bbf68 100644 --- a/tests/local.at +++ b/tests/local.at @@ -934,14 +934,14 @@ m4_define([AT_YYERROR_DEFINE(java)], public void yyreportSyntaxError (Calc.Context ctx) { int[] arg = new int[ctx.yyntokens]; - int n = Calc.yysyntaxErrorArguments (ctx, arg, ctx.yyntokens); + int n = ctx.yysyntaxErrorArguments (arg, ctx.yyntokens); System.err.print (]AT_LOCATION_IF([[ctx.yylocation + ": "]] - + )["syntax error on token @<:@" + Calc.yysymbolName(arg[0]) + "@:>@"); + + )["syntax error on token @<:@" + ctx.yysymbolName (arg[0]) + "@:>@"); if (1 < n) { System.err.print (" (expected:"); for (int i = 1; i < n; ++i) - System.err.print (" @<:@" + Calc.yysymbolName (arg[i]) + "@:>@"); + System.err.print (" @<:@" + ctx.yysymbolName (arg[i]) + "@:>@"); System.err.print (")"); } System.err.println (""); |