diff --git a/.gitignore b/.gitignore index 9f3089ff52..f4aaa6e8e8 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ out *~ /.gradletasknamecache **/*.flattened-pom.xml +dependency-reduced-pom.xml vscode settings.json diff --git a/pom.xml b/pom.xml index 3c13ba0102..d9fc0967f4 100644 --- a/pom.xml +++ b/pom.xml @@ -350,7 +350,7 @@ 1.1.0 - 4.13.1 + 4.13.2 3.14.1 3.6.2 - - org.antlr - antlr4-runtime - ${antlr.version} - - com.github.victools jsonschema-generator @@ -147,7 +140,7 @@ ${mockk-jvm.version} test - + - + diff --git a/spring-ai-template-st/pom.xml b/spring-ai-template-st/pom.xml index 686319a559..36e0890d2a 100644 --- a/spring-ai-template-st/pom.xml +++ b/spring-ai-template-st/pom.xml @@ -16,62 +16,134 @@ --> - 4.0.0 - - org.springframework.ai - spring-ai-parent - 2.0.0-SNAPSHOT - - spring-ai-template-st - jar - Spring AI Template StringTemplate - StringTemplate implementation for Spring AI templating - https://github.com/spring-projects/spring-ai + 4.0.0 + + org.springframework.ai + spring-ai-parent + 2.0.0-SNAPSHOT + + spring-ai-template-st + jar + Spring AI Template StringTemplate + StringTemplate implementation for Spring AI templating + https://github.com/spring-projects/spring-ai - - https://github.com/spring-projects/spring-ai - scm:git:git://github.com/spring-projects/spring-ai.git - scm:git:ssh://git@github.com/spring-projects/spring-ai.git - + + https://github.com/spring-projects/spring-ai + scm:git:git://github.com/spring-projects/spring-ai.git + scm:git:ssh://git@github.com/spring-projects/spring-ai.git + - - 17 - 17 - + + 17 + 17 + - - - org.springframework.ai - spring-ai-commons - ${project.parent.version} - + + + org.springframework.ai + spring-ai-commons + ${project.parent.version} + - - org.antlr - ST4 - ${ST4.version} - + + org.antlr + ST4 + ${ST4.version} + - - - org.antlr - antlr4-runtime - ${antlr.version} - + + + org.slf4j + slf4j-api + - - - org.slf4j - slf4j-api - + + + org.springframework.boot + spring-boot-starter-test + test + + - - - org.springframework.boot - spring-boot-starter-test - test - - - \ No newline at end of file + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.2 + + true + true + + + org.antlr:ST4 + + META-INF/services/** + META-INF/MANIFEST.MF + META-INF/maven/** + + + + org.antlr:antlr-runtime + + META-INF/services/** + META-INF/MANIFEST.MF + META-INF/maven/** + + + + + + org.stringtemplate.v4 + shaded.${project.groupId}.${project.artifactId}.library.org.stringtemplate.v4 + + + org.antlr + shaded.${project.groupId}.${project.artifactId}.library.org.antlr + + + + + org.antlr:ST4 + org.antlr:antlr-runtime + + + + + + + inject-problematic-dependencies + package + + shade + + + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + ${project.basedir} + + + dependency-reduced-pom.xml + + + + + + + + + + diff --git a/spring-ai-vector-store/pom.xml b/spring-ai-vector-store/pom.xml index 2e5121d157..0da0415772 100644 --- a/spring-ai-vector-store/pom.xml +++ b/spring-ai-vector-store/pom.xml @@ -47,6 +47,13 @@ ${project.parent.version} + + org.antlr + antlr4-runtime + + [${antlr.version}] + + @@ -63,34 +70,85 @@ - - - antlr4 - - false - - - - - org.antlr - antlr4-maven-plugin - ${antlr.version} - - ${basedir}/src/main/antlr4 - ${basedir}/src/main/java - true - - - - - antlr4 - - - - - - - - - + + + + org.antlr + antlr4-maven-plugin + ${antlr.version} + + true + + + + + antlr4 + + + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.2 + + true + true + + + org.antlr:antlr4-runtime + + META-INF/services/** + META-INF/MANIFEST.MF + META-INF/maven/** + + + + + + org.antlr + shaded.${project.groupId}.${project.artifactId}.library.org.antlr + + + + + org.antlr:antlr4-runtime + + + + + + + inject-problematic-dependencies + package + + shade + + + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + ${project.basedir} + + + dependency-reduced-pom.xml + + + + + + + + + diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/Filters.interp b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/Filters.interp deleted file mode 100644 index f4b78a77a3..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/Filters.interp +++ /dev/null @@ -1,75 +0,0 @@ -token literal names: -null -null -null -'.' -',' -'[' -']' -'(' -')' -'==' -'-' -'+' -'>' -'>=' -'<' -'<=' -'!=' -null -null -null -null -null -null -null -null -null -null -null -null -null - -token symbolic names: -null -LONG_SUFFIX -WHERE -DOT -COMMA -LEFT_SQUARE_BRACKETS -RIGHT_SQUARE_BRACKETS -LEFT_PARENTHESIS -RIGHT_PARENTHESIS -EQUALS -MINUS -PLUS -GT -GE -LT -LE -NE -AND -OR -IN -NIN -NOT -IS -NULL -BOOLEAN_VALUE -QUOTED_STRING -INTEGER_VALUE -DECIMAL_VALUE -IDENTIFIER -WS - -rule names: -where -booleanExpression -constantArray -compare -identifier -constant - - -atn: -[4, 1, 29, 99, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 30, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 49, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 57, 8, 1, 10, 1, 12, 1, 60, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 66, 8, 2, 10, 2, 12, 2, 69, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 80, 8, 4, 1, 5, 3, 5, 83, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 88, 8, 5, 1, 5, 1, 5, 3, 5, 92, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 97, 8, 5, 1, 5, 0, 1, 2, 6, 0, 2, 4, 6, 8, 10, 0, 2, 2, 0, 9, 9, 12, 16, 1, 0, 10, 11, 111, 0, 12, 1, 0, 0, 0, 2, 48, 1, 0, 0, 0, 4, 61, 1, 0, 0, 0, 6, 72, 1, 0, 0, 0, 8, 79, 1, 0, 0, 0, 10, 96, 1, 0, 0, 0, 12, 13, 5, 2, 0, 0, 13, 14, 3, 2, 1, 0, 14, 15, 5, 0, 0, 1, 15, 1, 1, 0, 0, 0, 16, 17, 6, 1, -1, 0, 17, 18, 3, 8, 4, 0, 18, 19, 3, 6, 3, 0, 19, 20, 3, 10, 5, 0, 20, 49, 1, 0, 0, 0, 21, 22, 3, 8, 4, 0, 22, 23, 5, 19, 0, 0, 23, 24, 3, 4, 2, 0, 24, 49, 1, 0, 0, 0, 25, 29, 3, 8, 4, 0, 26, 27, 5, 21, 0, 0, 27, 30, 5, 19, 0, 0, 28, 30, 5, 20, 0, 0, 29, 26, 1, 0, 0, 0, 29, 28, 1, 0, 0, 0, 30, 31, 1, 0, 0, 0, 31, 32, 3, 4, 2, 0, 32, 49, 1, 0, 0, 0, 33, 34, 3, 8, 4, 0, 34, 35, 5, 22, 0, 0, 35, 36, 5, 23, 0, 0, 36, 49, 1, 0, 0, 0, 37, 38, 3, 8, 4, 0, 38, 39, 5, 22, 0, 0, 39, 40, 5, 21, 0, 0, 40, 41, 5, 23, 0, 0, 41, 49, 1, 0, 0, 0, 42, 43, 5, 7, 0, 0, 43, 44, 3, 2, 1, 0, 44, 45, 5, 8, 0, 0, 45, 49, 1, 0, 0, 0, 46, 47, 5, 21, 0, 0, 47, 49, 3, 2, 1, 1, 48, 16, 1, 0, 0, 0, 48, 21, 1, 0, 0, 0, 48, 25, 1, 0, 0, 0, 48, 33, 1, 0, 0, 0, 48, 37, 1, 0, 0, 0, 48, 42, 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 49, 58, 1, 0, 0, 0, 50, 51, 10, 4, 0, 0, 51, 52, 5, 17, 0, 0, 52, 57, 3, 2, 1, 5, 53, 54, 10, 3, 0, 0, 54, 55, 5, 18, 0, 0, 55, 57, 3, 2, 1, 4, 56, 50, 1, 0, 0, 0, 56, 53, 1, 0, 0, 0, 57, 60, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 3, 1, 0, 0, 0, 60, 58, 1, 0, 0, 0, 61, 62, 5, 5, 0, 0, 62, 67, 3, 10, 5, 0, 63, 64, 5, 4, 0, 0, 64, 66, 3, 10, 5, 0, 65, 63, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 70, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 71, 5, 6, 0, 0, 71, 5, 1, 0, 0, 0, 72, 73, 7, 0, 0, 0, 73, 7, 1, 0, 0, 0, 74, 75, 5, 28, 0, 0, 75, 76, 5, 3, 0, 0, 76, 80, 5, 28, 0, 0, 77, 80, 5, 28, 0, 0, 78, 80, 5, 25, 0, 0, 79, 74, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 78, 1, 0, 0, 0, 80, 9, 1, 0, 0, 0, 81, 83, 7, 1, 0, 0, 82, 81, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 85, 5, 26, 0, 0, 85, 97, 5, 1, 0, 0, 86, 88, 7, 1, 0, 0, 87, 86, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 89, 1, 0, 0, 0, 89, 97, 5, 26, 0, 0, 90, 92, 7, 1, 0, 0, 91, 90, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 97, 5, 27, 0, 0, 94, 97, 5, 25, 0, 0, 95, 97, 5, 24, 0, 0, 96, 82, 1, 0, 0, 0, 96, 87, 1, 0, 0, 0, 96, 91, 1, 0, 0, 0, 96, 94, 1, 0, 0, 0, 96, 95, 1, 0, 0, 0, 97, 11, 1, 0, 0, 0, 10, 29, 48, 56, 58, 67, 79, 82, 87, 91, 96] \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersBaseListener.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersBaseListener.java deleted file mode 100644 index 251dd6886a..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersBaseListener.java +++ /dev/null @@ -1,520 +0,0 @@ -// Generated from org/springframework/ai/vectorstore/filter/antlr4/Filters.g4 by ANTLR 4.13.1 -package org.springframework.ai.vectorstore.filter.antlr4; - -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -// ############################################################ -// # NOTE: This is ANTLR4 auto-generated code. Do not modify! # -// ############################################################ - -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.tree.ErrorNode; -import org.antlr.v4.runtime.tree.TerminalNode; - -/** - * This class provides an empty implementation of {@link FiltersListener}, which can be - * extended to create a listener which only needs to handle a subset of the available - * methods. - */ -@SuppressWarnings("CheckReturnValue") -public class FiltersBaseListener implements FiltersListener { - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterWhere(FiltersParser.WhereContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitWhere(FiltersParser.WhereContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterNinExpression(FiltersParser.NinExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitNinExpression(FiltersParser.NinExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterIsNullExpression(FiltersParser.IsNullExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitIsNullExpression(FiltersParser.IsNullExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterIsNotNullExpression(FiltersParser.IsNotNullExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitIsNotNullExpression(FiltersParser.IsNotNullExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterAndExpression(FiltersParser.AndExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitAndExpression(FiltersParser.AndExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterInExpression(FiltersParser.InExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitInExpression(FiltersParser.InExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterNotExpression(FiltersParser.NotExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitNotExpression(FiltersParser.NotExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterCompareExpression(FiltersParser.CompareExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitCompareExpression(FiltersParser.CompareExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterOrExpression(FiltersParser.OrExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitOrExpression(FiltersParser.OrExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterGroupExpression(FiltersParser.GroupExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitGroupExpression(FiltersParser.GroupExpressionContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterConstantArray(FiltersParser.ConstantArrayContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitConstantArray(FiltersParser.ConstantArrayContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterCompare(FiltersParser.CompareContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitCompare(FiltersParser.CompareContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterCompoundIdentifier(FiltersParser.CompoundIdentifierContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitCompoundIdentifier(FiltersParser.CompoundIdentifierContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterSimpleIdentifier(FiltersParser.SimpleIdentifierContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitSimpleIdentifier(FiltersParser.SimpleIdentifierContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterQuotedIdentifier(FiltersParser.QuotedIdentifierContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitQuotedIdentifier(FiltersParser.QuotedIdentifierContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterLongConstant(FiltersParser.LongConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitLongConstant(FiltersParser.LongConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterIntegerConstant(FiltersParser.IntegerConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitIntegerConstant(FiltersParser.IntegerConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterDecimalConstant(FiltersParser.DecimalConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitDecimalConstant(FiltersParser.DecimalConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterTextConstant(FiltersParser.TextConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitTextConstant(FiltersParser.TextConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterBooleanConstant(FiltersParser.BooleanConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitBooleanConstant(FiltersParser.BooleanConstantContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void enterEveryRule(ParserRuleContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void exitEveryRule(ParserRuleContext ctx) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void visitTerminal(TerminalNode node) { - } - - /** - * {@inheritDoc} - * - *

- * The default implementation does nothing. - *

- */ - @Override - public void visitErrorNode(ErrorNode node) { - } - -} \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersBaseVisitor.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersBaseVisitor.java deleted file mode 100644 index c11b837211..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersBaseVisitor.java +++ /dev/null @@ -1,297 +0,0 @@ -// Generated from org/springframework/ai/vectorstore/filter/antlr4/Filters.g4 by ANTLR 4.13.1 -package org.springframework.ai.vectorstore.filter.antlr4; - -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -// ############################################################ -// # NOTE: This is ANTLR4 auto-generated code. Do not modify! # -// ############################################################ - -import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; - -/** - * This class provides an empty implementation of {@link FiltersVisitor}, which can be - * extended to create a visitor which only needs to handle a subset of the available - * methods. - * - * @param The return type of the visit operation. Use {@link Void} for operations with - * no return type. - */ -@SuppressWarnings("CheckReturnValue") -public class FiltersBaseVisitor extends AbstractParseTreeVisitor implements FiltersVisitor { - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitWhere(FiltersParser.WhereContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitNinExpression(FiltersParser.NinExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitIsNullExpression(FiltersParser.IsNullExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitIsNotNullExpression(FiltersParser.IsNotNullExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitAndExpression(FiltersParser.AndExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitInExpression(FiltersParser.InExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitNotExpression(FiltersParser.NotExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitCompareExpression(FiltersParser.CompareExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitOrExpression(FiltersParser.OrExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitGroupExpression(FiltersParser.GroupExpressionContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitConstantArray(FiltersParser.ConstantArrayContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitCompare(FiltersParser.CompareContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitCompoundIdentifier(FiltersParser.CompoundIdentifierContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitSimpleIdentifier(FiltersParser.SimpleIdentifierContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitQuotedIdentifier(FiltersParser.QuotedIdentifierContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitLongConstant(FiltersParser.LongConstantContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitIntegerConstant(FiltersParser.IntegerConstantContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitDecimalConstant(FiltersParser.DecimalConstantContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitTextConstant(FiltersParser.TextConstantContext ctx) { - return visitChildren(ctx); - } - - /** - * {@inheritDoc} - * - *

- * The default implementation returns the result of calling {@link #visitChildren} on - * {@code ctx}. - *

- */ - @Override - public T visitBooleanConstant(FiltersParser.BooleanConstantContext ctx) { - return visitChildren(ctx); - } - -} \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.interp b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.interp deleted file mode 100644 index 0b0bd5518b..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.interp +++ /dev/null @@ -1,107 +0,0 @@ -token literal names: -null -null -null -'.' -',' -'[' -']' -'(' -')' -'==' -'-' -'+' -'>' -'>=' -'<' -'<=' -'!=' -null -null -null -null -null -null -null -null -null -null -null -null -null - -token symbolic names: -null -LONG_SUFFIX -WHERE -DOT -COMMA -LEFT_SQUARE_BRACKETS -RIGHT_SQUARE_BRACKETS -LEFT_PARENTHESIS -RIGHT_PARENTHESIS -EQUALS -MINUS -PLUS -GT -GE -LT -LE -NE -AND -OR -IN -NIN -NOT -IS -NULL -BOOLEAN_VALUE -QUOTED_STRING -INTEGER_VALUE -DECIMAL_VALUE -IDENTIFIER -WS - -rule names: -LONG_SUFFIX -WHERE -DOT -COMMA -LEFT_SQUARE_BRACKETS -RIGHT_SQUARE_BRACKETS -LEFT_PARENTHESIS -RIGHT_PARENTHESIS -EQUALS -MINUS -PLUS -GT -GE -LT -LE -NE -AND -OR -IN -NIN -NOT -IS -NULL -BOOLEAN_VALUE -QUOTED_STRING -INTEGER_VALUE -DECIMAL_VALUE -IDENTIFIER -DECIMAL_DIGITS -DIGIT -LETTER -WS - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[4, 0, 29, 259, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 78, 8, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 120, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 128, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 134, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 142, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 150, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 156, 8, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 166, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 186, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 192, 8, 24, 10, 24, 12, 24, 195, 9, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 202, 8, 24, 10, 24, 12, 24, 205, 9, 24, 1, 24, 3, 24, 208, 8, 24, 1, 25, 4, 25, 211, 8, 25, 11, 25, 12, 25, 212, 1, 26, 1, 26, 1, 27, 1, 27, 3, 27, 219, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 224, 8, 27, 10, 27, 12, 27, 227, 9, 27, 1, 28, 4, 28, 230, 8, 28, 11, 28, 12, 28, 231, 1, 28, 1, 28, 5, 28, 236, 8, 28, 10, 28, 12, 28, 239, 9, 28, 1, 28, 1, 28, 4, 28, 243, 8, 28, 11, 28, 12, 28, 244, 3, 28, 247, 8, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 4, 31, 254, 8, 31, 11, 31, 12, 31, 255, 1, 31, 1, 31, 0, 0, 32, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 0, 59, 0, 61, 0, 63, 29, 1, 0, 6, 2, 0, 76, 76, 108, 108, 2, 0, 39, 39, 92, 92, 2, 0, 34, 34, 92, 92, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 3, 0, 9, 10, 13, 13, 32, 32, 283, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 1, 65, 1, 0, 0, 0, 3, 77, 1, 0, 0, 0, 5, 79, 1, 0, 0, 0, 7, 81, 1, 0, 0, 0, 9, 83, 1, 0, 0, 0, 11, 85, 1, 0, 0, 0, 13, 87, 1, 0, 0, 0, 15, 89, 1, 0, 0, 0, 17, 91, 1, 0, 0, 0, 19, 94, 1, 0, 0, 0, 21, 96, 1, 0, 0, 0, 23, 98, 1, 0, 0, 0, 25, 100, 1, 0, 0, 0, 27, 103, 1, 0, 0, 0, 29, 105, 1, 0, 0, 0, 31, 108, 1, 0, 0, 0, 33, 119, 1, 0, 0, 0, 35, 127, 1, 0, 0, 0, 37, 133, 1, 0, 0, 0, 39, 141, 1, 0, 0, 0, 41, 149, 1, 0, 0, 0, 43, 155, 1, 0, 0, 0, 45, 165, 1, 0, 0, 0, 47, 185, 1, 0, 0, 0, 49, 207, 1, 0, 0, 0, 51, 210, 1, 0, 0, 0, 53, 214, 1, 0, 0, 0, 55, 218, 1, 0, 0, 0, 57, 246, 1, 0, 0, 0, 59, 248, 1, 0, 0, 0, 61, 250, 1, 0, 0, 0, 63, 253, 1, 0, 0, 0, 65, 66, 7, 0, 0, 0, 66, 2, 1, 0, 0, 0, 67, 68, 5, 87, 0, 0, 68, 69, 5, 72, 0, 0, 69, 70, 5, 69, 0, 0, 70, 71, 5, 82, 0, 0, 71, 78, 5, 69, 0, 0, 72, 73, 5, 119, 0, 0, 73, 74, 5, 104, 0, 0, 74, 75, 5, 101, 0, 0, 75, 76, 5, 114, 0, 0, 76, 78, 5, 101, 0, 0, 77, 67, 1, 0, 0, 0, 77, 72, 1, 0, 0, 0, 78, 4, 1, 0, 0, 0, 79, 80, 5, 46, 0, 0, 80, 6, 1, 0, 0, 0, 81, 82, 5, 44, 0, 0, 82, 8, 1, 0, 0, 0, 83, 84, 5, 91, 0, 0, 84, 10, 1, 0, 0, 0, 85, 86, 5, 93, 0, 0, 86, 12, 1, 0, 0, 0, 87, 88, 5, 40, 0, 0, 88, 14, 1, 0, 0, 0, 89, 90, 5, 41, 0, 0, 90, 16, 1, 0, 0, 0, 91, 92, 5, 61, 0, 0, 92, 93, 5, 61, 0, 0, 93, 18, 1, 0, 0, 0, 94, 95, 5, 45, 0, 0, 95, 20, 1, 0, 0, 0, 96, 97, 5, 43, 0, 0, 97, 22, 1, 0, 0, 0, 98, 99, 5, 62, 0, 0, 99, 24, 1, 0, 0, 0, 100, 101, 5, 62, 0, 0, 101, 102, 5, 61, 0, 0, 102, 26, 1, 0, 0, 0, 103, 104, 5, 60, 0, 0, 104, 28, 1, 0, 0, 0, 105, 106, 5, 60, 0, 0, 106, 107, 5, 61, 0, 0, 107, 30, 1, 0, 0, 0, 108, 109, 5, 33, 0, 0, 109, 110, 5, 61, 0, 0, 110, 32, 1, 0, 0, 0, 111, 112, 5, 65, 0, 0, 112, 113, 5, 78, 0, 0, 113, 120, 5, 68, 0, 0, 114, 115, 5, 97, 0, 0, 115, 116, 5, 110, 0, 0, 116, 120, 5, 100, 0, 0, 117, 118, 5, 38, 0, 0, 118, 120, 5, 38, 0, 0, 119, 111, 1, 0, 0, 0, 119, 114, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 120, 34, 1, 0, 0, 0, 121, 122, 5, 79, 0, 0, 122, 128, 5, 82, 0, 0, 123, 124, 5, 111, 0, 0, 124, 128, 5, 114, 0, 0, 125, 126, 5, 124, 0, 0, 126, 128, 5, 124, 0, 0, 127, 121, 1, 0, 0, 0, 127, 123, 1, 0, 0, 0, 127, 125, 1, 0, 0, 0, 128, 36, 1, 0, 0, 0, 129, 130, 5, 73, 0, 0, 130, 134, 5, 78, 0, 0, 131, 132, 5, 105, 0, 0, 132, 134, 5, 110, 0, 0, 133, 129, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 38, 1, 0, 0, 0, 135, 136, 5, 78, 0, 0, 136, 137, 5, 73, 0, 0, 137, 142, 5, 78, 0, 0, 138, 139, 5, 110, 0, 0, 139, 140, 5, 105, 0, 0, 140, 142, 5, 110, 0, 0, 141, 135, 1, 0, 0, 0, 141, 138, 1, 0, 0, 0, 142, 40, 1, 0, 0, 0, 143, 144, 5, 78, 0, 0, 144, 145, 5, 79, 0, 0, 145, 150, 5, 84, 0, 0, 146, 147, 5, 110, 0, 0, 147, 148, 5, 111, 0, 0, 148, 150, 5, 116, 0, 0, 149, 143, 1, 0, 0, 0, 149, 146, 1, 0, 0, 0, 150, 42, 1, 0, 0, 0, 151, 152, 5, 73, 0, 0, 152, 156, 5, 83, 0, 0, 153, 154, 5, 105, 0, 0, 154, 156, 5, 115, 0, 0, 155, 151, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 44, 1, 0, 0, 0, 157, 158, 5, 78, 0, 0, 158, 159, 5, 85, 0, 0, 159, 160, 5, 76, 0, 0, 160, 166, 5, 76, 0, 0, 161, 162, 5, 110, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 108, 0, 0, 164, 166, 5, 108, 0, 0, 165, 157, 1, 0, 0, 0, 165, 161, 1, 0, 0, 0, 166, 46, 1, 0, 0, 0, 167, 168, 5, 84, 0, 0, 168, 169, 5, 82, 0, 0, 169, 170, 5, 85, 0, 0, 170, 186, 5, 69, 0, 0, 171, 172, 5, 116, 0, 0, 172, 173, 5, 114, 0, 0, 173, 174, 5, 117, 0, 0, 174, 186, 5, 101, 0, 0, 175, 176, 5, 70, 0, 0, 176, 177, 5, 65, 0, 0, 177, 178, 5, 76, 0, 0, 178, 179, 5, 83, 0, 0, 179, 186, 5, 69, 0, 0, 180, 181, 5, 102, 0, 0, 181, 182, 5, 97, 0, 0, 182, 183, 5, 108, 0, 0, 183, 184, 5, 115, 0, 0, 184, 186, 5, 101, 0, 0, 185, 167, 1, 0, 0, 0, 185, 171, 1, 0, 0, 0, 185, 175, 1, 0, 0, 0, 185, 180, 1, 0, 0, 0, 186, 48, 1, 0, 0, 0, 187, 193, 5, 39, 0, 0, 188, 192, 8, 1, 0, 0, 189, 190, 5, 92, 0, 0, 190, 192, 9, 0, 0, 0, 191, 188, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 208, 5, 39, 0, 0, 197, 203, 5, 34, 0, 0, 198, 202, 8, 2, 0, 0, 199, 200, 5, 92, 0, 0, 200, 202, 9, 0, 0, 0, 201, 198, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 202, 205, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 203, 204, 1, 0, 0, 0, 204, 206, 1, 0, 0, 0, 205, 203, 1, 0, 0, 0, 206, 208, 5, 34, 0, 0, 207, 187, 1, 0, 0, 0, 207, 197, 1, 0, 0, 0, 208, 50, 1, 0, 0, 0, 209, 211, 3, 59, 29, 0, 210, 209, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 210, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 52, 1, 0, 0, 0, 214, 215, 3, 57, 28, 0, 215, 54, 1, 0, 0, 0, 216, 219, 3, 61, 30, 0, 217, 219, 5, 95, 0, 0, 218, 216, 1, 0, 0, 0, 218, 217, 1, 0, 0, 0, 219, 225, 1, 0, 0, 0, 220, 224, 3, 61, 30, 0, 221, 224, 3, 59, 29, 0, 222, 224, 5, 95, 0, 0, 223, 220, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 223, 222, 1, 0, 0, 0, 224, 227, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 56, 1, 0, 0, 0, 227, 225, 1, 0, 0, 0, 228, 230, 3, 59, 29, 0, 229, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 237, 5, 46, 0, 0, 234, 236, 3, 59, 29, 0, 235, 234, 1, 0, 0, 0, 236, 239, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 247, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 240, 242, 5, 46, 0, 0, 241, 243, 3, 59, 29, 0, 242, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 247, 1, 0, 0, 0, 246, 229, 1, 0, 0, 0, 246, 240, 1, 0, 0, 0, 247, 58, 1, 0, 0, 0, 248, 249, 7, 3, 0, 0, 249, 60, 1, 0, 0, 0, 250, 251, 7, 4, 0, 0, 251, 62, 1, 0, 0, 0, 252, 254, 7, 5, 0, 0, 253, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 258, 6, 31, 0, 0, 258, 64, 1, 0, 0, 0, 24, 0, 77, 119, 127, 133, 141, 149, 155, 165, 185, 191, 193, 201, 203, 207, 212, 218, 223, 225, 231, 237, 244, 246, 255, 1, 0, 1, 0] \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.java deleted file mode 100644 index 48886efd8b..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.java +++ /dev/null @@ -1,328 +0,0 @@ -// Generated from org/springframework/ai/vectorstore/filter/antlr4/Filters.g4 by ANTLR 4.13.1 -package org.springframework.ai.vectorstore.filter.antlr4; - -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -// ############################################################ -// # NOTE: This is ANTLR4 auto-generated code. Do not modify! # -// ############################################################ - -import org.antlr.v4.runtime.Lexer; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.Token; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.*; -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", "CheckReturnValue", "this-escape" }) -public class FiltersLexer extends Lexer { - - static { - RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); - } - - protected static final DFA[] _decisionToDFA; - - protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); - - public static final int LONG_SUFFIX = 1, WHERE = 2, DOT = 3, COMMA = 4, LEFT_SQUARE_BRACKETS = 5, - RIGHT_SQUARE_BRACKETS = 6, LEFT_PARENTHESIS = 7, RIGHT_PARENTHESIS = 8, EQUALS = 9, MINUS = 10, PLUS = 11, - GT = 12, GE = 13, LT = 14, LE = 15, NE = 16, AND = 17, OR = 18, IN = 19, NIN = 20, NOT = 21, IS = 22, - NULL = 23, BOOLEAN_VALUE = 24, QUOTED_STRING = 25, INTEGER_VALUE = 26, DECIMAL_VALUE = 27, IDENTIFIER = 28, - WS = 29; - - public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; - - public static String[] modeNames = { "DEFAULT_MODE" }; - - private static String[] makeRuleNames() { - return new String[] { "LONG_SUFFIX", "WHERE", "DOT", "COMMA", "LEFT_SQUARE_BRACKETS", "RIGHT_SQUARE_BRACKETS", - "LEFT_PARENTHESIS", "RIGHT_PARENTHESIS", "EQUALS", "MINUS", "PLUS", "GT", "GE", "LT", "LE", "NE", "AND", - "OR", "IN", "NIN", "NOT", "IS", "NULL", "BOOLEAN_VALUE", "QUOTED_STRING", "INTEGER_VALUE", - "DECIMAL_VALUE", "IDENTIFIER", "DECIMAL_DIGITS", "DIGIT", "LETTER", "WS" }; - } - - public static final String[] ruleNames = makeRuleNames(); - - private static String[] makeLiteralNames() { - return new String[] { null, null, null, "'.'", "','", "'['", "']'", "'('", "')'", "'=='", "'-'", "'+'", "'>'", - "'>='", "'<'", "'<='", "'!='" }; - } - - private static final String[] _LITERAL_NAMES = makeLiteralNames(); - - private static String[] makeSymbolicNames() { - return new String[] { null, "LONG_SUFFIX", "WHERE", "DOT", "COMMA", "LEFT_SQUARE_BRACKETS", - "RIGHT_SQUARE_BRACKETS", "LEFT_PARENTHESIS", "RIGHT_PARENTHESIS", "EQUALS", "MINUS", "PLUS", "GT", "GE", - "LT", "LE", "NE", "AND", "OR", "IN", "NIN", "NOT", "IS", "NULL", "BOOLEAN_VALUE", "QUOTED_STRING", - "INTEGER_VALUE", "DECIMAL_VALUE", "IDENTIFIER", "WS" }; - } - - private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); - - public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - - /** - * @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++) { - tokenNames[i] = VOCABULARY.getLiteralName(i); - if (tokenNames[i] == null) { - tokenNames[i] = VOCABULARY.getSymbolicName(i); - } - - if (tokenNames[i] == null) { - tokenNames[i] = ""; - } - } - } - - @Override - @Deprecated - public String[] getTokenNames() { - return tokenNames; - } - - @Override - - public Vocabulary getVocabulary() { - return VOCABULARY; - } - - public FiltersLexer(CharStream input) { - super(input); - _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); - } - - @Override - public String getGrammarFileName() { - return "Filters.g4"; - } - - @Override - public String[] getRuleNames() { - return ruleNames; - } - - @Override - public String getSerializedATN() { - return _serializedATN; - } - - @Override - public String[] getChannelNames() { - return channelNames; - } - - @Override - public String[] getModeNames() { - return modeNames; - } - - @Override - public ATN getATN() { - return _ATN; - } - - public static final String _serializedATN = "\u0004\u0000\u001d\u0103\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002" - + "\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002" - + "\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002" - + "\u0007\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002" - + "\u000b\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e" - + "\u0002\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011" - + "\u0002\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014" - + "\u0002\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017" - + "\u0002\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a" - + "\u0002\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d" - + "\u0002\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0001\u0000\u0001\u0000" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0003\u0001N\b\u0001" - + "\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004" - + "\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007" - + "\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\n\u0001\n\u0001\u000b\u0001" - + "\u000b\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\u000e\u0001\u000e" - + "\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010" - + "\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010" - + "\u0003\u0010x\b\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011" - + "\u0001\u0011\u0001\u0011\u0003\u0011\u0080\b\u0011\u0001\u0012\u0001\u0012" - + "\u0001\u0012\u0001\u0012\u0003\u0012\u0086\b\u0012\u0001\u0013\u0001\u0013" - + "\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0003\u0013\u008e\b\u0013" - + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014" - + "\u0003\u0014\u0096\b\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015" - + "\u0003\u0015\u009c\b\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016" - + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0003\u0016\u00a6\b\u0016" - + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017" - + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017" - + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017" - + "\u0003\u0017\u00ba\b\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018" - + "\u0005\u0018\u00c0\b\u0018\n\u0018\f\u0018\u00c3\t\u0018\u0001\u0018\u0001" - + "\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u00ca\b\u0018\n" - + "\u0018\f\u0018\u00cd\t\u0018\u0001\u0018\u0003\u0018\u00d0\b\u0018\u0001" - + "\u0019\u0004\u0019\u00d3\b\u0019\u000b\u0019\f\u0019\u00d4\u0001\u001a" - + "\u0001\u001a\u0001\u001b\u0001\u001b\u0003\u001b\u00db\b\u001b\u0001\u001b" - + "\u0001\u001b\u0001\u001b\u0005\u001b\u00e0\b\u001b\n\u001b\f\u001b\u00e3" - + "\t\u001b\u0001\u001c\u0004\u001c\u00e6\b\u001c\u000b\u001c\f\u001c\u00e7" - + "\u0001\u001c\u0001\u001c\u0005\u001c\u00ec\b\u001c\n\u001c\f\u001c\u00ef" - + "\t\u001c\u0001\u001c\u0001\u001c\u0004\u001c\u00f3\b\u001c\u000b\u001c" - + "\f\u001c\u00f4\u0003\u001c\u00f7\b\u001c\u0001\u001d\u0001\u001d\u0001" - + "\u001e\u0001\u001e\u0001\u001f\u0004\u001f\u00fe\b\u001f\u000b\u001f\f" - + "\u001f\u00ff\u0001\u001f\u0001\u001f\u0000\u0000 \u0001\u0001\u0003\u0002" - + "\u0005\u0003\u0007\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013" - + "\n\u0015\u000b\u0017\f\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011" - + "#\u0012%\u0013\'\u0014)\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b" - + "7\u001c9\u0000;\u0000=\u0000?\u001d\u0001\u0000\u0006\u0002\u0000LLll" - + "\u0002\u0000\'\'\\\\\u0002\u0000\"\"\\\\\u0001\u000009\u0002\u0000AZa" - + "z\u0003\u0000\t\n\r\r \u011b\u0000\u0001\u0001\u0000\u0000\u0000\u0000" - + "\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000" - + "\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b" - + "\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001" - + "\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000\u0013\u0001" - + "\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001" - + "\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001" - + "\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001" - + "\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000\u0000" - + "\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000\u0000" - + "\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000-" - + "\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u00001\u0001\u0000" - + "\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000\u0000" - + "\u00007\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0001A" - + "\u0001\u0000\u0000\u0000\u0003M\u0001\u0000\u0000\u0000\u0005O\u0001\u0000" - + "\u0000\u0000\u0007Q\u0001\u0000\u0000\u0000\tS\u0001\u0000\u0000\u0000" - + "\u000bU\u0001\u0000\u0000\u0000\rW\u0001\u0000\u0000\u0000\u000fY\u0001" - + "\u0000\u0000\u0000\u0011[\u0001\u0000\u0000\u0000\u0013^\u0001\u0000\u0000" - + "\u0000\u0015`\u0001\u0000\u0000\u0000\u0017b\u0001\u0000\u0000\u0000\u0019" - + "d\u0001\u0000\u0000\u0000\u001bg\u0001\u0000\u0000\u0000\u001di\u0001" - + "\u0000\u0000\u0000\u001fl\u0001\u0000\u0000\u0000!w\u0001\u0000\u0000" - + "\u0000#\u007f\u0001\u0000\u0000\u0000%\u0085\u0001\u0000\u0000\u0000\'" - + "\u008d\u0001\u0000\u0000\u0000)\u0095\u0001\u0000\u0000\u0000+\u009b\u0001" - + "\u0000\u0000\u0000-\u00a5\u0001\u0000\u0000\u0000/\u00b9\u0001\u0000\u0000" - + "\u00001\u00cf\u0001\u0000\u0000\u00003\u00d2\u0001\u0000\u0000\u00005" - + "\u00d6\u0001\u0000\u0000\u00007\u00da\u0001\u0000\u0000\u00009\u00f6\u0001" - + "\u0000\u0000\u0000;\u00f8\u0001\u0000\u0000\u0000=\u00fa\u0001\u0000\u0000" - + "\u0000?\u00fd\u0001\u0000\u0000\u0000AB\u0007\u0000\u0000\u0000B\u0002" - + "\u0001\u0000\u0000\u0000CD\u0005W\u0000\u0000DE\u0005H\u0000\u0000EF\u0005" - + "E\u0000\u0000FG\u0005R\u0000\u0000GN\u0005E\u0000\u0000HI\u0005w\u0000" - + "\u0000IJ\u0005h\u0000\u0000JK\u0005e\u0000\u0000KL\u0005r\u0000\u0000" - + "LN\u0005e\u0000\u0000MC\u0001\u0000\u0000\u0000MH\u0001\u0000\u0000\u0000" - + "N\u0004\u0001\u0000\u0000\u0000OP\u0005.\u0000\u0000P\u0006\u0001\u0000" - + "\u0000\u0000QR\u0005,\u0000\u0000R\b\u0001\u0000\u0000\u0000ST\u0005[" - + "\u0000\u0000T\n\u0001\u0000\u0000\u0000UV\u0005]\u0000\u0000V\f\u0001" - + "\u0000\u0000\u0000WX\u0005(\u0000\u0000X\u000e\u0001\u0000\u0000\u0000" - + "YZ\u0005)\u0000\u0000Z\u0010\u0001\u0000\u0000\u0000[\\\u0005=\u0000\u0000" - + "\\]\u0005=\u0000\u0000]\u0012\u0001\u0000\u0000\u0000^_\u0005-\u0000\u0000" - + "_\u0014\u0001\u0000\u0000\u0000`a\u0005+\u0000\u0000a\u0016\u0001\u0000" - + "\u0000\u0000bc\u0005>\u0000\u0000c\u0018\u0001\u0000\u0000\u0000de\u0005" - + ">\u0000\u0000ef\u0005=\u0000\u0000f\u001a\u0001\u0000\u0000\u0000gh\u0005" - + "<\u0000\u0000h\u001c\u0001\u0000\u0000\u0000ij\u0005<\u0000\u0000jk\u0005" - + "=\u0000\u0000k\u001e\u0001\u0000\u0000\u0000lm\u0005!\u0000\u0000mn\u0005" - + "=\u0000\u0000n \u0001\u0000\u0000\u0000op\u0005A\u0000\u0000pq\u0005N" - + "\u0000\u0000qx\u0005D\u0000\u0000rs\u0005a\u0000\u0000st\u0005n\u0000" - + "\u0000tx\u0005d\u0000\u0000uv\u0005&\u0000\u0000vx\u0005&\u0000\u0000" - + "wo\u0001\u0000\u0000\u0000wr\u0001\u0000\u0000\u0000wu\u0001\u0000\u0000" - + "\u0000x\"\u0001\u0000\u0000\u0000yz\u0005O\u0000\u0000z\u0080\u0005R\u0000" - + "\u0000{|\u0005o\u0000\u0000|\u0080\u0005r\u0000\u0000}~\u0005|\u0000\u0000" - + "~\u0080\u0005|\u0000\u0000\u007fy\u0001\u0000\u0000\u0000\u007f{\u0001" - + "\u0000\u0000\u0000\u007f}\u0001\u0000\u0000\u0000\u0080$\u0001\u0000\u0000" - + "\u0000\u0081\u0082\u0005I\u0000\u0000\u0082\u0086\u0005N\u0000\u0000\u0083" - + "\u0084\u0005i\u0000\u0000\u0084\u0086\u0005n\u0000\u0000\u0085\u0081\u0001" - + "\u0000\u0000\u0000\u0085\u0083\u0001\u0000\u0000\u0000\u0086&\u0001\u0000" - + "\u0000\u0000\u0087\u0088\u0005N\u0000\u0000\u0088\u0089\u0005I\u0000\u0000" - + "\u0089\u008e\u0005N\u0000\u0000\u008a\u008b\u0005n\u0000\u0000\u008b\u008c" - + "\u0005i\u0000\u0000\u008c\u008e\u0005n\u0000\u0000\u008d\u0087\u0001\u0000" - + "\u0000\u0000\u008d\u008a\u0001\u0000\u0000\u0000\u008e(\u0001\u0000\u0000" - + "\u0000\u008f\u0090\u0005N\u0000\u0000\u0090\u0091\u0005O\u0000\u0000\u0091" - + "\u0096\u0005T\u0000\u0000\u0092\u0093\u0005n\u0000\u0000\u0093\u0094\u0005" - + "o\u0000\u0000\u0094\u0096\u0005t\u0000\u0000\u0095\u008f\u0001\u0000\u0000" - + "\u0000\u0095\u0092\u0001\u0000\u0000\u0000\u0096*\u0001\u0000\u0000\u0000" - + "\u0097\u0098\u0005I\u0000\u0000\u0098\u009c\u0005S\u0000\u0000\u0099\u009a" - + "\u0005i\u0000\u0000\u009a\u009c\u0005s\u0000\u0000\u009b\u0097\u0001\u0000" - + "\u0000\u0000\u009b\u0099\u0001\u0000\u0000\u0000\u009c,\u0001\u0000\u0000" - + "\u0000\u009d\u009e\u0005N\u0000\u0000\u009e\u009f\u0005U\u0000\u0000\u009f" - + "\u00a0\u0005L\u0000\u0000\u00a0\u00a6\u0005L\u0000\u0000\u00a1\u00a2\u0005" - + "n\u0000\u0000\u00a2\u00a3\u0005u\u0000\u0000\u00a3\u00a4\u0005l\u0000" - + "\u0000\u00a4\u00a6\u0005l\u0000\u0000\u00a5\u009d\u0001\u0000\u0000\u0000" - + "\u00a5\u00a1\u0001\u0000\u0000\u0000\u00a6.\u0001\u0000\u0000\u0000\u00a7" - + "\u00a8\u0005T\u0000\u0000\u00a8\u00a9\u0005R\u0000\u0000\u00a9\u00aa\u0005" - + "U\u0000\u0000\u00aa\u00ba\u0005E\u0000\u0000\u00ab\u00ac\u0005t\u0000" - + "\u0000\u00ac\u00ad\u0005r\u0000\u0000\u00ad\u00ae\u0005u\u0000\u0000\u00ae" - + "\u00ba\u0005e\u0000\u0000\u00af\u00b0\u0005F\u0000\u0000\u00b0\u00b1\u0005" - + "A\u0000\u0000\u00b1\u00b2\u0005L\u0000\u0000\u00b2\u00b3\u0005S\u0000" - + "\u0000\u00b3\u00ba\u0005E\u0000\u0000\u00b4\u00b5\u0005f\u0000\u0000\u00b5" - + "\u00b6\u0005a\u0000\u0000\u00b6\u00b7\u0005l\u0000\u0000\u00b7\u00b8\u0005" - + "s\u0000\u0000\u00b8\u00ba\u0005e\u0000\u0000\u00b9\u00a7\u0001\u0000\u0000" - + "\u0000\u00b9\u00ab\u0001\u0000\u0000\u0000\u00b9\u00af\u0001\u0000\u0000" - + "\u0000\u00b9\u00b4\u0001\u0000\u0000\u0000\u00ba0\u0001\u0000\u0000\u0000" - + "\u00bb\u00c1\u0005\'\u0000\u0000\u00bc\u00c0\b\u0001\u0000\u0000\u00bd" - + "\u00be\u0005\\\u0000\u0000\u00be\u00c0\t\u0000\u0000\u0000\u00bf\u00bc" - + "\u0001\u0000\u0000\u0000\u00bf\u00bd\u0001\u0000\u0000\u0000\u00c0\u00c3" - + "\u0001\u0000\u0000\u0000\u00c1\u00bf\u0001\u0000\u0000\u0000\u00c1\u00c2" - + "\u0001\u0000\u0000\u0000\u00c2\u00c4\u0001\u0000\u0000\u0000\u00c3\u00c1" - + "\u0001\u0000\u0000\u0000\u00c4\u00d0\u0005\'\u0000\u0000\u00c5\u00cb\u0005" - + "\"\u0000\u0000\u00c6\u00ca\b\u0002\u0000\u0000\u00c7\u00c8\u0005\\\u0000" - + "\u0000\u00c8\u00ca\t\u0000\u0000\u0000\u00c9\u00c6\u0001\u0000\u0000\u0000" - + "\u00c9\u00c7\u0001\u0000\u0000\u0000\u00ca\u00cd\u0001\u0000\u0000\u0000" - + "\u00cb\u00c9\u0001\u0000\u0000\u0000\u00cb\u00cc\u0001\u0000\u0000\u0000" - + "\u00cc\u00ce\u0001\u0000\u0000\u0000\u00cd\u00cb\u0001\u0000\u0000\u0000" - + "\u00ce\u00d0\u0005\"\u0000\u0000\u00cf\u00bb\u0001\u0000\u0000\u0000\u00cf" - + "\u00c5\u0001\u0000\u0000\u0000\u00d02\u0001\u0000\u0000\u0000\u00d1\u00d3" - + "\u0003;\u001d\u0000\u00d2\u00d1\u0001\u0000\u0000\u0000\u00d3\u00d4\u0001" - + "\u0000\u0000\u0000\u00d4\u00d2\u0001\u0000\u0000\u0000\u00d4\u00d5\u0001" - + "\u0000\u0000\u0000\u00d54\u0001\u0000\u0000\u0000\u00d6\u00d7\u00039\u001c" - + "\u0000\u00d76\u0001\u0000\u0000\u0000\u00d8\u00db\u0003=\u001e\u0000\u00d9" - + "\u00db\u0005_\u0000\u0000\u00da\u00d8\u0001\u0000\u0000\u0000\u00da\u00d9" - + "\u0001\u0000\u0000\u0000\u00db\u00e1\u0001\u0000\u0000\u0000\u00dc\u00e0" - + "\u0003=\u001e\u0000\u00dd\u00e0\u0003;\u001d\u0000\u00de\u00e0\u0005_" - + "\u0000\u0000\u00df\u00dc\u0001\u0000\u0000\u0000\u00df\u00dd\u0001\u0000" - + "\u0000\u0000\u00df\u00de\u0001\u0000\u0000\u0000\u00e0\u00e3\u0001\u0000" - + "\u0000\u0000\u00e1\u00df\u0001\u0000\u0000\u0000\u00e1\u00e2\u0001\u0000" - + "\u0000\u0000\u00e28\u0001\u0000\u0000\u0000\u00e3\u00e1\u0001\u0000\u0000" - + "\u0000\u00e4\u00e6\u0003;\u001d\u0000\u00e5\u00e4\u0001\u0000\u0000\u0000" - + "\u00e6\u00e7\u0001\u0000\u0000\u0000\u00e7\u00e5\u0001\u0000\u0000\u0000" - + "\u00e7\u00e8\u0001\u0000\u0000\u0000\u00e8\u00e9\u0001\u0000\u0000\u0000" - + "\u00e9\u00ed\u0005.\u0000\u0000\u00ea\u00ec\u0003;\u001d\u0000\u00eb\u00ea" - + "\u0001\u0000\u0000\u0000\u00ec\u00ef\u0001\u0000\u0000\u0000\u00ed\u00eb" - + "\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001\u0000\u0000\u0000\u00ee\u00f7" - + "\u0001\u0000\u0000\u0000\u00ef\u00ed\u0001\u0000\u0000\u0000\u00f0\u00f2" - + "\u0005.\u0000\u0000\u00f1\u00f3\u0003;\u001d\u0000\u00f2\u00f1\u0001\u0000" - + "\u0000\u0000\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u00f2\u0001\u0000" - + "\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000\u0000\u00f5\u00f7\u0001\u0000" - + "\u0000\u0000\u00f6\u00e5\u0001\u0000\u0000\u0000\u00f6\u00f0\u0001\u0000" - + "\u0000\u0000\u00f7:\u0001\u0000\u0000\u0000\u00f8\u00f9\u0007\u0003\u0000" - + "\u0000\u00f9<\u0001\u0000\u0000\u0000\u00fa\u00fb\u0007\u0004\u0000\u0000" - + "\u00fb>\u0001\u0000\u0000\u0000\u00fc\u00fe\u0007\u0005\u0000\u0000\u00fd" - + "\u00fc\u0001\u0000\u0000\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff" - + "\u00fd\u0001\u0000\u0000\u0000\u00ff\u0100\u0001\u0000\u0000\u0000\u0100" - + "\u0101\u0001\u0000\u0000\u0000\u0101\u0102\u0006\u001f\u0000\u0000\u0102" - + "@\u0001\u0000\u0000\u0000\u0018\u0000Mw\u007f\u0085\u008d\u0095\u009b" - + "\u00a5\u00b9\u00bf\u00c1\u00c9\u00cb\u00cf\u00d4\u00da\u00df\u00e1\u00e7" - + "\u00ed\u00f4\u00f6\u00ff\u0001\u0000\u0001\u0000"; - - public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } - -} \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersListener.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersListener.java deleted file mode 100644 index 21289d1211..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersListener.java +++ /dev/null @@ -1,306 +0,0 @@ -// Generated from org/springframework/ai/vectorstore/filter/antlr4/Filters.g4 by ANTLR 4.13.1 -package org.springframework.ai.vectorstore.filter.antlr4; - -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -// ############################################################ -// # NOTE: This is ANTLR4 auto-generated code. Do not modify! # -// ############################################################ - -import org.antlr.v4.runtime.tree.ParseTreeListener; - -/** - * This interface defines a complete listener for a parse tree produced by - * {@link FiltersParser}. - */ -public interface FiltersListener extends ParseTreeListener { - - /** - * Enter a parse tree produced by {@link FiltersParser#where}. - * @param ctx the parse tree - */ - void enterWhere(FiltersParser.WhereContext ctx); - - /** - * Exit a parse tree produced by {@link FiltersParser#where}. - * @param ctx the parse tree - */ - void exitWhere(FiltersParser.WhereContext ctx); - - /** - * Enter a parse tree produced by the {@code NinExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterNinExpression(FiltersParser.NinExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code NinExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitNinExpression(FiltersParser.NinExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code IsNullExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterIsNullExpression(FiltersParser.IsNullExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code IsNullExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitIsNullExpression(FiltersParser.IsNullExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code IsNotNullExpression} labeled alternative - * in {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterIsNotNullExpression(FiltersParser.IsNotNullExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code IsNotNullExpression} labeled alternative - * in {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitIsNotNullExpression(FiltersParser.IsNotNullExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code AndExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterAndExpression(FiltersParser.AndExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code AndExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitAndExpression(FiltersParser.AndExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code InExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterInExpression(FiltersParser.InExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code InExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitInExpression(FiltersParser.InExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code NotExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterNotExpression(FiltersParser.NotExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code NotExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitNotExpression(FiltersParser.NotExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code CompareExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterCompareExpression(FiltersParser.CompareExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code CompareExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitCompareExpression(FiltersParser.CompareExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code OrExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterOrExpression(FiltersParser.OrExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code OrExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitOrExpression(FiltersParser.OrExpressionContext ctx); - - /** - * Enter a parse tree produced by the {@code GroupExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void enterGroupExpression(FiltersParser.GroupExpressionContext ctx); - - /** - * Exit a parse tree produced by the {@code GroupExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - */ - void exitGroupExpression(FiltersParser.GroupExpressionContext ctx); - - /** - * Enter a parse tree produced by {@link FiltersParser#constantArray}. - * @param ctx the parse tree - */ - void enterConstantArray(FiltersParser.ConstantArrayContext ctx); - - /** - * Exit a parse tree produced by {@link FiltersParser#constantArray}. - * @param ctx the parse tree - */ - void exitConstantArray(FiltersParser.ConstantArrayContext ctx); - - /** - * Enter a parse tree produced by {@link FiltersParser#compare}. - * @param ctx the parse tree - */ - void enterCompare(FiltersParser.CompareContext ctx); - - /** - * Exit a parse tree produced by {@link FiltersParser#compare}. - * @param ctx the parse tree - */ - void exitCompare(FiltersParser.CompareContext ctx); - - /** - * Enter a parse tree produced by the {@code CompoundIdentifier} labeled alternative - * in {@link FiltersParser#identifier}. - * @param ctx the parse tree - */ - void enterCompoundIdentifier(FiltersParser.CompoundIdentifierContext ctx); - - /** - * Exit a parse tree produced by the {@code CompoundIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - */ - void exitCompoundIdentifier(FiltersParser.CompoundIdentifierContext ctx); - - /** - * Enter a parse tree produced by the {@code SimpleIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - */ - void enterSimpleIdentifier(FiltersParser.SimpleIdentifierContext ctx); - - /** - * Exit a parse tree produced by the {@code SimpleIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - */ - void exitSimpleIdentifier(FiltersParser.SimpleIdentifierContext ctx); - - /** - * Enter a parse tree produced by the {@code QuotedIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - */ - void enterQuotedIdentifier(FiltersParser.QuotedIdentifierContext ctx); - - /** - * Exit a parse tree produced by the {@code QuotedIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - */ - void exitQuotedIdentifier(FiltersParser.QuotedIdentifierContext ctx); - - /** - * Enter a parse tree produced by the {@code LongConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void enterLongConstant(FiltersParser.LongConstantContext ctx); - - /** - * Exit a parse tree produced by the {@code LongConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void exitLongConstant(FiltersParser.LongConstantContext ctx); - - /** - * Enter a parse tree produced by the {@code IntegerConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void enterIntegerConstant(FiltersParser.IntegerConstantContext ctx); - - /** - * Exit a parse tree produced by the {@code IntegerConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void exitIntegerConstant(FiltersParser.IntegerConstantContext ctx); - - /** - * Enter a parse tree produced by the {@code DecimalConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void enterDecimalConstant(FiltersParser.DecimalConstantContext ctx); - - /** - * Exit a parse tree produced by the {@code DecimalConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void exitDecimalConstant(FiltersParser.DecimalConstantContext ctx); - - /** - * Enter a parse tree produced by the {@code TextConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void enterTextConstant(FiltersParser.TextConstantContext ctx); - - /** - * Exit a parse tree produced by the {@code TextConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void exitTextConstant(FiltersParser.TextConstantContext ctx); - - /** - * Enter a parse tree produced by the {@code BooleanConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void enterBooleanConstant(FiltersParser.BooleanConstantContext ctx); - - /** - * Exit a parse tree produced by the {@code BooleanConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - */ - void exitBooleanConstant(FiltersParser.BooleanConstantContext ctx); - -} \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersParser.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersParser.java deleted file mode 100644 index f94cc81cd1..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersParser.java +++ /dev/null @@ -1,1574 +0,0 @@ -// Generated from org/springframework/ai/vectorstore/filter/antlr4/Filters.g4 by ANTLR 4.13.1 -package org.springframework.ai.vectorstore.filter.antlr4; - -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -// ############################################################ -// # NOTE: This is ANTLR4 auto-generated code. Do not modify! # -// ############################################################ - -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; -import java.util.Iterator; -import java.util.ArrayList; - -@SuppressWarnings({ "all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue" }) -public class FiltersParser extends Parser { - - static { - RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); - } - - protected static final DFA[] _decisionToDFA; - - protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); - - public static final int LONG_SUFFIX = 1, WHERE = 2, DOT = 3, COMMA = 4, LEFT_SQUARE_BRACKETS = 5, - RIGHT_SQUARE_BRACKETS = 6, LEFT_PARENTHESIS = 7, RIGHT_PARENTHESIS = 8, EQUALS = 9, MINUS = 10, PLUS = 11, - GT = 12, GE = 13, LT = 14, LE = 15, NE = 16, AND = 17, OR = 18, IN = 19, NIN = 20, NOT = 21, IS = 22, - NULL = 23, BOOLEAN_VALUE = 24, QUOTED_STRING = 25, INTEGER_VALUE = 26, DECIMAL_VALUE = 27, IDENTIFIER = 28, - WS = 29; - - public static final int RULE_where = 0, RULE_booleanExpression = 1, RULE_constantArray = 2, RULE_compare = 3, - RULE_identifier = 4, RULE_constant = 5; - - private static String[] makeRuleNames() { - return new String[] { "where", "booleanExpression", "constantArray", "compare", "identifier", "constant" }; - } - - public static final String[] ruleNames = makeRuleNames(); - - private static String[] makeLiteralNames() { - return new String[] { null, null, null, "'.'", "','", "'['", "']'", "'('", "')'", "'=='", "'-'", "'+'", "'>'", - "'>='", "'<'", "'<='", "'!='" }; - } - - private static final String[] _LITERAL_NAMES = makeLiteralNames(); - - private static String[] makeSymbolicNames() { - return new String[] { null, "LONG_SUFFIX", "WHERE", "DOT", "COMMA", "LEFT_SQUARE_BRACKETS", - "RIGHT_SQUARE_BRACKETS", "LEFT_PARENTHESIS", "RIGHT_PARENTHESIS", "EQUALS", "MINUS", "PLUS", "GT", "GE", - "LT", "LE", "NE", "AND", "OR", "IN", "NIN", "NOT", "IS", "NULL", "BOOLEAN_VALUE", "QUOTED_STRING", - "INTEGER_VALUE", "DECIMAL_VALUE", "IDENTIFIER", "WS" }; - } - - private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); - - public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - - /** - * @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++) { - tokenNames[i] = VOCABULARY.getLiteralName(i); - if (tokenNames[i] == null) { - tokenNames[i] = VOCABULARY.getSymbolicName(i); - } - - if (tokenNames[i] == null) { - tokenNames[i] = ""; - } - } - } - - @Override - @Deprecated - public String[] getTokenNames() { - return tokenNames; - } - - @Override - - public Vocabulary getVocabulary() { - return VOCABULARY; - } - - @Override - public String getGrammarFileName() { - return "Filters.g4"; - } - - @Override - public String[] getRuleNames() { - return ruleNames; - } - - @Override - public String getSerializedATN() { - return _serializedATN; - } - - @Override - public ATN getATN() { - return _ATN; - } - - public FiltersParser(TokenStream input) { - super(input); - _interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); - } - - @SuppressWarnings("CheckReturnValue") - public static class WhereContext extends ParserRuleContext { - - public TerminalNode WHERE() { - return getToken(FiltersParser.WHERE, 0); - } - - public BooleanExpressionContext booleanExpression() { - return getRuleContext(BooleanExpressionContext.class, 0); - } - - public TerminalNode EOF() { - return getToken(FiltersParser.EOF, 0); - } - - public WhereContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - - @Override - public int getRuleIndex() { - return RULE_where; - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterWhere(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitWhere(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitWhere(this); - else - return visitor.visitChildren(this); - } - - } - - public final WhereContext where() throws RecognitionException { - WhereContext _localctx = new WhereContext(_ctx, getState()); - enterRule(_localctx, 0, RULE_where); - try { - enterOuterAlt(_localctx, 1); - { - setState(12); - match(WHERE); - setState(13); - booleanExpression(0); - setState(14); - match(EOF); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - @SuppressWarnings("CheckReturnValue") - public static class BooleanExpressionContext extends ParserRuleContext { - - public BooleanExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - - @Override - public int getRuleIndex() { - return RULE_booleanExpression; - } - - public BooleanExpressionContext() { - } - - public void copyFrom(BooleanExpressionContext ctx) { - super.copyFrom(ctx); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class NinExpressionContext extends BooleanExpressionContext { - - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class, 0); - } - - public ConstantArrayContext constantArray() { - return getRuleContext(ConstantArrayContext.class, 0); - } - - public TerminalNode NOT() { - return getToken(FiltersParser.NOT, 0); - } - - public TerminalNode IN() { - return getToken(FiltersParser.IN, 0); - } - - public TerminalNode NIN() { - return getToken(FiltersParser.NIN, 0); - } - - public NinExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterNinExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitNinExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitNinExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class IsNullExpressionContext extends BooleanExpressionContext { - - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class, 0); - } - - public TerminalNode IS() { - return getToken(FiltersParser.IS, 0); - } - - public TerminalNode NULL() { - return getToken(FiltersParser.NULL, 0); - } - - public IsNullExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterIsNullExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitIsNullExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitIsNullExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class IsNotNullExpressionContext extends BooleanExpressionContext { - - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class, 0); - } - - public TerminalNode IS() { - return getToken(FiltersParser.IS, 0); - } - - public TerminalNode NOT() { - return getToken(FiltersParser.NOT, 0); - } - - public TerminalNode NULL() { - return getToken(FiltersParser.NULL, 0); - } - - public IsNotNullExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterIsNotNullExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitIsNotNullExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitIsNotNullExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class AndExpressionContext extends BooleanExpressionContext { - - public BooleanExpressionContext left; - - public Token operator; - - public BooleanExpressionContext right; - - public List booleanExpression() { - return getRuleContexts(BooleanExpressionContext.class); - } - - public BooleanExpressionContext booleanExpression(int i) { - return getRuleContext(BooleanExpressionContext.class, i); - } - - public TerminalNode AND() { - return getToken(FiltersParser.AND, 0); - } - - public AndExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterAndExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitAndExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitAndExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class InExpressionContext extends BooleanExpressionContext { - - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class, 0); - } - - public TerminalNode IN() { - return getToken(FiltersParser.IN, 0); - } - - public ConstantArrayContext constantArray() { - return getRuleContext(ConstantArrayContext.class, 0); - } - - public InExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterInExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitInExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitInExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class NotExpressionContext extends BooleanExpressionContext { - - public TerminalNode NOT() { - return getToken(FiltersParser.NOT, 0); - } - - public BooleanExpressionContext booleanExpression() { - return getRuleContext(BooleanExpressionContext.class, 0); - } - - public NotExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterNotExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitNotExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitNotExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class CompareExpressionContext extends BooleanExpressionContext { - - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class, 0); - } - - public CompareContext compare() { - return getRuleContext(CompareContext.class, 0); - } - - public ConstantContext constant() { - return getRuleContext(ConstantContext.class, 0); - } - - public CompareExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterCompareExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitCompareExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitCompareExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class OrExpressionContext extends BooleanExpressionContext { - - public BooleanExpressionContext left; - - public Token operator; - - public BooleanExpressionContext right; - - public List booleanExpression() { - return getRuleContexts(BooleanExpressionContext.class); - } - - public BooleanExpressionContext booleanExpression(int i) { - return getRuleContext(BooleanExpressionContext.class, i); - } - - public TerminalNode OR() { - return getToken(FiltersParser.OR, 0); - } - - public OrExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterOrExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitOrExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitOrExpression(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class GroupExpressionContext extends BooleanExpressionContext { - - public TerminalNode LEFT_PARENTHESIS() { - return getToken(FiltersParser.LEFT_PARENTHESIS, 0); - } - - public BooleanExpressionContext booleanExpression() { - return getRuleContext(BooleanExpressionContext.class, 0); - } - - public TerminalNode RIGHT_PARENTHESIS() { - return getToken(FiltersParser.RIGHT_PARENTHESIS, 0); - } - - public GroupExpressionContext(BooleanExpressionContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterGroupExpression(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitGroupExpression(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitGroupExpression(this); - else - return visitor.visitChildren(this); - } - - } - - public final BooleanExpressionContext booleanExpression() throws RecognitionException { - return booleanExpression(0); - } - - private BooleanExpressionContext booleanExpression(int _p) throws RecognitionException { - ParserRuleContext _parentctx = _ctx; - int _parentState = getState(); - BooleanExpressionContext _localctx = new BooleanExpressionContext(_ctx, _parentState); - BooleanExpressionContext _prevctx = _localctx; - int _startState = 2; - enterRecursionRule(_localctx, 2, RULE_booleanExpression, _p); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(48); - _errHandler.sync(this); - switch (getInterpreter().adaptivePredict(_input, 1, _ctx)) { - case 1: { - _localctx = new CompareExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - - setState(17); - identifier(); - setState(18); - compare(); - setState(19); - constant(); - } - break; - case 2: { - _localctx = new InExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(21); - identifier(); - setState(22); - match(IN); - setState(23); - constantArray(); - } - break; - case 3: { - _localctx = new NinExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(25); - identifier(); - setState(29); - _errHandler.sync(this); - switch (_input.LA(1)) { - case NOT: { - setState(26); - match(NOT); - setState(27); - match(IN); - } - break; - case NIN: { - setState(28); - match(NIN); - } - break; - default: - throw new NoViableAltException(this); - } - setState(31); - constantArray(); - } - break; - case 4: { - _localctx = new IsNullExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(33); - identifier(); - setState(34); - match(IS); - setState(35); - match(NULL); - } - break; - case 5: { - _localctx = new IsNotNullExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(37); - identifier(); - setState(38); - match(IS); - setState(39); - match(NOT); - setState(40); - match(NULL); - } - break; - case 6: { - _localctx = new GroupExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(42); - match(LEFT_PARENTHESIS); - setState(43); - booleanExpression(0); - setState(44); - match(RIGHT_PARENTHESIS); - } - break; - case 7: { - _localctx = new NotExpressionContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(46); - match(NOT); - setState(47); - booleanExpression(1); - } - break; - } - _ctx.stop = _input.LT(-1); - setState(58); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input, 3, _ctx); - while (_alt != 2 && _alt != org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER) { - if (_alt == 1) { - if (_parseListeners != null) - triggerExitRuleEvent(); - _prevctx = _localctx; - { - setState(56); - _errHandler.sync(this); - switch (getInterpreter().adaptivePredict(_input, 2, _ctx)) { - case 1: { - _localctx = new AndExpressionContext( - new BooleanExpressionContext(_parentctx, _parentState)); - ((AndExpressionContext) _localctx).left = _prevctx; - pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(50); - if (!(precpred(_ctx, 4))) - throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(51); - ((AndExpressionContext) _localctx).operator = match(AND); - setState(52); - ((AndExpressionContext) _localctx).right = booleanExpression(5); - } - break; - case 2: { - _localctx = new OrExpressionContext( - new BooleanExpressionContext(_parentctx, _parentState)); - ((OrExpressionContext) _localctx).left = _prevctx; - pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(53); - if (!(precpred(_ctx, 3))) - throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(54); - ((OrExpressionContext) _localctx).operator = match(OR); - setState(55); - ((OrExpressionContext) _localctx).right = booleanExpression(4); - } - break; - } - } - } - setState(60); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input, 3, _ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - unrollRecursionContexts(_parentctx); - } - return _localctx; - } - - @SuppressWarnings("CheckReturnValue") - public static class ConstantArrayContext extends ParserRuleContext { - - public TerminalNode LEFT_SQUARE_BRACKETS() { - return getToken(FiltersParser.LEFT_SQUARE_BRACKETS, 0); - } - - public List constant() { - return getRuleContexts(ConstantContext.class); - } - - public ConstantContext constant(int i) { - return getRuleContext(ConstantContext.class, i); - } - - public TerminalNode RIGHT_SQUARE_BRACKETS() { - return getToken(FiltersParser.RIGHT_SQUARE_BRACKETS, 0); - } - - public List COMMA() { - return getTokens(FiltersParser.COMMA); - } - - public TerminalNode COMMA(int i) { - return getToken(FiltersParser.COMMA, i); - } - - public ConstantArrayContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - - @Override - public int getRuleIndex() { - return RULE_constantArray; - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterConstantArray(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitConstantArray(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitConstantArray(this); - else - return visitor.visitChildren(this); - } - - } - - public final ConstantArrayContext constantArray() throws RecognitionException { - ConstantArrayContext _localctx = new ConstantArrayContext(_ctx, getState()); - enterRule(_localctx, 4, RULE_constantArray); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(61); - match(LEFT_SQUARE_BRACKETS); - setState(62); - constant(); - setState(67); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la == COMMA) { - { - { - setState(63); - match(COMMA); - setState(64); - constant(); - } - } - setState(69); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(70); - match(RIGHT_SQUARE_BRACKETS); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - @SuppressWarnings("CheckReturnValue") - public static class CompareContext extends ParserRuleContext { - - public TerminalNode EQUALS() { - return getToken(FiltersParser.EQUALS, 0); - } - - public TerminalNode GT() { - return getToken(FiltersParser.GT, 0); - } - - public TerminalNode GE() { - return getToken(FiltersParser.GE, 0); - } - - public TerminalNode LT() { - return getToken(FiltersParser.LT, 0); - } - - public TerminalNode LE() { - return getToken(FiltersParser.LE, 0); - } - - public TerminalNode NE() { - return getToken(FiltersParser.NE, 0); - } - - public CompareContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - - @Override - public int getRuleIndex() { - return RULE_compare; - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterCompare(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitCompare(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitCompare(this); - else - return visitor.visitChildren(this); - } - - } - - public final CompareContext compare() throws RecognitionException { - CompareContext _localctx = new CompareContext(_ctx, getState()); - enterRule(_localctx, 6, RULE_compare); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(72); - _la = _input.LA(1); - if (!((((_la) & ~0x3f) == 0 && ((1L << _la) & 127488L) != 0))) { - _errHandler.recoverInline(this); - } - else { - if (_input.LA(1) == Token.EOF) - matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - @SuppressWarnings("CheckReturnValue") - public static class IdentifierContext extends ParserRuleContext { - - public IdentifierContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - - @Override - public int getRuleIndex() { - return RULE_identifier; - } - - public IdentifierContext() { - } - - public void copyFrom(IdentifierContext ctx) { - super.copyFrom(ctx); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class CompoundIdentifierContext extends IdentifierContext { - - public List IDENTIFIER() { - return getTokens(FiltersParser.IDENTIFIER); - } - - public TerminalNode IDENTIFIER(int i) { - return getToken(FiltersParser.IDENTIFIER, i); - } - - public TerminalNode DOT() { - return getToken(FiltersParser.DOT, 0); - } - - public CompoundIdentifierContext(IdentifierContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterCompoundIdentifier(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitCompoundIdentifier(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitCompoundIdentifier(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class SimpleIdentifierContext extends IdentifierContext { - - public TerminalNode IDENTIFIER() { - return getToken(FiltersParser.IDENTIFIER, 0); - } - - public SimpleIdentifierContext(IdentifierContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterSimpleIdentifier(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitSimpleIdentifier(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitSimpleIdentifier(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class QuotedIdentifierContext extends IdentifierContext { - - public TerminalNode QUOTED_STRING() { - return getToken(FiltersParser.QUOTED_STRING, 0); - } - - public QuotedIdentifierContext(IdentifierContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterQuotedIdentifier(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitQuotedIdentifier(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitQuotedIdentifier(this); - else - return visitor.visitChildren(this); - } - - } - - public final IdentifierContext identifier() throws RecognitionException { - IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); - enterRule(_localctx, 8, RULE_identifier); - try { - setState(79); - _errHandler.sync(this); - switch (getInterpreter().adaptivePredict(_input, 5, _ctx)) { - case 1: - _localctx = new CompoundIdentifierContext(_localctx); - enterOuterAlt(_localctx, 1); { - setState(74); - match(IDENTIFIER); - setState(75); - match(DOT); - setState(76); - match(IDENTIFIER); - } - break; - case 2: - _localctx = new SimpleIdentifierContext(_localctx); - enterOuterAlt(_localctx, 2); { - setState(77); - match(IDENTIFIER); - } - break; - case 3: - _localctx = new QuotedIdentifierContext(_localctx); - enterOuterAlt(_localctx, 3); { - setState(78); - match(QUOTED_STRING); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - @SuppressWarnings("CheckReturnValue") - public static class ConstantContext extends ParserRuleContext { - - public ConstantContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - - @Override - public int getRuleIndex() { - return RULE_constant; - } - - public ConstantContext() { - } - - public void copyFrom(ConstantContext ctx) { - super.copyFrom(ctx); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class LongConstantContext extends ConstantContext { - - public TerminalNode INTEGER_VALUE() { - return getToken(FiltersParser.INTEGER_VALUE, 0); - } - - public TerminalNode LONG_SUFFIX() { - return getToken(FiltersParser.LONG_SUFFIX, 0); - } - - public TerminalNode MINUS() { - return getToken(FiltersParser.MINUS, 0); - } - - public TerminalNode PLUS() { - return getToken(FiltersParser.PLUS, 0); - } - - public LongConstantContext(ConstantContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterLongConstant(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitLongConstant(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitLongConstant(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class DecimalConstantContext extends ConstantContext { - - public TerminalNode DECIMAL_VALUE() { - return getToken(FiltersParser.DECIMAL_VALUE, 0); - } - - public TerminalNode MINUS() { - return getToken(FiltersParser.MINUS, 0); - } - - public TerminalNode PLUS() { - return getToken(FiltersParser.PLUS, 0); - } - - public DecimalConstantContext(ConstantContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterDecimalConstant(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitDecimalConstant(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitDecimalConstant(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class TextConstantContext extends ConstantContext { - - public TerminalNode QUOTED_STRING() { - return getToken(FiltersParser.QUOTED_STRING, 0); - } - - public TextConstantContext(ConstantContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterTextConstant(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitTextConstant(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitTextConstant(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class BooleanConstantContext extends ConstantContext { - - public TerminalNode BOOLEAN_VALUE() { - return getToken(FiltersParser.BOOLEAN_VALUE, 0); - } - - public BooleanConstantContext(ConstantContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterBooleanConstant(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitBooleanConstant(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitBooleanConstant(this); - else - return visitor.visitChildren(this); - } - - } - - @SuppressWarnings("CheckReturnValue") - public static class IntegerConstantContext extends ConstantContext { - - public TerminalNode INTEGER_VALUE() { - return getToken(FiltersParser.INTEGER_VALUE, 0); - } - - public TerminalNode MINUS() { - return getToken(FiltersParser.MINUS, 0); - } - - public TerminalNode PLUS() { - return getToken(FiltersParser.PLUS, 0); - } - - public IntegerConstantContext(ConstantContext ctx) { - copyFrom(ctx); - } - - @Override - public void enterRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).enterIntegerConstant(this); - } - - @Override - public void exitRule(ParseTreeListener listener) { - if (listener instanceof FiltersListener) - ((FiltersListener) listener).exitIntegerConstant(this); - } - - @Override - public T accept(ParseTreeVisitor visitor) { - if (visitor instanceof FiltersVisitor) - return ((FiltersVisitor) visitor).visitIntegerConstant(this); - else - return visitor.visitChildren(this); - } - - } - - public final ConstantContext constant() throws RecognitionException { - ConstantContext _localctx = new ConstantContext(_ctx, getState()); - enterRule(_localctx, 10, RULE_constant); - int _la; - try { - setState(96); - _errHandler.sync(this); - switch (getInterpreter().adaptivePredict(_input, 9, _ctx)) { - case 1: - _localctx = new LongConstantContext(_localctx); - enterOuterAlt(_localctx, 1); { - setState(82); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la == MINUS || _la == PLUS) { - { - setState(81); - _la = _input.LA(1); - if (!(_la == MINUS || _la == PLUS)) { - _errHandler.recoverInline(this); - } - else { - if (_input.LA(1) == Token.EOF) - matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - } - } - - setState(84); - match(INTEGER_VALUE); - setState(85); - match(LONG_SUFFIX); - } - break; - case 2: - _localctx = new IntegerConstantContext(_localctx); - enterOuterAlt(_localctx, 2); { - setState(87); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la == MINUS || _la == PLUS) { - { - setState(86); - _la = _input.LA(1); - if (!(_la == MINUS || _la == PLUS)) { - _errHandler.recoverInline(this); - } - else { - if (_input.LA(1) == Token.EOF) - matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - } - } - - setState(89); - match(INTEGER_VALUE); - } - break; - case 3: - _localctx = new DecimalConstantContext(_localctx); - enterOuterAlt(_localctx, 3); { - setState(91); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la == MINUS || _la == PLUS) { - { - setState(90); - _la = _input.LA(1); - if (!(_la == MINUS || _la == PLUS)) { - _errHandler.recoverInline(this); - } - else { - if (_input.LA(1) == Token.EOF) - matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - } - } - - setState(93); - match(DECIMAL_VALUE); - } - break; - case 4: - _localctx = new TextConstantContext(_localctx); - enterOuterAlt(_localctx, 4); { - setState(94); - match(QUOTED_STRING); - } - break; - case 5: - _localctx = new BooleanConstantContext(_localctx); - enterOuterAlt(_localctx, 5); { - setState(95); - match(BOOLEAN_VALUE); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { - switch (ruleIndex) { - case 1: - return booleanExpression_sempred((BooleanExpressionContext) _localctx, predIndex); - } - return true; - } - - private boolean booleanExpression_sempred(BooleanExpressionContext _localctx, int predIndex) { - switch (predIndex) { - case 0: - return precpred(_ctx, 4); - case 1: - return precpred(_ctx, 3); - } - return true; - } - - public static final String _serializedATN = "\u0004\u0001\u001dc\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002" - + "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002" - + "\u0005\u0007\u0005\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0003\u0001\u001e\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0001\u0001\u0003\u00011\b\u0001\u0001\u0001\u0001\u0001\u0001" - + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0005\u00019\b\u0001\n\u0001" - + "\f\u0001<\t\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005" - + "\u0002B\b\u0002\n\u0002\f\u0002E\t\u0002\u0001\u0002\u0001\u0002\u0001" - + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001" - + "\u0004\u0003\u0004P\b\u0004\u0001\u0005\u0003\u0005S\b\u0005\u0001\u0005" - + "\u0001\u0005\u0001\u0005\u0003\u0005X\b\u0005\u0001\u0005\u0001\u0005" - + "\u0003\u0005\\\b\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005" - + "a\b\u0005\u0001\u0005\u0000\u0001\u0002\u0006\u0000\u0002\u0004\u0006" - + "\b\n\u0000\u0002\u0002\u0000\t\t\f\u0010\u0001\u0000\n\u000bo\u0000\f" - + "\u0001\u0000\u0000\u0000\u00020\u0001\u0000\u0000\u0000\u0004=\u0001\u0000" - + "\u0000\u0000\u0006H\u0001\u0000\u0000\u0000\bO\u0001\u0000\u0000\u0000" - + "\n`\u0001\u0000\u0000\u0000\f\r\u0005\u0002\u0000\u0000\r\u000e\u0003" - + "\u0002\u0001\u0000\u000e\u000f\u0005\u0000\u0000\u0001\u000f\u0001\u0001" - + "\u0000\u0000\u0000\u0010\u0011\u0006\u0001\uffff\uffff\u0000\u0011\u0012" - + "\u0003\b\u0004\u0000\u0012\u0013\u0003\u0006\u0003\u0000\u0013\u0014\u0003" - + "\n\u0005\u0000\u00141\u0001\u0000\u0000\u0000\u0015\u0016\u0003\b\u0004" - + "\u0000\u0016\u0017\u0005\u0013\u0000\u0000\u0017\u0018\u0003\u0004\u0002" - + "\u0000\u00181\u0001\u0000\u0000\u0000\u0019\u001d\u0003\b\u0004\u0000" - + "\u001a\u001b\u0005\u0015\u0000\u0000\u001b\u001e\u0005\u0013\u0000\u0000" - + "\u001c\u001e\u0005\u0014\u0000\u0000\u001d\u001a\u0001\u0000\u0000\u0000" - + "\u001d\u001c\u0001\u0000\u0000\u0000\u001e\u001f\u0001\u0000\u0000\u0000" - + "\u001f \u0003\u0004\u0002\u0000 1\u0001\u0000\u0000\u0000!\"\u0003\b\u0004" - + "\u0000\"#\u0005\u0016\u0000\u0000#$\u0005\u0017\u0000\u0000$1\u0001\u0000" - + "\u0000\u0000%&\u0003\b\u0004\u0000&\'\u0005\u0016\u0000\u0000\'(\u0005" - + "\u0015\u0000\u0000()\u0005\u0017\u0000\u0000)1\u0001\u0000\u0000\u0000" - + "*+\u0005\u0007\u0000\u0000+,\u0003\u0002\u0001\u0000,-\u0005\b\u0000\u0000" - + "-1\u0001\u0000\u0000\u0000./\u0005\u0015\u0000\u0000/1\u0003\u0002\u0001" - + "\u00010\u0010\u0001\u0000\u0000\u00000\u0015\u0001\u0000\u0000\u00000" - + "\u0019\u0001\u0000\u0000\u00000!\u0001\u0000\u0000\u00000%\u0001\u0000" - + "\u0000\u00000*\u0001\u0000\u0000\u00000.\u0001\u0000\u0000\u00001:\u0001" - + "\u0000\u0000\u000023\n\u0004\u0000\u000034\u0005\u0011\u0000\u000049\u0003" - + "\u0002\u0001\u000556\n\u0003\u0000\u000067\u0005\u0012\u0000\u000079\u0003" - + "\u0002\u0001\u000482\u0001\u0000\u0000\u000085\u0001\u0000\u0000\u0000" - + "9<\u0001\u0000\u0000\u0000:8\u0001\u0000\u0000\u0000:;\u0001\u0000\u0000" - + "\u0000;\u0003\u0001\u0000\u0000\u0000<:\u0001\u0000\u0000\u0000=>\u0005" - + "\u0005\u0000\u0000>C\u0003\n\u0005\u0000?@\u0005\u0004\u0000\u0000@B\u0003" - + "\n\u0005\u0000A?\u0001\u0000\u0000\u0000BE\u0001\u0000\u0000\u0000CA\u0001" - + "\u0000\u0000\u0000CD\u0001\u0000\u0000\u0000DF\u0001\u0000\u0000\u0000" - + "EC\u0001\u0000\u0000\u0000FG\u0005\u0006\u0000\u0000G\u0005\u0001\u0000" - + "\u0000\u0000HI\u0007\u0000\u0000\u0000I\u0007\u0001\u0000\u0000\u0000" - + "JK\u0005\u001c\u0000\u0000KL\u0005\u0003\u0000\u0000LP\u0005\u001c\u0000" - + "\u0000MP\u0005\u001c\u0000\u0000NP\u0005\u0019\u0000\u0000OJ\u0001\u0000" - + "\u0000\u0000OM\u0001\u0000\u0000\u0000ON\u0001\u0000\u0000\u0000P\t\u0001" - + "\u0000\u0000\u0000QS\u0007\u0001\u0000\u0000RQ\u0001\u0000\u0000\u0000" - + "RS\u0001\u0000\u0000\u0000ST\u0001\u0000\u0000\u0000TU\u0005\u001a\u0000" - + "\u0000Ua\u0005\u0001\u0000\u0000VX\u0007\u0001\u0000\u0000WV\u0001\u0000" - + "\u0000\u0000WX\u0001\u0000\u0000\u0000XY\u0001\u0000\u0000\u0000Ya\u0005" - + "\u001a\u0000\u0000Z\\\u0007\u0001\u0000\u0000[Z\u0001\u0000\u0000\u0000" - + "[\\\u0001\u0000\u0000\u0000\\]\u0001\u0000\u0000\u0000]a\u0005\u001b\u0000" - + "\u0000^a\u0005\u0019\u0000\u0000_a\u0005\u0018\u0000\u0000`R\u0001\u0000" - + "\u0000\u0000`W\u0001\u0000\u0000\u0000`[\u0001\u0000\u0000\u0000`^\u0001" - + "\u0000\u0000\u0000`_\u0001\u0000\u0000\u0000a\u000b\u0001\u0000\u0000" + "\u0000\n\u001d08:CORW[`"; - - public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } - -} \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersVisitor.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersVisitor.java deleted file mode 100644 index 5d41e238b8..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersVisitor.java +++ /dev/null @@ -1,192 +0,0 @@ -// Generated from org/springframework/ai/vectorstore/filter/antlr4/Filters.g4 by ANTLR 4.13.1 -package org.springframework.ai.vectorstore.filter.antlr4; - -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -// ############################################################ -// # NOTE: This is ANTLR4 auto-generated code. Do not modify! # -// ############################################################ - -import org.antlr.v4.runtime.tree.ParseTreeVisitor; - -/** - * This interface defines a complete generic visitor for a parse tree produced by - * {@link FiltersParser}. - * - * @param The return type of the visit operation. Use {@link Void} for operations with - * no return type. - */ -public interface FiltersVisitor extends ParseTreeVisitor { - - /** - * Visit a parse tree produced by {@link FiltersParser#where}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitWhere(FiltersParser.WhereContext ctx); - - /** - * Visit a parse tree produced by the {@code NinExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitNinExpression(FiltersParser.NinExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code IsNullExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitIsNullExpression(FiltersParser.IsNullExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code IsNotNullExpression} labeled alternative - * in {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitIsNotNullExpression(FiltersParser.IsNotNullExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code AndExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitAndExpression(FiltersParser.AndExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code InExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitInExpression(FiltersParser.InExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code NotExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitNotExpression(FiltersParser.NotExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code CompareExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitCompareExpression(FiltersParser.CompareExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code OrExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitOrExpression(FiltersParser.OrExpressionContext ctx); - - /** - * Visit a parse tree produced by the {@code GroupExpression} labeled alternative in - * {@link FiltersParser#booleanExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitGroupExpression(FiltersParser.GroupExpressionContext ctx); - - /** - * Visit a parse tree produced by {@link FiltersParser#constantArray}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitConstantArray(FiltersParser.ConstantArrayContext ctx); - - /** - * Visit a parse tree produced by {@link FiltersParser#compare}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitCompare(FiltersParser.CompareContext ctx); - - /** - * Visit a parse tree produced by the {@code CompoundIdentifier} labeled alternative - * in {@link FiltersParser#identifier}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitCompoundIdentifier(FiltersParser.CompoundIdentifierContext ctx); - - /** - * Visit a parse tree produced by the {@code SimpleIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitSimpleIdentifier(FiltersParser.SimpleIdentifierContext ctx); - - /** - * Visit a parse tree produced by the {@code QuotedIdentifier} labeled alternative in - * {@link FiltersParser#identifier}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitQuotedIdentifier(FiltersParser.QuotedIdentifierContext ctx); - - /** - * Visit a parse tree produced by the {@code LongConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitLongConstant(FiltersParser.LongConstantContext ctx); - - /** - * Visit a parse tree produced by the {@code IntegerConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitIntegerConstant(FiltersParser.IntegerConstantContext ctx); - - /** - * Visit a parse tree produced by the {@code DecimalConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitDecimalConstant(FiltersParser.DecimalConstantContext ctx); - - /** - * Visit a parse tree produced by the {@code TextConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitTextConstant(FiltersParser.TextConstantContext ctx); - - /** - * Visit a parse tree produced by the {@code BooleanConstant} labeled alternative in - * {@link FiltersParser#constant}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitBooleanConstant(FiltersParser.BooleanConstantContext ctx); - -} \ No newline at end of file diff --git a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/package-info.java b/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/package-info.java deleted file mode 100644 index 446768bff2..0000000000 --- a/spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2023-present the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -@NullMarked -package org.springframework.ai.vectorstore.filter.antlr4; - -import org.jspecify.annotations.NullMarked;