[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] java: rename Lexer.yyreportSyntaxError as reportSyntaxErro
From: |
Akim Demaille |
Subject: |
[PATCH 06/10] java: rename Lexer.yyreportSyntaxError as reportSyntaxError |
Date: |
Tue, 7 Apr 2020 07:13:53 +0200 |
* data/skeletons/lalr1.java: here.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
---
data/skeletons/lalr1.java | 7 +++++--
examples/java/calc/Calc.y | 2 +-
tests/local.at | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/data/skeletons/lalr1.java b/data/skeletons/lalr1.java
index 0a6ed652..328c8bf7 100644
--- a/data/skeletons/lalr1.java
+++ b/data/skeletons/lalr1.java
@@ -221,7 +221,10 @@ import java.text.MessageFormat;
]b4_parse_error_bmatch(
[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)
{]b4_parse_error_bmatch(
[custom], [[
- yylexer.yyreportSyntaxError (yyctx);]],
+ yylexer.reportSyntaxError (yyctx);]],
[detailed\|verbose], [[
if (yyErrorVerbose)
{
diff --git a/examples/java/calc/Calc.y b/examples/java/calc/Calc.y
index b45a8061..790f6f47 100644
--- a/examples/java/calc/Calc.y
+++ b/examples/java/calc/Calc.y
@@ -116,7 +116,7 @@ class CalcLexer implements Calc.Lexer {
return new Position (end);
}
- public void yyreportSyntaxError (Calc.Context ctx)
+ public void reportSyntaxError (Calc.Context ctx)
{
System.err.print (ctx.getLocation () + ": syntax error");
{
diff --git a/tests/local.at b/tests/local.at
index 7a55dedf..cd16419b 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -976,7 +976,7 @@ m4_define([AT_YYERROR_DEFINE(java)],
]])[
]AT_ERROR_CUSTOM_IF([[
- public void yyreportSyntaxError (Calc.Context ctx)
+ public void reportSyntaxError (Calc.Context ctx)
{
System.err.print (]AT_LOCATION_IF([[ctx.getLocation () + ": "]]
+ )["syntax error");
--
2.26.0
- [PATCH 00/10] Make recent feature better looking, Akim Demaille, 2020/04/07
- [PATCH 01/10] c: make the generated YYSTYPE nicer to read, Akim Demaille, 2020/04/07
- [PATCH 02/10] c: make the token kind definition nicer to read, Akim Demaille, 2020/04/07
- [PATCH 03/10] c: make the symbol kind definition nicer to read, Akim Demaille, 2020/04/07
- [PATCH 05/10] java: use getExpectedTokens, not yyexpectedTokens, Akim Demaille, 2020/04/07
- [PATCH 04/10] java: style: fix coding style, Akim Demaille, 2020/04/07
- [PATCH 07/10] java: prefer null to YYSYMBOL_YYEMPTY, Akim Demaille, 2020/04/07
- [PATCH 10/10] todo: update, Akim Demaille, 2020/04/07
- [PATCH 06/10] java: rename Lexer.yyreportSyntaxError as reportSyntaxError,
Akim Demaille <=
- [PATCH 08/10] java: document new features, Akim Demaille, 2020/04/07
- [PATCH 09/10] skeletons: beware not to use yyarg when it's null, Akim Demaille, 2020/04/07