mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
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:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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");
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user