java: rename Lexer.yyreportSyntaxError as reportSyntaxError

* data/skeletons/lalr1.java: here.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
This commit is contained in:
Akim Demaille
2020-04-06 18:58:59 +02:00
parent 79f967ac0d
commit c0ccb8e5b4
3 changed files with 7 additions and 4 deletions

View File

@@ -221,7 +221,10 @@ import java.text.MessageFormat;
]b4_parse_error_bmatch( ]b4_parse_error_bmatch(
[custom], [[ [custom], [[
void yyreportSyntaxError (][Context yyctx); /**
* Build and emit a syntax error message.
*/
void reportSyntaxError (][Context yyctx);
]])[ ]])[
} }
@@ -984,7 +987,7 @@ b4_dollar_popdef[]dnl
private void yyreportSyntaxError (Context yyctx) private void yyreportSyntaxError (Context yyctx)
{]b4_parse_error_bmatch( {]b4_parse_error_bmatch(
[custom], [[ [custom], [[
yylexer.yyreportSyntaxError (yyctx);]], yylexer.reportSyntaxError (yyctx);]],
[detailed\|verbose], [[ [detailed\|verbose], [[
if (yyErrorVerbose) if (yyErrorVerbose)
{ {

View File

@@ -116,7 +116,7 @@ class CalcLexer implements Calc.Lexer {
return new Position (end); return new Position (end);
} }
public void yyreportSyntaxError (Calc.Context ctx) public void reportSyntaxError (Calc.Context ctx)
{ {
System.err.print (ctx.getLocation () + ": syntax error"); System.err.print (ctx.getLocation () + ": syntax error");
{ {

View File

@@ -976,7 +976,7 @@ m4_define([AT_YYERROR_DEFINE(java)],
]])[ ]])[
]AT_ERROR_CUSTOM_IF([[ ]AT_ERROR_CUSTOM_IF([[
public void yyreportSyntaxError (Calc.Context ctx) public void reportSyntaxError (Calc.Context ctx)
{ {
System.err.print (]AT_LOCATION_IF([[ctx.getLocation () + ": "]] System.err.print (]AT_LOCATION_IF([[ctx.getLocation () + ": "]]
+ )["syntax error"); + )["syntax error");