bison-patches
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]