From edbf3225efbcffe9f16f28cbb42c5d95a5de9996 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Wed, 6 Jul 2016 10:18:15 -0700 Subject: [PATCH] Fix LRWithLabelsListener to call EList.String --- .../resources/org/antlr/v4/test/runtime/go/Go.test.stg | 2 +- .../test/org/antlr/v4/test/runtime/go/TestListeners.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime-testsuite/resources/org/antlr/v4/test/runtime/go/Go.test.stg b/runtime-testsuite/resources/org/antlr/v4/test/runtime/go/Go.test.stg index be79a1f4e..e43da0bcd 100644 --- a/runtime-testsuite/resources/org/antlr/v4/test/runtime/go/Go.test.stg +++ b/runtime-testsuite/resources/org/antlr/v4/test/runtime/go/Go.test.stg @@ -409,7 +409,7 @@ func NewLeafListener() *LeafListener { } func (*LeafListener) ExitCall(ctx *CallContext) { - fmt.Printf("%s %s", ctx.E().GetStart().GetText(), ctx.EList()) + fmt.Printf("%s %s", ctx.E().GetStart().GetText(), ctx.EList().String(nil, nil)) } func (*LeafListener) ExitInt(ctx *IntContext) { diff --git a/runtime-testsuite/test/org/antlr/v4/test/runtime/go/TestListeners.java b/runtime-testsuite/test/org/antlr/v4/test/runtime/go/TestListeners.java index 66300878c..7a1281651 100644 --- a/runtime-testsuite/test/org/antlr/v4/test/runtime/go/TestListeners.java +++ b/runtime-testsuite/test/org/antlr/v4/test/runtime/go/TestListeners.java @@ -120,7 +120,7 @@ public class TestListeners extends BaseTest { @Test public void testLRWithLabels() throws Exception { mkdir(parserpkgdir); - StringBuilder grammarBuilder = new StringBuilder(709); + StringBuilder grammarBuilder = new StringBuilder(726); grammarBuilder.append("grammar T;\n"); grammarBuilder.append("@parser::header {\n"); grammarBuilder.append("}\n"); @@ -135,7 +135,7 @@ public class TestListeners extends BaseTest { grammarBuilder.append("}\n"); grammarBuilder.append("\n"); grammarBuilder.append("func (*LeafListener) ExitCall(ctx *CallContext) {\n"); - grammarBuilder.append(" fmt.Printf(\"%s %s\", ctx.E().GetStart().GetText(), ctx.EList())\n"); + grammarBuilder.append(" fmt.Printf(\"%s %s\", ctx.E().GetStart().GetText(), ctx.EList().String(nil, nil))\n"); grammarBuilder.append("}\n"); grammarBuilder.append("\n"); grammarBuilder.append("func (*LeafListener) ExitInt(ctx *IntContext) {\n");