You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/09/28 22:26:20 UTC

[groovy] branch GROOVY_3_0_X updated: prepare for removal of antlr2 parser

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 04a2f88  prepare for removal of antlr2 parser
04a2f88 is described below

commit 04a2f88a1f0472c594a2b8791040478c4cade523
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun Sep 29 08:26:09 2019 +1000

    prepare for removal of antlr2 parser
---
 src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java | 1 +
 src/test/groovy/MultiCatchTest.groovy                              | 1 +
 src/test/groovy/bugs/Groovy9141.groovy                             | 1 +
 src/test/groovy/bugs/Groovy9184.groovy                             | 1 +
 src/test/groovy/bugs/Groovy9213.groovy                             | 1 +
 5 files changed, 5 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java b/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java
index 0b6f143..f2bb160 100644
--- a/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java
+++ b/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java
@@ -38,6 +38,7 @@ public abstract class ParserPluginFactory {
      * creates the ANTLR 2.7 parser
      * @return the factory for the parser
      */
+    @Deprecated
     public static ParserPluginFactory antlr2() {
         return new AntlrParserPluginFactory();
     }
diff --git a/src/test/groovy/MultiCatchTest.groovy b/src/test/groovy/MultiCatchTest.groovy
index 7c17550..0231fb3 100644
--- a/src/test/groovy/MultiCatchTest.groovy
+++ b/src/test/groovy/MultiCatchTest.groovy
@@ -122,6 +122,7 @@ class MultiCatchTest extends GroovyTestCase {
     }
 
     // GROOVY-8238
+    @Deprecated
     void testMultipleCatchGroovyAndJavaExceptions() {
         def cc = new CompilerConfiguration(pluginFactory: ParserPluginFactory.antlr2())
         new GroovyShell(cc).evaluate '''
diff --git a/src/test/groovy/bugs/Groovy9141.groovy b/src/test/groovy/bugs/Groovy9141.groovy
index ab323bf..2a9b6f1 100644
--- a/src/test/groovy/bugs/Groovy9141.groovy
+++ b/src/test/groovy/bugs/Groovy9141.groovy
@@ -48,6 +48,7 @@ final class Groovy9141 {
     }
 
     @Test
+    @Deprecated
     void testAbstractMethodWithBodyInScript_oldParser() {
         def shell = new GroovyShell(new CompilerConfiguration(pluginFactory: antlr2()))
 
diff --git a/src/test/groovy/bugs/Groovy9184.groovy b/src/test/groovy/bugs/Groovy9184.groovy
index 70cfc6f..1f289e9 100644
--- a/src/test/groovy/bugs/Groovy9184.groovy
+++ b/src/test/groovy/bugs/Groovy9184.groovy
@@ -25,6 +25,7 @@ import org.junit.Test
 import static org.codehaus.groovy.control.ParserPluginFactory.antlr2
 
 @CompileStatic
+@Deprecated
 final class Groovy9184 {
 
     @Test(timeout=1500L)
diff --git a/src/test/groovy/bugs/Groovy9213.groovy b/src/test/groovy/bugs/Groovy9213.groovy
index 2e8980c..8431a04 100644
--- a/src/test/groovy/bugs/Groovy9213.groovy
+++ b/src/test/groovy/bugs/Groovy9213.groovy
@@ -30,6 +30,7 @@ import static org.codehaus.groovy.control.ParserPluginFactory.antlr4
 final class Groovy9213 {
 
     @Test(timeout=15000L)
+    @Deprecated
     void testUnmatchedParenInLongScript2() {
         def config = new CompilerConfiguration()
         config.pluginFactory = antlr2()