You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/12/20 18:26:14 UTC
[groovy] branch GROOVY_3_0_X updated: Revert the changes of the
implementation of `antlr2` factory method
This is an automated email from the ASF dual-hosted git repository.
sunlan 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 1f841d2 Revert the changes of the implementation of `antlr2` factory method
1f841d2 is described below
commit 1f841d2563141e301c759e6982f19d6da5031e61
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Dec 21 02:25:17 2019 +0800
Revert the changes of the implementation of `antlr2` factory method
The changes should be only on master(Groovy 4), but merged into 3_0_X by accident.
---
.../java/org/codehaus/groovy/control/ParserPluginFactory.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java b/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java
index ee09105..01e9a13 100644
--- a/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java
+++ b/src/main/java/org/codehaus/groovy/control/ParserPluginFactory.java
@@ -19,6 +19,7 @@
package org.codehaus.groovy.control;
import org.apache.groovy.parser.antlr4.Antlr4PluginFactory;
+import org.codehaus.groovy.antlr.AntlrParserPluginFactory;
/**
* A factory of parser plugin instances.
@@ -34,13 +35,12 @@ public abstract class ParserPluginFactory {
}
/**
- * Creates the ANTLR 2 parser.
- *
- * @throws UnsupportedOperationException always
+ * creates the ANTLR 2.7 parser
+ * @return the factory for the parser
*/
@Deprecated
public static ParserPluginFactory antlr2() {
- throw new UnsupportedOperationException("The Antlr2-based parser is no longer supported");
+ return new AntlrParserPluginFactory();
}
public abstract ParserPlugin createParserPlugin();