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/10/11 01:35:22 UTC
[groovy] branch master updated (bd2471c -> 28ae0c4)
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git.
from bd2471c Fix for error message of failed resolve
new 796e1ce GROOVY-9275: Bump antlr to 4.7.4
new 28ae0c4 GROOVY-9276: Improve the performance of parsing
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
build.gradle | 2 +-
.../apache/groovy/parser/antlr4/GroovyLangParser.java | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
[groovy] 01/02: GROOVY-9275: Bump antlr to 4.7.4
Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 796e1cecb4554a996b49e80876fc875d670bb4fa
Author: Daniel.Sun <re...@hotmail.com>
AuthorDate: Fri Oct 11 07:41:15 2019 +0800
GROOVY-9275: Bump antlr to 4.7.4
---
build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index a629970..4ea17b4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -159,7 +159,7 @@ ext {
xmlunitVersion = '1.6'
xstreamVersion = '1.4.11.1'
spockVersion = '1.3-groovy-2.5-SNAPSHOT' // supports up to 3.9.99
- antlr4Version = '4.7.3'
+ antlr4Version = '4.7.4'
spotbugsannotationsVersion = '3.1.11'
}
[groovy] 02/02: GROOVY-9276: Improve the performance of parsing
Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 28ae0c4f0ac9764c08bce8064cfb1983723cde98
Author: Daniel.Sun <re...@hotmail.com>
AuthorDate: Fri Oct 11 08:07:04 2019 +0800
GROOVY-9276: Improve the performance of parsing
---
.../apache/groovy/parser/antlr4/GroovyLangParser.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovyLangParser.java b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovyLangParser.java
index 0b87657..8e2c41a 100644
--- a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovyLangParser.java
+++ b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovyLangParser.java
@@ -19,6 +19,8 @@
package org.apache.groovy.parser.antlr4;
+import org.antlr.v4.runtime.FailedPredicateException;
+import org.antlr.v4.runtime.Parser;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.atn.ParserATNSimulator;
import org.apache.groovy.parser.antlr4.internal.atnmanager.ParserAtnManager;
@@ -40,4 +42,21 @@ public class GroovyLangParser extends GroovyParser {
}
}
+ @Override
+ protected FailedPredicateException createFailedPredicateException(String predicate, String message) {
+ return new LightWeightFailedPredicateException(this, predicate, message);
+ }
+
+ private static class LightWeightFailedPredicateException extends FailedPredicateException {
+ public LightWeightFailedPredicateException(Parser recognizer, String predicate, String message) {
+ super(recognizer, predicate, message);
+ }
+
+ @Override
+ public Throwable fillInStackTrace() {
+ // `FailedPredicateException` is used to change the control flow,
+ // so its stack trace can be eliminated for better performance
+ return this;
+ }
+ }
}