diff --git a/build.gradle b/build.gradle index 78bbb8ba9a4..6d63c64b6b0 100644 --- a/build.gradle +++ b/build.gradle @@ -154,6 +154,7 @@ apply from: file('gradle/generation/nori.gradle') apply from: file('gradle/generation/icu.gradle') apply from: file('gradle/generation/javacc.gradle') apply from: file('gradle/generation/forUtil.gradle') +apply from: file('gradle/generation/antlr.gradle') apply from: file('gradle/datasets/external-datasets.gradle') diff --git a/gradle/generation/antlr.gradle b/gradle/generation/antlr.gradle new file mode 100644 index 00000000000..33992384fa1 --- /dev/null +++ b/gradle/generation/antlr.gradle @@ -0,0 +1,88 @@ +import java.nio.file.Files + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +configure(project(":lucene:expressions")) { + configurations { + antlr + } + + dependencies { + antlr "org.antlr:antlr4" + } + + task generateAntlrInternal() { + description "Regenerate Javascript.g4" + group "generation" + + dependsOn configurations.antlr + + def generatedPatterns = [ + "**/JavascriptBaseVisitor.java", + "**/JavascriptLexer.java", + "**/JavascriptParser.java", + "**/JavascriptVisitor.java", + ] + + def sourceDir = "src/java/org/apache/lucene/expressions/js" + def inputFiles = file("$sourceDir/Javascript.g4") + def tempOutput = file("$buildDir/antlr") + def outputFiles = fileTree(dir: sourceDir, includes: generatedPatterns) + + inputs.files inputFiles + outputs.files outputFiles + + doFirst { + project.delete tempOutput + + project.javaexec { + main = "org.antlr.v4.Tool" + classpath = configurations.antlr + + ignoreExitValue false + args = [ + "-no-listener", + "-visitor", + "-package", "org.apache.lucene.expressions.js", + "-o", tempOutput, + inputFiles + ] + } + + def generatedFiles = fileTree(dir: tempOutput, includes: generatedPatterns) + generatedFiles.each { file -> + modifyFile(file, { text -> + text = text.replaceAll("public ((interface|class) Javascript\\w+)", "\$1") + text = text.replaceAll("// Generated from .*", "// ANTLR GENERATED CODE: DO NOT EDIT") + return text + }) + } + + project.copy { + from tempOutput + into sourceDir + include generatedPatterns + } + } + } + + def generateAntlr = wrapWithPersistentChecksums( + generateAntlrInternal, [ andThenTasks: ["spotlessJava", "spotlessJavaApply"] ]) + + regenerate.dependsOn generateAntlr +} diff --git a/gradle/generation/javacc.gradle b/gradle/generation/javacc.gradle index b639d01a37c..9496faaea63 100644 --- a/gradle/generation/javacc.gradle +++ b/gradle/generation/javacc.gradle @@ -37,20 +37,6 @@ configure(rootProject) { } } -/** - * Utility function to read a file, apply changes to its content and write it back. - */ -def modifyFile = { File path, Function modify -> - Function normalizeEols = { text -> text.replace("\r\n", "\n") } - modify = normalizeEols.andThen(modify).andThen(normalizeEols) - - String original = path.getText("UTF-8") - String modified = modify.apply(original) - if (!original.equals(modified)) { - path.write(modified, "UTF-8") - } -} - def commonCleanups = { FileTree generatedFiles -> // This is a minor typo in a comment that nonetheless people have hand-corrected in the past. generatedFiles.matching({ include "CharStream.java" }).each {file -> diff --git a/gradle/generation/regenerate.gradle b/gradle/generation/regenerate.gradle index 6ce918308aa..3ecad8c3d9c 100644 --- a/gradle/generation/regenerate.gradle +++ b/gradle/generation/regenerate.gradle @@ -2,6 +2,8 @@ import groovy.json.JsonOutput import groovy.json.JsonSlurper import org.apache.commons.codec.digest.DigestUtils +import java.util.function.Function + /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -62,6 +64,24 @@ def computeChecksummedEntries = { Task sourceTask -> return allEntries } +configure(rootProject) { + ext { + /** + * Utility function to read a file, apply changes to its content and write it back. + */ + modifyFile = { File path, Function modify -> + Function normalizeEols = { text -> text.replace("\r\n", "\n") } + modify = normalizeEols.andThen(modify).andThen(normalizeEols) + + String original = path.getText("UTF-8") + String modified = modify.apply(original) + if (!original.equals(modified)) { + path.write(modified, "UTF-8") + } + } + } +} + configure([ project(":lucene:analysis:common"), project(":lucene:analysis:icu"), @@ -70,6 +90,7 @@ configure([ project(":lucene:backward-codecs"), project(":lucene:core"), project(":lucene:queryparser"), + project(":lucene:expressions"), ]) { task regenerate() { description "Rerun any code or static data generation tasks." diff --git a/gradle/validation/spotless.gradle b/gradle/validation/spotless.gradle index d9198b30240..be2a6d95787 100644 --- a/gradle/validation/spotless.gradle +++ b/gradle/validation/spotless.gradle @@ -59,9 +59,6 @@ configure(project(":lucene").subprojects) { prj -> break case ":lucene:expressions": - targetExclude "**/JavascriptLexer.java", - "**/JavascriptParser.java", - "**/JavascriptVisitor.java" break case ":lucene:queryparser": diff --git a/lucene/expressions/src/generated/checksums/generateAntlr.json b/lucene/expressions/src/generated/checksums/generateAntlr.json new file mode 100644 index 00000000000..f4ba5046920 --- /dev/null +++ b/lucene/expressions/src/generated/checksums/generateAntlr.json @@ -0,0 +1,7 @@ +{ + "lucene/expressions/src/java/org/apache/lucene/expressions/js/Javascript.g4": "818e89aae0b6c7601051802013898c128fe7c1ba", + "lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptBaseVisitor.java": "45e3c7093f3e485a07be507efbdefc5e3d112576", + "lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptLexer.java": "f0a53549fb8329dd4181f836d1778417de08550e", + "lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptParser.java": "ca9d587e6e98436647370ee5b7c82ae07243ee50", + "lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptVisitor.java": "ebf033dc72e63203e5d4d85fd57114dd973482dc" +} \ No newline at end of file diff --git a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptLexer.java b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptLexer.java index 36e8a9fdd64..8a6af407f5b 100644 --- a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptLexer.java +++ b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptLexer.java @@ -1,54 +1,135 @@ // ANTLR GENERATED CODE: DO NOT EDIT package org.apache.lucene.expressions.js; + +import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Lexer; -import org.antlr.v4.runtime.RuntimeMetaData; -import org.antlr.v4.runtime.Vocabulary; -import org.antlr.v4.runtime.VocabularyImpl; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) class JavascriptLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.5.1", RuntimeMetaData.VERSION); } + static { + RuntimeMetaData.checkVersion("4.5.1", RuntimeMetaData.VERSION); + } protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - LP=1, RP=2, COMMA=3, BOOLNOT=4, BWNOT=5, MUL=6, DIV=7, REM=8, ADD=9, SUB=10, - LSH=11, RSH=12, USH=13, LT=14, LTE=15, GT=16, GTE=17, EQ=18, NE=19, BWAND=20, - BWXOR=21, BWOR=22, BOOLAND=23, BOOLOR=24, COND=25, COLON=26, WS=27, VARIABLE=28, - OCTAL=29, HEX=30, DECIMAL=31; - public static String[] modeNames = { - "DEFAULT_MODE" - }; + protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); + public static final int LP = 1, + RP = 2, + COMMA = 3, + BOOLNOT = 4, + BWNOT = 5, + MUL = 6, + DIV = 7, + REM = 8, + ADD = 9, + SUB = 10, + LSH = 11, + RSH = 12, + USH = 13, + LT = 14, + LTE = 15, + GT = 16, + GTE = 17, + EQ = 18, + NE = 19, + BWAND = 20, + BWXOR = 21, + BWOR = 22, + BOOLAND = 23, + BOOLOR = 24, + COND = 25, + COLON = 26, + WS = 27, + VARIABLE = 28, + OCTAL = 29, + HEX = 30, + DECIMAL = 31; + public static String[] modeNames = {"DEFAULT_MODE"}; public static final String[] ruleNames = { - "LP", "RP", "COMMA", "BOOLNOT", "BWNOT", "MUL", "DIV", "REM", "ADD", "SUB", - "LSH", "RSH", "USH", "LT", "LTE", "GT", "GTE", "EQ", "NE", "BWAND", "BWXOR", - "BWOR", "BOOLAND", "BOOLOR", "COND", "COLON", "WS", "VARIABLE", "ARRAY", - "ID", "STRING", "OCTAL", "HEX", "DECIMAL", "INTEGER" + "LP", + "RP", + "COMMA", + "BOOLNOT", + "BWNOT", + "MUL", + "DIV", + "REM", + "ADD", + "SUB", + "LSH", + "RSH", + "USH", + "LT", + "LTE", + "GT", + "GTE", + "EQ", + "NE", + "BWAND", + "BWXOR", + "BWOR", + "BOOLAND", + "BOOLOR", + "COND", + "COLON", + "WS", + "VARIABLE", + "ARRAY", + "ID", + "STRING", + "OCTAL", + "HEX", + "DECIMAL", + "INTEGER" }; private static final String[] _LITERAL_NAMES = { - null, null, null, null, null, null, null, null, null, null, null, "'<<'", - "'>>'", "'>>>'", null, "'<='", null, "'>='", "'=='", "'!='", null, null, - null, "'&&'", "'||'" + null, null, null, null, null, null, null, null, null, null, null, "'<<'", "'>>'", "'>>>'", null, + "'<='", null, "'>='", "'=='", "'!='", null, null, null, "'&&'", "'||'" }; private static final String[] _SYMBOLIC_NAMES = { - null, "LP", "RP", "COMMA", "BOOLNOT", "BWNOT", "MUL", "DIV", "REM", "ADD", - "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT", "GTE", "EQ", "NE", "BWAND", - "BWXOR", "BWOR", "BOOLAND", "BOOLOR", "COND", "COLON", "WS", "VARIABLE", - "OCTAL", "HEX", "DECIMAL" + null, + "LP", + "RP", + "COMMA", + "BOOLNOT", + "BWNOT", + "MUL", + "DIV", + "REM", + "ADD", + "SUB", + "LSH", + "RSH", + "USH", + "LT", + "LTE", + "GT", + "GTE", + "EQ", + "NE", + "BWAND", + "BWXOR", + "BWOR", + "BOOLAND", + "BOOLOR", + "COND", + "COLON", + "WS", + "VARIABLE", + "OCTAL", + "HEX", + "DECIMAL" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - /** - * @deprecated Use {@link #VOCABULARY} instead. - */ - @Deprecated - public static final String[] tokenNames; + /** @deprecated Use {@link #VOCABULARY} instead. */ + @Deprecated public static final String[] tokenNames; + static { tokenNames = new String[_SYMBOLIC_NAMES.length]; for (int i = 0; i < tokenNames.length; i++) { @@ -70,125 +151,133 @@ class JavascriptLexer extends Lexer { } @Override - public Vocabulary getVocabulary() { return VOCABULARY; } - public JavascriptLexer(CharStream input) { super(input); - _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); } @Override - public String getGrammarFileName() { return "Javascript.g4"; } + public String getGrammarFileName() { + return "Javascript.g4"; + } @Override - public String[] getRuleNames() { return ruleNames; } + public String[] getRuleNames() { + return ruleNames; + } @Override - public String getSerializedATN() { return _serializedATN; } + public String getSerializedATN() { + return _serializedATN; + } @Override - public String[] getModeNames() { return modeNames; } + public String[] getModeNames() { + return modeNames; + } @Override - public ATN getATN() { return _ATN; } + public ATN getATN() { + return _ATN; + } public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2!\u00fe\b\1\4\2\t"+ - "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ - "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ - "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ - "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ - "\t!\4\"\t\"\4#\t#\4$\t$\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3"+ - "\7\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16"+ - "\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\22\3\22\3\22\3\23\3\23"+ - "\3\23\3\24\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\30\3\31"+ - "\3\31\3\31\3\32\3\32\3\33\3\33\3\34\6\34\u0089\n\34\r\34\16\34\u008a\3"+ - "\34\3\34\3\35\3\35\7\35\u0091\n\35\f\35\16\35\u0094\13\35\3\35\3\35\3"+ - "\35\7\35\u0099\n\35\f\35\16\35\u009c\13\35\7\35\u009e\n\35\f\35\16\35"+ - "\u00a1\13\35\3\36\3\36\3\36\5\36\u00a6\n\36\3\36\3\36\3\37\3\37\7\37\u00ac"+ - "\n\37\f\37\16\37\u00af\13\37\3 \3 \3 \3 \3 \3 \7 \u00b7\n \f \16 \u00ba"+ - "\13 \3 \3 \3 \3 \3 \3 \3 \7 \u00c3\n \f \16 \u00c6\13 \3 \5 \u00c9\n "+ - "\3!\3!\6!\u00cd\n!\r!\16!\u00ce\3\"\3\"\3\"\6\"\u00d4\n\"\r\"\16\"\u00d5"+ - "\3#\3#\3#\7#\u00db\n#\f#\16#\u00de\13#\5#\u00e0\n#\3#\3#\6#\u00e4\n#\r"+ - "#\16#\u00e5\5#\u00e8\n#\3#\3#\5#\u00ec\n#\3#\6#\u00ef\n#\r#\16#\u00f0"+ - "\5#\u00f3\n#\3$\3$\3$\7$\u00f8\n$\f$\16$\u00fb\13$\5$\u00fd\n$\4\u00b8"+ - "\u00c4\2%\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33"+ - "\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67"+ - "\359\36;\2=\2?\2A\37C E!G\2\3\2%\3\2**\3\2++\3\2..\3\2##\3\2\u0080\u0080"+ - "\3\2,,\3\2\61\61\3\2\'\'\3\2--\3\2//\3\2>>\3\2@@\3\2((\3\2``\3\2~~\3\2"+ - "AA\3\2<<\5\2\13\f\17\17\"\"\3\2\60\60\3\2]]\3\2^_\6\2&&C\\aac|\7\2&&\62"+ - ";C\\aac|\3\2))\4\2))^^\3\2$$\4\2$$^^\3\2\62\62\3\2\629\4\2ZZzz\5\2\62"+ - ";CHch\3\2\62;\4\2GGgg\4\2--//\3\2\63;\u0111\2\3\3\2\2\2\2\5\3\2\2\2\2"+ - "\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2"+ - "\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2"+ - "\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2"+ - "\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2"+ - "\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2"+ - "\2\3I\3\2\2\2\5K\3\2\2\2\7M\3\2\2\2\tO\3\2\2\2\13Q\3\2\2\2\rS\3\2\2\2"+ - "\17U\3\2\2\2\21W\3\2\2\2\23Y\3\2\2\2\25[\3\2\2\2\27]\3\2\2\2\31`\3\2\2"+ - "\2\33c\3\2\2\2\35g\3\2\2\2\37i\3\2\2\2!l\3\2\2\2#n\3\2\2\2%q\3\2\2\2\'"+ - "t\3\2\2\2)w\3\2\2\2+y\3\2\2\2-{\3\2\2\2/}\3\2\2\2\61\u0080\3\2\2\2\63"+ - "\u0083\3\2\2\2\65\u0085\3\2\2\2\67\u0088\3\2\2\29\u008e\3\2\2\2;\u00a2"+ - "\3\2\2\2=\u00a9\3\2\2\2?\u00c8\3\2\2\2A\u00ca\3\2\2\2C\u00d0\3\2\2\2E"+ - "\u00e7\3\2\2\2G\u00fc\3\2\2\2IJ\t\2\2\2J\4\3\2\2\2KL\t\3\2\2L\6\3\2\2"+ - "\2MN\t\4\2\2N\b\3\2\2\2OP\t\5\2\2P\n\3\2\2\2QR\t\6\2\2R\f\3\2\2\2ST\t"+ - "\7\2\2T\16\3\2\2\2UV\t\b\2\2V\20\3\2\2\2WX\t\t\2\2X\22\3\2\2\2YZ\t\n\2"+ - "\2Z\24\3\2\2\2[\\\t\13\2\2\\\26\3\2\2\2]^\7>\2\2^_\7>\2\2_\30\3\2\2\2"+ - "`a\7@\2\2ab\7@\2\2b\32\3\2\2\2cd\7@\2\2de\7@\2\2ef\7@\2\2f\34\3\2\2\2"+ - "gh\t\f\2\2h\36\3\2\2\2ij\7>\2\2jk\7?\2\2k \3\2\2\2lm\t\r\2\2m\"\3\2\2"+ - "\2no\7@\2\2op\7?\2\2p$\3\2\2\2qr\7?\2\2rs\7?\2\2s&\3\2\2\2tu\7#\2\2uv"+ - "\7?\2\2v(\3\2\2\2wx\t\16\2\2x*\3\2\2\2yz\t\17\2\2z,\3\2\2\2{|\t\20\2\2"+ - "|.\3\2\2\2}~\7(\2\2~\177\7(\2\2\177\60\3\2\2\2\u0080\u0081\7~\2\2\u0081"+ - "\u0082\7~\2\2\u0082\62\3\2\2\2\u0083\u0084\t\21\2\2\u0084\64\3\2\2\2\u0085"+ - "\u0086\t\22\2\2\u0086\66\3\2\2\2\u0087\u0089\t\23\2\2\u0088\u0087\3\2"+ - "\2\2\u0089\u008a\3\2\2\2\u008a\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b"+ - "\u008c\3\2\2\2\u008c\u008d\b\34\2\2\u008d8\3\2\2\2\u008e\u0092\5=\37\2"+ - "\u008f\u0091\5;\36\2\u0090\u008f\3\2\2\2\u0091\u0094\3\2\2\2\u0092\u0090"+ - "\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u009f\3\2\2\2\u0094\u0092\3\2\2\2\u0095"+ - "\u0096\t\24\2\2\u0096\u009a\5=\37\2\u0097\u0099\5;\36\2\u0098\u0097\3"+ - "\2\2\2\u0099\u009c\3\2\2\2\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b"+ - "\u009e\3\2\2\2\u009c\u009a\3\2\2\2\u009d\u0095\3\2\2\2\u009e\u00a1\3\2"+ - "\2\2\u009f\u009d\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0:\3\2\2\2\u00a1\u009f"+ - "\3\2\2\2\u00a2\u00a5\t\25\2\2\u00a3\u00a6\5? \2\u00a4\u00a6\5G$\2\u00a5"+ - "\u00a3\3\2\2\2\u00a5\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a8\t\26"+ - "\2\2\u00a8<\3\2\2\2\u00a9\u00ad\t\27\2\2\u00aa\u00ac\t\30\2\2\u00ab\u00aa"+ - "\3\2\2\2\u00ac\u00af\3\2\2\2\u00ad\u00ab\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae"+ - ">\3\2\2\2\u00af\u00ad\3\2\2\2\u00b0\u00b8\t\31\2\2\u00b1\u00b2\7^\2\2"+ - "\u00b2\u00b7\7)\2\2\u00b3\u00b4\7^\2\2\u00b4\u00b7\7^\2\2\u00b5\u00b7"+ - "\n\32\2\2\u00b6\u00b1\3\2\2\2\u00b6\u00b3\3\2\2\2\u00b6\u00b5\3\2\2\2"+ - "\u00b7\u00ba\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b9\u00bb"+ - "\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u00c9\t\31\2\2\u00bc\u00c4\t\33\2\2"+ - "\u00bd\u00be\7^\2\2\u00be\u00c3\7$\2\2\u00bf\u00c0\7^\2\2\u00c0\u00c3"+ - "\7^\2\2\u00c1\u00c3\n\34\2\2\u00c2\u00bd\3\2\2\2\u00c2\u00bf\3\2\2\2\u00c2"+ - "\u00c1\3\2\2\2\u00c3\u00c6\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c4\u00c2\3\2"+ - "\2\2\u00c5\u00c7\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00c9\t\33\2\2\u00c8"+ - "\u00b0\3\2\2\2\u00c8\u00bc\3\2\2\2\u00c9@\3\2\2\2\u00ca\u00cc\t\35\2\2"+ - "\u00cb\u00cd\t\36\2\2\u00cc\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u00cc"+ - "\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cfB\3\2\2\2\u00d0\u00d1\t\35\2\2\u00d1"+ - "\u00d3\t\37\2\2\u00d2\u00d4\t \2\2\u00d3\u00d2\3\2\2\2\u00d4\u00d5\3\2"+ - "\2\2\u00d5\u00d3\3\2\2\2\u00d5\u00d6\3\2\2\2\u00d6D\3\2\2\2\u00d7\u00df"+ - "\5G$\2\u00d8\u00dc\t\24\2\2\u00d9\u00db\t!\2\2\u00da\u00d9\3\2\2\2\u00db"+ - "\u00de\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00e0\3\2"+ - "\2\2\u00de\u00dc\3\2\2\2\u00df\u00d8\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0"+ - "\u00e8\3\2\2\2\u00e1\u00e3\t\24\2\2\u00e2\u00e4\t!\2\2\u00e3\u00e2\3\2"+ - "\2\2\u00e4\u00e5\3\2\2\2\u00e5\u00e3\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6"+ - "\u00e8\3\2\2\2\u00e7\u00d7\3\2\2\2\u00e7\u00e1\3\2\2\2\u00e8\u00f2\3\2"+ - "\2\2\u00e9\u00eb\t\"\2\2\u00ea\u00ec\t#\2\2\u00eb\u00ea\3\2\2\2\u00eb"+ - "\u00ec\3\2\2\2\u00ec\u00ee\3\2\2\2\u00ed\u00ef\t!\2\2\u00ee\u00ed\3\2"+ - "\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00ee\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1"+ - "\u00f3\3\2\2\2\u00f2\u00e9\3\2\2\2\u00f2\u00f3\3\2\2\2\u00f3F\3\2\2\2"+ - "\u00f4\u00fd\t\35\2\2\u00f5\u00f9\t$\2\2\u00f6\u00f8\t!\2\2\u00f7\u00f6"+ - "\3\2\2\2\u00f8\u00fb\3\2\2\2\u00f9\u00f7\3\2\2\2\u00f9\u00fa\3\2\2\2\u00fa"+ - "\u00fd\3\2\2\2\u00fb\u00f9\3\2\2\2\u00fc\u00f4\3\2\2\2\u00fc\u00f5\3\2"+ - "\2\2\u00fdH\3\2\2\2\31\2\u008a\u0092\u009a\u009f\u00a5\u00ad\u00b6\u00b8"+ - "\u00c2\u00c4\u00c8\u00ce\u00d5\u00dc\u00df\u00e5\u00e7\u00eb\u00f0\u00f2"+ - "\u00f9\u00fc\3\b\2\2"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2!\u00fe\b\1\4\2\t" + + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13" + + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22" + + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31" + + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!" + + "\t!\4\"\t\"\4#\t#\4$\t$\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3" + + "\7\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16" + + "\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\22\3\22\3\22\3\23\3\23" + + "\3\23\3\24\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\30\3\31" + + "\3\31\3\31\3\32\3\32\3\33\3\33\3\34\6\34\u0089\n\34\r\34\16\34\u008a\3" + + "\34\3\34\3\35\3\35\7\35\u0091\n\35\f\35\16\35\u0094\13\35\3\35\3\35\3" + + "\35\7\35\u0099\n\35\f\35\16\35\u009c\13\35\7\35\u009e\n\35\f\35\16\35" + + "\u00a1\13\35\3\36\3\36\3\36\5\36\u00a6\n\36\3\36\3\36\3\37\3\37\7\37\u00ac" + + "\n\37\f\37\16\37\u00af\13\37\3 \3 \3 \3 \3 \3 \7 \u00b7\n \f \16 \u00ba" + + "\13 \3 \3 \3 \3 \3 \3 \3 \7 \u00c3\n \f \16 \u00c6\13 \3 \5 \u00c9\n " + + "\3!\3!\6!\u00cd\n!\r!\16!\u00ce\3\"\3\"\3\"\6\"\u00d4\n\"\r\"\16\"\u00d5" + + "\3#\3#\3#\7#\u00db\n#\f#\16#\u00de\13#\5#\u00e0\n#\3#\3#\6#\u00e4\n#\r" + + "#\16#\u00e5\5#\u00e8\n#\3#\3#\5#\u00ec\n#\3#\6#\u00ef\n#\r#\16#\u00f0" + + "\5#\u00f3\n#\3$\3$\3$\7$\u00f8\n$\f$\16$\u00fb\13$\5$\u00fd\n$\4\u00b8" + + "\u00c4\2%\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33" + + "\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67" + + "\359\36;\2=\2?\2A\37C E!G\2\3\2%\3\2**\3\2++\3\2..\3\2##\3\2\u0080\u0080" + + "\3\2,,\3\2\61\61\3\2\'\'\3\2--\3\2//\3\2>>\3\2@@\3\2((\3\2``\3\2~~\3\2" + + "AA\3\2<<\5\2\13\f\17\17\"\"\3\2\60\60\3\2]]\3\2^_\6\2&&C\\aac|\7\2&&\62" + + ";C\\aac|\3\2))\4\2))^^\3\2$$\4\2$$^^\3\2\62\62\3\2\629\4\2ZZzz\5\2\62" + + ";CHch\3\2\62;\4\2GGgg\4\2--//\3\2\63;\u0111\2\3\3\2\2\2\2\5\3\2\2\2\2" + + "\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2" + + "\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2" + + "\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2" + + "\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2" + + "\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2" + + "\2\3I\3\2\2\2\5K\3\2\2\2\7M\3\2\2\2\tO\3\2\2\2\13Q\3\2\2\2\rS\3\2\2\2" + + "\17U\3\2\2\2\21W\3\2\2\2\23Y\3\2\2\2\25[\3\2\2\2\27]\3\2\2\2\31`\3\2\2" + + "\2\33c\3\2\2\2\35g\3\2\2\2\37i\3\2\2\2!l\3\2\2\2#n\3\2\2\2%q\3\2\2\2\'" + + "t\3\2\2\2)w\3\2\2\2+y\3\2\2\2-{\3\2\2\2/}\3\2\2\2\61\u0080\3\2\2\2\63" + + "\u0083\3\2\2\2\65\u0085\3\2\2\2\67\u0088\3\2\2\29\u008e\3\2\2\2;\u00a2" + + "\3\2\2\2=\u00a9\3\2\2\2?\u00c8\3\2\2\2A\u00ca\3\2\2\2C\u00d0\3\2\2\2E" + + "\u00e7\3\2\2\2G\u00fc\3\2\2\2IJ\t\2\2\2J\4\3\2\2\2KL\t\3\2\2L\6\3\2\2" + + "\2MN\t\4\2\2N\b\3\2\2\2OP\t\5\2\2P\n\3\2\2\2QR\t\6\2\2R\f\3\2\2\2ST\t" + + "\7\2\2T\16\3\2\2\2UV\t\b\2\2V\20\3\2\2\2WX\t\t\2\2X\22\3\2\2\2YZ\t\n\2" + + "\2Z\24\3\2\2\2[\\\t\13\2\2\\\26\3\2\2\2]^\7>\2\2^_\7>\2\2_\30\3\2\2\2" + + "`a\7@\2\2ab\7@\2\2b\32\3\2\2\2cd\7@\2\2de\7@\2\2ef\7@\2\2f\34\3\2\2\2" + + "gh\t\f\2\2h\36\3\2\2\2ij\7>\2\2jk\7?\2\2k \3\2\2\2lm\t\r\2\2m\"\3\2\2" + + "\2no\7@\2\2op\7?\2\2p$\3\2\2\2qr\7?\2\2rs\7?\2\2s&\3\2\2\2tu\7#\2\2uv" + + "\7?\2\2v(\3\2\2\2wx\t\16\2\2x*\3\2\2\2yz\t\17\2\2z,\3\2\2\2{|\t\20\2\2" + + "|.\3\2\2\2}~\7(\2\2~\177\7(\2\2\177\60\3\2\2\2\u0080\u0081\7~\2\2\u0081" + + "\u0082\7~\2\2\u0082\62\3\2\2\2\u0083\u0084\t\21\2\2\u0084\64\3\2\2\2\u0085" + + "\u0086\t\22\2\2\u0086\66\3\2\2\2\u0087\u0089\t\23\2\2\u0088\u0087\3\2" + + "\2\2\u0089\u008a\3\2\2\2\u008a\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b" + + "\u008c\3\2\2\2\u008c\u008d\b\34\2\2\u008d8\3\2\2\2\u008e\u0092\5=\37\2" + + "\u008f\u0091\5;\36\2\u0090\u008f\3\2\2\2\u0091\u0094\3\2\2\2\u0092\u0090" + + "\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u009f\3\2\2\2\u0094\u0092\3\2\2\2\u0095" + + "\u0096\t\24\2\2\u0096\u009a\5=\37\2\u0097\u0099\5;\36\2\u0098\u0097\3" + + "\2\2\2\u0099\u009c\3\2\2\2\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b" + + "\u009e\3\2\2\2\u009c\u009a\3\2\2\2\u009d\u0095\3\2\2\2\u009e\u00a1\3\2" + + "\2\2\u009f\u009d\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0:\3\2\2\2\u00a1\u009f" + + "\3\2\2\2\u00a2\u00a5\t\25\2\2\u00a3\u00a6\5? \2\u00a4\u00a6\5G$\2\u00a5" + + "\u00a3\3\2\2\2\u00a5\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a8\t\26" + + "\2\2\u00a8<\3\2\2\2\u00a9\u00ad\t\27\2\2\u00aa\u00ac\t\30\2\2\u00ab\u00aa" + + "\3\2\2\2\u00ac\u00af\3\2\2\2\u00ad\u00ab\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae" + + ">\3\2\2\2\u00af\u00ad\3\2\2\2\u00b0\u00b8\t\31\2\2\u00b1\u00b2\7^\2\2" + + "\u00b2\u00b7\7)\2\2\u00b3\u00b4\7^\2\2\u00b4\u00b7\7^\2\2\u00b5\u00b7" + + "\n\32\2\2\u00b6\u00b1\3\2\2\2\u00b6\u00b3\3\2\2\2\u00b6\u00b5\3\2\2\2" + + "\u00b7\u00ba\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b9\u00bb" + + "\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u00c9\t\31\2\2\u00bc\u00c4\t\33\2\2" + + "\u00bd\u00be\7^\2\2\u00be\u00c3\7$\2\2\u00bf\u00c0\7^\2\2\u00c0\u00c3" + + "\7^\2\2\u00c1\u00c3\n\34\2\2\u00c2\u00bd\3\2\2\2\u00c2\u00bf\3\2\2\2\u00c2" + + "\u00c1\3\2\2\2\u00c3\u00c6\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c4\u00c2\3\2" + + "\2\2\u00c5\u00c7\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00c9\t\33\2\2\u00c8" + + "\u00b0\3\2\2\2\u00c8\u00bc\3\2\2\2\u00c9@\3\2\2\2\u00ca\u00cc\t\35\2\2" + + "\u00cb\u00cd\t\36\2\2\u00cc\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u00cc" + + "\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cfB\3\2\2\2\u00d0\u00d1\t\35\2\2\u00d1" + + "\u00d3\t\37\2\2\u00d2\u00d4\t \2\2\u00d3\u00d2\3\2\2\2\u00d4\u00d5\3\2" + + "\2\2\u00d5\u00d3\3\2\2\2\u00d5\u00d6\3\2\2\2\u00d6D\3\2\2\2\u00d7\u00df" + + "\5G$\2\u00d8\u00dc\t\24\2\2\u00d9\u00db\t!\2\2\u00da\u00d9\3\2\2\2\u00db" + + "\u00de\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00e0\3\2" + + "\2\2\u00de\u00dc\3\2\2\2\u00df\u00d8\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0" + + "\u00e8\3\2\2\2\u00e1\u00e3\t\24\2\2\u00e2\u00e4\t!\2\2\u00e3\u00e2\3\2" + + "\2\2\u00e4\u00e5\3\2\2\2\u00e5\u00e3\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6" + + "\u00e8\3\2\2\2\u00e7\u00d7\3\2\2\2\u00e7\u00e1\3\2\2\2\u00e8\u00f2\3\2" + + "\2\2\u00e9\u00eb\t\"\2\2\u00ea\u00ec\t#\2\2\u00eb\u00ea\3\2\2\2\u00eb" + + "\u00ec\3\2\2\2\u00ec\u00ee\3\2\2\2\u00ed\u00ef\t!\2\2\u00ee\u00ed\3\2" + + "\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00ee\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1" + + "\u00f3\3\2\2\2\u00f2\u00e9\3\2\2\2\u00f2\u00f3\3\2\2\2\u00f3F\3\2\2\2" + + "\u00f4\u00fd\t\35\2\2\u00f5\u00f9\t$\2\2\u00f6\u00f8\t!\2\2\u00f7\u00f6" + + "\3\2\2\2\u00f8\u00fb\3\2\2\2\u00f9\u00f7\3\2\2\2\u00f9\u00fa\3\2\2\2\u00fa" + + "\u00fd\3\2\2\2\u00fb\u00f9\3\2\2\2\u00fc\u00f4\3\2\2\2\u00fc\u00f5\3\2" + + "\2\2\u00fdH\3\2\2\2\31\2\u008a\u0092\u009a\u009f\u00a5\u00ad\u00b6\u00b8" + + "\u00c2\u00c4\u00c8\u00ce\u00d5\u00dc\u00df\u00e5\u00e7\u00eb\u00f0\u00f2" + + "\u00f9\u00fc\3\b\2\2"; + public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { diff --git a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptParser.java b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptParser.java index 564f6ff5e95..99f4cdf1306 100644 --- a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptParser.java +++ b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptParser.java @@ -1,47 +1,98 @@ // ANTLR GENERATED CODE: DO NOT EDIT package org.apache.lucene.expressions.js; + +import java.util.List; +import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; -import java.util.List; @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) class JavascriptParser extends Parser { - static { RuntimeMetaData.checkVersion("4.5.1", RuntimeMetaData.VERSION); } + static { + RuntimeMetaData.checkVersion("4.5.1", RuntimeMetaData.VERSION); + } protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - LP=1, RP=2, COMMA=3, BOOLNOT=4, BWNOT=5, MUL=6, DIV=7, REM=8, ADD=9, SUB=10, - LSH=11, RSH=12, USH=13, LT=14, LTE=15, GT=16, GTE=17, EQ=18, NE=19, BWAND=20, - BWXOR=21, BWOR=22, BOOLAND=23, BOOLOR=24, COND=25, COLON=26, WS=27, VARIABLE=28, - OCTAL=29, HEX=30, DECIMAL=31; - public static final int - RULE_compile = 0, RULE_expression = 1; - public static final String[] ruleNames = { - "compile", "expression" - }; + protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); + public static final int LP = 1, + RP = 2, + COMMA = 3, + BOOLNOT = 4, + BWNOT = 5, + MUL = 6, + DIV = 7, + REM = 8, + ADD = 9, + SUB = 10, + LSH = 11, + RSH = 12, + USH = 13, + LT = 14, + LTE = 15, + GT = 16, + GTE = 17, + EQ = 18, + NE = 19, + BWAND = 20, + BWXOR = 21, + BWOR = 22, + BOOLAND = 23, + BOOLOR = 24, + COND = 25, + COLON = 26, + WS = 27, + VARIABLE = 28, + OCTAL = 29, + HEX = 30, + DECIMAL = 31; + public static final int RULE_compile = 0, RULE_expression = 1; + public static final String[] ruleNames = {"compile", "expression"}; private static final String[] _LITERAL_NAMES = { - null, null, null, null, null, null, null, null, null, null, null, "'<<'", - "'>>'", "'>>>'", null, "'<='", null, "'>='", "'=='", "'!='", null, null, - null, "'&&'", "'||'" + null, null, null, null, null, null, null, null, null, null, null, "'<<'", "'>>'", "'>>>'", null, + "'<='", null, "'>='", "'=='", "'!='", null, null, null, "'&&'", "'||'" }; private static final String[] _SYMBOLIC_NAMES = { - null, "LP", "RP", "COMMA", "BOOLNOT", "BWNOT", "MUL", "DIV", "REM", "ADD", - "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT", "GTE", "EQ", "NE", "BWAND", - "BWXOR", "BWOR", "BOOLAND", "BOOLOR", "COND", "COLON", "WS", "VARIABLE", - "OCTAL", "HEX", "DECIMAL" + null, + "LP", + "RP", + "COMMA", + "BOOLNOT", + "BWNOT", + "MUL", + "DIV", + "REM", + "ADD", + "SUB", + "LSH", + "RSH", + "USH", + "LT", + "LTE", + "GT", + "GTE", + "EQ", + "NE", + "BWAND", + "BWXOR", + "BWOR", + "BOOLAND", + "BOOLOR", + "COND", + "COLON", + "WS", + "VARIABLE", + "OCTAL", + "HEX", + "DECIMAL" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - /** - * @deprecated Use {@link #VOCABULARY} instead. - */ - @Deprecated - public static final String[] tokenNames; + /** @deprecated Use {@link #VOCABULARY} instead. */ + @Deprecated public static final String[] tokenNames; + static { tokenNames = new String[_SYMBOLIC_NAMES.length]; for (int i = 0; i < tokenNames.length; i++) { @@ -63,39 +114,57 @@ class JavascriptParser extends Parser { } @Override - public Vocabulary getVocabulary() { return VOCABULARY; } @Override - public String getGrammarFileName() { return "Javascript.g4"; } + public String getGrammarFileName() { + return "Javascript.g4"; + } @Override - public String[] getRuleNames() { return ruleNames; } + public String[] getRuleNames() { + return ruleNames; + } @Override - public String getSerializedATN() { return _serializedATN; } + public String getSerializedATN() { + return _serializedATN; + } @Override - public ATN getATN() { return _ATN; } + public ATN getATN() { + return _ATN; + } public JavascriptParser(TokenStream input) { super(input); - _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + _interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); } + public static class CompileContext extends ParserRuleContext { public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); + return getRuleContext(ExpressionContext.class, 0); } - public TerminalNode EOF() { return getToken(JavascriptParser.EOF, 0); } + + public TerminalNode EOF() { + return getToken(JavascriptParser.EOF, 0); + } + public CompileContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } - @Override public int getRuleIndex() { return RULE_compile; } + + @Override + public int getRuleIndex() { + return RULE_compile; + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitCompile(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitCompile(this); else return visitor.visitChildren(this); } } @@ -106,18 +175,16 @@ class JavascriptParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(4); - expression(0); - setState(5); - match(EOF); + setState(4); + expression(0); + setState(5); + match(EOF); } - } - catch (RecognitionException re) { + } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); - } - finally { + } finally { exitRule(); } return _localctx; @@ -127,245 +194,454 @@ class JavascriptParser extends Parser { public ExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } - @Override public int getRuleIndex() { return RULE_expression; } - - public ExpressionContext() { } + + @Override + public int getRuleIndex() { + return RULE_expression; + } + + public ExpressionContext() {} + public void copyFrom(ExpressionContext ctx) { super.copyFrom(ctx); } } + public static class ConditionalContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode COND() { return getToken(JavascriptParser.COND, 0); } - public TerminalNode COLON() { return getToken(JavascriptParser.COLON, 0); } - public ConditionalContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode COND() { + return getToken(JavascriptParser.COND, 0); + } + + public TerminalNode COLON() { + return getToken(JavascriptParser.COLON, 0); + } + + public ConditionalContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitConditional(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitConditional(this); else return visitor.visitChildren(this); } } + public static class BoolorContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode BOOLOR() { return getToken(JavascriptParser.BOOLOR, 0); } - public BoolorContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode BOOLOR() { + return getToken(JavascriptParser.BOOLOR, 0); + } + + public BoolorContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBoolor(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBoolor(this); else return visitor.visitChildren(this); } } + public static class BoolcompContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode LT() { return getToken(JavascriptParser.LT, 0); } - public TerminalNode LTE() { return getToken(JavascriptParser.LTE, 0); } - public TerminalNode GT() { return getToken(JavascriptParser.GT, 0); } - public TerminalNode GTE() { return getToken(JavascriptParser.GTE, 0); } - public BoolcompContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode LT() { + return getToken(JavascriptParser.LT, 0); + } + + public TerminalNode LTE() { + return getToken(JavascriptParser.LTE, 0); + } + + public TerminalNode GT() { + return getToken(JavascriptParser.GT, 0); + } + + public TerminalNode GTE() { + return getToken(JavascriptParser.GTE, 0); + } + + public BoolcompContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBoolcomp(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBoolcomp(this); else return visitor.visitChildren(this); } } + public static class NumericContext extends ExpressionContext { - public TerminalNode OCTAL() { return getToken(JavascriptParser.OCTAL, 0); } - public TerminalNode HEX() { return getToken(JavascriptParser.HEX, 0); } - public TerminalNode DECIMAL() { return getToken(JavascriptParser.DECIMAL, 0); } - public NumericContext(ExpressionContext ctx) { copyFrom(ctx); } + public TerminalNode OCTAL() { + return getToken(JavascriptParser.OCTAL, 0); + } + + public TerminalNode HEX() { + return getToken(JavascriptParser.HEX, 0); + } + + public TerminalNode DECIMAL() { + return getToken(JavascriptParser.DECIMAL, 0); + } + + public NumericContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitNumeric(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitNumeric(this); else return visitor.visitChildren(this); } } + public static class AddsubContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode ADD() { return getToken(JavascriptParser.ADD, 0); } - public TerminalNode SUB() { return getToken(JavascriptParser.SUB, 0); } - public AddsubContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode ADD() { + return getToken(JavascriptParser.ADD, 0); + } + + public TerminalNode SUB() { + return getToken(JavascriptParser.SUB, 0); + } + + public AddsubContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitAddsub(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitAddsub(this); else return visitor.visitChildren(this); } } + public static class UnaryContext extends ExpressionContext { public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); + return getRuleContext(ExpressionContext.class, 0); } - public TerminalNode BOOLNOT() { return getToken(JavascriptParser.BOOLNOT, 0); } - public TerminalNode BWNOT() { return getToken(JavascriptParser.BWNOT, 0); } - public TerminalNode ADD() { return getToken(JavascriptParser.ADD, 0); } - public TerminalNode SUB() { return getToken(JavascriptParser.SUB, 0); } - public UnaryContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode BOOLNOT() { + return getToken(JavascriptParser.BOOLNOT, 0); + } + + public TerminalNode BWNOT() { + return getToken(JavascriptParser.BWNOT, 0); + } + + public TerminalNode ADD() { + return getToken(JavascriptParser.ADD, 0); + } + + public TerminalNode SUB() { + return getToken(JavascriptParser.SUB, 0); + } + + public UnaryContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitUnary(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitUnary(this); else return visitor.visitChildren(this); } } + public static class PrecedenceContext extends ExpressionContext { - public TerminalNode LP() { return getToken(JavascriptParser.LP, 0); } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); + public TerminalNode LP() { + return getToken(JavascriptParser.LP, 0); } - public TerminalNode RP() { return getToken(JavascriptParser.RP, 0); } - public PrecedenceContext(ExpressionContext ctx) { copyFrom(ctx); } + + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class, 0); + } + + public TerminalNode RP() { + return getToken(JavascriptParser.RP, 0); + } + + public PrecedenceContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitPrecedence(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitPrecedence(this); else return visitor.visitChildren(this); } } + public static class MuldivContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode MUL() { return getToken(JavascriptParser.MUL, 0); } - public TerminalNode DIV() { return getToken(JavascriptParser.DIV, 0); } - public TerminalNode REM() { return getToken(JavascriptParser.REM, 0); } - public MuldivContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode MUL() { + return getToken(JavascriptParser.MUL, 0); + } + + public TerminalNode DIV() { + return getToken(JavascriptParser.DIV, 0); + } + + public TerminalNode REM() { + return getToken(JavascriptParser.REM, 0); + } + + public MuldivContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitMuldiv(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitMuldiv(this); else return visitor.visitChildren(this); } } + public static class ExternalContext extends ExpressionContext { - public TerminalNode VARIABLE() { return getToken(JavascriptParser.VARIABLE, 0); } - public TerminalNode LP() { return getToken(JavascriptParser.LP, 0); } - public TerminalNode RP() { return getToken(JavascriptParser.RP, 0); } + public TerminalNode VARIABLE() { + return getToken(JavascriptParser.VARIABLE, 0); + } + + public TerminalNode LP() { + return getToken(JavascriptParser.LP, 0); + } + + public TerminalNode RP() { + return getToken(JavascriptParser.RP, 0); + } + public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public List COMMA() { return getTokens(JavascriptParser.COMMA); } + + public List COMMA() { + return getTokens(JavascriptParser.COMMA); + } + public TerminalNode COMMA(int i) { return getToken(JavascriptParser.COMMA, i); } - public ExternalContext(ExpressionContext ctx) { copyFrom(ctx); } + + public ExternalContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitExternal(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitExternal(this); else return visitor.visitChildren(this); } } + public static class BwshiftContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode LSH() { return getToken(JavascriptParser.LSH, 0); } - public TerminalNode RSH() { return getToken(JavascriptParser.RSH, 0); } - public TerminalNode USH() { return getToken(JavascriptParser.USH, 0); } - public BwshiftContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode LSH() { + return getToken(JavascriptParser.LSH, 0); + } + + public TerminalNode RSH() { + return getToken(JavascriptParser.RSH, 0); + } + + public TerminalNode USH() { + return getToken(JavascriptParser.USH, 0); + } + + public BwshiftContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBwshift(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBwshift(this); else return visitor.visitChildren(this); } } + public static class BworContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode BWOR() { return getToken(JavascriptParser.BWOR, 0); } - public BworContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode BWOR() { + return getToken(JavascriptParser.BWOR, 0); + } + + public BworContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBwor(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBwor(this); else return visitor.visitChildren(this); } } + public static class BoolandContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode BOOLAND() { return getToken(JavascriptParser.BOOLAND, 0); } - public BoolandContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode BOOLAND() { + return getToken(JavascriptParser.BOOLAND, 0); + } + + public BoolandContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBooland(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBooland(this); else return visitor.visitChildren(this); } } + public static class BwxorContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode BWXOR() { return getToken(JavascriptParser.BWXOR, 0); } - public BwxorContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode BWXOR() { + return getToken(JavascriptParser.BWXOR, 0); + } + + public BwxorContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBwxor(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBwxor(this); else return visitor.visitChildren(this); } } + public static class BwandContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode BWAND() { return getToken(JavascriptParser.BWAND, 0); } - public BwandContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode BWAND() { + return getToken(JavascriptParser.BWAND, 0); + } + + public BwandContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBwand(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBwand(this); else return visitor.visitChildren(this); } } + public static class BooleqneContext extends ExpressionContext { public List expression() { return getRuleContexts(ExpressionContext.class); } + public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); + return getRuleContext(ExpressionContext.class, i); } - public TerminalNode EQ() { return getToken(JavascriptParser.EQ, 0); } - public TerminalNode NE() { return getToken(JavascriptParser.NE, 0); } - public BooleqneContext(ExpressionContext ctx) { copyFrom(ctx); } + + public TerminalNode EQ() { + return getToken(JavascriptParser.EQ, 0); + } + + public TerminalNode NE() { + return getToken(JavascriptParser.NE, 0); + } + + public BooleqneContext(ExpressionContext ctx) { + copyFrom(ctx); + } + @Override public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof JavascriptVisitor ) return ((JavascriptVisitor)visitor).visitBooleqne(this); + if (visitor instanceof JavascriptVisitor) + return ((JavascriptVisitor) visitor).visitBooleqne(this); else return visitor.visitChildren(this); } } @@ -386,292 +662,322 @@ class JavascriptParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(30); - switch (_input.LA(1)) { - case BOOLNOT: - case BWNOT: - case ADD: - case SUB: - { - _localctx = new UnaryContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - - setState(8); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB))) != 0)) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(9); - expression(12); - } - break; - case LP: - { - _localctx = new PrecedenceContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(10); - match(LP); - setState(11); - expression(0); - setState(12); - match(RP); - } - break; - case OCTAL: - case HEX: - case DECIMAL: - { - _localctx = new NumericContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(14); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OCTAL) | (1L << HEX) | (1L << DECIMAL))) != 0)) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - } - break; - case VARIABLE: - { - _localctx = new ExternalContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(15); - match(VARIABLE); - setState(28); - switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { - case 1: - { - setState(16); - match(LP); - setState(25); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << VARIABLE) | (1L << OCTAL) | (1L << HEX) | (1L << DECIMAL))) != 0)) { + setState(30); + switch (_input.LA(1)) { + case BOOLNOT: + case BWNOT: + case ADD: + case SUB: { - setState(17); - expression(0); - setState(22); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(18); - match(COMMA); - setState(19); - expression(0); - } - } - setState(24); - _errHandler.sync(this); + _localctx = new UnaryContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(8); _la = _input.LA(1); + if (!((((_la) & ~0x3f) == 0 + && ((1L << _la) & ((1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB))) + != 0))) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(9); + expression(12); } + break; + case LP: + { + _localctx = new PrecedenceContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(10); + match(LP); + setState(11); + expression(0); + setState(12); + match(RP); } - } + break; + case OCTAL: + case HEX: + case DECIMAL: + { + _localctx = new NumericContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(14); + _la = _input.LA(1); + if (!((((_la) & ~0x3f) == 0 + && ((1L << _la) & ((1L << OCTAL) | (1L << HEX) | (1L << DECIMAL))) != 0))) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + break; + case VARIABLE: + { + _localctx = new ExternalContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(15); + match(VARIABLE); + setState(28); + switch (getInterpreter().adaptivePredict(_input, 2, _ctx)) { + case 1: + { + setState(16); + match(LP); + setState(25); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 + && ((1L << _la) + & ((1L << LP) + | (1L << BOOLNOT) + | (1L << BWNOT) + | (1L << ADD) + | (1L << SUB) + | (1L << VARIABLE) + | (1L << OCTAL) + | (1L << HEX) + | (1L << DECIMAL))) + != 0)) { + { + setState(17); + expression(0); + setState(22); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la == COMMA) { + { + { + setState(18); + match(COMMA); + setState(19); + expression(0); + } + } + setState(24); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } - setState(27); - match(RP); - } - break; + setState(27); + match(RP); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); } - } - break; - default: - throw new NoViableAltException(this); - } - _ctx.stop = _input.LT(-1); - setState(70); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,5,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - setState(68); - switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { - case 1: - { - _localctx = new MuldivContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(32); - if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(33); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << REM))) != 0)) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(34); - expression(12); - } - break; - case 2: - { - _localctx = new AddsubContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(35); - if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(36); - _la = _input.LA(1); - if ( !(_la==ADD || _la==SUB) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(37); - expression(11); - } - break; - case 3: - { - _localctx = new BwshiftContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(38); - if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(39); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LSH) | (1L << RSH) | (1L << USH))) != 0)) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(40); - expression(10); - } - break; - case 4: - { - _localctx = new BoolcompContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(41); - if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(42); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) != 0)) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(43); - expression(9); - } - break; - case 5: - { - _localctx = new BooleqneContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(44); - if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(45); - _la = _input.LA(1); - if ( !(_la==EQ || _la==NE) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(46); - expression(8); - } - break; - case 6: - { - _localctx = new BwandContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(47); - if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(48); - match(BWAND); - setState(49); - expression(7); - } - break; - case 7: - { - _localctx = new BwxorContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(50); - if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(51); - match(BWXOR); - setState(52); - expression(6); - } - break; - case 8: - { - _localctx = new BworContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(53); - if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(54); - match(BWOR); - setState(55); - expression(5); - } - break; - case 9: - { - _localctx = new BoolandContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(56); - if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(57); - match(BOOLAND); - setState(58); - expression(4); - } - break; - case 10: - { - _localctx = new BoolorContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(59); - if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(60); - match(BOOLOR); - setState(61); - expression(3); - } - break; - case 11: - { - _localctx = new ConditionalContext(new ExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(62); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(63); - match(COND); - setState(64); - expression(0); - setState(65); - match(COLON); - setState(66); - expression(1); - } - break; - } - } - } - setState(72); + _ctx.stop = _input.LT(-1); + setState(70); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,5,_ctx); + _alt = getInterpreter().adaptivePredict(_input, 5, _ctx); + while (_alt != 2 && _alt != org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER) { + if (_alt == 1) { + if (_parseListeners != null) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(68); + switch (getInterpreter().adaptivePredict(_input, 4, _ctx)) { + case 1: + { + _localctx = new MuldivContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(32); + if (!(precpred(_ctx, 11))) + throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(33); + _la = _input.LA(1); + if (!((((_la) & ~0x3f) == 0 + && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << REM))) != 0))) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(34); + expression(12); + } + break; + case 2: + { + _localctx = new AddsubContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(35); + if (!(precpred(_ctx, 10))) + throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(36); + _la = _input.LA(1); + if (!(_la == ADD || _la == SUB)) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(37); + expression(11); + } + break; + case 3: + { + _localctx = new BwshiftContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(38); + if (!(precpred(_ctx, 9))) + throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(39); + _la = _input.LA(1); + if (!((((_la) & ~0x3f) == 0 + && ((1L << _la) & ((1L << LSH) | (1L << RSH) | (1L << USH))) != 0))) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(40); + expression(10); + } + break; + case 4: + { + _localctx = + new BoolcompContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(41); + if (!(precpred(_ctx, 8))) + throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(42); + _la = _input.LA(1); + if (!((((_la) & ~0x3f) == 0 + && ((1L << _la) & ((1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) + != 0))) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(43); + expression(9); + } + break; + case 5: + { + _localctx = + new BooleqneContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(44); + if (!(precpred(_ctx, 7))) + throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(45); + _la = _input.LA(1); + if (!(_la == EQ || _la == NE)) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(46); + expression(8); + } + break; + case 6: + { + _localctx = new BwandContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(47); + if (!(precpred(_ctx, 6))) + throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(48); + match(BWAND); + setState(49); + expression(7); + } + break; + case 7: + { + _localctx = new BwxorContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(50); + if (!(precpred(_ctx, 5))) + throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(51); + match(BWXOR); + setState(52); + expression(6); + } + break; + case 8: + { + _localctx = new BworContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(53); + if (!(precpred(_ctx, 4))) + throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(54); + match(BWOR); + setState(55); + expression(5); + } + break; + case 9: + { + _localctx = new BoolandContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(56); + if (!(precpred(_ctx, 3))) + throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(57); + match(BOOLAND); + setState(58); + expression(4); + } + break; + case 10: + { + _localctx = new BoolorContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(59); + if (!(precpred(_ctx, 2))) + throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(60); + match(BOOLOR); + setState(61); + expression(3); + } + break; + case 11: + { + _localctx = + new ConditionalContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(62); + if (!(precpred(_ctx, 1))) + throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(63); + match(COND); + setState(64); + expression(0); + setState(65); + match(COLON); + setState(66); + expression(1); + } + break; + } + } + } + setState(72); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input, 5, _ctx); + } } - } - } - catch (RecognitionException re) { + } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); - } - finally { + } finally { unrollRecursionContexts(_parentctx); } return _localctx; @@ -679,64 +985,65 @@ class JavascriptParser extends Parser { public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { - case 1: - return expression_sempred((ExpressionContext)_localctx, predIndex); + case 1: + return expression_sempred((ExpressionContext) _localctx, predIndex); } return true; } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { switch (predIndex) { - case 0: - return precpred(_ctx, 11); - case 1: - return precpred(_ctx, 10); - case 2: - return precpred(_ctx, 9); - case 3: - return precpred(_ctx, 8); - case 4: - return precpred(_ctx, 7); - case 5: - return precpred(_ctx, 6); - case 6: - return precpred(_ctx, 5); - case 7: - return precpred(_ctx, 4); - case 8: - return precpred(_ctx, 3); - case 9: - return precpred(_ctx, 2); - case 10: - return precpred(_ctx, 1); + case 0: + return precpred(_ctx, 11); + case 1: + return precpred(_ctx, 10); + case 2: + return precpred(_ctx, 9); + case 3: + return precpred(_ctx, 8); + case 4: + return precpred(_ctx, 7); + case 5: + return precpred(_ctx, 6); + case 6: + return precpred(_ctx, 5); + case 7: + return precpred(_ctx, 4); + case 8: + return precpred(_ctx, 3); + case 9: + return precpred(_ctx, 2); + case 10: + return precpred(_ctx, 1); } return true; } public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3!L\4\2\t\2\4\3\t\3"+ - "\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\7\3\27"+ - "\n\3\f\3\16\3\32\13\3\5\3\34\n\3\3\3\5\3\37\n\3\5\3!\n\3\3\3\3\3\3\3\3"+ - "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+ - "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\7\3G\n\3"+ - "\f\3\16\3J\13\3\3\3\2\3\4\4\2\4\2\t\4\2\6\7\13\f\3\2\37!\3\2\b\n\3\2\13"+ - "\f\3\2\r\17\3\2\20\23\3\2\24\25Z\2\6\3\2\2\2\4 \3\2\2\2\6\7\5\4\3\2\7"+ - "\b\7\2\2\3\b\3\3\2\2\2\t\n\b\3\1\2\n\13\t\2\2\2\13!\5\4\3\16\f\r\7\3\2"+ - "\2\r\16\5\4\3\2\16\17\7\4\2\2\17!\3\2\2\2\20!\t\3\2\2\21\36\7\36\2\2\22"+ - "\33\7\3\2\2\23\30\5\4\3\2\24\25\7\5\2\2\25\27\5\4\3\2\26\24\3\2\2\2\27"+ - "\32\3\2\2\2\30\26\3\2\2\2\30\31\3\2\2\2\31\34\3\2\2\2\32\30\3\2\2\2\33"+ - "\23\3\2\2\2\33\34\3\2\2\2\34\35\3\2\2\2\35\37\7\4\2\2\36\22\3\2\2\2\36"+ - "\37\3\2\2\2\37!\3\2\2\2 \t\3\2\2\2 \f\3\2\2\2 \20\3\2\2\2 \21\3\2\2\2"+ - "!H\3\2\2\2\"#\f\r\2\2#$\t\4\2\2$G\5\4\3\16%&\f\f\2\2&\'\t\5\2\2\'G\5\4"+ - "\3\r()\f\13\2\2)*\t\6\2\2*G\5\4\3\f+,\f\n\2\2,-\t\7\2\2-G\5\4\3\13./\f"+ - "\t\2\2/\60\t\b\2\2\60G\5\4\3\n\61\62\f\b\2\2\62\63\7\26\2\2\63G\5\4\3"+ - "\t\64\65\f\7\2\2\65\66\7\27\2\2\66G\5\4\3\b\678\f\6\2\289\7\30\2\29G\5"+ - "\4\3\7:;\f\5\2\2;<\7\31\2\2\f\4\2\2>?\7\32\2\2?G\5\4\3\5@"+ - "A\f\3\2\2AB\7\33\2\2BC\5\4\3\2CD\7\34\2\2DE\5\4\3\3EG\3\2\2\2F\"\3\2\2"+ - "\2F%\3\2\2\2F(\3\2\2\2F+\3\2\2\2F.\3\2\2\2F\61\3\2\2\2F\64\3\2\2\2F\67"+ - "\3\2\2\2F:\3\2\2\2F=\3\2\2\2F@\3\2\2\2GJ\3\2\2\2HF\3\2\2\2HI\3\2\2\2I"+ - "\5\3\2\2\2JH\3\2\2\2\b\30\33\36 FH"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3!L\4\2\t\2\4\3\t\3" + + "\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\7\3\27" + + "\n\3\f\3\16\3\32\13\3\5\3\34\n\3\3\3\5\3\37\n\3\5\3!\n\3\3\3\3\3\3\3\3" + + "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3" + + "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\7\3G\n\3" + + "\f\3\16\3J\13\3\3\3\2\3\4\4\2\4\2\t\4\2\6\7\13\f\3\2\37!\3\2\b\n\3\2\13" + + "\f\3\2\r\17\3\2\20\23\3\2\24\25Z\2\6\3\2\2\2\4 \3\2\2\2\6\7\5\4\3\2\7" + + "\b\7\2\2\3\b\3\3\2\2\2\t\n\b\3\1\2\n\13\t\2\2\2\13!\5\4\3\16\f\r\7\3\2" + + "\2\r\16\5\4\3\2\16\17\7\4\2\2\17!\3\2\2\2\20!\t\3\2\2\21\36\7\36\2\2\22" + + "\33\7\3\2\2\23\30\5\4\3\2\24\25\7\5\2\2\25\27\5\4\3\2\26\24\3\2\2\2\27" + + "\32\3\2\2\2\30\26\3\2\2\2\30\31\3\2\2\2\31\34\3\2\2\2\32\30\3\2\2\2\33" + + "\23\3\2\2\2\33\34\3\2\2\2\34\35\3\2\2\2\35\37\7\4\2\2\36\22\3\2\2\2\36" + + "\37\3\2\2\2\37!\3\2\2\2 \t\3\2\2\2 \f\3\2\2\2 \20\3\2\2\2 \21\3\2\2\2" + + "!H\3\2\2\2\"#\f\r\2\2#$\t\4\2\2$G\5\4\3\16%&\f\f\2\2&\'\t\5\2\2\'G\5\4" + + "\3\r()\f\13\2\2)*\t\6\2\2*G\5\4\3\f+,\f\n\2\2,-\t\7\2\2-G\5\4\3\13./\f" + + "\t\2\2/\60\t\b\2\2\60G\5\4\3\n\61\62\f\b\2\2\62\63\7\26\2\2\63G\5\4\3" + + "\t\64\65\f\7\2\2\65\66\7\27\2\2\66G\5\4\3\b\678\f\6\2\289\7\30\2\29G\5" + + "\4\3\7:;\f\5\2\2;<\7\31\2\2\f\4\2\2>?\7\32\2\2?G\5\4\3\5@" + + "A\f\3\2\2AB\7\33\2\2BC\5\4\3\2CD\7\34\2\2DE\5\4\3\3EG\3\2\2\2F\"\3\2\2" + + "\2F%\3\2\2\2F(\3\2\2\2F+\3\2\2\2F.\3\2\2\2F\61\3\2\2\2F\64\3\2\2\2F\67" + + "\3\2\2\2F:\3\2\2\2F=\3\2\2\2F@\3\2\2\2GJ\3\2\2\2HF\3\2\2\2HI\3\2\2\2I" + + "\5\3\2\2\2JH\3\2\2\2\b\30\33\36 FH"; + public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { diff --git a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptVisitor.java b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptVisitor.java index 5977736797a..3c6f1d2e9a6 100644 --- a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptVisitor.java +++ b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptVisitor.java @@ -1,122 +1,139 @@ // ANTLR GENERATED CODE: DO NOT EDIT package org.apache.lucene.expressions.js; + import org.antlr.v4.runtime.tree.ParseTreeVisitor; /** - * This interface defines a complete generic visitor for a parse tree produced - * by {@link JavascriptParser}. + * This interface defines a complete generic visitor for a parse tree produced by {@link + * JavascriptParser}. * - * @param The return type of the visit operation. Use {@link Void} for - * operations with no return type. + * @param The return type of the visit operation. Use {@link Void} for operations with no return + * type. */ interface JavascriptVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by {@link JavascriptParser#compile}. + * * @param ctx the parse tree * @return the visitor result */ T visitCompile(JavascriptParser.CompileContext ctx); /** - * Visit a parse tree produced by the {@code conditional} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code conditional} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitConditional(JavascriptParser.ConditionalContext ctx); /** - * Visit a parse tree produced by the {@code boolor} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code boolor} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBoolor(JavascriptParser.BoolorContext ctx); /** - * Visit a parse tree produced by the {@code boolcomp} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code boolcomp} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBoolcomp(JavascriptParser.BoolcompContext ctx); /** - * Visit a parse tree produced by the {@code numeric} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code numeric} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitNumeric(JavascriptParser.NumericContext ctx); /** - * Visit a parse tree produced by the {@code addsub} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code addsub} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitAddsub(JavascriptParser.AddsubContext ctx); /** - * Visit a parse tree produced by the {@code unary} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code unary} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitUnary(JavascriptParser.UnaryContext ctx); /** - * Visit a parse tree produced by the {@code precedence} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code precedence} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitPrecedence(JavascriptParser.PrecedenceContext ctx); /** - * Visit a parse tree produced by the {@code muldiv} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code muldiv} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitMuldiv(JavascriptParser.MuldivContext ctx); /** - * Visit a parse tree produced by the {@code external} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code external} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitExternal(JavascriptParser.ExternalContext ctx); /** - * Visit a parse tree produced by the {@code bwshift} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code bwshift} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBwshift(JavascriptParser.BwshiftContext ctx); /** - * Visit a parse tree produced by the {@code bwor} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code bwor} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBwor(JavascriptParser.BworContext ctx); /** - * Visit a parse tree produced by the {@code booland} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code booland} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBooland(JavascriptParser.BoolandContext ctx); /** - * Visit a parse tree produced by the {@code bwxor} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code bwxor} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBwxor(JavascriptParser.BwxorContext ctx); /** - * Visit a parse tree produced by the {@code bwand} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code bwand} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ T visitBwand(JavascriptParser.BwandContext ctx); /** - * Visit a parse tree produced by the {@code booleqne} - * labeled alternative in {@link JavascriptParser#expression}. + * Visit a parse tree produced by the {@code booleqne} labeled alternative in {@link + * JavascriptParser#expression}. + * * @param ctx the parse tree * @return the visitor result */ diff --git a/versions.props b/versions.props index 201f436ed95..f5010d321bf 100644 --- a/versions.props +++ b/versions.props @@ -14,7 +14,7 @@ io.sgr:s2-geometry-library-java=1.0.0 javax.servlet:javax.servlet-api=3.1.0 junit:junit=4.13.1 net.sourceforge.nekohtml:nekohtml=1.9.17 -org.antlr:antlr4-runtime=4.5.1-1 +org.antlr:antlr4*=4.5.1-1 org.apache.commons:commons-compress=1.19 org.apache.httpcomponents:httpclient=4.5.13 org.apache.httpcomponents:httpcore=4.4.13