diff --git a/.github/workflows/pr-downstream.yml b/.github/workflows/pr-downstream.yml index 575f4ec6dfe..fbccd515f42 100644 --- a/.github/workflows/pr-downstream.yml +++ b/.github/workflows/pr-downstream.yml @@ -33,6 +33,7 @@ on: jobs: kogito-downstream-build: + if: false concurrency: group: pr-${{ matrix.job_name }}_${{ matrix.os }}_${{ matrix.java-version }}_${{ matrix.maven-version }}_${{ github.head_ref }} cancel-in-progress: true diff --git a/.gitignore b/.gitignore index 655baabbb2b..2d195d5f653 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ nbproject *.ipr *.iws *.iml +build.log # generated files dependency-reduced-pom.xml diff --git a/drools-docs/src/modules/ROOT/pages/language-reference/_language-level.adoc b/drools-docs/src/modules/ROOT/pages/language-reference/_language-level.adoc new file mode 100644 index 00000000000..5d6473cf177 --- /dev/null +++ b/drools-docs/src/modules/ROOT/pages/language-reference/_language-level.adoc @@ -0,0 +1,146 @@ +//// +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +//// + +[id='language-level_drl-rules'] + += Language Level + +Language Level is a feature that allows you to specify the version of the DRL (Drools Rule Language) syntax you want to use. + +Supported language levels are: + +* DRL6 (default) +* DRL10 + +Some old language levels are deprecated and will be removed in the future: + +* DRL5 +* DRL6_STRICT + +DRL6 is compatible with the previous Drools versions, while DRL10 introduces some changes to reduce ambiguity. + +Language Level can be specified by kmodule.xml or system property. Note that the configuration should be effective when rules are built. + +.kmodule.xml example +[source,xml] +---- + + + + + +---- + +.System property example +[source,java] +---- + System.setProperty("drools.lang.level", "DRL10"); +---- + +== DRL10 + +DRL10 has been added, which is handled by the new parser based on ANTLR4. DRL10 introduces the following changes mainly to reduce ambiguity: + +* Require a prefix `##` to custom operators +.DRL6 +[source] +---- + Person(addresses supersetOf $alice.addresses) +---- + +.DRL10 +[source] +---- + Person(addresses ##supersetOf $alice.addresses) +---- + +The custom operator's implementation Java code wouldn't need to be changed. + +* Drop half constraint syntax + +.DRL6 +[source] +---- + Person(age > 10 && < 20) +---- + +.DRL10 (also valid in DRL6) +[source] +---- + Person(age > 10 && age < 20) +---- + +* Drop double ampersand as infix and + +.DRL6 +[source] +---- + ( Person(age == 10) + && + Person(age == 20) ) +---- + +.DRL10 (also valid in DRL6) +[source] +---- + ( Person(age == 10) + and + Person(age == 20) ) +---- + +`&&` in a constraint will remain supported. For example, `Person(age == 10 && age == 20)` is valid in DRL6 and DRL10. + +* Drop double pipe as infix or + +.DRL6 +[source] +---- + ( Person(age == 10) + || + Person(age == 20) ) +---- + +.DRL10 (also valid in DRL6) +[source] +---- + ( Person(age == 10) + or + Person(age == 20) ) +---- + +`||` in a constraint will remain supported. For example, `Person(age == 10 || age == 20)` is valid in DRL6 and DRL10. + +* Drop annotation inside LHS pattern + +.DRL6 +[source] +---- + ( Double() + or @Annot1 String() + or @Annot2 Integer() ) +---- + +There is no equivalent expression in DRL10. + +Annotation in other places will remain supported. For example, `Person(name == "Mario") @watch(*)` is valid in DRL6 and DRL10. + +Those syntaxes are deprecated and will be removed in the future. Warnings are logged when the deprecated syntax is used in DRL6. + +Warnings are logged when the deprecated syntax is used in DRL6. The warning logs can be suppressed by the log level of `org.drools.drl.parser.lang.ParserHelper`. \ No newline at end of file diff --git a/drools-docs/src/modules/ROOT/pages/language-reference/index.adoc b/drools-docs/src/modules/ROOT/pages/language-reference/index.adoc index 95de660cfd0..547129970b4 100644 --- a/drools-docs/src/modules/ROOT/pages/language-reference/index.adoc +++ b/drools-docs/src/modules/ROOT/pages/language-reference/index.adoc @@ -29,3 +29,5 @@ include::_drl-rules.adoc[leveloffset=+1] include::_performance-tuning-drl-ref.adoc[leveloffset=+2] include::_XLSDecisionTable-section.adoc[leveloffset=+1] + +include::_language-level.adoc[leveloffset=+1] \ No newline at end of file diff --git a/drools-docs/src/modules/ROOT/pages/release-notes/_release-notes-10.1.adoc b/drools-docs/src/modules/ROOT/pages/release-notes/_release-notes-10.1.adoc new file mode 100644 index 00000000000..0fde598b64f --- /dev/null +++ b/drools-docs/src/modules/ROOT/pages/release-notes/_release-notes-10.1.adoc @@ -0,0 +1,35 @@ +//// +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +//// + +== 10.1.0 release notes + +=== Language Level DRL10 +New language level DRL10 has been added. DRL10 is handled by the new parser based on ANTLR4. The default language level is still DRL6. + +DRL10 introduces the following changes mainly to reduce ambiguity: + +* Require a prefix '##' to custom operators +* Drop half constraint syntax +* Drop double ampersand as infix and +* Drop double pipe as infix or +* Drop annotation inside LHS pattern + +Those syntaxes are deprecated and will be removed in the future. Warnings are logged when the deprecated syntax is used in DRL6. + +You can refer xref:language-reference/index.adoc#language-level_drl-rules[Language Level] for details. diff --git a/drools-docs/src/modules/ROOT/pages/release-notes/index.adoc b/drools-docs/src/modules/ROOT/pages/release-notes/index.adoc index 465523644ff..de97e8233e5 100644 --- a/drools-docs/src/modules/ROOT/pages/release-notes/index.adoc +++ b/drools-docs/src/modules/ROOT/pages/release-notes/index.adoc @@ -30,6 +30,8 @@ This chapter contains the release notes for the {PRODUCT} 10-series. For the release notes of the _previous releases_, you can refer to the {PRODUCT} documentation of link:https://docs.drools.org/8.44.0.Final/drools-docs/drools/release-notes/index.html[version 8]. +include::_release-notes-10.1.adoc[leveloffset=0] + include::_release-notes-10.0.adoc[leveloffset=0] == Drools 10-series release notes diff --git a/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/descr/OperatorDescr.java b/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/descr/OperatorDescr.java index 561bebe19a0..aa052e8632f 100644 --- a/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/descr/OperatorDescr.java +++ b/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/descr/OperatorDescr.java @@ -26,6 +26,9 @@ public class OperatorDescr extends BaseDescr { private static final long serialVersionUID = 520l; + // prefix for custom operators which are not built-in + public static final String CUSTOM_OPERATOR_PREFIX = "##"; + private String operator; private boolean negated; private List parameters; @@ -55,7 +58,15 @@ public String getOperator() { } public void setOperator( String operator ) { - this.operator = operator != null ? operator.trim() : null; + this.operator = operator != null ? trimOperator(operator) : null; + } + + private String trimOperator(String operator) { + operator = operator.trim(); + if (operator.startsWith(CUSTOM_OPERATOR_PREFIX)) { + operator = operator.substring(CUSTOM_OPERATOR_PREFIX.length()); + } + return operator; } public boolean isNegated() { diff --git a/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/DescrBuilder.java b/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/DescrBuilder.java index f9e08b0a002..5616d12d517 100644 --- a/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/DescrBuilder.java +++ b/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/DescrBuilder.java @@ -88,4 +88,14 @@ public DescrBuilder endLocation( int line, * @return */ public P end(); + + /** + * Returns the parent container of this descr builder. + * Example: ruleDescrBuilder.getParent() will return the + * PackageDescrBuilder as that is its parent container + * without ending the current construction. + * + * @return + */ + public P getParent(); } diff --git a/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/impl/BaseDescrBuilderImpl.java b/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/impl/BaseDescrBuilderImpl.java index d820a57919f..c2ac71dcbd3 100644 --- a/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/impl/BaseDescrBuilderImpl.java +++ b/drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/impl/BaseDescrBuilderImpl.java @@ -72,4 +72,8 @@ public P end() { return parent; } + @Override + public P getParent() { + return parent; + } } diff --git a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLParserTest.java b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRL10ParserTest.java similarity index 94% rename from drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLParserTest.java rename to drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRL10ParserTest.java index b760f5f75b4..598d18ddb8c 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLParserTest.java +++ b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRL10ParserTest.java @@ -31,14 +31,14 @@ import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; -import static org.drools.drl.parser.antlr4.DRLParserHelper.computeTokenIndex; -import static org.drools.drl.parser.antlr4.DRLParserHelper.createDrlParser; -import static org.drools.drl.parser.antlr4.DRLParserHelper.parse; +import static org.drools.drl.parser.antlr4.DRL10ParserHelper.computeTokenIndex; +import static org.drools.drl.parser.antlr4.DRL10ParserHelper.createDrlParser; +import static org.drools.drl.parser.antlr4.DRL10ParserHelper.parse; /** * This test class is specific to new antlr4 parser. */ -class DRLParserTest { +class DRL10ParserTest { private static final String drl = "package org.test;\n" + @@ -94,7 +94,7 @@ void parse_basicRule() { @Test void computeTokenIndex_basicRule() { - DRLParser parser = createDrlParser(drl); + DRL10Parser parser = createDrlParser(drl); parser.compilationUnit(); assertThat((int) computeTokenIndex(parser, 1, 0)).isEqualTo(0); diff --git a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLExprParserTest.java b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLExprParserTest.java index 0baeac61ff1..cfd490b0b19 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLExprParserTest.java +++ b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DRLExprParserTest.java @@ -27,7 +27,6 @@ import org.drools.drl.ast.descr.ConstraintConnectiveDescr; import org.drools.drl.ast.descr.RelationalExprDescr; import org.drools.drl.parser.DrlExprParser; -import org.drools.drl.parser.DrlExprParserFactory; import org.drools.drl.parser.DrlParser; import org.drools.drl.parser.DroolsParserException; import org.drools.drl.parser.impl.Operator; @@ -38,7 +37,6 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; import org.junit.jupiter.params.provider.ValueSource; -import org.kie.internal.builder.conf.LanguageLevelOption; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assumptions.assumeFalse; @@ -52,7 +50,7 @@ class DRLExprParserTest { @BeforeEach void setUp() { - this.parser = DrlExprParserFactory.getDrlExprParser(LanguageLevelOption.DRL6); + this.parser = ParserTestUtils.getExprParser(); } @AfterEach @@ -175,7 +173,7 @@ void bindingConstraint() { @Test void bindingWithRestrictions() { - String source = "$x : property > value && < 20"; + String source = "$x : property > value && property < 20"; ConstraintConnectiveDescr result = parser.parse( source ); assertThat(parser.hasErrors()).as(parser.getErrors().toString()).isFalse(); @@ -458,7 +456,7 @@ void noViableAlt() { assertThat(exception.getColumn()).isEqualTo(2); assertThat(exception.getOffset()).isEqualTo(2); assertThat(exception.getMessage()) - .isEqualToIgnoringCase("[ERR 101] Line 1:2 no viable alternative at input 'a'"); + .isEqualToIgnoringCase("[ERR 101] Line 1:2 no viable alternative at input '~a'"); } else { assertThat(parser.hasErrors()).isFalse(); } @@ -578,4 +576,48 @@ void newBigDecimal() { assertThat(bind.getVariable()).isEqualTo("$bd"); assertThat(bind.getExpression()).isEqualTo("new BigDecimal(30)"); } + + @Test + void halfConstraintAnd() { + String source = "age > 10 && < 20"; + parser.parse(source); + + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // half constraint is dropped in DRL10 + assertThat(parser.hasErrors()).isTrue(); + } else { + assertThat(parser.hasErrors()).as(parser.getErrors().toString()).isFalse(); + } + } + + @Test + void halfConstraintOr() { + String source = "name == \"John\" || == \"Paul\""; + parser.parse(source); + + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // half constraint is dropped in DRL10 + assertThat(parser.hasErrors()).isTrue(); + } else { + assertThat(parser.hasErrors()).as(parser.getErrors().toString()).isFalse(); + } + } + + @Test + void customOperator() { + Operator.addOperatorToRegistry("supersetOf", false); + // prefix '##' is required for custom operators in DRL10 + String source = DrlParser.ANTLR4_PARSER_ENABLED ? "this ##supersetOf $list" : "this supersetOf $list"; + ConstraintConnectiveDescr result = parser.parse(source); + assertThat(parser.hasErrors()).as(parser.getErrors().toString()).isFalse(); + + RelationalExprDescr rel = (RelationalExprDescr) result.getDescrs().get(0); + assertThat(rel.getOperator()).isEqualTo("supersetOf"); + + AtomicExprDescr left = (AtomicExprDescr) rel.getLeft(); + assertThat(left.getExpression()).isEqualTo("this"); + + AtomicExprDescr right = (AtomicExprDescr) rel.getRight(); + assertThat(right.getExpression()).isEqualTo("$list"); + } } diff --git a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrCommonPropertyTest.java b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrCommonPropertyTest.java index 2e1a0e8564e..ae374091b65 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrCommonPropertyTest.java +++ b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrCommonPropertyTest.java @@ -245,7 +245,7 @@ void typeFieldDescr() { void attributeDescr() { final String source = "rule R1\n" + " salience 42\n" + - " agenda-group \"my_group\"\n" + + " ruleflow-group \"my_group\"\n" + " when\n" + " then\n" + "end"; @@ -257,10 +257,10 @@ void attributeDescr() { // Backward compatibility doesn't seem to be required in this case. (If do it, the code would be unnecessarily complicated.) if (DrlParser.ANTLR4_PARSER_ENABLED) { assertProperties(rule.getAttributes().get("salience"), 10, 21, 2, 2, 2, 12); - assertProperties(rule.getAttributes().get("agenda-group"), 24, 47, 3, 2, 3, 24); + assertProperties(rule.getAttributes().get("ruleflow-group"), 24, 49, 3, 2, 3, 26); } else { assertProperties(rule.getAttributes().get("salience"), 19, 21, 2, 11, 2, 12); - assertProperties(rule.getAttributes().get("agenda-group"), 37, 47, 3, 15, 3, 24); + assertProperties(rule.getAttributes().get("ruleflow-group"), 39, 49, 3, 17, 3, 26); } } diff --git a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrDumperTest.java b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrDumperTest.java index 76f750ff215..a64b618c887 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrDumperTest.java +++ b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrDumperTest.java @@ -24,13 +24,12 @@ import org.drools.drl.ast.descr.BindingDescr; import org.drools.drl.ast.descr.ConstraintConnectiveDescr; import org.drools.drl.parser.DrlExprParser; -import org.drools.drl.parser.DrlExprParserFactory; import org.drools.mvel.evaluators.MatchesEvaluatorsDefinition; import org.drools.mvel.evaluators.SetEvaluatorsDefinition; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.kie.internal.builder.conf.LanguageLevelOption; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import static org.assertj.core.api.Assertions.assertThat; @@ -47,6 +46,7 @@ void setUp() { dumper = new DescrDumper(); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void dump() { String input = "price > 10 && < 20 || == $val || == 30"; @@ -147,6 +147,7 @@ void dumpWithDateAttr() { assertThat(result).isEqualTo(expected); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void dumpComplex() { String input = "a ( > 60 && < 70 ) || ( > 50 && < 55 ) && a3 == \"black\" || a == 40 && a3 == \"pink\" || a == 12 && a3 == \"yellow\" || a3 == \"blue\""; @@ -220,6 +221,7 @@ void dumpBindings4() { assertThat(result).isEqualTo(expected); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void dumpBindingsWithRestriction() { String input = "$x : age > 10 && < 20 || > 30"; @@ -360,7 +362,7 @@ void processImplicitConstraints() { } public ConstraintConnectiveDescr parse(final String constraint) { - DrlExprParser parser = DrlExprParserFactory.getDrlExprParser(LanguageLevelOption.DRL6); + DrlExprParser parser = ParserTestUtils.getExprParser(); ConstraintConnectiveDescr result = parser.parse(constraint); assertThat(parser.hasErrors()).as(parser.getErrors().toString()).isFalse(); diff --git a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/MiscDRLParserTest.java b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/MiscDRLParserTest.java index 3fc2cdbca39..477f92db239 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/MiscDRLParserTest.java +++ b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/MiscDRLParserTest.java @@ -74,8 +74,9 @@ import org.drools.drl.parser.DroolsParserException; import org.drools.drl.parser.impl.Operator; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; +import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -873,6 +874,7 @@ void simpleRuleWithBindings() { assertThat((String) rule.getConsequence()).isEqualToIgnoringWhitespace("if ( a == b ) { " + " assert( foo3 );" + "} else {" + " retract( foo4 );" + "}" + " System.out.println( a4 );"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void multipleRestrictionsConstraint() { RuleDescr rule = parseAndGetFirstRuleDescrFromFile("restrictions_test.drl"); @@ -1763,8 +1765,8 @@ void attributes() { assertThat(at.getName()).isEqualTo("salience"); assertThat(at.getValue()).isEqualTo("42"); - at = (AttributeDescr) attrs.get("agenda-group"); - assertThat(at.getName()).isEqualTo("agenda-group"); + at = (AttributeDescr) attrs.get("ruleflow-group"); + assertThat(at.getName()).isEqualTo("ruleflow-group"); assertThat(at.getValue()).isEqualTo("my_group"); at = (AttributeDescr) attrs.get("no-loop"); @@ -1799,8 +1801,8 @@ void attributes2() { AttributeDescr at = (AttributeDescr) attrs.get("salience"); assertThat(at.getName()).isEqualTo("salience"); assertThat(at.getValue()).isEqualTo("(42)"); - at = (AttributeDescr) attrs.get("agenda-group"); - assertThat(at.getName()).isEqualTo("agenda-group"); + at = (AttributeDescr) attrs.get("ruleflow-group"); + assertThat(at.getName()).isEqualTo("ruleflow-group"); assertThat(at.getValue()).isEqualTo("my_group"); rule = rules.get(1); @@ -1955,8 +1957,8 @@ void attributes_alternateSyntax() { assertThat(at.getName()).isEqualTo("salience"); assertThat(at.getValue()).isEqualTo("42"); - at = attrs.get("agenda-group"); - assertThat(at.getName()).isEqualTo("agenda-group"); + at = attrs.get("ruleflow-group"); + assertThat(at.getName()).isEqualTo("ruleflow-group"); assertThat(at.getValue()).isEqualTo("my_group"); at = attrs.get("no-loop"); @@ -2013,7 +2015,7 @@ void packageAttributes() { "package_attributes.drl"); AttributeDescr at = (AttributeDescr) pkg.getAttributes().get(0); - assertThat(at.getName()).isEqualTo("agenda-group"); + assertThat(at.getName()).isEqualTo("ruleflow-group"); assertThat(at.getValue()).isEqualTo("x"); at = (AttributeDescr) pkg.getAttributes().get(1); assertThat(at.getName()).isEqualTo("dialect"); @@ -2025,8 +2027,8 @@ void packageAttributes() { RuleDescr rule = (RuleDescr) pkg.getRules().get(0); assertThat(rule.getName()).isEqualTo("bar"); - at = (AttributeDescr) rule.getAttributes().get("agenda-group"); - assertThat(at.getName()).isEqualTo("agenda-group"); + at = (AttributeDescr) rule.getAttributes().get("ruleflow-group"); + assertThat(at.getName()).isEqualTo("ruleflow-group"); assertThat(at.getValue()).isEqualTo("x"); at = (AttributeDescr) rule.getAttributes().get("dialect"); assertThat(at.getName()).isEqualTo("dialect"); @@ -2037,8 +2039,8 @@ void packageAttributes() { at = (AttributeDescr) rule.getAttributes().get("dialect"); assertThat(at.getName()).isEqualTo("dialect"); assertThat(at.getValue()).isEqualTo("mvel"); - at = (AttributeDescr) rule.getAttributes().get("agenda-group"); - assertThat(at.getName()).isEqualTo("agenda-group"); + at = (AttributeDescr) rule.getAttributes().get("ruleflow-group"); + assertThat(at.getName()).isEqualTo("ruleflow-group"); assertThat(at.getValue()).isEqualTo("x"); } @@ -2444,7 +2446,7 @@ void inOperator() { assertThat(pattern.getConstraint().getDescrs()).hasSize(1); ExprConstraintDescr fld = (ExprConstraintDescr) pattern.getConstraint().getDescrs().get(0); - assertThat(fld.getExpression()).isEqualTo("age > 30 && < 40"); + assertThat(fld.getExpression()).isEqualTo("age > 30 && age < 40"); // the second col, with 2 fields, the first with 2 restrictions, the // second field with one @@ -2478,7 +2480,7 @@ void notInOperator() { assertThat(pattern.getConstraint().getDescrs()).hasSize(1); ExprConstraintDescr fld = (ExprConstraintDescr) pattern.getConstraint().getDescrs().get(0); - assertThat(fld.getExpression()).isEqualTo("age > 30 && < 40"); + assertThat(fld.getExpression()).isEqualTo("age > 30 && age < 40"); // the second col, with 2 fields, the first with 2 restrictions, the // second field with one @@ -2528,6 +2530,7 @@ void constraintOrConnective() { assertThat(fcd.getExpression()).isEqualToIgnoringWhitespace("age < 42 || location==\"atlanta\""); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void restrictions() { final String text = "rule X when Foo( bar > 1 || == 1 ) then end\n"; @@ -2979,7 +2982,7 @@ void pluggableOperators() { assertThat(eventE.getConstraint().getDescrs()).hasSize(1); ExprConstraintDescr fcdE = (ExprConstraintDescr) eventE.getConstraint().getDescrs().get(0); - assertThat(fcdE.getExpression()).isEqualTo("this not before[1, 10] $b || after[1, 10] $c && this after[1, 5] $d"); + assertThat(fcdE.getExpression()).isEqualTo("this not before[1, 10] $b || this after[1, 10] $c && this after[1, 5] $d"); } @Test @@ -3586,6 +3589,22 @@ void endTokenInRhs() { assertThat(ruleDescr.getConsequence().toString()).isEqualToIgnoringWhitespace("int end = 10;"); } + @Test + void endTokenWithSemiInRhs() { + final String text = "package org.drools\n" + + "rule X\n" + + "when\n" + + " $s : String()\n" + + "then\n" + + " int end = 10;" + + " int a = end;\n" + + "end;\n"; + PackageDescr packageDescr = parseAndGetPackageDescr(text); + + RuleDescr ruleDescr = packageDescr.getRules().get(0); + assertThat(ruleDescr.getConsequence().toString()).isEqualToIgnoringWhitespace("int end = 10; int a = end;"); + } + @Test void ruleTokenInRhs() { final String text = "package org.drools\n" + @@ -3888,6 +3907,7 @@ void constraintOperators(String constraint) { assertThat(exprConstraintDescr.getExpression()).isEqualToIgnoringWhitespace(constraint); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @ValueSource(strings = { "country matches \"[a-z]*\" || matches \"[A-Z]*\"", @@ -4053,6 +4073,7 @@ void lhsPatternAnnotation() { assertThat(annotationDescr.getSingleValueAsString()).isEqualTo("!*, age"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void prefixAndDescrAnnotation() { final String text = @@ -4074,6 +4095,7 @@ void prefixAndDescrAnnotation() { assertThat(andDescr.getDescrs()).hasSize(2); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void prefixOrDescrAnnotation() { final String text = @@ -4096,6 +4118,7 @@ void prefixOrDescrAnnotation() { assertThat(orDescr.getDescrs()).hasSize(2); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void infixAndDescrAnnotation() { final String text = @@ -4116,6 +4139,7 @@ void infixAndDescrAnnotation() { assertThat(andDescr.getDescrs()).hasSize(3); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void infixOrDescrAnnotation() { final String text = @@ -4411,8 +4435,9 @@ void traitExtendsMultiple() { .containsExactlyInAnyOrder("com.sample.ParentTrait", "UncleTrait", "org.test.GrandParentTrait"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test - void pluggableEvaluator() { + void pluggableEvaluatorOldParser() { final String source = "package org.drools\n" + "rule R\n" + "when\n" + @@ -4431,6 +4456,27 @@ void pluggableEvaluator() { .containsExactly("$c : core", "this not isA t.x.E.class", "this isA t.x.D.class"); } + @EnabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") + @Test + void pluggableEvaluatorNewParser() { + final String source = "package org.drools\n" + + "rule R\n" + + "when\n" + + " $t : Thing( $c : core, this not ##isA t.x.E.class, this ##isA t.x.D.class )\n" + + "then\n" + + " list.add( \"E\" ); \n" + + " don( $t, E.class ); \n" + + "end\n"; + + Operator.addOperatorToRegistry("isA", false); + Operator.addOperatorToRegistry("isA", true); + + PatternDescr pattern = (PatternDescr) parseAndGetFirstRuleDescr(source).getLhs().getDescrs().get(0); + assertThat(pattern.getConstraint().getDescrs()) + .extracting(Object::toString) + .containsExactly("$c : core", "this not ##isA t.x.E.class", "this ##isA t.x.D.class"); + } + @Test void namedConsequenceDo() { final String text = @@ -5114,6 +5160,7 @@ void accumulateEmptyChunks() { assertThat(accumulateDescr.getResultCode()).isEqualTo("null"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void doublePipeInfixOr() { final String text = @@ -5135,6 +5182,7 @@ void doublePipeInfixOr() { }); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void doubleAmpersandInfixAnd() { final String text = @@ -5154,6 +5202,7 @@ void doubleAmpersandInfixAnd() { }); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test void doubleAmpersandInfixAndInAccumulate() { final String text = @@ -5271,4 +5320,24 @@ void typeDeclarationWithTypeToken() { TypeFieldDescr typeFieldDescr = typeDeclarationDescr.getFields().get("id"); assertThat(typeFieldDescr.getPattern().getObjectType()).isEqualTo("int"); } + + @Test + void agendaGroup() { + final String drl = "rule R1\n" + + " agenda-group \"group1\"\n" + + " when\n" + + " then\n" + + "end"; + PackageDescr pkg = parseAndGetPackageDescrWithoutErrorCheck(drl); + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // agenda-group is dropped in DRL10 + assertThat(parser.hasErrors()).isTrue(); + } else { + RuleDescr rule = pkg.getRules().get(0); + assertThat(rule).isNotNull(); + final AttributeDescr att = rule.getAttributes().get("agenda-group"); + assertThat(att.getValue()).isEqualTo("group1"); + assertThat(att.getName()).isEqualTo("agenda-group"); + } + } } diff --git a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/ParserTestUtils.java b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/ParserTestUtils.java index 3419eab65e5..87e4de894a7 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/ParserTestUtils.java +++ b/drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/ParserTestUtils.java @@ -21,7 +21,10 @@ import java.util.Arrays; import java.util.List; +import org.drools.drl.parser.DrlExprParser; +import org.drools.drl.parser.DrlExprParserFactory; import org.drools.drl.parser.DrlParser; +import org.kie.internal.builder.conf.LanguageLevelOption; public class ParserTestUtils { @@ -45,14 +48,22 @@ private ParserTestUtils() { * Returns a DrlParser which encapsulates an old or new parser depending on system property */ public static DrlParser getParser() { - return new DrlParser(); + if (DrlParser.ANTLR4_PARSER_ENABLED) { + return new DrlParser(LanguageLevelOption.DRL10); + } else { + return new DrlParser(LanguageLevelOption.DRL6); + } } /** - * Enables the old parser. Just for quick testing purposes. + * Returns a DrlExprParser which encapsulates an old or new parser depending on system property */ - public static void enableOldParser() { - DrlParser.ANTLR4_PARSER_ENABLED = false; + public static DrlExprParser getExprParser() { + if (DrlParser.ANTLR4_PARSER_ENABLED) { + return DrlExprParserFactory.getDrlExprParser(LanguageLevelOption.DRL10); + } else { + return DrlExprParserFactory.getDrlExprParser(LanguageLevelOption.DRL6); + } } public static List javaKeywords() { diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/accumulate_with_nested_from.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/accumulate_with_nested_from.drl index 3696836b1f2..5911bcadfb4 100755 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/accumulate_with_nested_from.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/accumulate_with_nested_from.drl @@ -18,7 +18,7 @@ rule "AccumulateParserTest" when // below statement makes no sense, but is useful to test parsing recursiveness - $personList : ArrayList() from accumulate( Person( $age : age > 21 || < 10 ) from collect( People() from $town.getPeople() ), + $personList : ArrayList() from accumulate( Person( $age : age > 21 || age < 10 ) from collect( People() from $town.getPeople() ), max( $age ) ); then end diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/in_operator_test.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/in_operator_test.drl index 54f5225c3e8..7141a89d0d4 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/in_operator_test.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/in_operator_test.drl @@ -19,7 +19,7 @@ rule simple_rule when - Person(age > 30 && < 40) + Person(age > 30 && age < 40) Vehicle(type in ( "sedan", "wagon" ), age < 3) then consequence(); diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/notin_operator_test.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/notin_operator_test.drl index a2eae254405..8b054e0a4fb 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/notin_operator_test.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/notin_operator_test.drl @@ -19,7 +19,7 @@ rule simple_rule when - Person(age > 30 && < 40) + Person(age > 30 && age < 40) Vehicle(type not in ( "sedan", "wagon" ), age < 3) then consequence(); diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/package_attributes.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/package_attributes.drl index 156f5c58f6d..5f1cd1b5fd8 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/package_attributes.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/package_attributes.drl @@ -17,7 +17,7 @@ package com.foo; -agenda-group "x" +ruleflow-group "x" import goo.ber import wee.waa diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/pluggable_operators.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/pluggable_operators.drl index 59c31d2c8e7..a605648d783 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/pluggable_operators.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/pluggable_operators.drl @@ -23,6 +23,6 @@ when $b : EventB( this after[1,10] $a || this not after[15,20] $a ) $c : EventC( this finishes $b ) $d : EventD( this not starts $a ) - $e : EventE( this not before[1, 10] $b || after[1, 10] $c && this after[1, 5] $d ) + $e : EventE( this not before[1, 10] $b || this after[1, 10] $c && this after[1, 5] $d ) then end \ No newline at end of file diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes.drl index faf0d0c3351..9b68c4f617a 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes.drl @@ -21,7 +21,7 @@ rule simple_rule // attributes keywork (and colon) is totally optional salience 42 - agenda-group "my_group" + ruleflow-group "my_group" no-loop duration 42 activation-group "my_activation_group" diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes2.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes2.drl index cece840aa59..279dc33963d 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes2.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes2.drl @@ -20,7 +20,7 @@ package foo.bar rule rule1 salience (42) - agenda-group "my_group" + ruleflow-group "my_group" when Foo() then diff --git a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes_alt.drl b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes_alt.drl index fafc7032171..34a1baa5632 100644 --- a/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes_alt.drl +++ b/drools-drl/drools-drl-parser-tests/src/test/resources/org/drools/drl/parser/antlr4/rule_attributes_alt.drl @@ -20,7 +20,7 @@ rule simple_rule attributes: - salience 42, agenda-group "my_group", no-loop, lock-on-active, duration 42, activation-group "my_activation_group" + salience 42, ruleflow-group "my_group", no-loop, lock-on-active, duration 42, activation-group "my_activation_group" when Foo() then diff --git a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL6Expressions.g4 b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Expressions.g4 similarity index 92% rename from drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL6Expressions.g4 rename to drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Expressions.g4 index 063e4ed48cf..a022c96c121 100644 --- a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL6Expressions.g4 +++ b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Expressions.g4 @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -parser grammar DRL6Expressions; +parser grammar DRL10Expressions; options { language = Java; - tokenVocab = DRLLexer; + tokenVocab = DRL10Lexer; superClass=DRLExpressions; } @@ -81,13 +81,13 @@ options { /*if (state.backtracking != 0){ return false; }*/ - if (_input.get( _input.index() - 1 ).getType() == DRLLexer.WS){ + if (_input.get( _input.index() - 1 ).getType() == DRL10Lexer.WS){ return true; } - if (_input.LA(-1) == DRLLexer.LPAREN){ + if (_input.LA(-1) == DRL10Lexer.LPAREN){ return true; } - return _input.get( _input.index() ).getType() != DRLLexer.EOF; + return _input.get( _input.index() ).getType() != DRL10Lexer.EOF; } private boolean notStartWithNewline() { @@ -126,7 +126,7 @@ literal operator returns [boolean negated, String opr] @init{ if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); helper.setHasOperator( true ); } // TODO verify that we can omit the backtracking check -@after{ if( /*state.backtracking == 0 &&*/ _input.LA( 1 ) != DRLLexer.EOF) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } } +@after{ if( /*state.backtracking == 0 &&*/ _input.LA( 1 ) != DRL10Lexer.EOF) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } } : x=TILDE? ( op=EQUAL { $negated = false; $opr=($x != null ? $x.text : "")+$op.text; helper.emit($op, DroolsEditorType.SYMBOL); } | op=NOTEQUAL { $negated = false; $opr=($x != null ? $x.text : "")+$op.text; helper.emit($op, DroolsEditorType.SYMBOL); } @@ -139,7 +139,7 @@ operator returns [boolean negated, String opr] relationalOp returns [boolean negated, String opr, java.util.List params] @init{ if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); helper.setHasOperator( true ); } // TODO verify that we can omit the backtracking check -@after{ if( /*state.backtracking == 0 &&*/ _input.LA( 1 ) != DRLLexer.EOF) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } } +@after{ if( /*state.backtracking == 0 &&*/ _input.LA( 1 ) != DRL10Lexer.EOF) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } } : ( op=LE { $negated = false; $opr=$op.text; $params = null; helper.emit($op, DroolsEditorType.SYMBOL);} | op=GE { $negated = false; $opr=$op.text; $params = null; helper.emit($op, DroolsEditorType.SYMBOL);} | op=LT { $negated = false; $opr=$op.text; $params = null; helper.emit($op, DroolsEditorType.SYMBOL);} @@ -290,7 +290,6 @@ drlKeywords returns [Token token] | DRL_LOCK_ON_ACTIVE | DRL_REFRACT | DRL_DIRECT - | DRL_AGENDA_GROUP | DRL_ACTIVATION_GROUP | DRL_RULEFLOW_GROUP | DRL_DATE_EFFECTIVE @@ -476,7 +475,7 @@ equalityExpression returns [BaseDescr result] : left=instanceOfExpression { if( buildDescr ) { $result = $left.result; } } ( ( op=EQUAL | op=NOTEQUAL ) { helper.setHasOperator( true ); - if( _input.LA( 1 ) != DRLLexer.EOF ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } + if( _input.LA( 1 ) != DRL10Lexer.EOF ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } right=instanceOfExpression { if( buildDescr ) { $result = new RelationalExprDescr( $op.text, false, null, $left.result, $right.result ); @@ -489,7 +488,7 @@ instanceOfExpression returns [BaseDescr result] : left=inExpression { if( buildDescr ) { $result = $left.result; } } ( op=instanceof_key { helper.setHasOperator( true ); - if( _input.LA( 1 ) != DRLLexer.EOF ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } + if( _input.LA( 1 ) != DRL10Lexer.EOF ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } right=type { if( buildDescr ) { $result = new RelationalExprDescr( $op.text, false, null, $left.result, new AtomicExprDescr($right.text) ); @@ -571,7 +570,7 @@ locals [ BaseDescr lsd ] $relationalExpression::lsd = $result; } } - ( right=orRestriction + ( right=singleRestriction { if( buildDescr ) { $result = $right.result; // TODO access lsd directly instead of through dynamic context here @@ -581,36 +580,6 @@ locals [ BaseDescr lsd ] )* ; -orRestriction returns [BaseDescr result] - : left=andRestriction { if( buildDescr ) { $result = $left.result; } } - ( lop=OR args=fullAnnotation[null]? right=andRestriction - { if( buildDescr ) { - ConstraintConnectiveDescr descr = ConstraintConnectiveDescr.newOr(); - descr.addOrMerge( $result ); - descr.addOrMerge( $right.result ); - if ( $ctx.args != null ) { descr.addAnnotation( $args.result ); } - $result = descr; - } - } - )*? EOF? - ; - -andRestriction returns [BaseDescr result] - : left=singleRestriction { if( buildDescr ) { $result = $left.result; } } - ( lop=AND - { if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); } - args=fullAnnotation[null]?right=singleRestriction - { if( buildDescr ) { - ConstraintConnectiveDescr descr = ConstraintConnectiveDescr.newAnd(); - descr.addOrMerge( $result ); - descr.addOrMerge( $right.result ); - if ( $ctx.args != null ) { descr.addAnnotation( $args.result ); } - $result = descr; - } - } - )*? - ; - singleRestriction returns [BaseDescr result] : op=operator { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } @@ -630,7 +599,6 @@ singleRestriction returns [BaseDescr result] } helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_END ); } - | LPAREN or=orRestriction RPAREN { $result = $or.result; } ; @@ -688,9 +656,9 @@ unaryExpressionNotPlusMinus returns [BaseDescr result] | castExpression | backReferenceExpression | { isLeft = helper.getLeftMostExpr() == null;} - ( ({inMap == 0 && ternOp == 0 && _input.LA(2) == DRLLexer.COLON}? (var=drlIdentifier COLON + ( ({inMap == 0 && ternOp == 0 && _input.LA(2) == DRL10Lexer.COLON}? (var=drlIdentifier COLON { hasBindings = true; helper.emit($var.token, DroolsEditorType.IDENTIFIER_VARIABLE); helper.emit($COLON, DroolsEditorType.SYMBOL); if( buildDescr ) { bind = new BindingDescr($var.text, null, false); helper.setStart( bind, $var.token ); } } )) - | ({inMap == 0 && ternOp == 0 && _input.LA(2) == DRLLexer.DRL_UNIFY}? (var=drlIdentifier DRL_UNIFY + | ({inMap == 0 && ternOp == 0 && _input.LA(2) == DRL10Lexer.DRL_UNIFY}? (var=drlIdentifier DRL_UNIFY { hasBindings = true; helper.emit($var.token, DroolsEditorType.IDENTIFIER_VARIABLE); helper.emit($DRL_UNIFY, DroolsEditorType.SYMBOL); if( buildDescr ) { bind = new BindingDescr($var.text, null, true); helper.setStart( bind, $var.token ); } } )) )? @@ -1000,12 +968,11 @@ in_key ; operator_key - // IDENTIFIER is required to accept custom operators. We need to keep this semantic predicate for custom operators - : {(helper.isPluggableEvaluator(false))}? id=IDENTIFIER { helper.emit($id, DroolsEditorType.KEYWORD); } + : DRL_CUSTOM_OPERATOR_PREFIX {(helper.isPluggableEvaluator(false))}? id=IDENTIFIER { helper.emit($id, DroolsEditorType.KEYWORD); } | op=builtInOperator { helper.emit($op.token, DroolsEditorType.KEYWORD); } ; neg_operator_key - : {(helper.isPluggableEvaluator(true))}? id=IDENTIFIER { helper.emit($id, DroolsEditorType.KEYWORD); } + : DRL_CUSTOM_OPERATOR_PREFIX {(helper.isPluggableEvaluator(true))}? id=IDENTIFIER { helper.emit($id, DroolsEditorType.KEYWORD); } | op=builtInOperator { helper.emit($op.token, DroolsEditorType.KEYWORD); } ; diff --git a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLLexer.g4 b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Lexer.g4 similarity index 98% rename from drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLLexer.g4 rename to drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Lexer.g4 index 2c05b4dc38b..ed673f881b2 100644 --- a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLLexer.g4 +++ b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Lexer.g4 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -lexer grammar DRLLexer; +lexer grammar DRL10Lexer; import JavaLexer; @@ -115,7 +115,6 @@ DRL_AUTO_FOCUS : 'auto-focus'; DRL_LOCK_ON_ACTIVE : 'lock-on-active'; DRL_REFRACT : 'refract'; DRL_DIRECT : 'direct'; -DRL_AGENDA_GROUP : 'agenda-group'; DRL_ACTIVATION_GROUP : 'activation-group'; DRL_RULEFLOW_GROUP : 'ruleflow-group'; DRL_DATE_EFFECTIVE : 'date-effective'; @@ -125,6 +124,8 @@ DRL_CALENDARS : 'calendars'; DRL_TIMER : 'timer'; DRL_DURATION : 'duration'; +DRL_CUSTOM_OPERATOR_PREFIX : '##' ; + ///////////////// // LEXER ///////////////// diff --git a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Parser.g4 similarity index 96% rename from drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 rename to drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Parser.g4 index 8ccaf9b4cd8..cca81800df4 100644 --- a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 +++ b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL10Parser.g4 @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ - parser grammar DRLParser; + parser grammar DRL10Parser; -options { tokenVocab=DRLLexer; } +options { tokenVocab=DRL10Lexer; } -import DRL6Expressions, JavaParser; +import DRL10Expressions, JavaParser; /* * statement := importStatement @@ -122,16 +122,16 @@ lhs : DRL_WHEN lhsExpression* ; queryLhs : lhsExpression* ; lhsExpression : LPAREN lhsExpression RPAREN #lhsExpressionEnclosed - | DRL_OR drlAnnotation* lhsExpression+ #lhsOr - | lhsExpression ((DRL_OR|OR) drlAnnotation* lhsExpression)+ #lhsOr - | DRL_AND drlAnnotation* lhsExpression+ #lhsAnd - | lhsExpression ((DRL_AND|AND) drlAnnotation* lhsExpression)+ #lhsAnd + | DRL_OR lhsExpression+ #lhsOr + | lhsExpression ((DRL_OR) lhsExpression)+ #lhsOr + | DRL_AND lhsExpression+ #lhsAnd + | lhsExpression ((DRL_AND) lhsExpression)+ #lhsAnd | lhsUnary #lhsUnarySingle ; // lhsAnd is used as a label in lhsExpression rule. But some other rules explicitly use the def, so lhsAndDef is declared. lhsAndDef : LPAREN lhsAndDef RPAREN - | lhsUnary ((DRL_AND|AND) lhsUnary)* + | lhsUnary ((DRL_AND) lhsUnary)* | LPAREN DRL_AND lhsUnary+ RPAREN ; @@ -462,7 +462,7 @@ drlAnnotation attributes : (DRL_ATTRIBUTES COLON?)? attribute ( COMMA? attribute )* ; attribute : name=( DRL_SALIENCE | DRL_ENABLED ) conditionalAttributeValue #expressionAttribute | name=( DRL_NO_LOOP | DRL_AUTO_FOCUS | DRL_LOCK_ON_ACTIVE | DRL_REFRACT | DRL_DIRECT ) BOOL_LITERAL? #booleanAttribute - | name=( DRL_AGENDA_GROUP | DRL_ACTIVATION_GROUP | DRL_RULEFLOW_GROUP | DRL_DATE_EFFECTIVE | DRL_DATE_EXPIRES | DRL_DIALECT ) DRL_STRING_LITERAL #stringAttribute + | name=( DRL_ACTIVATION_GROUP | DRL_RULEFLOW_GROUP | DRL_DATE_EFFECTIVE | DRL_DATE_EXPIRES | DRL_DIALECT ) DRL_STRING_LITERAL #stringAttribute | name=DRL_CALENDARS DRL_STRING_LITERAL ( COMMA DRL_STRING_LITERAL )* #stringListAttribute | name=DRL_TIMER ( DECIMAL_LITERAL | LPAREN chunk RPAREN ) #intOrChunkAttribute | name=DRL_DURATION ( DECIMAL_LITERAL | LPAREN chunk RPAREN ) #intOrChunkAttribute diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlExprParserFactory.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlExprParserFactory.java index 4ddbf289705..55259828e07 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlExprParserFactory.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlExprParserFactory.java @@ -18,7 +18,7 @@ */ package org.drools.drl.parser; -import org.drools.drl.parser.antlr4.Drl6ExprParserAntlr4; +import org.drools.drl.parser.antlr4.Drl10ExprParser; import org.kie.internal.builder.conf.LanguageLevelOption; public class DrlExprParserFactory { @@ -28,7 +28,9 @@ public static DrlExprParser getDrlExprParser(LanguageLevelOption languageLevel) case DRL5: case DRL6: case DRL6_STRICT: - return DrlParser.ANTLR4_PARSER_ENABLED ? new Drl6ExprParserAntlr4(languageLevel) : new Drl6ExprParser(languageLevel); + return new Drl6ExprParser(languageLevel); + case DRL10: + return new Drl10ExprParser(languageLevel); default: throw new RuntimeException("Unsupported language level: " + languageLevel); } diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java index 714fd8a21c6..e314c6b4ee4 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java @@ -19,7 +19,7 @@ package org.drools.drl.parser; import org.drools.drl.parser.antlr4.DRLParserError; -import org.drools.drl.parser.antlr4.DRLParserWrapper; +import org.drools.drl.parser.antlr4.DRL10ParserWrapper; import org.drools.io.InternalResource; import org.drools.drl.ast.descr.PackageDescr; import org.drools.drl.parser.lang.DRLLexer; @@ -53,7 +53,7 @@ public class DrlParser { // TODO: REMOVE THIS GENERIC MESSAGE ASAP private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n"; - private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}"; + private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}, languageLevel = {}"; private final List results = new ArrayList<>(); private List editorSentences = null; private Location location = new Location( Location.LOCATION_UNKNOWN ); @@ -62,10 +62,10 @@ public class DrlParser { public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled"; - // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable - public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false + // for test purpose + public static final boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false - public static final LanguageLevelOption DEFAULT_LANGUAGE_LEVEL = LanguageLevelOption.DRL6; + public static final LanguageLevelOption DEFAULT_LANGUAGE_LEVEL = ANTLR4_PARSER_ENABLED ? LanguageLevelOption.DRL10 : LanguageLevelOption.DRL6; private final LanguageLevelOption languageLevel; public DrlParser() { @@ -74,6 +74,11 @@ public DrlParser() { public DrlParser(LanguageLevelOption languageLevel) { this.languageLevel = languageLevel; + + if (languageLevel == LanguageLevelOption.DRL5 || languageLevel == LanguageLevelOption.DRL6_STRICT) { + LOG.warn("{} is deprecated and will be removed in future versions. Please use the default {} or newly introduced {} instead.", + languageLevel, LanguageLevelOption.DRL6, LanguageLevelOption.DRL10); + } } /** Parse a rule from text */ @@ -84,9 +89,9 @@ public PackageDescr parse(final Resource resource, final String text) throws Dro public PackageDescr parse(final boolean isEditor, final String text) throws DroolsParserException { - LOG.debug(DEBUG_PARSER_LOG, ANTLR4_PARSER_ENABLED); - if (ANTLR4_PARSER_ENABLED) { - // new parser based on antlr4 + LOG.debug(DEBUG_PARSER_LOG, ANTLR4_PARSER_ENABLED, languageLevel); + if (languageLevel == LanguageLevelOption.DRL10) { + // DRL10 is handled by the new antlr4 parser return compileWithAntlr4Parser(parser -> parser.parse(new StringReader(text))); } else { lexer = DRLFactory.buildLexer(text, languageLevel); @@ -97,9 +102,9 @@ public PackageDescr parse(final boolean isEditor, public PackageDescr parse(final boolean isEditor, final Reader reader) throws DroolsParserException { - LOG.debug(DEBUG_PARSER_LOG, ANTLR4_PARSER_ENABLED); - if (ANTLR4_PARSER_ENABLED) { - // new parser based on antlr4 + LOG.debug(DEBUG_PARSER_LOG, ANTLR4_PARSER_ENABLED, languageLevel); + if (languageLevel == LanguageLevelOption.DRL10) { + // DRL10 is handled by the new antlr4 parser return compileWithAntlr4Parser(parser -> parser.parse(reader)); } else { lexer = DRLFactory.buildLexer(reader, languageLevel); @@ -186,9 +191,9 @@ public PackageDescr parse(final boolean isEditor, final InputStream is) throws DroolsParserException, IOException { this.resource = resource; String encoding = resource instanceof InternalResource ? ((InternalResource) resource).getEncoding() : null; - LOG.debug(DEBUG_PARSER_LOG, ANTLR4_PARSER_ENABLED); - if (ANTLR4_PARSER_ENABLED) { - // new parser based on antlr4 + LOG.debug(DEBUG_PARSER_LOG, ANTLR4_PARSER_ENABLED, languageLevel); + if (languageLevel == LanguageLevelOption.DRL10) { + // DRL10 is handled by the new antlr4 parser return compileWithAntlr4Parser(parser -> parser.parse(is, encoding)); } else { // old parsers based on antlr3 @@ -198,10 +203,10 @@ public PackageDescr parse(final boolean isEditor, } } - private PackageDescr compileWithAntlr4Parser(Function packageDescrFunction) throws DroolsParserException { + private PackageDescr compileWithAntlr4Parser(Function packageDescrFunction) throws DroolsParserException { try { - // we don't use languageLevel here, assuming DRL6 compatible - DRLParserWrapper parser = new DRLParserWrapper(resource); + // When DRL11 or higher is developed, languageLevel would be used to determine the parser to be used. + DRL10ParserWrapper parser = new DRL10ParserWrapper(resource); PackageDescr packageDescr = packageDescrFunction.apply(parser); for (final DRLParserError drlParserError : parser.getErrors()) { final ParserError err = new ParserError(resource, diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLParserHelper.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRL10ParserHelper.java similarity index 84% rename from drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLParserHelper.java rename to drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRL10ParserHelper.java index 131145b2d75..75994fc5a52 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLParserHelper.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRL10ParserHelper.java @@ -37,28 +37,28 @@ import org.kie.internal.builder.conf.LanguageLevelOption; /** - * Collection of static helper methods for DRLParser + * Collection of static helper methods for DRL10Parser */ -public class DRLParserHelper { +public class DRL10ParserHelper { - private DRLParserHelper() { + private DRL10ParserHelper() { } /** * Entry point for parsing DRL. - * Unlike DRLParserWrapper.parse(), this method does not collect errors. + * Unlike DRL10ParserWrapper.parse(), this method does not collect errors. */ public static PackageDescr parse(String drl) { - DRLParser drlParser = createDrlParser(drl); + DRL10Parser drlParser = createDrlParser(drl); return compilationUnitContext2PackageDescr(drlParser.compilationUnit(), drlParser.getTokenStream(), null); } - public static DRLParser createDrlParser(String drl) { + public static DRL10Parser createDrlParser(String drl) { CharStream charStream = CharStreams.fromString(drl); return createDrlParser(charStream); } - public static DRLParser createDrlParser(InputStream is, String encoding) { + public static DRL10Parser createDrlParser(InputStream is, String encoding) { try { CharStream charStream = encoding != null ? CharStreams.fromStream(is, Charset.forName(encoding)) @@ -69,7 +69,7 @@ public static DRLParser createDrlParser(InputStream is, String encoding) { } } - public static DRLParser createDrlParser(Reader reader) { + public static DRL10Parser createDrlParser(Reader reader) { try { CharStream charStream = CharStreams.fromReader(reader); return createDrlParser(charStream); @@ -78,11 +78,11 @@ public static DRLParser createDrlParser(Reader reader) { } } - private static DRLParser createDrlParser(CharStream charStream) { - DRLLexer drlLexer = new DRLLexer(charStream); + private static DRL10Parser createDrlParser(CharStream charStream) { + DRL10Lexer drlLexer = new DRL10Lexer(charStream); CommonTokenStream commonTokenStream = new CommonTokenStream(drlLexer); - DRLParser parser = new DRLParser(commonTokenStream); - ParserHelper helper = new ParserHelper(commonTokenStream, LanguageLevelOption.DRL6); + DRL10Parser parser = new DRL10Parser(commonTokenStream); + ParserHelper helper = new ParserHelper(commonTokenStream, LanguageLevelOption.DRL10); parser.setHelper(helper); return parser; } @@ -90,7 +90,7 @@ private static DRLParser createDrlParser(CharStream charStream) { /** * DRLVisitorImpl visits a parse tree and creates a PackageDescr */ - public static PackageDescr compilationUnitContext2PackageDescr(DRLParser.CompilationUnitContext ctx, TokenStream tokenStream, Resource resource) { + public static PackageDescr compilationUnitContext2PackageDescr(DRL10Parser.CompilationUnitContext ctx, TokenStream tokenStream, Resource resource) { DRLVisitorImpl visitor = new DRLVisitorImpl(tokenStream, resource); Object descr = visitor.visit(ctx); if (descr instanceof PackageDescr) { @@ -103,7 +103,7 @@ public static PackageDescr compilationUnitContext2PackageDescr(DRLParser.Compila /** * Given a row and column of the input DRL, return the index of the matched token */ - public static Integer computeTokenIndex(DRLParser parser, int row, int col) { + public static Integer computeTokenIndex(DRL10Parser parser, int row, int col) { for (int i = 0; i < parser.getInputStream().size(); i++) { Token token = parser.getInputStream().get(i); int start = token.getCharPositionInLine(); diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLParserWrapper.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRL10ParserWrapper.java similarity index 82% rename from drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLParserWrapper.java rename to drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRL10ParserWrapper.java index e89ad669197..bc0f62c81ec 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLParserWrapper.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRL10ParserWrapper.java @@ -29,20 +29,20 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.drools.drl.parser.antlr4.DRLParserHelper.compilationUnitContext2PackageDescr; +import static org.drools.drl.parser.antlr4.DRL10ParserHelper.compilationUnitContext2PackageDescr; /** * Wrapper for DRLParser. Somewhat duplicated from DRLParserHelper, but this class is instantiated and holds errors. */ -public class DRLParserWrapper { +public class DRL10ParserWrapper { - private static final Logger LOGGER = LoggerFactory.getLogger(DRLParserWrapper.class); + private static final Logger LOGGER = LoggerFactory.getLogger(DRL10ParserWrapper.class); private final List errors = new ArrayList<>(); private final Resource resource; - public DRLParserWrapper(Resource resource) { + public DRL10ParserWrapper(Resource resource) { this.resource = resource; } @@ -50,7 +50,7 @@ public DRLParserWrapper(Resource resource) { * Main entry point for parsing DRL */ public PackageDescr parse(String drl) { - DRLParser drlParser = DRLParserHelper.createDrlParser(drl); + DRL10Parser drlParser = DRL10ParserHelper.createDrlParser(drl); return parse(drlParser); } @@ -58,7 +58,7 @@ public PackageDescr parse(String drl) { * Main entry point for parsing DRL */ public PackageDescr parse(InputStream is, String encoding) { - DRLParser drlParser = DRLParserHelper.createDrlParser(is, encoding); + DRL10Parser drlParser = DRL10ParserHelper.createDrlParser(is, encoding); return parse(drlParser); } @@ -66,15 +66,15 @@ public PackageDescr parse(InputStream is, String encoding) { * Main entry point for parsing DRL */ public PackageDescr parse(Reader reader) { - DRLParser drlParser = DRLParserHelper.createDrlParser(reader); + DRL10Parser drlParser = DRL10ParserHelper.createDrlParser(reader); return parse(drlParser); } - private PackageDescr parse(DRLParser drlParser) { + private PackageDescr parse(DRL10Parser drlParser) { DRLErrorListener errorListener = new DRLErrorListener(); drlParser.addErrorListener(errorListener); - DRLParser.CompilationUnitContext cxt = drlParser.compilationUnit(); + DRL10Parser.CompilationUnitContext cxt = drlParser.compilationUnit(); errors.addAll(errorListener.getErrors()); diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java index 47d1b40bf9b..9d0cdf62a4e 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java @@ -23,7 +23,6 @@ import java.util.stream.Collectors; import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.RuleContext; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.tree.ParseTree; @@ -70,18 +69,18 @@ import static org.drools.drl.parser.antlr4.Antlr4ParserStringUtils.extractNamedConsequenceName; import static org.drools.drl.parser.antlr4.Antlr4ParserStringUtils.getTextPreservingWhitespace; import static org.drools.drl.parser.antlr4.Antlr4ParserStringUtils.getTokenTextPreservingWhitespace; -import static org.drools.drl.parser.antlr4.DRLParserHelper.getTextWithoutErrorNode; +import static org.drools.drl.parser.antlr4.DRL10ParserHelper.getTextWithoutErrorNode; import static org.drools.drl.parser.util.ParserStringUtils.appendPrefix; import static org.drools.drl.parser.util.ParserStringUtils.safeStripStringDelimiters; import static org.drools.util.StringUtils.unescapeJava; /** - * Visitor implementation for DRLParser. + * Visitor implementation for DRL10Parser. * Basically, each visit method creates and returns a Descr object traversing the parse tree. * Finally, visitCompilationUnit() returns a PackageDescr object. * Try not to depend on DRLVisitorImpl's internal state for clean maintainability */ -public class DRLVisitorImpl extends DRLParserBaseVisitor { +public class DRLVisitorImpl extends DRL10ParserBaseVisitor { private final TokenStream tokenStream; private final Resource resource; @@ -95,7 +94,7 @@ public DRLVisitorImpl(TokenStream tokenStream, Resource resource) { * Main entry point for creating PackageDescr from a parser tree. */ @Override - public PackageDescr visitCompilationUnit(DRLParser.CompilationUnitContext ctx) { + public PackageDescr visitCompilationUnit(DRL10Parser.CompilationUnitContext ctx) { PackageDescr packageDescr = BaseDescrFactory.builder(new PackageDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -159,7 +158,7 @@ private void applyChildrenDescrs(PackageDescr packageDescr, List desc } @Override - public UnitDescr visitUnitdef(DRLParser.UnitdefContext ctx) { + public UnitDescr visitUnitdef(DRL10Parser.UnitdefContext ctx) { return BaseDescrFactory.builder(new UnitDescr(ctx.name.getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -167,12 +166,12 @@ public UnitDescr visitUnitdef(DRLParser.UnitdefContext ctx) { } @Override - public BaseDescr visitDrlStatementdef(DRLParser.DrlStatementdefContext ctx) { + public BaseDescr visitDrlStatementdef(DRL10Parser.DrlStatementdefContext ctx) { return visitDescrChildren(ctx).get(0); // only one child. Ignore SEMICOLON } @Override - public GlobalDescr visitGlobaldef(DRLParser.GlobaldefContext ctx) { + public GlobalDescr visitGlobaldef(DRL10Parser.GlobaldefContext ctx) { return BaseDescrFactory.builder(new GlobalDescr(ctx.drlIdentifier().getText(), ctx.type().getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -180,7 +179,7 @@ public GlobalDescr visitGlobaldef(DRLParser.GlobaldefContext ctx) { } @Override - public ImportDescr visitImportStandardDef(DRLParser.ImportStandardDefContext ctx) { + public ImportDescr visitImportStandardDef(DRL10Parser.ImportStandardDefContext ctx) { String target = ctx.drlQualifiedName().getText() + (ctx.MUL() != null ? ".*" : ""); if (ctx.DRL_FUNCTION() != null || ctx.STATIC() != null) { FunctionImportDescr functionImportDescr = BaseDescrFactory.builder(new FunctionImportDescr()) @@ -200,7 +199,7 @@ public ImportDescr visitImportStandardDef(DRLParser.ImportStandardDefContext ctx } @Override - public AccumulateImportDescr visitImportAccumulateDef(DRLParser.ImportAccumulateDefContext ctx) { + public AccumulateImportDescr visitImportAccumulateDef(DRL10Parser.ImportAccumulateDefContext ctx) { AccumulateImportDescr accumulateImportDescr = BaseDescrFactory.builder(new AccumulateImportDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -211,7 +210,7 @@ public AccumulateImportDescr visitImportAccumulateDef(DRLParser.ImportAccumulate } @Override - public FunctionDescr visitFunctiondef(DRLParser.FunctiondefContext ctx) { + public FunctionDescr visitFunctiondef(DRL10Parser.FunctiondefContext ctx) { FunctionDescr functionDescr = BaseDescrFactory.builder(new FunctionDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -224,13 +223,13 @@ public FunctionDescr visitFunctiondef(DRLParser.FunctiondefContext ctx) { functionDescr.setName(ctx.drlIdentifier().getText()); // add function parameters - DRLParser.FormalParametersContext formalParametersContext = ctx.formalParameters(); - DRLParser.FormalParameterListContext formalParameterListContext = formalParametersContext.formalParameterList(); + DRL10Parser.FormalParametersContext formalParametersContext = ctx.formalParameters(); + DRL10Parser.FormalParameterListContext formalParameterListContext = formalParametersContext.formalParameterList(); if (formalParameterListContext != null) { - List formalParameterContexts = formalParameterListContext.formalParameter(); + List formalParameterContexts = formalParameterListContext.formalParameter(); formalParameterContexts.forEach(formalParameterContext -> { - DRLParser.TypeTypeContext typeTypeContext = formalParameterContext.typeType(); - DRLParser.VariableDeclaratorIdContext variableDeclaratorIdContext = formalParameterContext.variableDeclaratorId(); + DRL10Parser.TypeTypeContext typeTypeContext = formalParameterContext.typeType(); + DRL10Parser.VariableDeclaratorIdContext variableDeclaratorIdContext = formalParameterContext.variableDeclaratorId(); functionDescr.addParameter(typeTypeContext.getText(), variableDeclaratorIdContext.getText()); }); } @@ -239,12 +238,12 @@ public FunctionDescr visitFunctiondef(DRLParser.FunctiondefContext ctx) { } @Override - public BaseDescr visitDeclaredef(DRLParser.DeclaredefContext ctx) { + public BaseDescr visitDeclaredef(DRL10Parser.DeclaredefContext ctx) { return visitDescrChildren(ctx).get(0); // only one child } @Override - public TypeDeclarationDescr visitTypeDeclaration(DRLParser.TypeDeclarationContext ctx) { + public TypeDeclarationDescr visitTypeDeclaration(DRL10Parser.TypeDeclarationContext ctx) { TypeDeclarationDescr typeDeclarationDescr = BaseDescrFactory.builder(new TypeDeclarationDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -256,7 +255,7 @@ public TypeDeclarationDescr visitTypeDeclaration(DRLParser.TypeDeclarationContex typeDeclarationDescr.setTrait(true); } if (ctx.EXTENDS() != null) { - for (DRLParser.DrlQualifiedNameContext superType : ctx.superTypes) { + for (DRL10Parser.DrlQualifiedNameContext superType : ctx.superTypes) { typeDeclarationDescr.addSuperType(superType.getText()); } } @@ -270,7 +269,7 @@ public TypeDeclarationDescr visitTypeDeclaration(DRLParser.TypeDeclarationContex } @Override - public EnumDeclarationDescr visitEnumDeclaration(DRLParser.EnumDeclarationContext ctx) { + public EnumDeclarationDescr visitEnumDeclaration(DRL10Parser.EnumDeclarationContext ctx) { EnumDeclarationDescr enumDeclarationDescr = BaseDescrFactory.builder(new EnumDeclarationDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -295,7 +294,7 @@ public EnumDeclarationDescr visitEnumDeclaration(DRLParser.EnumDeclarationContex } @Override - public EnumLiteralDescr visitEnumerative(DRLParser.EnumerativeContext ctx) { + public EnumLiteralDescr visitEnumerative(DRL10Parser.EnumerativeContext ctx) { EnumLiteralDescr enumLiteralDescr = BaseDescrFactory.builder(new EnumLiteralDescr(ctx.drlIdentifier().getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -307,7 +306,7 @@ public EnumLiteralDescr visitEnumerative(DRLParser.EnumerativeContext ctx) { } @Override - public EntryPointDeclarationDescr visitEntryPointDeclaration(DRLParser.EntryPointDeclarationContext ctx) { + public EntryPointDeclarationDescr visitEntryPointDeclaration(DRL10Parser.EntryPointDeclarationContext ctx) { EntryPointDeclarationDescr entryPointDeclarationDescr = BaseDescrFactory.builder(new EntryPointDeclarationDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -320,7 +319,7 @@ public EntryPointDeclarationDescr visitEntryPointDeclaration(DRLParser.EntryPoin } @Override - public WindowDeclarationDescr visitWindowDeclaration(DRLParser.WindowDeclarationContext ctx) { + public WindowDeclarationDescr visitWindowDeclaration(DRL10Parser.WindowDeclarationContext ctx) { WindowDeclarationDescr windowDeclarationDescr = BaseDescrFactory.builder(new WindowDeclarationDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -337,7 +336,7 @@ public WindowDeclarationDescr visitWindowDeclaration(DRLParser.WindowDeclaration * entry point for one rule */ @Override - public RuleDescr visitRuledef(DRLParser.RuledefContext ctx) { + public RuleDescr visitRuledef(DRL10Parser.RuledefContext ctx) { RuleDescr ruleDescr = BaseDescrFactory.builder(new RuleDescr(safeStripStringDelimiters(ctx.name.getText()))) .withParserRuleContext(ctx) .withResource(resource) @@ -398,15 +397,15 @@ public RuleDescr visitRuledef(DRLParser.RuledefContext ctx) { } @Override - public QueryDescr visitQuerydef(DRLParser.QuerydefContext ctx) { + public QueryDescr visitQuerydef(DRL10Parser.QuerydefContext ctx) { QueryDescr queryDescr = BaseDescrFactory.builder(new QueryDescr(safeStripStringDelimiters(ctx.name.getText()))) .withParserRuleContext(ctx) .withResource(resource) .build(); - DRLParser.ParametersContext parametersContext = ctx.parameters(); + DRL10Parser.ParametersContext parametersContext = ctx.parameters(); if (parametersContext != null) { - List parameterContexts = parametersContext.parameter(); + List parameterContexts = parametersContext.parameter(); parameterContexts.forEach(parameterContext -> { String type = parameterContext.type() != null ? parameterContext.type().getText() : "Object"; // default type is Object String name = parameterContext.drlIdentifier().getText(); @@ -425,7 +424,7 @@ public QueryDescr visitQuerydef(DRLParser.QuerydefContext ctx) { } @Override - public AnnotationDescr visitDrlAnnotation(DRLParser.DrlAnnotationContext ctx) { + public AnnotationDescr visitDrlAnnotation(DRL10Parser.DrlAnnotationContext ctx) { // Full Java-style annotation. if (ctx.anno != null) { if (ctx.anno.result == null) { @@ -449,7 +448,7 @@ public AnnotationDescr visitDrlAnnotation(DRLParser.DrlAnnotationContext ctx) { } @Override - public TypeFieldDescr visitField(DRLParser.FieldContext ctx) { + public TypeFieldDescr visitField(DRL10Parser.FieldContext ctx) { TypeFieldDescr typeFieldDescr = BaseDescrFactory.builder(new TypeFieldDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -466,7 +465,7 @@ public TypeFieldDescr visitField(DRLParser.FieldContext ctx) { } @Override - public AttributeDescr visitExpressionAttribute(DRLParser.ExpressionAttributeContext ctx) { + public AttributeDescr visitExpressionAttribute(DRL10Parser.ExpressionAttributeContext ctx) { AttributeDescr attributeDescr = BaseDescrFactory.builder(new AttributeDescr(ctx.name.getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -477,7 +476,7 @@ public AttributeDescr visitExpressionAttribute(DRLParser.ExpressionAttributeCont } @Override - public AttributeDescr visitBooleanAttribute(DRLParser.BooleanAttributeContext ctx) { + public AttributeDescr visitBooleanAttribute(DRL10Parser.BooleanAttributeContext ctx) { AttributeDescr attributeDescr = BaseDescrFactory.builder(new AttributeDescr(ctx.name.getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -488,7 +487,7 @@ public AttributeDescr visitBooleanAttribute(DRLParser.BooleanAttributeContext ct } @Override - public AttributeDescr visitStringAttribute(DRLParser.StringAttributeContext ctx) { + public AttributeDescr visitStringAttribute(DRL10Parser.StringAttributeContext ctx) { AttributeDescr attributeDescr = BaseDescrFactory.builder(new AttributeDescr(ctx.name.getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -499,7 +498,7 @@ public AttributeDescr visitStringAttribute(DRLParser.StringAttributeContext ctx) } @Override - public AttributeDescr visitStringListAttribute(DRLParser.StringListAttributeContext ctx) { + public AttributeDescr visitStringListAttribute(DRL10Parser.StringListAttributeContext ctx) { AttributeDescr attributeDescr = BaseDescrFactory.builder(new AttributeDescr(ctx.name.getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -526,7 +525,7 @@ private static String createStringList(List valueList) { } @Override - public AttributeDescr visitIntOrChunkAttribute(DRLParser.IntOrChunkAttributeContext ctx) { + public AttributeDescr visitIntOrChunkAttribute(DRL10Parser.IntOrChunkAttributeContext ctx) { AttributeDescr attributeDescr = BaseDescrFactory.builder(new AttributeDescr(ctx.name.getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -545,7 +544,7 @@ public AttributeDescr visitIntOrChunkAttribute(DRLParser.IntOrChunkAttributeCont * entry point for LHS */ @Override - public List visitLhs(DRLParser.LhsContext ctx) { + public List visitLhs(DRL10Parser.LhsContext ctx) { if (ctx.lhsExpression() != null) { return visitDescrChildren(ctx); } else { @@ -554,7 +553,7 @@ public List visitLhs(DRLParser.LhsContext ctx) { } @Override - public BaseDescr visitLhsPatternBind(DRLParser.LhsPatternBindContext ctx) { + public BaseDescr visitLhsPatternBind(DRL10Parser.LhsPatternBindContext ctx) { if (ctx.lhsPattern().size() == 1) { return getSinglePatternDescr(ctx); } else if (ctx.lhsPattern().size() > 1) { @@ -564,7 +563,7 @@ public BaseDescr visitLhsPatternBind(DRLParser.LhsPatternBindContext ctx) { } } - private PatternDescr getSinglePatternDescr(DRLParser.LhsPatternBindContext ctx) { + private PatternDescr getSinglePatternDescr(DRL10Parser.LhsPatternBindContext ctx) { List patternDescrList = visitDescrChildren(ctx); if (patternDescrList.isEmpty() || !(patternDescrList.get(0) instanceof PatternDescr)) { throw new IllegalStateException("lhsPatternBind must have at least one lhsPattern : " + ctx.getText()); @@ -581,7 +580,7 @@ private PatternDescr getSinglePatternDescr(DRLParser.LhsPatternBindContext ctx) return patternDescr; } - private OrDescr getOrDescrWithMultiplePatternDescr(DRLParser.LhsPatternBindContext ctx) { + private OrDescr getOrDescrWithMultiplePatternDescr(DRL10Parser.LhsPatternBindContext ctx) { OrDescr orDescr = BaseDescrFactory.builder(new OrDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -604,7 +603,7 @@ private OrDescr getOrDescrWithMultiplePatternDescr(DRLParser.LhsPatternBindConte * entry point for a Pattern */ @Override - public PatternDescr visitLhsPattern(DRLParser.LhsPatternContext ctx) { + public PatternDescr visitLhsPattern(DRL10Parser.LhsPatternContext ctx) { if (ctx.xpathPrimary() != null) { String constraint = visitConstraintChildren(ctx); ExprConstraintDescr constraintDescr = BaseDescrFactory.builder(new ExprConstraintDescr(constraint)) @@ -649,7 +648,7 @@ private void addToPatternDescr(PatternDescr patternDescr, ExprConstraintDescr ex } @Override - public NamedConsequenceDescr visitNamedConsequenceInvocation(DRLParser.NamedConsequenceInvocationContext ctx) { + public NamedConsequenceDescr visitNamedConsequenceInvocation(DRL10Parser.NamedConsequenceInvocationContext ctx) { NamedConsequenceDescr namedConsequenceDescr = BaseDescrFactory.builder(new NamedConsequenceDescr(ctx.drlIdentifier().getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -658,7 +657,7 @@ public NamedConsequenceDescr visitNamedConsequenceInvocation(DRLParser.NamedCons } @Override - public NamedConsequenceDescr visitBreakingNamedConsequenceInvocation(DRLParser.BreakingNamedConsequenceInvocationContext ctx) { + public NamedConsequenceDescr visitBreakingNamedConsequenceInvocation(DRL10Parser.BreakingNamedConsequenceInvocationContext ctx) { NamedConsequenceDescr namedConsequenceDescr = BaseDescrFactory.builder(new NamedConsequenceDescr(ctx.drlIdentifier().getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -675,7 +674,7 @@ public NamedConsequenceDescr visitBreakingNamedConsequenceInvocation(DRLParser.B * into a ConditionalBranchDescr */ @Override - public ConditionalBranchDescr visitConditionalBranch(DRLParser.ConditionalBranchContext ctx) { + public ConditionalBranchDescr visitConditionalBranch(DRL10Parser.ConditionalBranchContext ctx) { ConditionalBranchDescr conditionalBranchDescr = BaseDescrFactory.builder(new ConditionalBranchDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -723,7 +722,7 @@ public ConditionalBranchDescr visitConditionalBranch(DRLParser.ConditionalBranch } @Override - public ForallDescr visitLhsForall(DRLParser.LhsForallContext ctx) { + public ForallDescr visitLhsForall(DRL10Parser.LhsForallContext ctx) { ForallDescr forallDescr = BaseDescrFactory.builder(new ForallDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -733,7 +732,7 @@ public ForallDescr visitLhsForall(DRLParser.LhsForallContext ctx) { } @Override - public PatternDescr visitLhsAccumulate(DRLParser.LhsAccumulateContext ctx) { + public PatternDescr visitLhsAccumulate(DRL10Parser.LhsAccumulateContext ctx) { AccumulateDescr accumulateDescr = BaseDescrFactory.builder(new AccumulateDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -742,7 +741,7 @@ public PatternDescr visitLhsAccumulate(DRLParser.LhsAccumulateContext ctx) { accumulateDescr.setInput(wrapWithAndDescr(visitLhsAndDef(ctx.lhsAndDef()), ctx.lhsAndDef())); // accumulate function - for (DRLParser.AccumulateFunctionContext accumulateFunctionContext : ctx.accumulateFunction()) { + for (DRL10Parser.AccumulateFunctionContext accumulateFunctionContext : ctx.accumulateFunction()) { accumulateDescr.addFunction(visitAccumulateFunction(accumulateFunctionContext)); } @@ -769,7 +768,7 @@ private AndDescr wrapWithAndDescr(BaseDescr baseDescr, ParserRuleContext ctx) { } @Override - public Object visitLhsGroupBy(DRLParser.LhsGroupByContext ctx) { + public Object visitLhsGroupBy(DRL10Parser.LhsGroupByContext ctx) { GroupByDescr groupByDescr = BaseDescrFactory.builder(new GroupByDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -782,7 +781,7 @@ public Object visitLhsGroupBy(DRLParser.LhsGroupByContext ctx) { groupByDescr.setGroupingFunction(getTextPreservingWhitespace(ctx.groupByKeyBinding().conditionalExpression())); // accumulate function - for (DRLParser.AccumulateFunctionContext accumulateFunctionContext : ctx.accumulateFunction()) { + for (DRL10Parser.AccumulateFunctionContext accumulateFunctionContext : ctx.accumulateFunction()) { groupByDescr.addFunction(visitAccumulateFunction(accumulateFunctionContext)); } @@ -797,21 +796,21 @@ public Object visitLhsGroupBy(DRLParser.LhsGroupByContext ctx) { } @Override - public BehaviorDescr visitPatternFilter(DRLParser.PatternFilterContext ctx) { + public BehaviorDescr visitPatternFilter(DRL10Parser.PatternFilterContext ctx) { BehaviorDescr behaviorDescr = BaseDescrFactory.builder(new BehaviorDescr()) .withParserRuleContext(ctx) .withResource(resource) .build(); behaviorDescr.setType(ctx.DRL_WINDOW().getText()); behaviorDescr.setSubType(ctx.drlIdentifier().getText()); - List expressionContexts = ctx.expressionList().expression(); + List expressionContexts = ctx.expressionList().expression(); List parameters = expressionContexts.stream().map(Antlr4ParserStringUtils::getTextPreservingWhitespace).collect(Collectors.toList()); behaviorDescr.setParameters(parameters); return behaviorDescr; } @Override - public FromDescr visitFromExpression(DRLParser.FromExpressionContext ctx) { + public FromDescr visitFromExpression(DRL10Parser.FromExpressionContext ctx) { FromDescr fromDescr = BaseDescrFactory.builder(new FromDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -821,7 +820,7 @@ public FromDescr visitFromExpression(DRLParser.FromExpressionContext ctx) { } @Override - public CollectDescr visitFromCollect(DRLParser.FromCollectContext ctx) { + public CollectDescr visitFromCollect(DRL10Parser.FromCollectContext ctx) { CollectDescr collectDescr = BaseDescrFactory.builder(new CollectDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -831,7 +830,7 @@ public CollectDescr visitFromCollect(DRLParser.FromCollectContext ctx) { } @Override - public AccumulateDescr visitFromAccumulate(DRLParser.FromAccumulateContext ctx) { + public AccumulateDescr visitFromAccumulate(DRL10Parser.FromAccumulateContext ctx) { AccumulateDescr accumulateDescr = BaseDescrFactory.builder(new AccumulateDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -854,7 +853,7 @@ public AccumulateDescr visitFromAccumulate(DRLParser.FromAccumulateContext ctx) } @Override - public AccumulateDescr.AccumulateFunctionCallDescr visitAccumulateFunction(DRLParser.AccumulateFunctionContext ctx) { + public AccumulateDescr.AccumulateFunctionCallDescr visitAccumulateFunction(DRL10Parser.AccumulateFunctionContext ctx) { String function = ctx.drlIdentifier().getText(); String bind = null; boolean unify = false; @@ -872,7 +871,7 @@ public AccumulateDescr.AccumulateFunctionCallDescr visitAccumulateFunction(DRLPa } @Override - public EntryPointDescr visitFromEntryPoint(DRLParser.FromEntryPointContext ctx) { + public EntryPointDescr visitFromEntryPoint(DRL10Parser.FromEntryPointContext ctx) { return BaseDescrFactory.builder(new EntryPointDescr(safeStripStringDelimiters(ctx.stringId().getText()))) .withParserRuleContext(ctx) .withResource(resource) @@ -880,7 +879,7 @@ public EntryPointDescr visitFromEntryPoint(DRLParser.FromEntryPointContext ctx) } @Override - public WindowReferenceDescr visitFromWindow(DRLParser.FromWindowContext ctx) { + public WindowReferenceDescr visitFromWindow(DRL10Parser.FromWindowContext ctx) { return BaseDescrFactory.builder(new WindowReferenceDescr(ctx.drlIdentifier().getText())) .withParserRuleContext(ctx) .withResource(resource) @@ -891,7 +890,7 @@ public WindowReferenceDescr visitFromWindow(DRLParser.FromWindowContext ctx) { * Collect constraints in a Pattern */ @Override - public List visitConstraints(DRLParser.ConstraintsContext ctx) { + public List visitConstraints(DRL10Parser.ConstraintsContext ctx) { List exprConstraintDescrList = new ArrayList<>(); populateExprConstraintDescrList(ctx, exprConstraintDescrList); return exprConstraintDescrList; @@ -900,7 +899,7 @@ public List visitConstraints(DRLParser.ConstraintsContext c /** * Collect constraints in a Pattern. Positional constraints comes first with semicolon. */ - private List visitConstraints(DRLParser.PositionalConstraintsContext positionalCtx, DRLParser.ConstraintsContext ctx) { + private List visitConstraints(DRL10Parser.PositionalConstraintsContext positionalCtx, DRL10Parser.ConstraintsContext ctx) { List exprConstraintDescrList = new ArrayList<>(); populateExprConstraintDescrList(positionalCtx, exprConstraintDescrList); populateExprConstraintDescrList(ctx, exprConstraintDescrList); @@ -915,7 +914,7 @@ private void populateExprConstraintDescrList(ParserRuleContext ctx, List visitConstraint(DRLParser.ConstraintContext ctx) { + public List visitConstraint(DRL10Parser.ConstraintContext ctx) { List descrList = new ArrayList<>(); if (ctx.nestedConstraint() != null) { // nested constraint requires special string manipulation @@ -955,7 +954,7 @@ public List visitConstraint(DRLParser.ConstraintContext ctx * address.city.startsWith("I"), address.city.length() == 5 */ @Override - public List visitNestedConstraint(DRLParser.NestedConstraintContext ctx) { + public List visitNestedConstraint(DRL10Parser.NestedConstraintContext ctx) { Token prefixStartToken = ctx.start; Token prefixEndToken = tokenStream.get(ctx.LPAREN().getSymbol().getTokenIndex() - 1); String prefix = tokenStream.getText(prefixStartToken, prefixEndToken); @@ -965,12 +964,12 @@ public List visitNestedConstraint(DRLParser.NestedConstrain } @Override - public String visitDrlIdentifier(DRLParser.DrlIdentifierContext ctx) { + public String visitDrlIdentifier(DRL10Parser.DrlIdentifierContext ctx) { return ctx.getText(); } @Override - public ExistsDescr visitLhsExists(DRLParser.LhsExistsContext ctx) { + public ExistsDescr visitLhsExists(DRL10Parser.LhsExistsContext ctx) { ExistsDescr existsDescr = BaseDescrFactory.builder(new ExistsDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -992,7 +991,7 @@ public ExistsDescr visitLhsExists(DRLParser.LhsExistsContext ctx) { } @Override - public NotDescr visitLhsNot(DRLParser.LhsNotContext ctx) { + public NotDescr visitLhsNot(DRL10Parser.LhsNotContext ctx) { NotDescr notDescr = BaseDescrFactory.builder(new NotDescr()) .withParserRuleContext(ctx) .withResource(resource) @@ -1014,7 +1013,7 @@ public NotDescr visitLhsNot(DRLParser.LhsNotContext ctx) { } @Override - public EvalDescr visitLhsEval(DRLParser.LhsEvalContext ctx) { + public EvalDescr visitLhsEval(DRL10Parser.LhsEvalContext ctx) { return BaseDescrFactory.builder(new EvalDescr(getTextPreservingWhitespace(ctx.conditionalOrExpression()))) .withParserRuleContext(ctx) .withResource(resource) @@ -1022,13 +1021,13 @@ public EvalDescr visitLhsEval(DRLParser.LhsEvalContext ctx) { } @Override - public List visitLhsExpressionEnclosed(DRLParser.LhsExpressionEnclosedContext ctx) { + public List visitLhsExpressionEnclosed(DRL10Parser.LhsExpressionEnclosedContext ctx) { // enclosed expression is simply stripped because Descr itself is encapsulated return visitDescrChildren(ctx); } @Override - public BaseDescr visitLhsOr(DRLParser.LhsOrContext ctx) { + public BaseDescr visitLhsOr(DRL10Parser.LhsOrContext ctx) { // For flatten nested OrDescr logic, we call visitDescrChildrenForDescrNodePair instead of usual visitDescrChildren List descrList = visitDescrChildrenForDescrNodePair(ctx); if (descrList.size() == 1) { @@ -1064,7 +1063,7 @@ private List flattenOrDescr(List descrList) { for (DescrNodePair descrNodePair : descrList) { BaseDescr descr = descrNodePair.getDescr(); ParseTree node = descrNodePair.getNode(); // parser node corresponding to the descr - if (descr instanceof OrDescr orDescr && !(node instanceof DRLParser.LhsExpressionEnclosedContext)) { + if (descr instanceof OrDescr orDescr && !(node instanceof DRL10Parser.LhsExpressionEnclosedContext)) { // sibling OrDescr should be flattened unless it's explicitly enclosed by parenthesis flattenedDescrs.addAll(orDescr.getDescrs()); flattenedDescrs.addAll(orDescr.getAnnotations()); @@ -1076,7 +1075,7 @@ private List flattenOrDescr(List descrList) { } @Override - public BaseDescr visitLhsAnd(DRLParser.LhsAndContext ctx) { + public BaseDescr visitLhsAnd(DRL10Parser.LhsAndContext ctx) { return createAndDescr(ctx); } @@ -1116,7 +1115,7 @@ private List flattenAndDescr(List descrList) { for (DescrNodePair descrNodePair : descrList) { BaseDescr descr = descrNodePair.getDescr(); ParseTree node = descrNodePair.getNode(); // parser node corresponding to the descr - if (descr instanceof AndDescr andDescr && !(node instanceof DRLParser.LhsExpressionEnclosedContext)) { + if (descr instanceof AndDescr andDescr && !(node instanceof DRL10Parser.LhsExpressionEnclosedContext)) { // sibling AndDescr should be flattened unless it's explicitly enclosed by parenthesis flattenedDescrs.addAll(andDescr.getDescrs()); flattenedDescrs.addAll(andDescr.getAnnotations()); @@ -1128,12 +1127,12 @@ private List flattenAndDescr(List descrList) { } @Override - public BaseDescr visitLhsAndDef(DRLParser.LhsAndDefContext ctx) { + public BaseDescr visitLhsAndDef(DRL10Parser.LhsAndDefContext ctx) { return createAndDescr(ctx); } @Override - public BaseDescr visitLhsUnary(DRLParser.LhsUnaryContext ctx) { + public BaseDescr visitLhsUnary(DRL10Parser.LhsUnaryContext ctx) { List children = visitDescrChildren(ctx); if (children.size() > 1) { // lhsUnary may have multiple children e.g. consequenceInvocation, connect with AND diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DescrHelper.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DescrHelper.java index 02a4f38d276..3add771b360 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DescrHelper.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DescrHelper.java @@ -81,7 +81,7 @@ public static T populateCommonProperties(T descr, List recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { - helper.reportError(offendingSymbol, line, charPositionInLine, msg, e); - } - }); - parser.setBuildDescr(true); - parser.setLeftMostExpr(null); // setting initial value just in case - BaseDescr expr = parser.conditionalOrExpressionDescr(); - if (expr != null && !parser.hasErrors()) { - constraint = ConstraintConnectiveDescr.newAnd(); - constraint.addOrMerge(expr); + DRL10Lexer lexer = new DRL10Lexer(CharStreams.fromString(text)); + CommonTokenStream input = new CommonTokenStream(lexer); + helper = new ParserHelper(input, languageLevel); + DRL10Expressions parser = new DRL10Expressions(input); + parser.setHelper(helper); + parser.addErrorListener(new BaseErrorListener() { + @Override + public void syntaxError(Recognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { + helper.reportError(offendingSymbol, line, charPositionInLine, msg, e); } + }); + parser.setBuildDescr(true); + parser.setLeftMostExpr(null); // setting initial value just in case + BaseDescr expr = parser.conditionalOrExpressionDescr(); + if (expr != null && !parser.hasErrors()) { + constraint = ConstraintConnectiveDescr.newAnd(); + constraint.addOrMerge(expr); + } return constraint; } diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Expressions.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Expressions.java index b217ee09d9e..b9251427a1f 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Expressions.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Expressions.java @@ -1,23 +1,4 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -// $ANTLR 3.5.2 src/main/resources/org/drools/drl/parser/DRL6Expressions.g 2024-01-03 11:41:51 +// $ANTLR 3.5.2 src/main/resources/org/drools/drl/parser/DRL6Expressions.g 2025-01-31 19:08:38 package org.drools.drl.parser.lang; @@ -46,6 +27,24 @@ import java.util.Map; import java.util.HashMap; +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ @SuppressWarnings("all") public class DRL6Expressions extends DRLExpressions { public static final String[] tokenNames = new String[] { @@ -211,7 +210,7 @@ public static class literal_return extends ParserRuleReturnScope { // $ANTLR start "literal" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:96:1: literal : ( STRING | DECIMAL | HEX | FLOAT | BOOL | NULL | TIME_INTERVAL | STAR ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:115:1: literal : ( STRING | DECIMAL | HEX | FLOAT | BOOL | NULL | TIME_INTERVAL | STAR ); public final DRL6Expressions.literal_return literal() throws RecognitionException { DRL6Expressions.literal_return retval = new DRL6Expressions.literal_return(); retval.start = input.LT(1); @@ -226,7 +225,7 @@ public final DRL6Expressions.literal_return literal() throws RecognitionExceptio Token STAR8=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:97:5: ( STRING | DECIMAL | HEX | FLOAT | BOOL | NULL | TIME_INTERVAL | STAR ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:116:5: ( STRING | DECIMAL | HEX | FLOAT | BOOL | NULL | TIME_INTERVAL | STAR ) int alt1=8; switch ( input.LA(1) ) { case STRING: @@ -277,58 +276,58 @@ public final DRL6Expressions.literal_return literal() throws RecognitionExceptio } switch (alt1) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:97:7: STRING + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:116:7: STRING { - STRING1=(Token)match(input,STRING,FOLLOW_STRING_in_literal92); if (state.failed) return retval; + STRING1=(Token)match(input,STRING,FOLLOW_STRING_in_literal95); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(STRING1, DroolsEditorType.STRING_CONST); } } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:98:7: DECIMAL + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:117:7: DECIMAL { - DECIMAL2=(Token)match(input,DECIMAL,FOLLOW_DECIMAL_in_literal109); if (state.failed) return retval; + DECIMAL2=(Token)match(input,DECIMAL,FOLLOW_DECIMAL_in_literal112); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(DECIMAL2, DroolsEditorType.NUMERIC_CONST); } } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:99:7: HEX + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:118:7: HEX { - HEX3=(Token)match(input,HEX,FOLLOW_HEX_in_literal125); if (state.failed) return retval; + HEX3=(Token)match(input,HEX,FOLLOW_HEX_in_literal128); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(HEX3, DroolsEditorType.NUMERIC_CONST); } } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:100:7: FLOAT + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:119:7: FLOAT { - FLOAT4=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_literal145); if (state.failed) return retval; + FLOAT4=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_literal148); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(FLOAT4, DroolsEditorType.NUMERIC_CONST); } } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:101:7: BOOL + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:120:7: BOOL { - BOOL5=(Token)match(input,BOOL,FOLLOW_BOOL_in_literal163); if (state.failed) return retval; + BOOL5=(Token)match(input,BOOL,FOLLOW_BOOL_in_literal166); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(BOOL5, DroolsEditorType.BOOLEAN_CONST); } } break; case 6 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:102:7: NULL + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:121:7: NULL { - NULL6=(Token)match(input,NULL,FOLLOW_NULL_in_literal182); if (state.failed) return retval; + NULL6=(Token)match(input,NULL,FOLLOW_NULL_in_literal185); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(NULL6, DroolsEditorType.NULL_CONST); } } break; case 7 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:103:9: TIME_INTERVAL + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:122:9: TIME_INTERVAL { - TIME_INTERVAL7=(Token)match(input,TIME_INTERVAL,FOLLOW_TIME_INTERVAL_in_literal203); if (state.failed) return retval; + TIME_INTERVAL7=(Token)match(input,TIME_INTERVAL,FOLLOW_TIME_INTERVAL_in_literal206); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(TIME_INTERVAL7, DroolsEditorType.NULL_CONST); } } break; case 8 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:104:9: STAR + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:123:9: STAR { - STAR8=(Token)match(input,STAR,FOLLOW_STAR_in_literal215); if (state.failed) return retval; + STAR8=(Token)match(input,STAR,FOLLOW_STAR_in_literal218); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(STAR8, DroolsEditorType.NUMERIC_CONST); } } break; @@ -357,7 +356,7 @@ public static class operator_return extends ParserRuleReturnScope { // $ANTLR start "operator" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:107:1: operator returns [boolean negated, String opr] : (x= TILDE )? (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:126:1: operator returns [boolean negated, String opr] : (x= TILDE )? (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) ; public final DRL6Expressions.operator_return operator() throws RecognitionException { DRL6Expressions.operator_return retval = new DRL6Expressions.operator_return(); retval.start = input.LT(1); @@ -368,10 +367,10 @@ public final DRL6Expressions.operator_return operator() throws RecognitionExcept if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); helper.setHasOperator( true ); try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:110:3: ( (x= TILDE )? (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:110:5: (x= TILDE )? (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:129:3: ( (x= TILDE )? (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:129:5: (x= TILDE )? (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:110:6: (x= TILDE )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:129:6: (x= TILDE )? int alt2=2; int LA2_0 = input.LA(1); if ( (LA2_0==TILDE) ) { @@ -382,15 +381,15 @@ public final DRL6Expressions.operator_return operator() throws RecognitionExcept } switch (alt2) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:110:6: x= TILDE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:129:6: x= TILDE { - x=(Token)match(input,TILDE,FOLLOW_TILDE_in_operator256); if (state.failed) return retval; + x=(Token)match(input,TILDE,FOLLOW_TILDE_in_operator259); if (state.failed) return retval; } break; } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:111:5: (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:130:5: (op= EQUALS |op= NOT_EQUALS |rop= relationalOp ) int alt3=3; int LA3_0 = input.LA(1); if ( (LA3_0==EQUALS) ) { @@ -408,23 +407,23 @@ else if ( (LA3_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.NOT switch (alt3) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:111:7: op= EQUALS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:130:7: op= EQUALS { - op=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_operator267); if (state.failed) return retval; + op=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_operator270); if (state.failed) return retval; if ( state.backtracking==0 ) { retval.negated = false; retval.opr =(x != null ? (x!=null?x.getText():null) : "")+(op!=null?op.getText():null); helper.emit(op, DroolsEditorType.SYMBOL); } } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:112:7: op= NOT_EQUALS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:131:7: op= NOT_EQUALS { - op=(Token)match(input,NOT_EQUALS,FOLLOW_NOT_EQUALS_in_operator286); if (state.failed) return retval; + op=(Token)match(input,NOT_EQUALS,FOLLOW_NOT_EQUALS_in_operator289); if (state.failed) return retval; if ( state.backtracking==0 ) { retval.negated = false; retval.opr =(x != null ? (x!=null?x.getText():null) : "")+(op!=null?op.getText():null); helper.emit(op, DroolsEditorType.SYMBOL); } } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:113:7: rop= relationalOp + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:132:7: rop= relationalOp { - pushFollow(FOLLOW_relationalOp_in_operator301); + pushFollow(FOLLOW_relationalOp_in_operator304); rop=relationalOp(); state._fsp--; if (state.failed) return retval; @@ -461,7 +460,7 @@ public static class relationalOp_return extends ParserRuleReturnScope { // $ANTLR start "relationalOp" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:119:1: relationalOp returns [boolean negated, String opr, java.util.List params] : (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:138:1: relationalOp returns [boolean negated, String opr, java.util.List params] : (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) ; public final DRL6Expressions.relationalOp_return relationalOp() throws RecognitionException { DRL6Expressions.relationalOp_return retval = new DRL6Expressions.relationalOp_return(); retval.start = input.LT(1); @@ -473,10 +472,10 @@ public final DRL6Expressions.relationalOp_return relationalOp() throws Recogniti if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); helper.setHasOperator( true ); try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:122:3: ( (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:122:5: (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:141:3: ( (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:141:5: (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:122:5: (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:141:5: (op= LESS_EQUALS |op= GREATER_EQUALS |op= LESS |op= GREATER |xop= complexOp | not_key nop= neg_operator_key |cop= operator_key ) int alt4=7; int LA4_0 = input.LA(1); if ( (LA4_0==LESS_EQUALS) ) { @@ -520,37 +519,37 @@ else if ( (((helper.isPluggableEvaluator(false)))) ) { switch (alt4) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:122:7: op= LESS_EQUALS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:141:7: op= LESS_EQUALS { - op=(Token)match(input,LESS_EQUALS,FOLLOW_LESS_EQUALS_in_relationalOp342); if (state.failed) return retval; + op=(Token)match(input,LESS_EQUALS,FOLLOW_LESS_EQUALS_in_relationalOp345); if (state.failed) return retval; if ( state.backtracking==0 ) { retval.negated = false; retval.opr =(op!=null?op.getText():null); retval.params = null; helper.emit(op, DroolsEditorType.SYMBOL);} } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:123:7: op= GREATER_EQUALS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:142:7: op= GREATER_EQUALS { - op=(Token)match(input,GREATER_EQUALS,FOLLOW_GREATER_EQUALS_in_relationalOp358); if (state.failed) return retval; + op=(Token)match(input,GREATER_EQUALS,FOLLOW_GREATER_EQUALS_in_relationalOp361); if (state.failed) return retval; if ( state.backtracking==0 ) { retval.negated = false; retval.opr =(op!=null?op.getText():null); retval.params = null; helper.emit(op, DroolsEditorType.SYMBOL);} } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:124:7: op= LESS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:143:7: op= LESS { - op=(Token)match(input,LESS,FOLLOW_LESS_in_relationalOp371); if (state.failed) return retval; + op=(Token)match(input,LESS,FOLLOW_LESS_in_relationalOp374); if (state.failed) return retval; if ( state.backtracking==0 ) { retval.negated = false; retval.opr =(op!=null?op.getText():null); retval.params = null; helper.emit(op, DroolsEditorType.SYMBOL);} } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:125:7: op= GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:144:7: op= GREATER { - op=(Token)match(input,GREATER,FOLLOW_GREATER_in_relationalOp394); if (state.failed) return retval; + op=(Token)match(input,GREATER,FOLLOW_GREATER_in_relationalOp397); if (state.failed) return retval; if ( state.backtracking==0 ) { retval.negated = false; retval.opr =(op!=null?op.getText():null); retval.params = null; helper.emit(op, DroolsEditorType.SYMBOL);} } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:126:7: xop= complexOp + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:7: xop= complexOp { - pushFollow(FOLLOW_complexOp_in_relationalOp414); + pushFollow(FOLLOW_complexOp_in_relationalOp417); xop=complexOp(); state._fsp--; if (state.failed) return retval; @@ -558,13 +557,13 @@ else if ( (((helper.isPluggableEvaluator(false)))) ) { } break; case 6 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:127:7: not_key nop= neg_operator_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:7: not_key nop= neg_operator_key { - pushFollow(FOLLOW_not_key_in_relationalOp429); + pushFollow(FOLLOW_not_key_in_relationalOp432); not_key(); state._fsp--; if (state.failed) return retval; - pushFollow(FOLLOW_neg_operator_key_in_relationalOp433); + pushFollow(FOLLOW_neg_operator_key_in_relationalOp436); nop=neg_operator_key(); state._fsp--; if (state.failed) return retval; @@ -572,9 +571,9 @@ else if ( (((helper.isPluggableEvaluator(false)))) ) { } break; case 7 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:128:7: cop= operator_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:147:7: cop= operator_key { - pushFollow(FOLLOW_operator_key_in_relationalOp445); + pushFollow(FOLLOW_operator_key_in_relationalOp448); cop=operator_key(); state._fsp--; if (state.failed) return retval; @@ -605,7 +604,7 @@ else if ( (((helper.isPluggableEvaluator(false)))) ) { // $ANTLR start "complexOp" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:132:1: complexOp returns [String opr] : t= TILDE e= EQUALS_ASSIGN ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:151:1: complexOp returns [String opr] : t= TILDE e= EQUALS_ASSIGN ; public final String complexOp() throws RecognitionException { String opr = null; @@ -614,11 +613,11 @@ public final String complexOp() throws RecognitionException { Token e=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:133:5: (t= TILDE e= EQUALS_ASSIGN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:133:7: t= TILDE e= EQUALS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:152:5: (t= TILDE e= EQUALS_ASSIGN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:152:7: t= TILDE e= EQUALS_ASSIGN { - t=(Token)match(input,TILDE,FOLLOW_TILDE_in_complexOp477); if (state.failed) return opr; - e=(Token)match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_complexOp481); if (state.failed) return opr; + t=(Token)match(input,TILDE,FOLLOW_TILDE_in_complexOp480); if (state.failed) return opr; + e=(Token)match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_complexOp484); if (state.failed) return opr; if ( state.backtracking==0 ) { opr =(t!=null?t.getText():null)+(e!=null?e.getText():null); } } @@ -638,17 +637,17 @@ public final String complexOp() throws RecognitionException { // $ANTLR start "typeList" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:136:1: typeList : type ( COMMA type )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:1: typeList : type ( COMMA type )* ; public final void typeList() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:137:5: ( type ( COMMA type )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:137:7: type ( COMMA type )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:156:5: ( type ( COMMA type )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:156:7: type ( COMMA type )* { - pushFollow(FOLLOW_type_in_typeList502); + pushFollow(FOLLOW_type_in_typeList505); type(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:137:12: ( COMMA type )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:156:12: ( COMMA type )* loop5: while (true) { int alt5=2; @@ -659,10 +658,10 @@ public final void typeList() throws RecognitionException { switch (alt5) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:137:13: COMMA type + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:156:13: COMMA type { - match(input,COMMA,FOLLOW_COMMA_in_typeList505); if (state.failed) return; - pushFollow(FOLLOW_type_in_typeList507); + match(input,COMMA,FOLLOW_COMMA_in_typeList508); if (state.failed) return; + pushFollow(FOLLOW_type_in_typeList510); type(); state._fsp--; if (state.failed) return; @@ -694,16 +693,16 @@ public static class type_return extends ParserRuleReturnScope { // $ANTLR start "type" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:140:1: type : tm= typeMatch ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:159:1: type : tm= typeMatch ; public final DRL6Expressions.type_return type() throws RecognitionException { DRL6Expressions.type_return retval = new DRL6Expressions.type_return(); retval.start = input.LT(1); try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:141:5: (tm= typeMatch ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:141:8: tm= typeMatch + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:160:5: (tm= typeMatch ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:160:8: tm= typeMatch { - pushFollow(FOLLOW_typeMatch_in_type529); + pushFollow(FOLLOW_typeMatch_in_type532); typeMatch(); state._fsp--; if (state.failed) return retval; @@ -727,10 +726,10 @@ public final DRL6Expressions.type_return type() throws RecognitionException { // $ANTLR start "typeMatch" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:144:1: typeMatch : ( ( primitiveType )=> ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) | ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:163:1: typeMatch : ( ( primitiveType )=> ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) | ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ); public final void typeMatch() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:5: ( ( primitiveType )=> ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) | ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:5: ( ( primitiveType )=> ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) | ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ) int alt11=2; int LA11_0 = input.LA(1); if ( (LA11_0==ID) ) { @@ -753,16 +752,16 @@ else if ( (true) ) { switch (alt11) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:8: ( primitiveType )=> ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:8: ( primitiveType )=> ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:27: ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:29: primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:27: ( primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:29: primitiveType ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* { - pushFollow(FOLLOW_primitiveType_in_typeMatch555); + pushFollow(FOLLOW_primitiveType_in_typeMatch558); primitiveType(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:43: ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:43: ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* loop6: while (true) { int alt6=2; @@ -773,10 +772,10 @@ else if ( (true) ) { switch (alt6) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:44: ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:44: ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_typeMatch565); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_typeMatch567); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_typeMatch568); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_typeMatch570); if (state.failed) return; } break; @@ -790,13 +789,13 @@ else if ( (true) ) { } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:7: ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:7: ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:7: ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:9: ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:7: ( ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:9: ID ( ( typeArguments )=> typeArguments )? ( DOT ID ( ( typeArguments )=> typeArguments )? )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* { - match(input,ID,FOLLOW_ID_in_typeMatch581); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:12: ( ( typeArguments )=> typeArguments )? + match(input,ID,FOLLOW_ID_in_typeMatch584); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:12: ( ( typeArguments )=> typeArguments )? int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0==LESS) ) { @@ -810,9 +809,9 @@ else if ( (LA7_1==QUESTION) && (synpred3_DRL6Expressions())) { } switch (alt7) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:13: ( typeArguments )=> typeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:13: ( typeArguments )=> typeArguments { - pushFollow(FOLLOW_typeArguments_in_typeMatch588); + pushFollow(FOLLOW_typeArguments_in_typeMatch591); typeArguments(); state._fsp--; if (state.failed) return; @@ -821,7 +820,7 @@ else if ( (LA7_1==QUESTION) && (synpred3_DRL6Expressions())) { } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:46: ( DOT ID ( ( typeArguments )=> typeArguments )? )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:46: ( DOT ID ( ( typeArguments )=> typeArguments )? )* loop9: while (true) { int alt9=2; @@ -832,11 +831,11 @@ else if ( (LA7_1==QUESTION) && (synpred3_DRL6Expressions())) { switch (alt9) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:47: DOT ID ( ( typeArguments )=> typeArguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:47: DOT ID ( ( typeArguments )=> typeArguments )? { - match(input,DOT,FOLLOW_DOT_in_typeMatch593); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_typeMatch595); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:54: ( ( typeArguments )=> typeArguments )? + match(input,DOT,FOLLOW_DOT_in_typeMatch596); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_typeMatch598); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:54: ( ( typeArguments )=> typeArguments )? int alt8=2; int LA8_0 = input.LA(1); if ( (LA8_0==LESS) ) { @@ -850,9 +849,9 @@ else if ( (LA8_1==QUESTION) && (synpred4_DRL6Expressions())) { } switch (alt8) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:55: ( typeArguments )=> typeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:55: ( typeArguments )=> typeArguments { - pushFollow(FOLLOW_typeArguments_in_typeMatch602); + pushFollow(FOLLOW_typeArguments_in_typeMatch605); typeArguments(); state._fsp--; if (state.failed) return; @@ -869,7 +868,7 @@ else if ( (LA8_1==QUESTION) && (synpred4_DRL6Expressions())) { } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:91: ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:91: ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* loop10: while (true) { int alt10=2; @@ -880,10 +879,10 @@ else if ( (LA8_1==QUESTION) && (synpred4_DRL6Expressions())) { switch (alt10) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:92: ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:92: ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_typeMatch617); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_typeMatch619); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_typeMatch620); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_typeMatch622); if (state.failed) return; } break; @@ -913,18 +912,18 @@ else if ( (LA8_1==QUESTION) && (synpred4_DRL6Expressions())) { // $ANTLR start "typeArguments" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:149:1: typeArguments : LESS typeArgument ( COMMA typeArgument )* GREATER ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:168:1: typeArguments : LESS typeArgument ( COMMA typeArgument )* GREATER ; public final void typeArguments() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:150:5: ( LESS typeArgument ( COMMA typeArgument )* GREATER ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:150:7: LESS typeArgument ( COMMA typeArgument )* GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:169:5: ( LESS typeArgument ( COMMA typeArgument )* GREATER ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:169:7: LESS typeArgument ( COMMA typeArgument )* GREATER { - match(input,LESS,FOLLOW_LESS_in_typeArguments640); if (state.failed) return; - pushFollow(FOLLOW_typeArgument_in_typeArguments642); + match(input,LESS,FOLLOW_LESS_in_typeArguments643); if (state.failed) return; + pushFollow(FOLLOW_typeArgument_in_typeArguments645); typeArgument(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:150:25: ( COMMA typeArgument )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:169:25: ( COMMA typeArgument )* loop12: while (true) { int alt12=2; @@ -935,10 +934,10 @@ public final void typeArguments() throws RecognitionException { switch (alt12) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:150:26: COMMA typeArgument + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:169:26: COMMA typeArgument { - match(input,COMMA,FOLLOW_COMMA_in_typeArguments645); if (state.failed) return; - pushFollow(FOLLOW_typeArgument_in_typeArguments647); + match(input,COMMA,FOLLOW_COMMA_in_typeArguments648); if (state.failed) return; + pushFollow(FOLLOW_typeArgument_in_typeArguments650); typeArgument(); state._fsp--; if (state.failed) return; @@ -950,7 +949,7 @@ public final void typeArguments() throws RecognitionException { } } - match(input,GREATER,FOLLOW_GREATER_in_typeArguments651); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_typeArguments654); if (state.failed) return; } } @@ -968,10 +967,10 @@ public final void typeArguments() throws RecognitionException { // $ANTLR start "typeArgument" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:153:1: typeArgument : ( type | QUESTION ( ( extends_key | super_key ) type )? ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:172:1: typeArgument : ( type | QUESTION ( ( extends_key | super_key ) type )? ); public final void typeArgument() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:154:5: ( type | QUESTION ( ( extends_key | super_key ) type )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:173:5: ( type | QUESTION ( ( extends_key | super_key ) type )? ) int alt15=2; int LA15_0 = input.LA(1); if ( (LA15_0==ID) ) { @@ -990,19 +989,19 @@ else if ( (LA15_0==QUESTION) ) { switch (alt15) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:154:7: type + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:173:7: type { - pushFollow(FOLLOW_type_in_typeArgument668); + pushFollow(FOLLOW_type_in_typeArgument671); type(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:7: QUESTION ( ( extends_key | super_key ) type )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:174:7: QUESTION ( ( extends_key | super_key ) type )? { - match(input,QUESTION,FOLLOW_QUESTION_in_typeArgument676); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:16: ( ( extends_key | super_key ) type )? + match(input,QUESTION,FOLLOW_QUESTION_in_typeArgument679); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:174:16: ( ( extends_key | super_key ) type )? int alt14=2; int LA14_0 = input.LA(1); if ( (LA14_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS)))||((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))))) { @@ -1010,9 +1009,9 @@ else if ( (LA15_0==QUESTION) ) { } switch (alt14) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:17: ( extends_key | super_key ) type + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:174:17: ( extends_key | super_key ) type { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:17: ( extends_key | super_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:174:17: ( extends_key | super_key ) int alt13=2; int LA13_0 = input.LA(1); if ( (LA13_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS)))||((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))))) { @@ -1041,18 +1040,18 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))) ) { switch (alt13) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:18: extends_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:174:18: extends_key { - pushFollow(FOLLOW_extends_key_in_typeArgument680); + pushFollow(FOLLOW_extends_key_in_typeArgument683); extends_key(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:155:32: super_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:174:32: super_key { - pushFollow(FOLLOW_super_key_in_typeArgument684); + pushFollow(FOLLOW_super_key_in_typeArgument687); super_key(); state._fsp--; if (state.failed) return; @@ -1061,7 +1060,7 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))) ) { } - pushFollow(FOLLOW_type_in_typeArgument687); + pushFollow(FOLLOW_type_in_typeArgument690); type(); state._fsp--; if (state.failed) return; @@ -1089,13 +1088,13 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))) ) { // $ANTLR start "dummy" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:163:1: dummy : expression ( AT | SEMICOLON | EOF | ID | RIGHT_PAREN ) ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:182:1: dummy : expression ( AT | SEMICOLON | EOF | ID | RIGHT_PAREN ) ; public final void dummy() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:5: ( expression ( AT | SEMICOLON | EOF | ID | RIGHT_PAREN ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:7: expression ( AT | SEMICOLON | EOF | ID | RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:183:5: ( expression ( AT | SEMICOLON | EOF | ID | RIGHT_PAREN ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:183:7: expression ( AT | SEMICOLON | EOF | ID | RIGHT_PAREN ) { - pushFollow(FOLLOW_expression_in_dummy711); + pushFollow(FOLLOW_expression_in_dummy714); expression(); state._fsp--; if (state.failed) return; @@ -1126,17 +1125,17 @@ public final void dummy() throws RecognitionException { // $ANTLR start "dummy2" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:166:1: dummy2 : relationalExpression EOF ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:185:1: dummy2 : relationalExpression EOF ; public final void dummy2() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:167:5: ( relationalExpression EOF ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:167:8: relationalExpression EOF + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:186:5: ( relationalExpression EOF ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:186:8: relationalExpression EOF { - pushFollow(FOLLOW_relationalExpression_in_dummy2747); + pushFollow(FOLLOW_relationalExpression_in_dummy2750); relationalExpression(); state._fsp--; if (state.failed) return; - match(input,EOF,FOLLOW_EOF_in_dummy2749); if (state.failed) return; + match(input,EOF,FOLLOW_EOF_in_dummy2752); if (state.failed) return; } } @@ -1158,7 +1157,7 @@ public static class expression_return extends ParserRuleReturnScope { // $ANTLR start "expression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:170:1: expression returns [BaseDescr result] : left= conditionalExpression ( ( assignmentOperator )=>op= assignmentOperator right= expression )? ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:189:1: expression returns [BaseDescr result] : left= conditionalExpression ( ( assignmentOperator )=>op= assignmentOperator right= expression )? ; public final DRL6Expressions.expression_return expression() throws RecognitionException { DRL6Expressions.expression_return retval = new DRL6Expressions.expression_return(); retval.start = input.LT(1); @@ -1167,15 +1166,15 @@ public final DRL6Expressions.expression_return expression() throws RecognitionEx ParserRuleReturnScope right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:171:5: (left= conditionalExpression ( ( assignmentOperator )=>op= assignmentOperator right= expression )? ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:171:7: left= conditionalExpression ( ( assignmentOperator )=>op= assignmentOperator right= expression )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:190:5: (left= conditionalExpression ( ( assignmentOperator )=>op= assignmentOperator right= expression )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:190:7: left= conditionalExpression ( ( assignmentOperator )=>op= assignmentOperator right= expression )? { - pushFollow(FOLLOW_conditionalExpression_in_expression768); + pushFollow(FOLLOW_conditionalExpression_in_expression771); left=conditionalExpression(); state._fsp--; if (state.failed) return retval; if ( state.backtracking==0 ) { if( buildDescr ) { retval.result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:172:9: ( ( assignmentOperator )=>op= assignmentOperator right= expression )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:191:9: ( ( assignmentOperator )=>op= assignmentOperator right= expression )? int alt16=2; switch ( input.LA(1) ) { case EQUALS_ASSIGN: @@ -1269,13 +1268,13 @@ public final DRL6Expressions.expression_return expression() throws RecognitionEx } switch (alt16) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:172:10: ( assignmentOperator )=>op= assignmentOperator right= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:191:10: ( assignmentOperator )=>op= assignmentOperator right= expression { - pushFollow(FOLLOW_assignmentOperator_in_expression789); + pushFollow(FOLLOW_assignmentOperator_in_expression792); assignmentOperator(); state._fsp--; if (state.failed) return retval; - pushFollow(FOLLOW_expression_in_expression793); + pushFollow(FOLLOW_expression_in_expression796); right=expression(); state._fsp--; if (state.failed) return retval; @@ -1304,7 +1303,7 @@ public final DRL6Expressions.expression_return expression() throws RecognitionEx // $ANTLR start "conditionalExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:175:1: conditionalExpression returns [BaseDescr result] : left= conditionalOrExpression ( ternaryExpression )? ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:194:1: conditionalExpression returns [BaseDescr result] : left= conditionalOrExpression ( ternaryExpression )? ; public final BaseDescr conditionalExpression() throws RecognitionException { BaseDescr result = null; @@ -1312,15 +1311,15 @@ public final BaseDescr conditionalExpression() throws RecognitionException { BaseDescr left =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:176:5: (left= conditionalOrExpression ( ternaryExpression )? ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:176:9: left= conditionalOrExpression ( ternaryExpression )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:195:5: (left= conditionalOrExpression ( ternaryExpression )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:195:9: left= conditionalOrExpression ( ternaryExpression )? { - pushFollow(FOLLOW_conditionalOrExpression_in_conditionalExpression820); + pushFollow(FOLLOW_conditionalOrExpression_in_conditionalExpression823); left=conditionalOrExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:177:9: ( ternaryExpression )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:196:9: ( ternaryExpression )? int alt17=2; int LA17_0 = input.LA(1); if ( (LA17_0==QUESTION) ) { @@ -1328,9 +1327,9 @@ public final BaseDescr conditionalExpression() throws RecognitionException { } switch (alt17) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:177:9: ternaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:196:9: ternaryExpression { - pushFollow(FOLLOW_ternaryExpression_in_conditionalExpression832); + pushFollow(FOLLOW_ternaryExpression_in_conditionalExpression835); ternaryExpression(); state._fsp--; if (state.failed) return result; @@ -1357,23 +1356,23 @@ public final BaseDescr conditionalExpression() throws RecognitionException { // $ANTLR start "ternaryExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:180:1: ternaryExpression : QUESTION ts= expression COLON fs= expression ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:199:1: ternaryExpression : QUESTION ts= expression COLON fs= expression ; public final void ternaryExpression() throws RecognitionException { ParserRuleReturnScope ts =null; ParserRuleReturnScope fs =null; ternOp++; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:182:5: ( QUESTION ts= expression COLON fs= expression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:182:7: QUESTION ts= expression COLON fs= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:201:5: ( QUESTION ts= expression COLON fs= expression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:201:7: QUESTION ts= expression COLON fs= expression { - match(input,QUESTION,FOLLOW_QUESTION_in_ternaryExpression854); if (state.failed) return; - pushFollow(FOLLOW_expression_in_ternaryExpression858); + match(input,QUESTION,FOLLOW_QUESTION_in_ternaryExpression857); if (state.failed) return; + pushFollow(FOLLOW_expression_in_ternaryExpression861); ts=expression(); state._fsp--; if (state.failed) return; - match(input,COLON,FOLLOW_COLON_in_ternaryExpression860); if (state.failed) return; - pushFollow(FOLLOW_expression_in_ternaryExpression864); + match(input,COLON,FOLLOW_COLON_in_ternaryExpression863); if (state.failed) return; + pushFollow(FOLLOW_expression_in_ternaryExpression867); fs=expression(); state._fsp--; if (state.failed) return; @@ -1395,7 +1394,7 @@ public final void ternaryExpression() throws RecognitionException { // $ANTLR start "fullAnnotation" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:187:1: fullAnnotation[AnnotatedDescrBuilder inDescrBuilder] returns [AnnotationDescr result] : AT name= ID ( DOT x= ID )* annotationArgs[result, annoBuilder] ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:206:1: fullAnnotation[AnnotatedDescrBuilder inDescrBuilder] returns [AnnotationDescr result] : AT name= ID ( DOT x= ID )* annotationArgs[result, annoBuilder] ; public final AnnotationDescr fullAnnotation(AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException { AnnotationDescr result = null; @@ -1405,13 +1404,13 @@ public final AnnotationDescr fullAnnotation(AnnotatedDescrBuilder inDescrBuilder String n = ""; AnnotationDescrBuilder annoBuilder = null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:189:3: ( AT name= ID ( DOT x= ID )* annotationArgs[result, annoBuilder] ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:189:5: AT name= ID ( DOT x= ID )* annotationArgs[result, annoBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:208:3: ( AT name= ID ( DOT x= ID )* annotationArgs[result, annoBuilder] ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:208:5: AT name= ID ( DOT x= ID )* annotationArgs[result, annoBuilder] { - match(input,AT,FOLLOW_AT_in_fullAnnotation894); if (state.failed) return result; - name=(Token)match(input,ID,FOLLOW_ID_in_fullAnnotation898); if (state.failed) return result; + match(input,AT,FOLLOW_AT_in_fullAnnotation897); if (state.failed) return result; + name=(Token)match(input,ID,FOLLOW_ID_in_fullAnnotation901); if (state.failed) return result; if ( state.backtracking==0 ) { n = (name!=null?name.getText():null); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:189:36: ( DOT x= ID )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:208:36: ( DOT x= ID )* loop18: while (true) { int alt18=2; @@ -1422,10 +1421,10 @@ public final AnnotationDescr fullAnnotation(AnnotatedDescrBuilder inDescrBuilder switch (alt18) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:189:38: DOT x= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:208:38: DOT x= ID { - match(input,DOT,FOLLOW_DOT_in_fullAnnotation904); if (state.failed) return result; - x=(Token)match(input,ID,FOLLOW_ID_in_fullAnnotation908); if (state.failed) return result; + match(input,DOT,FOLLOW_DOT_in_fullAnnotation907); if (state.failed) return result; + x=(Token)match(input,ID,FOLLOW_ID_in_fullAnnotation911); if (state.failed) return result; if ( state.backtracking==0 ) { n += "." + (x!=null?x.getText():null); } } break; @@ -1445,7 +1444,7 @@ public final AnnotationDescr fullAnnotation(AnnotatedDescrBuilder inDescrBuilder } } } - pushFollow(FOLLOW_annotationArgs_in_fullAnnotation929); + pushFollow(FOLLOW_annotationArgs_in_fullAnnotation932); annotationArgs(result, annoBuilder); state._fsp--; if (state.failed) return result; @@ -1467,16 +1466,16 @@ public final AnnotationDescr fullAnnotation(AnnotatedDescrBuilder inDescrBuilder // $ANTLR start "annotationArgs" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:203:1: annotationArgs[AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder] : LEFT_PAREN ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? RIGHT_PAREN ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:222:1: annotationArgs[AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder] : LEFT_PAREN ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? RIGHT_PAREN ; public final void annotationArgs(AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException { Object value =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:204:3: ( LEFT_PAREN ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? RIGHT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:204:5: LEFT_PAREN ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:223:3: ( LEFT_PAREN ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:223:5: LEFT_PAREN ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? RIGHT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_annotationArgs945); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:205:5: ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_annotationArgs948); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:224:5: ( ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] |value= annotationValue[inDescrBuilder] )? int alt19=3; int LA19_0 = input.LA(1); if ( (LA19_0==ID) ) { @@ -1493,18 +1492,18 @@ else if ( ((LA19_0 >= AT && LA19_0 <= BOOL)||(LA19_0 >= DECIMAL && LA19_0 <= DIV } switch (alt19) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:206:8: ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:225:8: ( ID EQUALS_ASSIGN )=> annotationElementValuePairs[descr, inDescrBuilder] { - pushFollow(FOLLOW_annotationElementValuePairs_in_annotationArgs968); + pushFollow(FOLLOW_annotationElementValuePairs_in_annotationArgs971); annotationElementValuePairs(descr, inDescrBuilder); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:207:10: value= annotationValue[inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:226:10: value= annotationValue[inDescrBuilder] { - pushFollow(FOLLOW_annotationValue_in_annotationArgs982); + pushFollow(FOLLOW_annotationValue_in_annotationArgs985); value=annotationValue(inDescrBuilder); state._fsp--; if (state.failed) return; @@ -1514,7 +1513,7 @@ else if ( ((LA19_0 >= AT && LA19_0 <= BOOL)||(LA19_0 >= DECIMAL && LA19_0 <= DIV } - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_annotationArgs998); if (state.failed) return; + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_annotationArgs1001); if (state.failed) return; } } @@ -1532,17 +1531,17 @@ else if ( ((LA19_0 >= AT && LA19_0 <= BOOL)||(LA19_0 >= DECIMAL && LA19_0 <= DIV // $ANTLR start "annotationElementValuePairs" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:212:1: annotationElementValuePairs[AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder] : annotationElementValuePair[descr, inDescrBuilder] ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:231:1: annotationElementValuePairs[AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder] : annotationElementValuePair[descr, inDescrBuilder] ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* ; public final void annotationElementValuePairs(AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:213:3: ( annotationElementValuePair[descr, inDescrBuilder] ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:213:5: annotationElementValuePair[descr, inDescrBuilder] ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:232:3: ( annotationElementValuePair[descr, inDescrBuilder] ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:232:5: annotationElementValuePair[descr, inDescrBuilder] ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* { - pushFollow(FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1013); + pushFollow(FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1016); annotationElementValuePair(descr, inDescrBuilder); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:213:55: ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:232:55: ( COMMA annotationElementValuePair[descr, inDescrBuilder] )* loop20: while (true) { int alt20=2; @@ -1553,10 +1552,10 @@ public final void annotationElementValuePairs(AnnotationDescr descr, AnnotatedDe switch (alt20) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:213:57: COMMA annotationElementValuePair[descr, inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:232:57: COMMA annotationElementValuePair[descr, inDescrBuilder] { - match(input,COMMA,FOLLOW_COMMA_in_annotationElementValuePairs1018); if (state.failed) return; - pushFollow(FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1020); + match(input,COMMA,FOLLOW_COMMA_in_annotationElementValuePairs1021); if (state.failed) return; + pushFollow(FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1023); annotationElementValuePair(descr, inDescrBuilder); state._fsp--; if (state.failed) return; @@ -1585,18 +1584,18 @@ public final void annotationElementValuePairs(AnnotationDescr descr, AnnotatedDe // $ANTLR start "annotationElementValuePair" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:216:1: annotationElementValuePair[AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder] : key= ID EQUALS_ASSIGN val= annotationValue[inDescrBuilder] ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:235:1: annotationElementValuePair[AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder] : key= ID EQUALS_ASSIGN val= annotationValue[inDescrBuilder] ; public final void annotationElementValuePair(AnnotationDescr descr, AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException { Token key=null; Object val =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:217:3: (key= ID EQUALS_ASSIGN val= annotationValue[inDescrBuilder] ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:217:5: key= ID EQUALS_ASSIGN val= annotationValue[inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:236:3: (key= ID EQUALS_ASSIGN val= annotationValue[inDescrBuilder] ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:236:5: key= ID EQUALS_ASSIGN val= annotationValue[inDescrBuilder] { - key=(Token)match(input,ID,FOLLOW_ID_in_annotationElementValuePair1041); if (state.failed) return; - match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_annotationElementValuePair1043); if (state.failed) return; - pushFollow(FOLLOW_annotationValue_in_annotationElementValuePair1047); + key=(Token)match(input,ID,FOLLOW_ID_in_annotationElementValuePair1044); if (state.failed) return; + match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_annotationElementValuePair1046); if (state.failed) return; + pushFollow(FOLLOW_annotationValue_in_annotationElementValuePair1050); val=annotationValue(inDescrBuilder); state._fsp--; if (state.failed) return; @@ -1618,7 +1617,7 @@ public final void annotationElementValuePair(AnnotationDescr descr, AnnotatedDes // $ANTLR start "annotationValue" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:220:1: annotationValue[AnnotatedDescrBuilder inDescrBuilder] returns [Object result] : (exp= expression |annos= annotationArray[inDescrBuilder] |anno= fullAnnotation[inDescrBuilder] ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:239:1: annotationValue[AnnotatedDescrBuilder inDescrBuilder] returns [Object result] : (exp= expression |annos= annotationArray[inDescrBuilder] |anno= fullAnnotation[inDescrBuilder] ); public final Object annotationValue(AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException { Object result = null; @@ -1628,7 +1627,7 @@ public final Object annotationValue(AnnotatedDescrBuilder inDescrBuilder) throws AnnotationDescr anno =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:221:3: (exp= expression |annos= annotationArray[inDescrBuilder] |anno= fullAnnotation[inDescrBuilder] ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:240:3: (exp= expression |annos= annotationArray[inDescrBuilder] |anno= fullAnnotation[inDescrBuilder] ) int alt21=3; switch ( input.LA(1) ) { case BOOL: @@ -1674,9 +1673,9 @@ public final Object annotationValue(AnnotatedDescrBuilder inDescrBuilder) throws } switch (alt21) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:221:5: exp= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:240:5: exp= expression { - pushFollow(FOLLOW_expression_in_annotationValue1070); + pushFollow(FOLLOW_expression_in_annotationValue1073); exp=expression(); state._fsp--; if (state.failed) return result; @@ -1684,9 +1683,9 @@ public final Object annotationValue(AnnotatedDescrBuilder inDescrBuilder) throws } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:222:7: annos= annotationArray[inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:241:7: annos= annotationArray[inDescrBuilder] { - pushFollow(FOLLOW_annotationArray_in_annotationValue1082); + pushFollow(FOLLOW_annotationArray_in_annotationValue1085); annos=annotationArray(inDescrBuilder); state._fsp--; if (state.failed) return result; @@ -1694,9 +1693,9 @@ public final Object annotationValue(AnnotatedDescrBuilder inDescrBuilder) throws } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:223:7: anno= fullAnnotation[inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:242:7: anno= fullAnnotation[inDescrBuilder] { - pushFollow(FOLLOW_fullAnnotation_in_annotationValue1095); + pushFollow(FOLLOW_fullAnnotation_in_annotationValue1098); anno=fullAnnotation(inDescrBuilder); state._fsp--; if (state.failed) return result; @@ -1721,7 +1720,7 @@ public final Object annotationValue(AnnotatedDescrBuilder inDescrBuilder) throws // $ANTLR start "annotationArray" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:226:1: annotationArray[AnnotatedDescrBuilder inDescrBuilder] returns [java.util.List result] : LEFT_CURLY (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? RIGHT_CURLY ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:245:1: annotationArray[AnnotatedDescrBuilder inDescrBuilder] returns [java.util.List result] : LEFT_CURLY (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? RIGHT_CURLY ; public final java.util.List annotationArray(AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException { java.util.List result = null; @@ -1730,11 +1729,11 @@ public final java.util.List annotationArray(AnnotatedDescrBuilder inDescrBuilder result = new java.util.ArrayList(); try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:228:3: ( LEFT_CURLY (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? RIGHT_CURLY ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:228:6: LEFT_CURLY (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? RIGHT_CURLY + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:247:3: ( LEFT_CURLY (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? RIGHT_CURLY ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:247:6: LEFT_CURLY (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? RIGHT_CURLY { - match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_annotationArray1122); if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:228:17: (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? + match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_annotationArray1125); if (state.failed) return result; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:247:17: (anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* )? int alt23=2; int LA23_0 = input.LA(1); if ( ((LA23_0 >= AT && LA23_0 <= BOOL)||(LA23_0 >= DECIMAL && LA23_0 <= DIV)||LA23_0==DOT||LA23_0==FLOAT||LA23_0==HEX||(LA23_0 >= ID && LA23_0 <= INCR)||(LA23_0 >= LEFT_CURLY && LA23_0 <= LESS)||LA23_0==MINUS||LA23_0==NEGATION||LA23_0==NULL||LA23_0==PLUS||LA23_0==QUESTION_DIV||(LA23_0 >= STAR && LA23_0 <= TIME_INTERVAL)) ) { @@ -1742,14 +1741,14 @@ public final java.util.List annotationArray(AnnotatedDescrBuilder inDescrBuilder } switch (alt23) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:228:19: anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:247:19: anno= annotationValue[inDescrBuilder] ( COMMA anno= annotationValue[inDescrBuilder] )* { - pushFollow(FOLLOW_annotationValue_in_annotationArray1128); + pushFollow(FOLLOW_annotationValue_in_annotationArray1131); anno=annotationValue(inDescrBuilder); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { result.add( anno ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:229:17: ( COMMA anno= annotationValue[inDescrBuilder] )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:248:17: ( COMMA anno= annotationValue[inDescrBuilder] )* loop22: while (true) { int alt22=2; @@ -1760,10 +1759,10 @@ public final java.util.List annotationArray(AnnotatedDescrBuilder inDescrBuilder switch (alt22) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:229:19: COMMA anno= annotationValue[inDescrBuilder] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:248:19: COMMA anno= annotationValue[inDescrBuilder] { - match(input,COMMA,FOLLOW_COMMA_in_annotationArray1151); if (state.failed) return result; - pushFollow(FOLLOW_annotationValue_in_annotationArray1155); + match(input,COMMA,FOLLOW_COMMA_in_annotationArray1154); if (state.failed) return result; + pushFollow(FOLLOW_annotationValue_in_annotationArray1158); anno=annotationValue(inDescrBuilder); state._fsp--; if (state.failed) return result; @@ -1781,7 +1780,7 @@ public final java.util.List annotationArray(AnnotatedDescrBuilder inDescrBuilder } - match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_annotationArray1171); if (state.failed) return result; + match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_annotationArray1174); if (state.failed) return result; } } @@ -1800,7 +1799,7 @@ public final java.util.List annotationArray(AnnotatedDescrBuilder inDescrBuilder // $ANTLR start "conditionalOrExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:235:1: conditionalOrExpression returns [BaseDescr result] : left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:254:1: conditionalOrExpression returns [BaseDescr result] : left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* ; public final BaseDescr conditionalOrExpression() throws RecognitionException { BaseDescr result = null; @@ -1810,15 +1809,15 @@ public final BaseDescr conditionalOrExpression() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:236:3: (left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:236:5: left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:255:3: (left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:255:5: left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* { - pushFollow(FOLLOW_conditionalAndExpression_in_conditionalOrExpression1192); + pushFollow(FOLLOW_conditionalAndExpression_in_conditionalOrExpression1195); left=conditionalAndExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:237:3: ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:256:3: ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* loop25: while (true) { int alt25=2; @@ -1829,11 +1828,11 @@ public final BaseDescr conditionalOrExpression() throws RecognitionException { switch (alt25) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:237:5: DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:256:5: DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression { - match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_conditionalOrExpression1201); if (state.failed) return result; + match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_conditionalOrExpression1204); if (state.failed) return result; if ( state.backtracking==0 ) { if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:239:13: (args= fullAnnotation[null] )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:258:13: (args= fullAnnotation[null] )? int alt24=2; int LA24_0 = input.LA(1); if ( (LA24_0==AT) ) { @@ -1841,9 +1840,9 @@ public final BaseDescr conditionalOrExpression() throws RecognitionException { } switch (alt24) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:239:13: args= fullAnnotation[null] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:258:13: args= fullAnnotation[null] { - pushFollow(FOLLOW_fullAnnotation_in_conditionalOrExpression1223); + pushFollow(FOLLOW_fullAnnotation_in_conditionalOrExpression1226); args=fullAnnotation(null); state._fsp--; if (state.failed) return result; @@ -1852,7 +1851,7 @@ public final BaseDescr conditionalOrExpression() throws RecognitionException { } - pushFollow(FOLLOW_conditionalAndExpression_in_conditionalOrExpression1229); + pushFollow(FOLLOW_conditionalAndExpression_in_conditionalOrExpression1232); right=conditionalAndExpression(); state._fsp--; if (state.failed) return result; @@ -1890,7 +1889,7 @@ public final BaseDescr conditionalOrExpression() throws RecognitionException { // $ANTLR start "conditionalAndExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:251:1: conditionalAndExpression returns [BaseDescr result] : left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:270:1: conditionalAndExpression returns [BaseDescr result] : left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* ; public final BaseDescr conditionalAndExpression() throws RecognitionException { BaseDescr result = null; @@ -1900,15 +1899,15 @@ public final BaseDescr conditionalAndExpression() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:252:3: (left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:252:5: left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:271:3: (left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:271:5: left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* { - pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1264); + pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1267); left=inclusiveOrExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:253:3: ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:272:3: ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* loop27: while (true) { int alt27=2; @@ -1919,11 +1918,11 @@ public final BaseDescr conditionalAndExpression() throws RecognitionException { switch (alt27) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:253:5: DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:272:5: DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression { - match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_conditionalAndExpression1272); if (state.failed) return result; + match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_conditionalAndExpression1275); if (state.failed) return result; if ( state.backtracking==0 ) { if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:255:13: (args= fullAnnotation[null] )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:274:13: (args= fullAnnotation[null] )? int alt26=2; int LA26_0 = input.LA(1); if ( (LA26_0==AT) ) { @@ -1931,9 +1930,9 @@ public final BaseDescr conditionalAndExpression() throws RecognitionException { } switch (alt26) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:255:13: args= fullAnnotation[null] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:274:13: args= fullAnnotation[null] { - pushFollow(FOLLOW_fullAnnotation_in_conditionalAndExpression1295); + pushFollow(FOLLOW_fullAnnotation_in_conditionalAndExpression1298); args=fullAnnotation(null); state._fsp--; if (state.failed) return result; @@ -1942,7 +1941,7 @@ public final BaseDescr conditionalAndExpression() throws RecognitionException { } - pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1301); + pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1304); right=inclusiveOrExpression(); state._fsp--; if (state.failed) return result; @@ -1980,7 +1979,7 @@ public final BaseDescr conditionalAndExpression() throws RecognitionException { // $ANTLR start "inclusiveOrExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:267:1: inclusiveOrExpression returns [BaseDescr result] : left= exclusiveOrExpression ( PIPE right= exclusiveOrExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:286:1: inclusiveOrExpression returns [BaseDescr result] : left= exclusiveOrExpression ( PIPE right= exclusiveOrExpression )* ; public final BaseDescr inclusiveOrExpression() throws RecognitionException { BaseDescr result = null; @@ -1989,15 +1988,15 @@ public final BaseDescr inclusiveOrExpression() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:268:3: (left= exclusiveOrExpression ( PIPE right= exclusiveOrExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:268:5: left= exclusiveOrExpression ( PIPE right= exclusiveOrExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:287:3: (left= exclusiveOrExpression ( PIPE right= exclusiveOrExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:287:5: left= exclusiveOrExpression ( PIPE right= exclusiveOrExpression )* { - pushFollow(FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1336); + pushFollow(FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1339); left=exclusiveOrExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:269:3: ( PIPE right= exclusiveOrExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:288:3: ( PIPE right= exclusiveOrExpression )* loop28: while (true) { int alt28=2; @@ -2008,10 +2007,10 @@ public final BaseDescr inclusiveOrExpression() throws RecognitionException { switch (alt28) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:269:5: PIPE right= exclusiveOrExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:288:5: PIPE right= exclusiveOrExpression { - match(input,PIPE,FOLLOW_PIPE_in_inclusiveOrExpression1344); if (state.failed) return result; - pushFollow(FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1348); + match(input,PIPE,FOLLOW_PIPE_in_inclusiveOrExpression1347); if (state.failed) return result; + pushFollow(FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1351); right=exclusiveOrExpression(); state._fsp--; if (state.failed) return result; @@ -2048,7 +2047,7 @@ public final BaseDescr inclusiveOrExpression() throws RecognitionException { // $ANTLR start "exclusiveOrExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:280:1: exclusiveOrExpression returns [BaseDescr result] : left= andExpression ( XOR right= andExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:299:1: exclusiveOrExpression returns [BaseDescr result] : left= andExpression ( XOR right= andExpression )* ; public final BaseDescr exclusiveOrExpression() throws RecognitionException { BaseDescr result = null; @@ -2057,15 +2056,15 @@ public final BaseDescr exclusiveOrExpression() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:281:3: (left= andExpression ( XOR right= andExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:281:5: left= andExpression ( XOR right= andExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:300:3: (left= andExpression ( XOR right= andExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:300:5: left= andExpression ( XOR right= andExpression )* { - pushFollow(FOLLOW_andExpression_in_exclusiveOrExpression1383); + pushFollow(FOLLOW_andExpression_in_exclusiveOrExpression1386); left=andExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:282:3: ( XOR right= andExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:301:3: ( XOR right= andExpression )* loop29: while (true) { int alt29=2; @@ -2076,10 +2075,10 @@ public final BaseDescr exclusiveOrExpression() throws RecognitionException { switch (alt29) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:282:5: XOR right= andExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:301:5: XOR right= andExpression { - match(input,XOR,FOLLOW_XOR_in_exclusiveOrExpression1391); if (state.failed) return result; - pushFollow(FOLLOW_andExpression_in_exclusiveOrExpression1395); + match(input,XOR,FOLLOW_XOR_in_exclusiveOrExpression1394); if (state.failed) return result; + pushFollow(FOLLOW_andExpression_in_exclusiveOrExpression1398); right=andExpression(); state._fsp--; if (state.failed) return result; @@ -2116,7 +2115,7 @@ public final BaseDescr exclusiveOrExpression() throws RecognitionException { // $ANTLR start "andExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:293:1: andExpression returns [BaseDescr result] : left= equalityExpression ( AMPER right= equalityExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:312:1: andExpression returns [BaseDescr result] : left= equalityExpression ( AMPER right= equalityExpression )* ; public final BaseDescr andExpression() throws RecognitionException { BaseDescr result = null; @@ -2125,15 +2124,15 @@ public final BaseDescr andExpression() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:294:3: (left= equalityExpression ( AMPER right= equalityExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:294:5: left= equalityExpression ( AMPER right= equalityExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:313:3: (left= equalityExpression ( AMPER right= equalityExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:313:5: left= equalityExpression ( AMPER right= equalityExpression )* { - pushFollow(FOLLOW_equalityExpression_in_andExpression1430); + pushFollow(FOLLOW_equalityExpression_in_andExpression1433); left=equalityExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:295:3: ( AMPER right= equalityExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:314:3: ( AMPER right= equalityExpression )* loop30: while (true) { int alt30=2; @@ -2144,10 +2143,10 @@ public final BaseDescr andExpression() throws RecognitionException { switch (alt30) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:295:5: AMPER right= equalityExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:314:5: AMPER right= equalityExpression { - match(input,AMPER,FOLLOW_AMPER_in_andExpression1438); if (state.failed) return result; - pushFollow(FOLLOW_equalityExpression_in_andExpression1442); + match(input,AMPER,FOLLOW_AMPER_in_andExpression1441); if (state.failed) return result; + pushFollow(FOLLOW_equalityExpression_in_andExpression1445); right=equalityExpression(); state._fsp--; if (state.failed) return result; @@ -2184,7 +2183,7 @@ public final BaseDescr andExpression() throws RecognitionException { // $ANTLR start "equalityExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:306:1: equalityExpression returns [BaseDescr result] : left= instanceOfExpression ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:325:1: equalityExpression returns [BaseDescr result] : left= instanceOfExpression ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* ; public final BaseDescr equalityExpression() throws RecognitionException { BaseDescr result = null; @@ -2194,15 +2193,15 @@ public final BaseDescr equalityExpression() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:307:3: (left= instanceOfExpression ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:307:5: left= instanceOfExpression ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:326:3: (left= instanceOfExpression ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:326:5: left= instanceOfExpression ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* { - pushFollow(FOLLOW_instanceOfExpression_in_equalityExpression1477); + pushFollow(FOLLOW_instanceOfExpression_in_equalityExpression1480); left=instanceOfExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:308:3: ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:327:3: ( (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression )* loop32: while (true) { int alt32=2; @@ -2213,9 +2212,9 @@ public final BaseDescr equalityExpression() throws RecognitionException { switch (alt32) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:308:5: (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:327:5: (op= EQUALS |op= NOT_EQUALS ) right= instanceOfExpression { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:308:5: (op= EQUALS |op= NOT_EQUALS ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:327:5: (op= EQUALS |op= NOT_EQUALS ) int alt31=2; int LA31_0 = input.LA(1); if ( (LA31_0==EQUALS) ) { @@ -2234,15 +2233,15 @@ else if ( (LA31_0==NOT_EQUALS) ) { switch (alt31) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:308:7: op= EQUALS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:327:7: op= EQUALS { - op=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_equalityExpression1489); if (state.failed) return result; + op=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_equalityExpression1492); if (state.failed) return result; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:308:19: op= NOT_EQUALS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:327:19: op= NOT_EQUALS { - op=(Token)match(input,NOT_EQUALS,FOLLOW_NOT_EQUALS_in_equalityExpression1495); if (state.failed) return result; + op=(Token)match(input,NOT_EQUALS,FOLLOW_NOT_EQUALS_in_equalityExpression1498); if (state.failed) return result; } break; @@ -2250,7 +2249,7 @@ else if ( (LA31_0==NOT_EQUALS) ) { if ( state.backtracking==0 ) { helper.setHasOperator( true ); if( input.LA( 1 ) != DRL6Lexer.EOF ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } - pushFollow(FOLLOW_instanceOfExpression_in_equalityExpression1511); + pushFollow(FOLLOW_instanceOfExpression_in_equalityExpression1514); right=instanceOfExpression(); state._fsp--; if (state.failed) return result; @@ -2284,7 +2283,7 @@ else if ( (LA31_0==NOT_EQUALS) ) { // $ANTLR start "instanceOfExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:319:1: instanceOfExpression returns [BaseDescr result] : left= inExpression (op= instanceof_key right= type )? ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:338:1: instanceOfExpression returns [BaseDescr result] : left= inExpression (op= instanceof_key right= type )? ; public final BaseDescr instanceOfExpression() throws RecognitionException { BaseDescr result = null; @@ -2294,15 +2293,15 @@ public final BaseDescr instanceOfExpression() throws RecognitionException { ParserRuleReturnScope right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:320:3: (left= inExpression (op= instanceof_key right= type )? ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:320:5: left= inExpression (op= instanceof_key right= type )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:339:3: (left= inExpression (op= instanceof_key right= type )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:339:5: left= inExpression (op= instanceof_key right= type )? { - pushFollow(FOLLOW_inExpression_in_instanceOfExpression1546); + pushFollow(FOLLOW_inExpression_in_instanceOfExpression1549); left=inExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:321:3: (op= instanceof_key right= type )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:340:3: (op= instanceof_key right= type )? int alt33=2; int LA33_0 = input.LA(1); if ( (LA33_0==ID) ) { @@ -2313,15 +2312,15 @@ public final BaseDescr instanceOfExpression() throws RecognitionException { } switch (alt33) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:321:5: op= instanceof_key right= type + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:340:5: op= instanceof_key right= type { - pushFollow(FOLLOW_instanceof_key_in_instanceOfExpression1556); + pushFollow(FOLLOW_instanceof_key_in_instanceOfExpression1559); op=instanceof_key(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { helper.setHasOperator( true ); if( input.LA( 1 ) != DRL6Lexer.EOF ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } - pushFollow(FOLLOW_type_in_instanceOfExpression1570); + pushFollow(FOLLOW_type_in_instanceOfExpression1573); right=type(); state._fsp--; if (state.failed) return result; @@ -2352,7 +2351,7 @@ public final BaseDescr instanceOfExpression() throws RecognitionException { // $ANTLR start "inExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:332:1: inExpression returns [BaseDescr result] : left= relationalExpression ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:351:1: inExpression returns [BaseDescr result] : left= relationalExpression ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? ; public final BaseDescr inExpression() throws RecognitionException { BaseDescr result = null; @@ -2363,10 +2362,10 @@ public final BaseDescr inExpression() throws RecognitionException { ConstraintConnectiveDescr descr = null; BaseDescr leftDescr = null; BindingDescr binding = null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:335:3: (left= relationalExpression ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:335:5: left= relationalExpression ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:354:3: (left= relationalExpression ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:354:5: left= relationalExpression ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? { - pushFollow(FOLLOW_relationalExpression_in_inExpression1615); + pushFollow(FOLLOW_relationalExpression_in_inExpression1618); left=relationalExpression(); state._fsp--; if (state.failed) return result; @@ -2378,7 +2377,7 @@ public final BaseDescr inExpression() throws RecognitionException { leftDescr = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:344:5: ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:363:5: ( ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN |in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN )? int alt36=3; int LA36_0 = input.LA(1); if ( (LA36_0==ID) ) { @@ -2395,19 +2394,19 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw } switch (alt36) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:344:6: ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:363:6: ( not_key in_key )=> not_key in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN { - pushFollow(FOLLOW_not_key_in_inExpression1635); + pushFollow(FOLLOW_not_key_in_inExpression1638); not_key(); state._fsp--; if (state.failed) return result; - pushFollow(FOLLOW_in_key_in_inExpression1639); + pushFollow(FOLLOW_in_key_in_inExpression1642); in_key(); state._fsp--; if (state.failed) return result; - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_inExpression1641); if (state.failed) return result; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_inExpression1644); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } - pushFollow(FOLLOW_expression_in_inExpression1663); + pushFollow(FOLLOW_expression_in_inExpression1666); e1=expression(); state._fsp--; if (state.failed) return result; @@ -2416,7 +2415,7 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw descr.addOrMerge( rel ); result = descr; } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:352:7: ( COMMA e2= expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:371:7: ( COMMA e2= expression )* loop34: while (true) { int alt34=2; @@ -2427,10 +2426,10 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw switch (alt34) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:352:8: COMMA e2= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:371:8: COMMA e2= expression { - match(input,COMMA,FOLLOW_COMMA_in_inExpression1682); if (state.failed) return result; - pushFollow(FOLLOW_expression_in_inExpression1686); + match(input,COMMA,FOLLOW_COMMA_in_inExpression1685); if (state.failed) return result; + pushFollow(FOLLOW_expression_in_inExpression1689); e2=expression(); state._fsp--; if (state.failed) return result; @@ -2445,20 +2444,20 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw } } - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_inExpression1707); if (state.failed) return result; + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_inExpression1710); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_END ); } } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:358:7: in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:377:7: in= in_key LEFT_PAREN e1= expression ( COMMA e2= expression )* RIGHT_PAREN { - pushFollow(FOLLOW_in_key_in_inExpression1723); + pushFollow(FOLLOW_in_key_in_inExpression1726); in_key(); state._fsp--; if (state.failed) return result; - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_inExpression1725); if (state.failed) return result; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_inExpression1728); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } - pushFollow(FOLLOW_expression_in_inExpression1747); + pushFollow(FOLLOW_expression_in_inExpression1750); e1=expression(); state._fsp--; if (state.failed) return result; @@ -2467,7 +2466,7 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw descr.addOrMerge( rel ); result = descr; } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:366:7: ( COMMA e2= expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:385:7: ( COMMA e2= expression )* loop35: while (true) { int alt35=2; @@ -2478,10 +2477,10 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw switch (alt35) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:366:8: COMMA e2= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:385:8: COMMA e2= expression { - match(input,COMMA,FOLLOW_COMMA_in_inExpression1766); if (state.failed) return result; - pushFollow(FOLLOW_expression_in_inExpression1770); + match(input,COMMA,FOLLOW_COMMA_in_inExpression1769); if (state.failed) return result; + pushFollow(FOLLOW_expression_in_inExpression1773); e2=expression(); state._fsp--; if (state.failed) return result; @@ -2496,7 +2495,7 @@ else if ( (LA36_1==LEFT_PAREN) && (((helper.validateIdentifierKey(DroolsSoftKeyw } } - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_inExpression1791); if (state.failed) return result; + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_inExpression1794); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_END ); } } break; @@ -2527,7 +2526,7 @@ protected static class relationalExpression_scope { // $ANTLR start "relationalExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:375:1: relationalExpression returns [BaseDescr result] : left= shiftExpression ( ( operator | LEFT_PAREN )=>right= orRestriction )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:394:1: relationalExpression returns [BaseDescr result] : left= shiftExpression ( ( operator | LEFT_PAREN )=>right= orRestriction )* ; public final BaseDescr relationalExpression() throws RecognitionException { relationalExpression_stack.push(new relationalExpression_scope()); BaseDescr result = null; @@ -2538,10 +2537,10 @@ public final BaseDescr relationalExpression() throws RecognitionException { relationalExpression_stack.peek().lsd = null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:378:3: (left= shiftExpression ( ( operator | LEFT_PAREN )=>right= orRestriction )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:378:5: left= shiftExpression ( ( operator | LEFT_PAREN )=>right= orRestriction )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:397:3: (left= shiftExpression ( ( operator | LEFT_PAREN )=>right= orRestriction )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:397:5: left= shiftExpression ( ( operator | LEFT_PAREN )=>right= orRestriction )* { - pushFollow(FOLLOW_shiftExpression_in_relationalExpression1832); + pushFollow(FOLLOW_shiftExpression_in_relationalExpression1835); left=shiftExpression(); state._fsp--; if (state.failed) return result; @@ -2569,7 +2568,7 @@ public final BaseDescr relationalExpression() throws RecognitionException { relationalExpression_stack.peek().lsd = result; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:403:3: ( ( operator | LEFT_PAREN )=>right= orRestriction )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:422:3: ( ( operator | LEFT_PAREN )=>right= orRestriction )* loop37: while (true) { int alt37=2; @@ -2624,9 +2623,9 @@ else if ( (LA37_0==LEFT_PAREN) && (synpred9_DRL6Expressions())) { switch (alt37) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:403:5: ( operator | LEFT_PAREN )=>right= orRestriction + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:422:5: ( operator | LEFT_PAREN )=>right= orRestriction { - pushFollow(FOLLOW_orRestriction_in_relationalExpression1857); + pushFollow(FOLLOW_orRestriction_in_relationalExpression1860); right=orRestriction(); state._fsp--; if (state.failed) return result; @@ -2662,7 +2661,7 @@ else if ( (LA37_0==LEFT_PAREN) && (synpred9_DRL6Expressions())) { // $ANTLR start "orRestriction" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:412:1: orRestriction returns [BaseDescr result] : left= andRestriction ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* ( EOF )? ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:431:1: orRestriction returns [BaseDescr result] : left= andRestriction ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* ( EOF )? ; public final BaseDescr orRestriction() throws RecognitionException { BaseDescr result = null; @@ -2673,15 +2672,15 @@ public final BaseDescr orRestriction() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:413:3: (left= andRestriction ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* ( EOF )? ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:413:5: left= andRestriction ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* ( EOF )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:432:3: (left= andRestriction ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* ( EOF )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:432:5: left= andRestriction ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* ( EOF )? { - pushFollow(FOLLOW_andRestriction_in_orRestriction1892); + pushFollow(FOLLOW_andRestriction_in_orRestriction1895); left=andRestriction(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:5: ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:5: ( ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction )* loop39: while (true) { int alt39=2; @@ -2696,10 +2695,10 @@ public final BaseDescr orRestriction() throws RecognitionException { switch (alt39) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:7: ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:7: ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction )=>lop= DOUBLE_PIPE (args= fullAnnotation[null] )? right= andRestriction { - lop=(Token)match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_orRestriction1914); if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:79: (args= fullAnnotation[null] )? + lop=(Token)match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_orRestriction1917); if (state.failed) return result; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:79: (args= fullAnnotation[null] )? int alt38=2; int LA38_0 = input.LA(1); if ( (LA38_0==AT) ) { @@ -2707,9 +2706,9 @@ public final BaseDescr orRestriction() throws RecognitionException { } switch (alt38) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:79: args= fullAnnotation[null] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:79: args= fullAnnotation[null] { - pushFollow(FOLLOW_fullAnnotation_in_orRestriction1918); + pushFollow(FOLLOW_fullAnnotation_in_orRestriction1921); args=fullAnnotation(null); state._fsp--; if (state.failed) return result; @@ -2718,11 +2717,12 @@ public final BaseDescr orRestriction() throws RecognitionException { } - pushFollow(FOLLOW_andRestriction_in_orRestriction1924); + pushFollow(FOLLOW_andRestriction_in_orRestriction1927); right=andRestriction(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { + helper.logHalfConstraintWarn("||", right); ConstraintConnectiveDescr descr = ConstraintConnectiveDescr.newOr(); descr.addOrMerge( result ); descr.addOrMerge( right ); @@ -2738,7 +2738,7 @@ public final BaseDescr orRestriction() throws RecognitionException { } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:423:7: ( EOF )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:443:7: ( EOF )? int alt40=2; int LA40_0 = input.LA(1); if ( (LA40_0==EOF) ) { @@ -2755,9 +2755,9 @@ else if ( ((LA40_1 >= AMPER && LA40_1 <= AND_ASSIGN)||LA40_1==AT||(LA40_1 >= COL } switch (alt40) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:423:7: EOF + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:443:7: EOF { - match(input,EOF,FOLLOW_EOF_in_orRestriction1943); if (state.failed) return result; + match(input,EOF,FOLLOW_EOF_in_orRestriction1946); if (state.failed) return result; } break; @@ -2781,7 +2781,7 @@ else if ( ((LA40_1 >= AMPER && LA40_1 <= AND_ASSIGN)||LA40_1==AT||(LA40_1 >= COL // $ANTLR start "andRestriction" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:426:1: andRestriction returns [BaseDescr result] : left= singleRestriction ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:446:1: andRestriction returns [BaseDescr result] : left= singleRestriction ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* ; public final BaseDescr andRestriction() throws RecognitionException { BaseDescr result = null; @@ -2792,15 +2792,15 @@ public final BaseDescr andRestriction() throws RecognitionException { BaseDescr right =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:427:3: (left= singleRestriction ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:427:5: left= singleRestriction ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:447:3: (left= singleRestriction ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:447:5: left= singleRestriction ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* { - pushFollow(FOLLOW_singleRestriction_in_andRestriction1963); + pushFollow(FOLLOW_singleRestriction_in_andRestriction1966); left=singleRestriction(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:428:3: ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:448:3: ( ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction )* loop42: while (true) { int alt42=2; @@ -2815,11 +2815,11 @@ public final BaseDescr andRestriction() throws RecognitionException { switch (alt42) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:428:5: ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:448:5: ( DOUBLE_AMPER ( fullAnnotation[null] )? operator )=>lop= DOUBLE_AMPER (args= fullAnnotation[null] )? right= singleRestriction { - lop=(Token)match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_andRestriction1983); if (state.failed) return result; + lop=(Token)match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_andRestriction1986); if (state.failed) return result; if ( state.backtracking==0 ) { if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:430:13: (args= fullAnnotation[null] )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:450:13: (args= fullAnnotation[null] )? int alt41=2; int LA41_0 = input.LA(1); if ( (LA41_0==AT) ) { @@ -2827,9 +2827,9 @@ public final BaseDescr andRestriction() throws RecognitionException { } switch (alt41) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:430:13: args= fullAnnotation[null] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:450:13: args= fullAnnotation[null] { - pushFollow(FOLLOW_fullAnnotation_in_andRestriction2004); + pushFollow(FOLLOW_fullAnnotation_in_andRestriction2007); args=fullAnnotation(null); state._fsp--; if (state.failed) return result; @@ -2838,11 +2838,12 @@ public final BaseDescr andRestriction() throws RecognitionException { } - pushFollow(FOLLOW_singleRestriction_in_andRestriction2009); + pushFollow(FOLLOW_singleRestriction_in_andRestriction2012); right=singleRestriction(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { + helper.logHalfConstraintWarn("&&", right); ConstraintConnectiveDescr descr = ConstraintConnectiveDescr.newAnd(); descr.addOrMerge( result ); descr.addOrMerge( right ); @@ -2876,7 +2877,7 @@ public final BaseDescr andRestriction() throws RecognitionException { // $ANTLR start "singleRestriction" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:442:1: singleRestriction returns [BaseDescr result] : (op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) | LEFT_PAREN or= orRestriction RIGHT_PAREN ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:463:1: singleRestriction returns [BaseDescr result] : (op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) | LEFT_PAREN or= orRestriction RIGHT_PAREN ); public final BaseDescr singleRestriction() throws RecognitionException { BaseDescr result = null; @@ -2887,7 +2888,7 @@ public final BaseDescr singleRestriction() throws RecognitionException { BaseDescr or =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:443:3: (op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) | LEFT_PAREN or= orRestriction RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:464:3: (op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) | LEFT_PAREN or= orRestriction RIGHT_PAREN ) int alt44=2; int LA44_0 = input.LA(1); if ( (LA44_0==EQUALS||(LA44_0 >= GREATER && LA44_0 <= GREATER_EQUALS)||(LA44_0 >= LESS && LA44_0 <= LESS_EQUALS)||LA44_0==NOT_EQUALS||LA44_0==TILDE) ) { @@ -2909,14 +2910,14 @@ else if ( (LA44_0==LEFT_PAREN) ) { switch (alt44) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:443:6: op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:464:6: op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) { - pushFollow(FOLLOW_operator_in_singleRestriction2045); + pushFollow(FOLLOW_operator_in_singleRestriction2048); op=operator(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:445:6: ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:466:6: ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) int alt43=2; int LA43_0 = input.LA(1); if ( (LA43_0==LEFT_SQUARE) ) { @@ -2942,22 +2943,22 @@ else if ( (LA43_0==BOOL||(LA43_0 >= DECIMAL && LA43_0 <= DIV)||LA43_0==DOT||LA43 switch (alt43) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:445:8: ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:466:8: ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression { - pushFollow(FOLLOW_squareArguments_in_singleRestriction2074); + pushFollow(FOLLOW_squareArguments_in_singleRestriction2077); sa=squareArguments(); state._fsp--; if (state.failed) return result; - pushFollow(FOLLOW_shiftExpression_in_singleRestriction2078); + pushFollow(FOLLOW_shiftExpression_in_singleRestriction2081); value=shiftExpression(); state._fsp--; if (state.failed) return result; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:446:10: value= shiftExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:467:10: value= shiftExpression { - pushFollow(FOLLOW_shiftExpression_in_singleRestriction2091); + pushFollow(FOLLOW_shiftExpression_in_singleRestriction2094); value=shiftExpression(); state._fsp--; if (state.failed) return result; @@ -2982,14 +2983,14 @@ else if ( (LA43_0==BOOL||(LA43_0 >= DECIMAL && LA43_0 <= DIV)||LA43_0==DOT||LA43 } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:461:6: LEFT_PAREN or= orRestriction RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:482:6: LEFT_PAREN or= orRestriction RIGHT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_singleRestriction2116); if (state.failed) return result; - pushFollow(FOLLOW_orRestriction_in_singleRestriction2120); + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_singleRestriction2119); if (state.failed) return result; + pushFollow(FOLLOW_orRestriction_in_singleRestriction2123); or=orRestriction(); state._fsp--; if (state.failed) return result; - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_singleRestriction2122); if (state.failed) return result; + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_singleRestriction2125); if (state.failed) return result; if ( state.backtracking==0 ) { result = or; } } break; @@ -3015,7 +3016,7 @@ public static class shiftExpression_return extends ParserRuleReturnScope { // $ANTLR start "shiftExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:466:1: shiftExpression returns [BaseDescr result] : left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:487:1: shiftExpression returns [BaseDescr result] : left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* ; public final DRL6Expressions.shiftExpression_return shiftExpression() throws RecognitionException { DRL6Expressions.shiftExpression_return retval = new DRL6Expressions.shiftExpression_return(); retval.start = input.LT(1); @@ -3023,15 +3024,15 @@ public final DRL6Expressions.shiftExpression_return shiftExpression() throws Rec BaseDescr left =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:467:3: (left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:467:5: left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:488:3: (left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:488:5: left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* { - pushFollow(FOLLOW_additiveExpression_in_shiftExpression2146); + pushFollow(FOLLOW_additiveExpression_in_shiftExpression2149); left=additiveExpression(); state._fsp--; if (state.failed) return retval; if ( state.backtracking==0 ) { if( buildDescr ) { retval.result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:468:5: ( ( shiftOp )=> shiftOp additiveExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:489:5: ( ( shiftOp )=> shiftOp additiveExpression )* loop45: while (true) { int alt45=2; @@ -3053,13 +3054,13 @@ else if ( (LA45_0==GREATER) ) { switch (alt45) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:468:7: ( shiftOp )=> shiftOp additiveExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:489:7: ( shiftOp )=> shiftOp additiveExpression { - pushFollow(FOLLOW_shiftOp_in_shiftExpression2160); + pushFollow(FOLLOW_shiftOp_in_shiftExpression2163); shiftOp(); state._fsp--; if (state.failed) return retval; - pushFollow(FOLLOW_additiveExpression_in_shiftExpression2162); + pushFollow(FOLLOW_additiveExpression_in_shiftExpression2165); additiveExpression(); state._fsp--; if (state.failed) return retval; @@ -3091,13 +3092,13 @@ else if ( (LA45_0==GREATER) ) { // $ANTLR start "shiftOp" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:471:1: shiftOp : ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:492:1: shiftOp : ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) ; public final void shiftOp() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:472:5: ( ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:472:7: ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:493:5: ( ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:493:7: ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:472:7: ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:493:7: ( LESS LESS | GREATER GREATER GREATER | GREATER GREATER ) int alt46=3; int LA46_0 = input.LA(1); if ( (LA46_0==LESS) ) { @@ -3155,25 +3156,25 @@ else if ( (LA46_3==EOF||LA46_3==BOOL||(LA46_3 >= DECIMAL && LA46_3 <= DIV)||LA46 switch (alt46) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:472:9: LESS LESS + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:493:9: LESS LESS { - match(input,LESS,FOLLOW_LESS_in_shiftOp2182); if (state.failed) return; - match(input,LESS,FOLLOW_LESS_in_shiftOp2184); if (state.failed) return; + match(input,LESS,FOLLOW_LESS_in_shiftOp2185); if (state.failed) return; + match(input,LESS,FOLLOW_LESS_in_shiftOp2187); if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:473:11: GREATER GREATER GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:494:11: GREATER GREATER GREATER { - match(input,GREATER,FOLLOW_GREATER_in_shiftOp2196); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_shiftOp2198); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_shiftOp2200); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_shiftOp2199); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_shiftOp2201); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_shiftOp2203); if (state.failed) return; } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:474:11: GREATER GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:495:11: GREATER GREATER { - match(input,GREATER,FOLLOW_GREATER_in_shiftOp2212); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_shiftOp2214); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_shiftOp2215); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_shiftOp2217); if (state.failed) return; } break; @@ -3196,7 +3197,7 @@ else if ( (LA46_3==EOF||LA46_3==BOOL||(LA46_3 >= DECIMAL && LA46_3 <= DIV)||LA46 // $ANTLR start "additiveExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:477:1: additiveExpression returns [BaseDescr result] : left= multiplicativeExpression ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:498:1: additiveExpression returns [BaseDescr result] : left= multiplicativeExpression ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* ; public final BaseDescr additiveExpression() throws RecognitionException { BaseDescr result = null; @@ -3204,15 +3205,15 @@ public final BaseDescr additiveExpression() throws RecognitionException { BaseDescr left =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:478:5: (left= multiplicativeExpression ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:478:9: left= multiplicativeExpression ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:499:5: (left= multiplicativeExpression ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:499:9: left= multiplicativeExpression ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* { - pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression2242); + pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression2245); left=multiplicativeExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:479:9: ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:500:9: ( ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression )* loop47: while (true) { int alt47=2; @@ -3223,7 +3224,7 @@ public final BaseDescr additiveExpression() throws RecognitionException { switch (alt47) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:479:11: ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:500:11: ( PLUS | MINUS )=> ( PLUS | MINUS ) multiplicativeExpression { if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) { input.consume(); @@ -3235,7 +3236,7 @@ public final BaseDescr additiveExpression() throws RecognitionException { MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } - pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression2271); + pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression2274); multiplicativeExpression(); state._fsp--; if (state.failed) return result; @@ -3265,7 +3266,7 @@ public final BaseDescr additiveExpression() throws RecognitionException { // $ANTLR start "multiplicativeExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:482:1: multiplicativeExpression returns [BaseDescr result] : left= unaryExpression ( ( STAR | DIV | MOD ) unaryExpression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:503:1: multiplicativeExpression returns [BaseDescr result] : left= unaryExpression ( ( STAR | DIV | MOD ) unaryExpression )* ; public final BaseDescr multiplicativeExpression() throws RecognitionException { BaseDescr result = null; @@ -3273,15 +3274,15 @@ public final BaseDescr multiplicativeExpression() throws RecognitionException { BaseDescr left =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:483:5: (left= unaryExpression ( ( STAR | DIV | MOD ) unaryExpression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:483:9: left= unaryExpression ( ( STAR | DIV | MOD ) unaryExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:504:5: (left= unaryExpression ( ( STAR | DIV | MOD ) unaryExpression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:504:9: left= unaryExpression ( ( STAR | DIV | MOD ) unaryExpression )* { - pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression2299); + pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression2302); left=unaryExpression(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = left; } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:484:7: ( ( STAR | DIV | MOD ) unaryExpression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:505:7: ( ( STAR | DIV | MOD ) unaryExpression )* loop48: while (true) { int alt48=2; @@ -3292,7 +3293,7 @@ public final BaseDescr multiplicativeExpression() throws RecognitionException { switch (alt48) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:484:9: ( STAR | DIV | MOD ) unaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:505:9: ( STAR | DIV | MOD ) unaryExpression { if ( input.LA(1)==DIV||input.LA(1)==MOD||input.LA(1)==STAR ) { input.consume(); @@ -3304,7 +3305,7 @@ public final BaseDescr multiplicativeExpression() throws RecognitionException { MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } - pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression2325); + pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression2328); unaryExpression(); state._fsp--; if (state.failed) return result; @@ -3334,7 +3335,7 @@ public final BaseDescr multiplicativeExpression() throws RecognitionException { // $ANTLR start "unaryExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:487:1: unaryExpression returns [BaseDescr result] : ( PLUS ue= unaryExpression | MINUS ue= unaryExpression | INCR primary | DECR primary |left= unaryExpressionNotPlusMinus ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:508:1: unaryExpression returns [BaseDescr result] : ( PLUS ue= unaryExpression | MINUS ue= unaryExpression | INCR primary | DECR primary |left= unaryExpressionNotPlusMinus ); public final BaseDescr unaryExpression() throws RecognitionException { BaseDescr result = null; @@ -3343,7 +3344,7 @@ public final BaseDescr unaryExpression() throws RecognitionException { ParserRuleReturnScope left =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:488:5: ( PLUS ue= unaryExpression | MINUS ue= unaryExpression | INCR primary | DECR primary |left= unaryExpressionNotPlusMinus ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:509:5: ( PLUS ue= unaryExpression | MINUS ue= unaryExpression | INCR primary | DECR primary |left= unaryExpressionNotPlusMinus ) int alt49=5; switch ( input.LA(1) ) { case PLUS: @@ -3395,10 +3396,10 @@ public final BaseDescr unaryExpression() throws RecognitionException { } switch (alt49) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:488:9: PLUS ue= unaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:509:9: PLUS ue= unaryExpression { - match(input,PLUS,FOLLOW_PLUS_in_unaryExpression2351); if (state.failed) return result; - pushFollow(FOLLOW_unaryExpression_in_unaryExpression2355); + match(input,PLUS,FOLLOW_PLUS_in_unaryExpression2354); if (state.failed) return result; + pushFollow(FOLLOW_unaryExpression_in_unaryExpression2358); ue=unaryExpression(); state._fsp--; if (state.failed) return result; @@ -3411,10 +3412,10 @@ public final BaseDescr unaryExpression() throws RecognitionException { } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:495:7: MINUS ue= unaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:516:7: MINUS ue= unaryExpression { - match(input,MINUS,FOLLOW_MINUS_in_unaryExpression2373); if (state.failed) return result; - pushFollow(FOLLOW_unaryExpression_in_unaryExpression2377); + match(input,MINUS,FOLLOW_MINUS_in_unaryExpression2376); if (state.failed) return result; + pushFollow(FOLLOW_unaryExpression_in_unaryExpression2380); ue=unaryExpression(); state._fsp--; if (state.failed) return result; @@ -3427,29 +3428,29 @@ public final BaseDescr unaryExpression() throws RecognitionException { } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:502:9: INCR primary + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:523:9: INCR primary { - match(input,INCR,FOLLOW_INCR_in_unaryExpression2397); if (state.failed) return result; - pushFollow(FOLLOW_primary_in_unaryExpression2399); + match(input,INCR,FOLLOW_INCR_in_unaryExpression2400); if (state.failed) return result; + pushFollow(FOLLOW_primary_in_unaryExpression2402); primary(); state._fsp--; if (state.failed) return result; } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:503:9: DECR primary + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:524:9: DECR primary { - match(input,DECR,FOLLOW_DECR_in_unaryExpression2409); if (state.failed) return result; - pushFollow(FOLLOW_primary_in_unaryExpression2411); + match(input,DECR,FOLLOW_DECR_in_unaryExpression2412); if (state.failed) return result; + pushFollow(FOLLOW_primary_in_unaryExpression2414); primary(); state._fsp--; if (state.failed) return result; } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:504:9: left= unaryExpressionNotPlusMinus + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:525:9: left= unaryExpressionNotPlusMinus { - pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression2423); + pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression2426); left=unaryExpressionNotPlusMinus(); state._fsp--; if (state.failed) return result; @@ -3478,7 +3479,7 @@ public static class unaryExpressionNotPlusMinus_return extends ParserRuleReturnS // $ANTLR start "unaryExpressionNotPlusMinus" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:507:1: unaryExpressionNotPlusMinus returns [BaseDescr result] : ( TILDE unaryExpression | NEGATION ue= unaryExpression | ( castExpression )=> castExpression | ( backReferenceExpression )=> backReferenceExpression | ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) ( ( selector )=> selector )* ( ( INCR | DECR )=> ( INCR | DECR ) )? ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:528:1: unaryExpressionNotPlusMinus returns [BaseDescr result] : ( TILDE unaryExpression | NEGATION ue= unaryExpression | ( castExpression )=> castExpression | ( backReferenceExpression )=> backReferenceExpression | ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) ( ( selector )=> selector )* ( ( INCR | DECR )=> ( INCR | DECR ) )? ); public final DRL6Expressions.unaryExpressionNotPlusMinus_return unaryExpressionNotPlusMinus() throws RecognitionException { DRL6Expressions.unaryExpressionNotPlusMinus_return retval = new DRL6Expressions.unaryExpressionNotPlusMinus_return(); retval.start = input.LT(1); @@ -3492,7 +3493,7 @@ public final DRL6Expressions.unaryExpressionNotPlusMinus_return unaryExpressionN boolean isLeft = false; BindingDescr bind = null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:509:5: ( TILDE unaryExpression | NEGATION ue= unaryExpression | ( castExpression )=> castExpression | ( backReferenceExpression )=> backReferenceExpression | ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) ( ( selector )=> selector )* ( ( INCR | DECR )=> ( INCR | DECR ) )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:530:5: ( TILDE unaryExpression | NEGATION ue= unaryExpression | ( castExpression )=> castExpression | ( backReferenceExpression )=> backReferenceExpression | ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) ( ( selector )=> selector )* ( ( INCR | DECR )=> ( INCR | DECR ) )? ) int alt54=5; int LA54_0 = input.LA(1); if ( (LA54_0==TILDE) ) { @@ -3527,20 +3528,20 @@ else if ( (LA54_0==BOOL||LA54_0==DECIMAL||LA54_0==DIV||LA54_0==FLOAT||LA54_0==HE switch (alt54) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:509:9: TILDE unaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:530:9: TILDE unaryExpression { - match(input,TILDE,FOLLOW_TILDE_in_unaryExpressionNotPlusMinus2453); if (state.failed) return retval; - pushFollow(FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2455); + match(input,TILDE,FOLLOW_TILDE_in_unaryExpressionNotPlusMinus2456); if (state.failed) return retval; + pushFollow(FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2458); unaryExpression(); state._fsp--; if (state.failed) return retval; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:510:8: NEGATION ue= unaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:531:8: NEGATION ue= unaryExpression { - match(input,NEGATION,FOLLOW_NEGATION_in_unaryExpressionNotPlusMinus2464); if (state.failed) return retval; - pushFollow(FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2468); + match(input,NEGATION,FOLLOW_NEGATION_in_unaryExpressionNotPlusMinus2467); if (state.failed) return retval; + pushFollow(FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2471); ue=unaryExpression(); state._fsp--; if (state.failed) return retval; @@ -3552,28 +3553,28 @@ else if ( (LA54_0==BOOL||LA54_0==DECIMAL||LA54_0==DIV||LA54_0==FLOAT||LA54_0==HE } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:516:9: ( castExpression )=> castExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:537:9: ( castExpression )=> castExpression { - pushFollow(FOLLOW_castExpression_in_unaryExpressionNotPlusMinus2492); + pushFollow(FOLLOW_castExpression_in_unaryExpressionNotPlusMinus2495); castExpression(); state._fsp--; if (state.failed) return retval; } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:517:9: ( backReferenceExpression )=> backReferenceExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:538:9: ( backReferenceExpression )=> backReferenceExpression { - pushFollow(FOLLOW_backReferenceExpression_in_unaryExpressionNotPlusMinus2506); + pushFollow(FOLLOW_backReferenceExpression_in_unaryExpressionNotPlusMinus2509); backReferenceExpression(); state._fsp--; if (state.failed) return retval; } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:518:9: ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) ( ( selector )=> selector )* ( ( INCR | DECR )=> ( INCR | DECR ) )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:539:9: ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) ( ( selector )=> selector )* ( ( INCR | DECR )=> ( INCR | DECR ) )? { if ( state.backtracking==0 ) { isLeft = helper.getLeftMostExpr() == null;} - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:519:9: ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:540:9: ( ({...}? (var= ID COLON ) ) | ({...}? (var= ID UNIFY ) ) )? int alt50=3; int LA50_0 = input.LA(1); if ( (LA50_0==ID) ) { @@ -3590,20 +3591,20 @@ else if ( (LA50_1==UNIFY) ) { } switch (alt50) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:519:11: ({...}? (var= ID COLON ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:540:11: ({...}? (var= ID COLON ) ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:519:11: ({...}? (var= ID COLON ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:519:12: {...}? (var= ID COLON ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:540:11: ({...}? (var= ID COLON ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:540:12: {...}? (var= ID COLON ) { if ( !((inMap == 0 && ternOp == 0 && input.LA(2) == DRL6Lexer.COLON)) ) { if (state.backtracking>0) {state.failed=true; return retval;} throw new FailedPredicateException(input, "unaryExpressionNotPlusMinus", "inMap == 0 && ternOp == 0 && input.LA(2) == DRL6Lexer.COLON"); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:519:75: (var= ID COLON ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:519:76: var= ID COLON + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:540:75: (var= ID COLON ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:540:76: var= ID COLON { - var=(Token)match(input,ID,FOLLOW_ID_in_unaryExpressionNotPlusMinus2534); if (state.failed) return retval; - COLON9=(Token)match(input,COLON,FOLLOW_COLON_in_unaryExpressionNotPlusMinus2536); if (state.failed) return retval; + var=(Token)match(input,ID,FOLLOW_ID_in_unaryExpressionNotPlusMinus2537); if (state.failed) return retval; + COLON9=(Token)match(input,COLON,FOLLOW_COLON_in_unaryExpressionNotPlusMinus2539); if (state.failed) return retval; if ( state.backtracking==0 ) { hasBindings = true; helper.emit(var, DroolsEditorType.IDENTIFIER_VARIABLE); helper.emit(COLON9, DroolsEditorType.SYMBOL); if( buildDescr ) { bind = new BindingDescr((var!=null?var.getText():null), null, false); helper.setStart( bind, var ); } } } @@ -3612,20 +3613,20 @@ else if ( (LA50_1==UNIFY) ) { } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:521:11: ({...}? (var= ID UNIFY ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:542:11: ({...}? (var= ID UNIFY ) ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:521:11: ({...}? (var= ID UNIFY ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:521:12: {...}? (var= ID UNIFY ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:542:11: ({...}? (var= ID UNIFY ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:542:12: {...}? (var= ID UNIFY ) { if ( !((inMap == 0 && ternOp == 0 && input.LA(2) == DRL6Lexer.UNIFY)) ) { if (state.backtracking>0) {state.failed=true; return retval;} throw new FailedPredicateException(input, "unaryExpressionNotPlusMinus", "inMap == 0 && ternOp == 0 && input.LA(2) == DRL6Lexer.UNIFY"); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:521:75: (var= ID UNIFY ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:521:76: var= ID UNIFY + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:542:75: (var= ID UNIFY ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:542:76: var= ID UNIFY { - var=(Token)match(input,ID,FOLLOW_ID_in_unaryExpressionNotPlusMinus2575); if (state.failed) return retval; - UNIFY10=(Token)match(input,UNIFY,FOLLOW_UNIFY_in_unaryExpressionNotPlusMinus2577); if (state.failed) return retval; + var=(Token)match(input,ID,FOLLOW_ID_in_unaryExpressionNotPlusMinus2578); if (state.failed) return retval; + UNIFY10=(Token)match(input,UNIFY,FOLLOW_UNIFY_in_unaryExpressionNotPlusMinus2580); if (state.failed) return retval; if ( state.backtracking==0 ) { hasBindings = true; helper.emit(var, DroolsEditorType.IDENTIFIER_VARIABLE); helper.emit(UNIFY10, DroolsEditorType.SYMBOL); if( buildDescr ) { bind = new BindingDescr((var!=null?var.getText():null), null, true); helper.setStart( bind, var ); } } } @@ -3636,7 +3637,7 @@ else if ( (LA50_1==UNIFY) ) { } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:525:9: ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:546:9: ( ( xpathSeparator ID )=>left2= xpathPrimary |left1= primary ) int alt51=2; int LA51_0 = input.LA(1); if ( (LA51_0==DIV||LA51_0==QUESTION_DIV) && (synpred17_DRL6Expressions())) { @@ -3655,9 +3656,9 @@ else if ( (LA51_0==BOOL||LA51_0==DECIMAL||LA51_0==FLOAT||LA51_0==HEX||LA51_0==ID switch (alt51) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:525:11: ( xpathSeparator ID )=>left2= xpathPrimary + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:546:11: ( xpathSeparator ID )=>left2= xpathPrimary { - pushFollow(FOLLOW_xpathPrimary_in_unaryExpressionNotPlusMinus2631); + pushFollow(FOLLOW_xpathPrimary_in_unaryExpressionNotPlusMinus2634); left2=xpathPrimary(); state._fsp--; if (state.failed) return retval; @@ -3665,9 +3666,9 @@ else if ( (LA51_0==BOOL||LA51_0==DECIMAL||LA51_0==FLOAT||LA51_0==HEX||LA51_0==ID } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:526:13: left1= primary + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:547:13: left1= primary { - pushFollow(FOLLOW_primary_in_unaryExpressionNotPlusMinus2649); + pushFollow(FOLLOW_primary_in_unaryExpressionNotPlusMinus2652); left1=primary(); state._fsp--; if (state.failed) return retval; @@ -3677,7 +3678,7 @@ else if ( (LA51_0==BOOL||LA51_0==DECIMAL||LA51_0==FLOAT||LA51_0==HEX||LA51_0==ID } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:529:9: ( ( selector )=> selector )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:550:9: ( ( selector )=> selector )* loop52: while (true) { int alt52=2; @@ -3694,9 +3695,9 @@ else if ( (LA52_0==LEFT_SQUARE) && (synpred18_DRL6Expressions())) { switch (alt52) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:529:10: ( selector )=> selector + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:550:10: ( selector )=> selector { - pushFollow(FOLLOW_selector_in_unaryExpressionNotPlusMinus2677); + pushFollow(FOLLOW_selector_in_unaryExpressionNotPlusMinus2680); selector(); state._fsp--; if (state.failed) return retval; @@ -3726,7 +3727,7 @@ else if ( (LA52_0==LEFT_SQUARE) && (synpred18_DRL6Expressions())) { } } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:548:9: ( ( INCR | DECR )=> ( INCR | DECR ) )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:569:9: ( ( INCR | DECR )=> ( INCR | DECR ) )? int alt53=2; int LA53_0 = input.LA(1); if ( (LA53_0==DECR||LA53_0==INCR) && (synpred19_DRL6Expressions())) { @@ -3734,7 +3735,7 @@ else if ( (LA52_0==LEFT_SQUARE) && (synpred18_DRL6Expressions())) { } switch (alt53) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:548:10: ( INCR | DECR )=> ( INCR | DECR ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:569:10: ( INCR | DECR )=> ( INCR | DECR ) { if ( input.LA(1)==DECR||input.LA(1)==INCR ) { input.consume(); @@ -3773,12 +3774,12 @@ else if ( (LA52_0==LEFT_SQUARE) && (synpred18_DRL6Expressions())) { // $ANTLR start "castExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:551:1: castExpression : ( ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression | ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN unaryExpressionNotPlusMinus ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:572:1: castExpression : ( ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression | ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN unaryExpressionNotPlusMinus ); public final void castExpression() throws RecognitionException { BaseDescr expr =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:552:5: ( ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression | ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN unaryExpressionNotPlusMinus ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:573:5: ( ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression | ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN unaryExpressionNotPlusMinus ) int alt55=2; int LA55_0 = input.LA(1); if ( (LA55_0==LEFT_PAREN) ) { @@ -3814,30 +3815,30 @@ else if ( (synpred21_DRL6Expressions()) ) { switch (alt55) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:552:8: ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:573:8: ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_castExpression2739); if (state.failed) return; - pushFollow(FOLLOW_primitiveType_in_castExpression2741); + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_castExpression2742); if (state.failed) return; + pushFollow(FOLLOW_primitiveType_in_castExpression2744); primitiveType(); state._fsp--; if (state.failed) return; - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_castExpression2743); if (state.failed) return; - pushFollow(FOLLOW_unaryExpression_in_castExpression2747); + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_castExpression2746); if (state.failed) return; + pushFollow(FOLLOW_unaryExpression_in_castExpression2750); expr=unaryExpression(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:553:8: ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN unaryExpressionNotPlusMinus + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:574:8: ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN unaryExpressionNotPlusMinus { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_castExpression2764); if (state.failed) return; - pushFollow(FOLLOW_type_in_castExpression2766); + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_castExpression2767); if (state.failed) return; + pushFollow(FOLLOW_type_in_castExpression2769); type(); state._fsp--; if (state.failed) return; - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_castExpression2768); if (state.failed) return; - pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_castExpression2770); + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_castExpression2771); if (state.failed) return; + pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_castExpression2773); unaryExpressionNotPlusMinus(); state._fsp--; if (state.failed) return; @@ -3860,13 +3861,13 @@ else if ( (synpred21_DRL6Expressions()) ) { // $ANTLR start "backReferenceExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:556:1: backReferenceExpression : ( DOT DOT DIV )=> ( DOT DOT DIV )+ unaryExpressionNotPlusMinus ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:577:1: backReferenceExpression : ( DOT DOT DIV )=> ( DOT DOT DIV )+ unaryExpressionNotPlusMinus ; public final void backReferenceExpression() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:557:5: ( ( DOT DOT DIV )=> ( DOT DOT DIV )+ unaryExpressionNotPlusMinus ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:557:8: ( DOT DOT DIV )=> ( DOT DOT DIV )+ unaryExpressionNotPlusMinus + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:578:5: ( ( DOT DOT DIV )=> ( DOT DOT DIV )+ unaryExpressionNotPlusMinus ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:578:8: ( DOT DOT DIV )=> ( DOT DOT DIV )+ unaryExpressionNotPlusMinus { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:557:25: ( DOT DOT DIV )+ + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:578:25: ( DOT DOT DIV )+ int cnt56=0; loop56: while (true) { @@ -3878,11 +3879,11 @@ public final void backReferenceExpression() throws RecognitionException { switch (alt56) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:557:26: DOT DOT DIV + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:578:26: DOT DOT DIV { - match(input,DOT,FOLLOW_DOT_in_backReferenceExpression2799); if (state.failed) return; - match(input,DOT,FOLLOW_DOT_in_backReferenceExpression2801); if (state.failed) return; - match(input,DIV,FOLLOW_DIV_in_backReferenceExpression2803); if (state.failed) return; + match(input,DOT,FOLLOW_DOT_in_backReferenceExpression2802); if (state.failed) return; + match(input,DOT,FOLLOW_DOT_in_backReferenceExpression2804); if (state.failed) return; + match(input,DIV,FOLLOW_DIV_in_backReferenceExpression2806); if (state.failed) return; } break; @@ -3895,7 +3896,7 @@ public final void backReferenceExpression() throws RecognitionException { cnt56++; } - pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_backReferenceExpression2807); + pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_backReferenceExpression2810); unaryExpressionNotPlusMinus(); state._fsp--; if (state.failed) return; @@ -3916,10 +3917,10 @@ public final void backReferenceExpression() throws RecognitionException { // $ANTLR start "primitiveType" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:560:1: primitiveType : ( boolean_key | char_key | byte_key | short_key | int_key | long_key | float_key | double_key ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:1: primitiveType : ( boolean_key | char_key | byte_key | short_key | int_key | long_key | float_key | double_key ); public final void primitiveType() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:561:5: ( boolean_key | char_key | byte_key | short_key | int_key | long_key | float_key | double_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:582:5: ( boolean_key | char_key | byte_key | short_key | int_key | long_key | float_key | double_key ) int alt57=8; int LA57_0 = input.LA(1); if ( (LA57_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.LONG)))||((helper.validateIdentifierKey(DroolsSoftKeywords.CHAR)))||((helper.validateIdentifierKey(DroolsSoftKeywords.INT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.FLOAT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.BOOLEAN)))||((helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE)))||((helper.validateIdentifierKey(DroolsSoftKeywords.BYTE)))))) { @@ -3966,72 +3967,72 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE)))) ) { switch (alt57) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:561:9: boolean_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:582:9: boolean_key { - pushFollow(FOLLOW_boolean_key_in_primitiveType2826); + pushFollow(FOLLOW_boolean_key_in_primitiveType2829); boolean_key(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:562:7: char_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:583:7: char_key { - pushFollow(FOLLOW_char_key_in_primitiveType2834); + pushFollow(FOLLOW_char_key_in_primitiveType2837); char_key(); state._fsp--; if (state.failed) return; } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:563:7: byte_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:584:7: byte_key { - pushFollow(FOLLOW_byte_key_in_primitiveType2842); + pushFollow(FOLLOW_byte_key_in_primitiveType2845); byte_key(); state._fsp--; if (state.failed) return; } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:564:7: short_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:585:7: short_key { - pushFollow(FOLLOW_short_key_in_primitiveType2850); + pushFollow(FOLLOW_short_key_in_primitiveType2853); short_key(); state._fsp--; if (state.failed) return; } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:565:7: int_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:586:7: int_key { - pushFollow(FOLLOW_int_key_in_primitiveType2858); + pushFollow(FOLLOW_int_key_in_primitiveType2861); int_key(); state._fsp--; if (state.failed) return; } break; case 6 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:566:7: long_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:587:7: long_key { - pushFollow(FOLLOW_long_key_in_primitiveType2866); + pushFollow(FOLLOW_long_key_in_primitiveType2869); long_key(); state._fsp--; if (state.failed) return; } break; case 7 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:567:7: float_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:588:7: float_key { - pushFollow(FOLLOW_float_key_in_primitiveType2874); + pushFollow(FOLLOW_float_key_in_primitiveType2877); float_key(); state._fsp--; if (state.failed) return; } break; case 8 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:568:7: double_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:589:7: double_key { - pushFollow(FOLLOW_double_key_in_primitiveType2882); + pushFollow(FOLLOW_double_key_in_primitiveType2885); double_key(); state._fsp--; if (state.failed) return; @@ -4054,10 +4055,10 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE)))) ) { // $ANTLR start "xpathSeparator" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:571:1: xpathSeparator : ( DIV | QUESTION_DIV ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:1: xpathSeparator : ( DIV | QUESTION_DIV ); public final void xpathSeparator() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:572:5: ( DIV | QUESTION_DIV ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:593:5: ( DIV | QUESTION_DIV ) // src/main/resources/org/drools/drl/parser/DRL6Expressions.g: { if ( input.LA(1)==DIV||input.LA(1)==QUESTION_DIV ) { @@ -4087,20 +4088,20 @@ public final void xpathSeparator() throws RecognitionException { // $ANTLR start "xpathPrimary" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:576:1: xpathPrimary returns [BaseDescr result] : xpathChunk ({...}? xpathChunk )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:597:1: xpathPrimary returns [BaseDescr result] : xpathChunk ({...}? xpathChunk )* ; public final BaseDescr xpathPrimary() throws RecognitionException { BaseDescr result = null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:577:5: ( xpathChunk ({...}? xpathChunk )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:577:7: xpathChunk ({...}? xpathChunk )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:598:5: ( xpathChunk ({...}? xpathChunk )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:598:7: xpathChunk ({...}? xpathChunk )* { - pushFollow(FOLLOW_xpathChunk_in_xpathPrimary2930); + pushFollow(FOLLOW_xpathChunk_in_xpathPrimary2933); xpathChunk(); state._fsp--; if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:577:18: ({...}? xpathChunk )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:598:18: ({...}? xpathChunk )* loop58: while (true) { int alt58=2; @@ -4122,13 +4123,13 @@ else if ( (LA58_0==QUESTION_DIV) ) { switch (alt58) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:577:19: {...}? xpathChunk + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:598:19: {...}? xpathChunk { if ( !((notStartWithNewline())) ) { if (state.backtracking>0) {state.failed=true; return result;} throw new FailedPredicateException(input, "xpathPrimary", "notStartWithNewline()"); } - pushFollow(FOLLOW_xpathChunk_in_xpathPrimary2935); + pushFollow(FOLLOW_xpathChunk_in_xpathPrimary2938); xpathChunk(); state._fsp--; if (state.failed) return result; @@ -4158,21 +4159,21 @@ else if ( (LA58_0==QUESTION_DIV) ) { // $ANTLR start "xpathChunk" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:580:1: xpathChunk returns [BaseDescr result] : ( xpathSeparator ID )=> xpathSeparator ID ( DOT ID )* ( HASH ID )? ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:601:1: xpathChunk returns [BaseDescr result] : ( xpathSeparator ID )=> xpathSeparator ID ( DOT ID )* ( HASH ID )? ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? ; public final BaseDescr xpathChunk() throws RecognitionException { BaseDescr result = null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:5: ( ( xpathSeparator ID )=> xpathSeparator ID ( DOT ID )* ( HASH ID )? ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:7: ( xpathSeparator ID )=> xpathSeparator ID ( DOT ID )* ( HASH ID )? ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:5: ( ( xpathSeparator ID )=> xpathSeparator ID ( DOT ID )* ( HASH ID )? ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:7: ( xpathSeparator ID )=> xpathSeparator ID ( DOT ID )* ( HASH ID )? ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? { - pushFollow(FOLLOW_xpathSeparator_in_xpathChunk2965); + pushFollow(FOLLOW_xpathSeparator_in_xpathChunk2968); xpathSeparator(); state._fsp--; if (state.failed) return result; - match(input,ID,FOLLOW_ID_in_xpathChunk2967); if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:47: ( DOT ID )* + match(input,ID,FOLLOW_ID_in_xpathChunk2970); if (state.failed) return result; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:47: ( DOT ID )* loop59: while (true) { int alt59=2; @@ -4187,10 +4188,10 @@ public final BaseDescr xpathChunk() throws RecognitionException { switch (alt59) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:48: DOT ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:48: DOT ID { - match(input,DOT,FOLLOW_DOT_in_xpathChunk2970); if (state.failed) return result; - match(input,ID,FOLLOW_ID_in_xpathChunk2972); if (state.failed) return result; + match(input,DOT,FOLLOW_DOT_in_xpathChunk2973); if (state.failed) return result; + match(input,ID,FOLLOW_ID_in_xpathChunk2975); if (state.failed) return result; } break; @@ -4199,7 +4200,7 @@ public final BaseDescr xpathChunk() throws RecognitionException { } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:57: ( HASH ID )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:57: ( HASH ID )? int alt60=2; int LA60_0 = input.LA(1); if ( (LA60_0==HASH) ) { @@ -4207,16 +4208,16 @@ public final BaseDescr xpathChunk() throws RecognitionException { } switch (alt60) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:58: HASH ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:58: HASH ID { - match(input,HASH,FOLLOW_HASH_in_xpathChunk2977); if (state.failed) return result; - match(input,ID,FOLLOW_ID_in_xpathChunk2979); if (state.failed) return result; + match(input,HASH,FOLLOW_HASH_in_xpathChunk2980); if (state.failed) return result; + match(input,ID,FOLLOW_ID_in_xpathChunk2982); if (state.failed) return result; } break; } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:68: ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:68: ( LEFT_SQUARE xpathExpressionList RIGHT_SQUARE )? int alt61=2; int LA61_0 = input.LA(1); if ( (LA61_0==LEFT_SQUARE) ) { @@ -4224,14 +4225,14 @@ public final BaseDescr xpathChunk() throws RecognitionException { } switch (alt61) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:581:69: LEFT_SQUARE xpathExpressionList RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:69: LEFT_SQUARE xpathExpressionList RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_xpathChunk2984); if (state.failed) return result; - pushFollow(FOLLOW_xpathExpressionList_in_xpathChunk2986); + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_xpathChunk2987); if (state.failed) return result; + pushFollow(FOLLOW_xpathExpressionList_in_xpathChunk2989); xpathExpressionList(); state._fsp--; if (state.failed) return result; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_xpathChunk2988); if (state.failed) return result; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_xpathChunk2991); if (state.failed) return result; } break; @@ -4255,7 +4256,7 @@ public final BaseDescr xpathChunk() throws RecognitionException { // $ANTLR start "xpathExpressionList" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:584:1: xpathExpressionList returns [java.util.List exprs] : f= expression ( COMMA s= expression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:605:1: xpathExpressionList returns [java.util.List exprs] : f= expression ( COMMA s= expression )* ; public final java.util.List xpathExpressionList() throws RecognitionException { java.util.List exprs = null; @@ -4265,15 +4266,15 @@ public final java.util.List xpathExpressionList() throws RecognitionExce exprs = new java.util.ArrayList(); try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:586:3: (f= expression ( COMMA s= expression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:586:7: f= expression ( COMMA s= expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:607:3: (f= expression ( COMMA s= expression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:607:7: f= expression ( COMMA s= expression )* { - pushFollow(FOLLOW_expression_in_xpathExpressionList3018); + pushFollow(FOLLOW_expression_in_xpathExpressionList3021); f=expression(); state._fsp--; if (state.failed) return exprs; if ( state.backtracking==0 ) { exprs.add( (f!=null?input.toString(f.start,f.stop):null) ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:587:7: ( COMMA s= expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:608:7: ( COMMA s= expression )* loop62: while (true) { int alt62=2; @@ -4284,10 +4285,10 @@ public final java.util.List xpathExpressionList() throws RecognitionExce switch (alt62) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:587:8: COMMA s= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:608:8: COMMA s= expression { - match(input,COMMA,FOLLOW_COMMA_in_xpathExpressionList3029); if (state.failed) return exprs; - pushFollow(FOLLOW_expression_in_xpathExpressionList3033); + match(input,COMMA,FOLLOW_COMMA_in_xpathExpressionList3032); if (state.failed) return exprs; + pushFollow(FOLLOW_expression_in_xpathExpressionList3036); s=expression(); state._fsp--; if (state.failed) return exprs; @@ -4318,7 +4319,7 @@ public final java.util.List xpathExpressionList() throws RecognitionExce // $ANTLR start "primary" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:590:1: primary returns [BaseDescr result] : ( ( LEFT_PAREN )=>expr= parExpression | ( nonWildcardTypeArguments )=> nonWildcardTypeArguments ( explicitGenericInvocationSuffix | this_key arguments ) | ( literal )=> literal | ( super_key )=> super_key superSuffix | ( new_key )=> new_key creator | ( primitiveType )=> primitiveType ( LEFT_SQUARE RIGHT_SQUARE )* DOT class_key | ( inlineMapExpression )=> inlineMapExpression | ( inlineListExpression )=> inlineListExpression | ( ID )=>i1= ID ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* ( ( identifierSuffix )=> identifierSuffix )? ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:611:1: primary returns [BaseDescr result] : ( ( LEFT_PAREN )=>expr= parExpression | ( nonWildcardTypeArguments )=> nonWildcardTypeArguments ( explicitGenericInvocationSuffix | this_key arguments ) | ( literal )=> literal | ( super_key )=> super_key superSuffix | ( new_key )=> new_key creator | ( primitiveType )=> primitiveType ( LEFT_SQUARE RIGHT_SQUARE )* DOT class_key | ( inlineMapExpression )=> inlineMapExpression | ( inlineListExpression )=> inlineListExpression | ( ID )=>i1= ID ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* ( ( identifierSuffix )=> identifierSuffix )? ); public final BaseDescr primary() throws RecognitionException { BaseDescr result = null; @@ -4335,7 +4336,7 @@ public final BaseDescr primary() throws RecognitionException { ParserRuleReturnScope literal11 =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:591:5: ( ( LEFT_PAREN )=>expr= parExpression | ( nonWildcardTypeArguments )=> nonWildcardTypeArguments ( explicitGenericInvocationSuffix | this_key arguments ) | ( literal )=> literal | ( super_key )=> super_key superSuffix | ( new_key )=> new_key creator | ( primitiveType )=> primitiveType ( LEFT_SQUARE RIGHT_SQUARE )* DOT class_key | ( inlineMapExpression )=> inlineMapExpression | ( inlineListExpression )=> inlineListExpression | ( ID )=>i1= ID ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* ( ( identifierSuffix )=> identifierSuffix )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:5: ( ( LEFT_PAREN )=>expr= parExpression | ( nonWildcardTypeArguments )=> nonWildcardTypeArguments ( explicitGenericInvocationSuffix | this_key arguments ) | ( literal )=> literal | ( super_key )=> super_key superSuffix | ( new_key )=> new_key creator | ( primitiveType )=> primitiveType ( LEFT_SQUARE RIGHT_SQUARE )* DOT class_key | ( inlineMapExpression )=> inlineMapExpression | ( inlineListExpression )=> inlineListExpression | ( ID )=>i1= ID ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* ( ( identifierSuffix )=> identifierSuffix )? ) int alt68=9; int LA68_0 = input.LA(1); if ( (LA68_0==LEFT_PAREN) && (synpred24_DRL6Expressions())) { @@ -4430,9 +4431,9 @@ else if ( (synpred31_DRL6Expressions()) ) { switch (alt68) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:591:7: ( LEFT_PAREN )=>expr= parExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:7: ( LEFT_PAREN )=>expr= parExpression { - pushFollow(FOLLOW_parExpression_in_primary3063); + pushFollow(FOLLOW_parExpression_in_primary3066); expr=parExpression(); state._fsp--; if (state.failed) return result; @@ -4440,13 +4441,13 @@ else if ( (synpred31_DRL6Expressions()) ) { } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:9: ( nonWildcardTypeArguments )=> nonWildcardTypeArguments ( explicitGenericInvocationSuffix | this_key arguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:9: ( nonWildcardTypeArguments )=> nonWildcardTypeArguments ( explicitGenericInvocationSuffix | this_key arguments ) { - pushFollow(FOLLOW_nonWildcardTypeArguments_in_primary3080); + pushFollow(FOLLOW_nonWildcardTypeArguments_in_primary3083); nonWildcardTypeArguments(); state._fsp--; if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:63: ( explicitGenericInvocationSuffix | this_key arguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:63: ( explicitGenericInvocationSuffix | this_key arguments ) int alt63=2; int LA63_0 = input.LA(1); if ( (LA63_0==ID) ) { @@ -4482,22 +4483,22 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.THIS)))) ) { switch (alt63) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:64: explicitGenericInvocationSuffix + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:64: explicitGenericInvocationSuffix { - pushFollow(FOLLOW_explicitGenericInvocationSuffix_in_primary3083); + pushFollow(FOLLOW_explicitGenericInvocationSuffix_in_primary3086); explicitGenericInvocationSuffix(); state._fsp--; if (state.failed) return result; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:98: this_key arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:98: this_key arguments { - pushFollow(FOLLOW_this_key_in_primary3087); + pushFollow(FOLLOW_this_key_in_primary3090); this_key(); state._fsp--; if (state.failed) return result; - pushFollow(FOLLOW_arguments_in_primary3089); + pushFollow(FOLLOW_arguments_in_primary3092); arguments(); state._fsp--; if (state.failed) return result; @@ -4509,9 +4510,9 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.THIS)))) ) { } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:593:9: ( literal )=> literal + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:614:9: ( literal )=> literal { - pushFollow(FOLLOW_literal_in_primary3105); + pushFollow(FOLLOW_literal_in_primary3108); literal11=literal(); state._fsp--; if (state.failed) return result; @@ -4519,39 +4520,39 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.THIS)))) ) { } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:595:9: ( super_key )=> super_key superSuffix + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:616:9: ( super_key )=> super_key superSuffix { - pushFollow(FOLLOW_super_key_in_primary3127); + pushFollow(FOLLOW_super_key_in_primary3130); super_key(); state._fsp--; if (state.failed) return result; - pushFollow(FOLLOW_superSuffix_in_primary3129); + pushFollow(FOLLOW_superSuffix_in_primary3132); superSuffix(); state._fsp--; if (state.failed) return result; } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:596:9: ( new_key )=> new_key creator + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:9: ( new_key )=> new_key creator { - pushFollow(FOLLOW_new_key_in_primary3144); + pushFollow(FOLLOW_new_key_in_primary3147); new_key(); state._fsp--; if (state.failed) return result; - pushFollow(FOLLOW_creator_in_primary3146); + pushFollow(FOLLOW_creator_in_primary3149); creator(); state._fsp--; if (state.failed) return result; } break; case 6 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:597:9: ( primitiveType )=> primitiveType ( LEFT_SQUARE RIGHT_SQUARE )* DOT class_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:618:9: ( primitiveType )=> primitiveType ( LEFT_SQUARE RIGHT_SQUARE )* DOT class_key { - pushFollow(FOLLOW_primitiveType_in_primary3161); + pushFollow(FOLLOW_primitiveType_in_primary3164); primitiveType(); state._fsp--; if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:597:41: ( LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:618:41: ( LEFT_SQUARE RIGHT_SQUARE )* loop64: while (true) { int alt64=2; @@ -4562,10 +4563,10 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.THIS)))) ) { switch (alt64) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:597:42: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:618:42: LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_primary3164); if (state.failed) return result; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_primary3166); if (state.failed) return result; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_primary3167); if (state.failed) return result; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_primary3169); if (state.failed) return result; } break; @@ -4574,37 +4575,37 @@ else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.THIS)))) ) { } } - match(input,DOT,FOLLOW_DOT_in_primary3170); if (state.failed) return result; - pushFollow(FOLLOW_class_key_in_primary3172); + match(input,DOT,FOLLOW_DOT_in_primary3173); if (state.failed) return result; + pushFollow(FOLLOW_class_key_in_primary3175); class_key(); state._fsp--; if (state.failed) return result; } break; case 7 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:599:9: ( inlineMapExpression )=> inlineMapExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:620:9: ( inlineMapExpression )=> inlineMapExpression { - pushFollow(FOLLOW_inlineMapExpression_in_primary3192); + pushFollow(FOLLOW_inlineMapExpression_in_primary3195); inlineMapExpression(); state._fsp--; if (state.failed) return result; } break; case 8 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:600:9: ( inlineListExpression )=> inlineListExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:621:9: ( inlineListExpression )=> inlineListExpression { - pushFollow(FOLLOW_inlineListExpression_in_primary3207); + pushFollow(FOLLOW_inlineListExpression_in_primary3210); inlineListExpression(); state._fsp--; if (state.failed) return result; } break; case 9 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:601:9: ( ID )=>i1= ID ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* ( ( identifierSuffix )=> identifierSuffix )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:622:9: ( ID )=>i1= ID ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* ( ( identifierSuffix )=> identifierSuffix )? { - i1=(Token)match(input,ID,FOLLOW_ID_in_primary3223); if (state.failed) return result; + i1=(Token)match(input,ID,FOLLOW_ID_in_primary3226); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(i1, DroolsEditorType.IDENTIFIER); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:602:9: ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:623:9: ( ( ( DOT ID )=>d= DOT i2= ID ) | ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) | ( ( HASH ID )=>h= HASH i2= ID ) | ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) )* loop66: while (true) { int alt66=5; @@ -4643,23 +4644,23 @@ else if ( (LA66_0==HASH) && (synpred35_DRL6Expressions())) { switch (alt66) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:603:13: ( ( DOT ID )=>d= DOT i2= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:624:13: ( ( DOT ID )=>d= DOT i2= ID ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:603:13: ( ( DOT ID )=>d= DOT i2= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:603:15: ( DOT ID )=>d= DOT i2= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:624:13: ( ( DOT ID )=>d= DOT i2= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:624:15: ( DOT ID )=>d= DOT i2= ID { - d=(Token)match(input,DOT,FOLLOW_DOT_in_primary3259); if (state.failed) return result; - i2=(Token)match(input,ID,FOLLOW_ID_in_primary3263); if (state.failed) return result; + d=(Token)match(input,DOT,FOLLOW_DOT_in_primary3262); if (state.failed) return result; + i2=(Token)match(input,ID,FOLLOW_ID_in_primary3266); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(d, DroolsEditorType.SYMBOL); helper.emit(i2, DroolsEditorType.IDENTIFIER); } } } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:605:13: ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:626:13: ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:605:13: ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:605:15: ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:626:13: ( ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:626:15: ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN )=>d= ( DOT | NULL_SAFE_DOT ) LEFT_PAREN expression ( COMMA expression )* RIGHT_PAREN { d=input.LT(1); if ( input.LA(1)==DOT||input.LA(1)==NULL_SAFE_DOT ) { @@ -4672,13 +4673,13 @@ else if ( (LA66_0==HASH) && (synpred35_DRL6Expressions())) { MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } - LEFT_PAREN12=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_primary3315); if (state.failed) return result; + LEFT_PAREN12=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_primary3318); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(d, DroolsEditorType.SYMBOL); helper.emit(LEFT_PAREN12, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_expression_in_primary3355); + pushFollow(FOLLOW_expression_in_primary3358); expression(); state._fsp--; if (state.failed) return result; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:606:48: ( COMMA expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:627:48: ( COMMA expression )* loop65: while (true) { int alt65=2; @@ -4689,11 +4690,11 @@ else if ( (LA66_0==HASH) && (synpred35_DRL6Expressions())) { switch (alt65) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:606:49: COMMA expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:627:49: COMMA expression { - COMMA13=(Token)match(input,COMMA,FOLLOW_COMMA_in_primary3358); if (state.failed) return result; + COMMA13=(Token)match(input,COMMA,FOLLOW_COMMA_in_primary3361); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(COMMA13, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_expression_in_primary3362); + pushFollow(FOLLOW_expression_in_primary3365); expression(); state._fsp--; if (state.failed) return result; @@ -4705,33 +4706,33 @@ else if ( (LA66_0==HASH) && (synpred35_DRL6Expressions())) { } } - RIGHT_PAREN14=(Token)match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_primary3402); if (state.failed) return result; + RIGHT_PAREN14=(Token)match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_primary3405); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(RIGHT_PAREN14, DroolsEditorType.SYMBOL); } } } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:610:13: ( ( HASH ID )=>h= HASH i2= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:13: ( ( HASH ID )=>h= HASH i2= ID ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:610:13: ( ( HASH ID )=>h= HASH i2= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:610:15: ( HASH ID )=>h= HASH i2= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:13: ( ( HASH ID )=>h= HASH i2= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:15: ( HASH ID )=>h= HASH i2= ID { - h=(Token)match(input,HASH,FOLLOW_HASH_in_primary3456); if (state.failed) return result; - i2=(Token)match(input,ID,FOLLOW_ID_in_primary3460); if (state.failed) return result; + h=(Token)match(input,HASH,FOLLOW_HASH_in_primary3459); if (state.failed) return result; + i2=(Token)match(input,ID,FOLLOW_ID_in_primary3463); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(h, DroolsEditorType.SYMBOL); helper.emit(i2, DroolsEditorType.IDENTIFIER); } } } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:13: ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:633:13: ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:13: ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:15: ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:633:13: ( ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:633:15: ( NULL_SAFE_DOT ID )=>n= NULL_SAFE_DOT i2= ID { - n=(Token)match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_primary3502); if (state.failed) return result; - i2=(Token)match(input,ID,FOLLOW_ID_in_primary3506); if (state.failed) return result; + n=(Token)match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_primary3505); if (state.failed) return result; + i2=(Token)match(input,ID,FOLLOW_ID_in_primary3509); if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit(n, DroolsEditorType.SYMBOL); helper.emit(i2, DroolsEditorType.IDENTIFIER); } } @@ -4743,7 +4744,7 @@ else if ( (LA66_0==HASH) && (synpred35_DRL6Expressions())) { } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:12: ( ( identifierSuffix )=> identifierSuffix )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:634:12: ( ( identifierSuffix )=> identifierSuffix )? int alt67=2; int LA67_0 = input.LA(1); if ( (LA67_0==LEFT_SQUARE) ) { @@ -4760,9 +4761,9 @@ else if ( (LA67_0==LEFT_PAREN) ) { } switch (alt67) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:13: ( identifierSuffix )=> identifierSuffix + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:634:13: ( identifierSuffix )=> identifierSuffix { - pushFollow(FOLLOW_identifierSuffix_in_primary3528); + pushFollow(FOLLOW_identifierSuffix_in_primary3531); identifierSuffix(); state._fsp--; if (state.failed) return result; @@ -4791,14 +4792,14 @@ else if ( (LA67_0==LEFT_PAREN) ) { // $ANTLR start "inlineListExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:616:1: inlineListExpression : LEFT_SQUARE ( expressionList )? RIGHT_SQUARE ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:637:1: inlineListExpression : LEFT_SQUARE ( expressionList )? RIGHT_SQUARE ; public final void inlineListExpression() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:5: ( LEFT_SQUARE ( expressionList )? RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:9: LEFT_SQUARE ( expressionList )? RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:638:5: ( LEFT_SQUARE ( expressionList )? RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:638:9: LEFT_SQUARE ( expressionList )? RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_inlineListExpression3549); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:21: ( expressionList )? + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_inlineListExpression3552); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:638:21: ( expressionList )? int alt69=2; int LA69_0 = input.LA(1); if ( (LA69_0==BOOL||(LA69_0 >= DECIMAL && LA69_0 <= DIV)||LA69_0==DOT||LA69_0==FLOAT||LA69_0==HEX||(LA69_0 >= ID && LA69_0 <= INCR)||(LA69_0 >= LEFT_PAREN && LA69_0 <= LESS)||LA69_0==MINUS||LA69_0==NEGATION||LA69_0==NULL||LA69_0==PLUS||LA69_0==QUESTION_DIV||(LA69_0 >= STAR && LA69_0 <= TIME_INTERVAL)) ) { @@ -4806,9 +4807,9 @@ public final void inlineListExpression() throws RecognitionException { } switch (alt69) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:21: expressionList + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:638:21: expressionList { - pushFollow(FOLLOW_expressionList_in_inlineListExpression3551); + pushFollow(FOLLOW_expressionList_in_inlineListExpression3554); expressionList(); state._fsp--; if (state.failed) return; @@ -4817,7 +4818,7 @@ public final void inlineListExpression() throws RecognitionException { } - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_inlineListExpression3554); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_inlineListExpression3557); if (state.failed) return; } } @@ -4835,19 +4836,19 @@ public final void inlineListExpression() throws RecognitionException { // $ANTLR start "inlineMapExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:620:1: inlineMapExpression : LEFT_SQUARE mapExpressionList RIGHT_SQUARE ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:641:1: inlineMapExpression : LEFT_SQUARE mapExpressionList RIGHT_SQUARE ; public final void inlineMapExpression() throws RecognitionException { inMap++; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:622:5: ( LEFT_SQUARE mapExpressionList RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:622:7: LEFT_SQUARE mapExpressionList RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:643:5: ( LEFT_SQUARE mapExpressionList RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:643:7: LEFT_SQUARE mapExpressionList RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_inlineMapExpression3575); if (state.failed) return; - pushFollow(FOLLOW_mapExpressionList_in_inlineMapExpression3577); + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_inlineMapExpression3578); if (state.failed) return; + pushFollow(FOLLOW_mapExpressionList_in_inlineMapExpression3580); mapExpressionList(); state._fsp--; if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_inlineMapExpression3579); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_inlineMapExpression3582); if (state.failed) return; } } @@ -4866,17 +4867,17 @@ public final void inlineMapExpression() throws RecognitionException { // $ANTLR start "mapExpressionList" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:626:1: mapExpressionList : mapEntry ( COMMA mapEntry )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:647:1: mapExpressionList : mapEntry ( COMMA mapEntry )* ; public final void mapExpressionList() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:627:5: ( mapEntry ( COMMA mapEntry )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:627:7: mapEntry ( COMMA mapEntry )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:648:5: ( mapEntry ( COMMA mapEntry )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:648:7: mapEntry ( COMMA mapEntry )* { - pushFollow(FOLLOW_mapEntry_in_mapExpressionList3600); + pushFollow(FOLLOW_mapEntry_in_mapExpressionList3603); mapEntry(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:627:16: ( COMMA mapEntry )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:648:16: ( COMMA mapEntry )* loop70: while (true) { int alt70=2; @@ -4887,10 +4888,10 @@ public final void mapExpressionList() throws RecognitionException { switch (alt70) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:627:17: COMMA mapEntry + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:648:17: COMMA mapEntry { - match(input,COMMA,FOLLOW_COMMA_in_mapExpressionList3603); if (state.failed) return; - pushFollow(FOLLOW_mapEntry_in_mapExpressionList3605); + match(input,COMMA,FOLLOW_COMMA_in_mapExpressionList3606); if (state.failed) return; + pushFollow(FOLLOW_mapEntry_in_mapExpressionList3608); mapEntry(); state._fsp--; if (state.failed) return; @@ -4919,18 +4920,18 @@ public final void mapExpressionList() throws RecognitionException { // $ANTLR start "mapEntry" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:630:1: mapEntry : expression COLON expression ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:651:1: mapEntry : expression COLON expression ; public final void mapEntry() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:5: ( expression COLON expression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:7: expression COLON expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:652:5: ( expression COLON expression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:652:7: expression COLON expression { - pushFollow(FOLLOW_expression_in_mapEntry3624); + pushFollow(FOLLOW_expression_in_mapEntry3627); expression(); state._fsp--; if (state.failed) return; - match(input,COLON,FOLLOW_COLON_in_mapEntry3626); if (state.failed) return; - pushFollow(FOLLOW_expression_in_mapEntry3628); + match(input,COLON,FOLLOW_COLON_in_mapEntry3629); if (state.failed) return; + pushFollow(FOLLOW_expression_in_mapEntry3631); expression(); state._fsp--; if (state.failed) return; @@ -4951,7 +4952,7 @@ public final void mapEntry() throws RecognitionException { // $ANTLR start "parExpression" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:634:1: parExpression returns [BaseDescr result] : LEFT_PAREN expr= expression RIGHT_PAREN ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:655:1: parExpression returns [BaseDescr result] : LEFT_PAREN expr= expression RIGHT_PAREN ; public final BaseDescr parExpression() throws RecognitionException { BaseDescr result = null; @@ -4959,15 +4960,15 @@ public final BaseDescr parExpression() throws RecognitionException { ParserRuleReturnScope expr =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:635:5: ( LEFT_PAREN expr= expression RIGHT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:635:7: LEFT_PAREN expr= expression RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:656:5: ( LEFT_PAREN expr= expression RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:656:7: LEFT_PAREN expr= expression RIGHT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_parExpression3649); if (state.failed) return result; - pushFollow(FOLLOW_expression_in_parExpression3653); + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_parExpression3652); if (state.failed) return result; + pushFollow(FOLLOW_expression_in_parExpression3656); expr=expression(); state._fsp--; if (state.failed) return result; - match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_parExpression3655); if (state.failed) return result; + match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_parExpression3658); if (state.failed) return result; if ( state.backtracking==0 ) { if( buildDescr ) { result = (expr!=null?((DRL6Expressions.expression_return)expr).result:null); if( result instanceof AtomicExprDescr ) { @@ -4993,7 +4994,7 @@ public final BaseDescr parExpression() throws RecognitionException { // $ANTLR start "identifierSuffix" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:645:1: identifierSuffix : ( ( LEFT_SQUARE RIGHT_SQUARE )=> ( LEFT_SQUARE RIGHT_SQUARE )+ DOT class_key | ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ | arguments ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:666:1: identifierSuffix : ( ( LEFT_SQUARE RIGHT_SQUARE )=> ( LEFT_SQUARE RIGHT_SQUARE )+ DOT class_key | ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ | arguments ); public final void identifierSuffix() throws RecognitionException { Token LEFT_SQUARE15=null; Token RIGHT_SQUARE16=null; @@ -5002,7 +5003,7 @@ public final void identifierSuffix() throws RecognitionException { Token RIGHT_SQUARE19=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:646:5: ( ( LEFT_SQUARE RIGHT_SQUARE )=> ( LEFT_SQUARE RIGHT_SQUARE )+ DOT class_key | ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ | arguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:5: ( ( LEFT_SQUARE RIGHT_SQUARE )=> ( LEFT_SQUARE RIGHT_SQUARE )+ DOT class_key | ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ | arguments ) int alt73=3; int LA73_0 = input.LA(1); if ( (LA73_0==LEFT_SQUARE) ) { @@ -5041,9 +5042,9 @@ else if ( (LA73_0==LEFT_PAREN) ) { switch (alt73) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:646:7: ( LEFT_SQUARE RIGHT_SQUARE )=> ( LEFT_SQUARE RIGHT_SQUARE )+ DOT class_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:7: ( LEFT_SQUARE RIGHT_SQUARE )=> ( LEFT_SQUARE RIGHT_SQUARE )+ DOT class_key { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:646:35: ( LEFT_SQUARE RIGHT_SQUARE )+ + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:35: ( LEFT_SQUARE RIGHT_SQUARE )+ int cnt71=0; loop71: while (true) { @@ -5055,11 +5056,11 @@ else if ( (LA73_0==LEFT_PAREN) ) { switch (alt71) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:646:36: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:36: LEFT_SQUARE RIGHT_SQUARE { - LEFT_SQUARE15=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_identifierSuffix3689); if (state.failed) return; + LEFT_SQUARE15=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_identifierSuffix3692); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(LEFT_SQUARE15, DroolsEditorType.SYMBOL); } - RIGHT_SQUARE16=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_identifierSuffix3730); if (state.failed) return; + RIGHT_SQUARE16=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_identifierSuffix3733); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(RIGHT_SQUARE16, DroolsEditorType.SYMBOL); } } break; @@ -5073,18 +5074,18 @@ else if ( (LA73_0==LEFT_PAREN) ) { cnt71++; } - DOT17=(Token)match(input,DOT,FOLLOW_DOT_in_identifierSuffix3774); if (state.failed) return; + DOT17=(Token)match(input,DOT,FOLLOW_DOT_in_identifierSuffix3777); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(DOT17, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_class_key_in_identifierSuffix3778); + pushFollow(FOLLOW_class_key_in_identifierSuffix3781); class_key(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:649:7: ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:670:7: ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:649:7: ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:670:7: ( ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE )+ int cnt72=0; loop72: while (true) { @@ -5100,15 +5101,15 @@ else if ( (LA73_0==LEFT_PAREN) ) { switch (alt72) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:649:8: ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:670:8: ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE { - LEFT_SQUARE18=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_identifierSuffix3793); if (state.failed) return; + LEFT_SQUARE18=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_identifierSuffix3796); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(LEFT_SQUARE18, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_expression_in_identifierSuffix3823); + pushFollow(FOLLOW_expression_in_identifierSuffix3826); expression(); state._fsp--; if (state.failed) return; - RIGHT_SQUARE19=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_identifierSuffix3851); if (state.failed) return; + RIGHT_SQUARE19=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_identifierSuffix3854); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(RIGHT_SQUARE19, DroolsEditorType.SYMBOL); } } break; @@ -5125,9 +5126,9 @@ else if ( (LA73_0==LEFT_PAREN) ) { } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:652:9: arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:673:9: arguments { - pushFollow(FOLLOW_arguments_in_identifierSuffix3867); + pushFollow(FOLLOW_arguments_in_identifierSuffix3870); arguments(); state._fsp--; if (state.failed) return; @@ -5150,13 +5151,13 @@ else if ( (LA73_0==LEFT_PAREN) ) { // $ANTLR start "creator" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:660:1: creator : ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:681:1: creator : ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) ; public final void creator() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:661:5: ( ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:661:7: ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:682:5: ( ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:682:7: ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:661:7: ( nonWildcardTypeArguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:682:7: ( nonWildcardTypeArguments )? int alt74=2; int LA74_0 = input.LA(1); if ( (LA74_0==LESS) ) { @@ -5164,9 +5165,9 @@ public final void creator() throws RecognitionException { } switch (alt74) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:661:7: nonWildcardTypeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:682:7: nonWildcardTypeArguments { - pushFollow(FOLLOW_nonWildcardTypeArguments_in_creator3889); + pushFollow(FOLLOW_nonWildcardTypeArguments_in_creator3892); nonWildcardTypeArguments(); state._fsp--; if (state.failed) return; @@ -5175,11 +5176,11 @@ public final void creator() throws RecognitionException { } - pushFollow(FOLLOW_createdName_in_creator3892); + pushFollow(FOLLOW_createdName_in_creator3895); createdName(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:662:9: ( arrayCreatorRest | classCreatorRest ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:683:9: ( arrayCreatorRest | classCreatorRest ) int alt75=2; int LA75_0 = input.LA(1); if ( (LA75_0==LEFT_SQUARE) ) { @@ -5198,18 +5199,18 @@ else if ( (LA75_0==LEFT_PAREN) ) { switch (alt75) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:662:10: arrayCreatorRest + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:683:10: arrayCreatorRest { - pushFollow(FOLLOW_arrayCreatorRest_in_creator3903); + pushFollow(FOLLOW_arrayCreatorRest_in_creator3906); arrayCreatorRest(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:662:29: classCreatorRest + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:683:29: classCreatorRest { - pushFollow(FOLLOW_classCreatorRest_in_creator3907); + pushFollow(FOLLOW_classCreatorRest_in_creator3910); classCreatorRest(); state._fsp--; if (state.failed) return; @@ -5235,10 +5236,10 @@ else if ( (LA75_0==LEFT_PAREN) ) { // $ANTLR start "createdName" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:665:1: createdName : ( ID ( typeArguments )? ( DOT ID ( typeArguments )? )* | primitiveType ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:686:1: createdName : ( ID ( typeArguments )? ( DOT ID ( typeArguments )? )* | primitiveType ); public final void createdName() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:666:5: ( ID ( typeArguments )? ( DOT ID ( typeArguments )? )* | primitiveType ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:687:5: ( ID ( typeArguments )? ( DOT ID ( typeArguments )? )* | primitiveType ) int alt79=2; int LA79_0 = input.LA(1); if ( (LA79_0==ID) ) { @@ -5274,10 +5275,10 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper switch (alt79) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:666:7: ID ( typeArguments )? ( DOT ID ( typeArguments )? )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:687:7: ID ( typeArguments )? ( DOT ID ( typeArguments )? )* { - match(input,ID,FOLLOW_ID_in_createdName3925); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:666:10: ( typeArguments )? + match(input,ID,FOLLOW_ID_in_createdName3928); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:687:10: ( typeArguments )? int alt76=2; int LA76_0 = input.LA(1); if ( (LA76_0==LESS) ) { @@ -5285,9 +5286,9 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper } switch (alt76) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:666:10: typeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:687:10: typeArguments { - pushFollow(FOLLOW_typeArguments_in_createdName3927); + pushFollow(FOLLOW_typeArguments_in_createdName3930); typeArguments(); state._fsp--; if (state.failed) return; @@ -5296,7 +5297,7 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:9: ( DOT ID ( typeArguments )? )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:9: ( DOT ID ( typeArguments )? )* loop78: while (true) { int alt78=2; @@ -5307,11 +5308,11 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper switch (alt78) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:11: DOT ID ( typeArguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:11: DOT ID ( typeArguments )? { - match(input,DOT,FOLLOW_DOT_in_createdName3940); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_createdName3942); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:18: ( typeArguments )? + match(input,DOT,FOLLOW_DOT_in_createdName3943); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_createdName3945); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:18: ( typeArguments )? int alt77=2; int LA77_0 = input.LA(1); if ( (LA77_0==LESS) ) { @@ -5319,9 +5320,9 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper } switch (alt77) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:18: typeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:18: typeArguments { - pushFollow(FOLLOW_typeArguments_in_createdName3944); + pushFollow(FOLLOW_typeArguments_in_createdName3947); typeArguments(); state._fsp--; if (state.failed) return; @@ -5341,9 +5342,9 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:668:11: primitiveType + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:689:11: primitiveType { - pushFollow(FOLLOW_primitiveType_in_createdName3959); + pushFollow(FOLLOW_primitiveType_in_createdName3962); primitiveType(); state._fsp--; if (state.failed) return; @@ -5366,18 +5367,18 @@ else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper // $ANTLR start "innerCreator" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:671:1: innerCreator :{...}? => ID classCreatorRest ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:692:1: innerCreator :{...}? => ID classCreatorRest ; public final void innerCreator() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:672:5: ({...}? => ID classCreatorRest ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:672:7: {...}? => ID classCreatorRest + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:693:5: ({...}? => ID classCreatorRest ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:693:7: {...}? => ID classCreatorRest { if ( !((!(helper.validateIdentifierKey(DroolsSoftKeywords.INSTANCEOF)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "innerCreator", "!(helper.validateIdentifierKey(DroolsSoftKeywords.INSTANCEOF))"); } - match(input,ID,FOLLOW_ID_in_innerCreator3979); if (state.failed) return; - pushFollow(FOLLOW_classCreatorRest_in_innerCreator3981); + match(input,ID,FOLLOW_ID_in_innerCreator3982); if (state.failed) return; + pushFollow(FOLLOW_classCreatorRest_in_innerCreator3984); classCreatorRest(); state._fsp--; if (state.failed) return; @@ -5398,14 +5399,14 @@ public final void innerCreator() throws RecognitionException { // $ANTLR start "arrayCreatorRest" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:675:1: arrayCreatorRest : LEFT_SQUARE ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:696:1: arrayCreatorRest : LEFT_SQUARE ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ; public final void arrayCreatorRest() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:676:5: ( LEFT_SQUARE ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:676:9: LEFT_SQUARE ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:697:5: ( LEFT_SQUARE ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:697:9: LEFT_SQUARE ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4000); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:677:5: ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4003); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:698:5: ( RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer | expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* ) int alt83=2; int LA83_0 = input.LA(1); if ( (LA83_0==RIGHT_SQUARE) ) { @@ -5424,10 +5425,10 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 switch (alt83) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:677:9: RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:698:9: RIGHT_SQUARE ( LEFT_SQUARE RIGHT_SQUARE )* arrayInitializer { - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4010); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:677:22: ( LEFT_SQUARE RIGHT_SQUARE )* + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4013); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:698:22: ( LEFT_SQUARE RIGHT_SQUARE )* loop80: while (true) { int alt80=2; @@ -5438,10 +5439,10 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 switch (alt80) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:677:23: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:698:23: LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4013); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4015); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4016); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4018); if (state.failed) return; } break; @@ -5450,21 +5451,21 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 } } - pushFollow(FOLLOW_arrayInitializer_in_arrayCreatorRest4019); + pushFollow(FOLLOW_arrayInitializer_in_arrayCreatorRest4022); arrayInitializer(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:13: expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:13: expression RIGHT_SQUARE ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* { - pushFollow(FOLLOW_expression_in_arrayCreatorRest4033); + pushFollow(FOLLOW_expression_in_arrayCreatorRest4036); expression(); state._fsp--; if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4035); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:37: ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4038); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:37: ({...}? => LEFT_SQUARE expression RIGHT_SQUARE )* loop81: while (true) { int alt81=2; @@ -5479,18 +5480,18 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 switch (alt81) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:38: {...}? => LEFT_SQUARE expression RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:38: {...}? => LEFT_SQUARE expression RIGHT_SQUARE { if ( !((!helper.validateLT(2,"]"))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "arrayCreatorRest", "!helper.validateLT(2,\"]\")"); } - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4040); if (state.failed) return; - pushFollow(FOLLOW_expression_in_arrayCreatorRest4042); + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4043); if (state.failed) return; + pushFollow(FOLLOW_expression_in_arrayCreatorRest4045); expression(); state._fsp--; if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4044); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4047); if (state.failed) return; } break; @@ -5499,7 +5500,7 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:106: ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:106: ( ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE )* loop82: while (true) { int alt82=2; @@ -5514,10 +5515,10 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 switch (alt82) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:107: ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:107: ( LEFT_SQUARE RIGHT_SQUARE )=> LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4056); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4058); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4059); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4061); if (state.failed) return; } break; @@ -5548,10 +5549,10 @@ else if ( (LA83_0==BOOL||(LA83_0 >= DECIMAL && LA83_0 <= DIV)||LA83_0==DOT||LA83 // $ANTLR start "variableInitializer" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:682:1: variableInitializer : ( arrayInitializer | expression ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:703:1: variableInitializer : ( arrayInitializer | expression ); public final void variableInitializer() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:683:5: ( arrayInitializer | expression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:704:5: ( arrayInitializer | expression ) int alt84=2; int LA84_0 = input.LA(1); if ( (LA84_0==LEFT_CURLY) ) { @@ -5570,18 +5571,18 @@ else if ( (LA84_0==BOOL||(LA84_0 >= DECIMAL && LA84_0 <= DIV)||LA84_0==DOT||LA84 switch (alt84) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:683:7: arrayInitializer + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:704:7: arrayInitializer { - pushFollow(FOLLOW_arrayInitializer_in_variableInitializer4087); + pushFollow(FOLLOW_arrayInitializer_in_variableInitializer4090); arrayInitializer(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:684:13: expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:705:13: expression { - pushFollow(FOLLOW_expression_in_variableInitializer4101); + pushFollow(FOLLOW_expression_in_variableInitializer4104); expression(); state._fsp--; if (state.failed) return; @@ -5604,14 +5605,14 @@ else if ( (LA84_0==BOOL||(LA84_0 >= DECIMAL && LA84_0 <= DIV)||LA84_0==DOT||LA84 // $ANTLR start "arrayInitializer" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:687:1: arrayInitializer : LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:708:1: arrayInitializer : LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY ; public final void arrayInitializer() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:5: ( LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:7: LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:5: ( LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:7: LEFT_CURLY ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? RIGHT_CURLY { - match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_arrayInitializer4118); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:18: ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? + match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_arrayInitializer4121); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:18: ( variableInitializer ( COMMA variableInitializer )* ( COMMA )? )? int alt87=2; int LA87_0 = input.LA(1); if ( (LA87_0==BOOL||(LA87_0 >= DECIMAL && LA87_0 <= DIV)||LA87_0==DOT||LA87_0==FLOAT||LA87_0==HEX||(LA87_0 >= ID && LA87_0 <= INCR)||(LA87_0 >= LEFT_CURLY && LA87_0 <= LESS)||LA87_0==MINUS||LA87_0==NEGATION||LA87_0==NULL||LA87_0==PLUS||LA87_0==QUESTION_DIV||(LA87_0 >= STAR && LA87_0 <= TIME_INTERVAL)) ) { @@ -5619,13 +5620,13 @@ public final void arrayInitializer() throws RecognitionException { } switch (alt87) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:19: variableInitializer ( COMMA variableInitializer )* ( COMMA )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:19: variableInitializer ( COMMA variableInitializer )* ( COMMA )? { - pushFollow(FOLLOW_variableInitializer_in_arrayInitializer4121); + pushFollow(FOLLOW_variableInitializer_in_arrayInitializer4124); variableInitializer(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:39: ( COMMA variableInitializer )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:39: ( COMMA variableInitializer )* loop85: while (true) { int alt85=2; @@ -5640,10 +5641,10 @@ public final void arrayInitializer() throws RecognitionException { switch (alt85) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:40: COMMA variableInitializer + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:40: COMMA variableInitializer { - match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer4124); if (state.failed) return; - pushFollow(FOLLOW_variableInitializer_in_arrayInitializer4126); + match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer4127); if (state.failed) return; + pushFollow(FOLLOW_variableInitializer_in_arrayInitializer4129); variableInitializer(); state._fsp--; if (state.failed) return; @@ -5655,7 +5656,7 @@ public final void arrayInitializer() throws RecognitionException { } } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:68: ( COMMA )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:68: ( COMMA )? int alt86=2; int LA86_0 = input.LA(1); if ( (LA86_0==COMMA) ) { @@ -5663,9 +5664,9 @@ public final void arrayInitializer() throws RecognitionException { } switch (alt86) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:688:69: COMMA + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:69: COMMA { - match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer4131); if (state.failed) return; + match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer4134); if (state.failed) return; } break; @@ -5676,7 +5677,7 @@ public final void arrayInitializer() throws RecognitionException { } - match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_arrayInitializer4138); if (state.failed) return; + match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_arrayInitializer4141); if (state.failed) return; } } @@ -5694,13 +5695,13 @@ public final void arrayInitializer() throws RecognitionException { // $ANTLR start "classCreatorRest" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:691:1: classCreatorRest : arguments ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:712:1: classCreatorRest : arguments ; public final void classCreatorRest() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:692:5: ( arguments ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:692:7: arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:713:5: ( arguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:713:7: arguments { - pushFollow(FOLLOW_arguments_in_classCreatorRest4155); + pushFollow(FOLLOW_arguments_in_classCreatorRest4158); arguments(); state._fsp--; if (state.failed) return; @@ -5721,17 +5722,17 @@ public final void classCreatorRest() throws RecognitionException { // $ANTLR start "explicitGenericInvocation" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:695:1: explicitGenericInvocation : nonWildcardTypeArguments arguments ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:716:1: explicitGenericInvocation : nonWildcardTypeArguments arguments ; public final void explicitGenericInvocation() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:696:5: ( nonWildcardTypeArguments arguments ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:696:7: nonWildcardTypeArguments arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:717:5: ( nonWildcardTypeArguments arguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:717:7: nonWildcardTypeArguments arguments { - pushFollow(FOLLOW_nonWildcardTypeArguments_in_explicitGenericInvocation4173); + pushFollow(FOLLOW_nonWildcardTypeArguments_in_explicitGenericInvocation4176); nonWildcardTypeArguments(); state._fsp--; if (state.failed) return; - pushFollow(FOLLOW_arguments_in_explicitGenericInvocation4175); + pushFollow(FOLLOW_arguments_in_explicitGenericInvocation4178); arguments(); state._fsp--; if (state.failed) return; @@ -5752,18 +5753,18 @@ public final void explicitGenericInvocation() throws RecognitionException { // $ANTLR start "nonWildcardTypeArguments" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:1: nonWildcardTypeArguments : LESS typeList GREATER ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:720:1: nonWildcardTypeArguments : LESS typeList GREATER ; public final void nonWildcardTypeArguments() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:700:5: ( LESS typeList GREATER ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:700:7: LESS typeList GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:721:5: ( LESS typeList GREATER ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:721:7: LESS typeList GREATER { - match(input,LESS,FOLLOW_LESS_in_nonWildcardTypeArguments4192); if (state.failed) return; - pushFollow(FOLLOW_typeList_in_nonWildcardTypeArguments4194); + match(input,LESS,FOLLOW_LESS_in_nonWildcardTypeArguments4195); if (state.failed) return; + pushFollow(FOLLOW_typeList_in_nonWildcardTypeArguments4197); typeList(); state._fsp--; if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_nonWildcardTypeArguments4196); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_nonWildcardTypeArguments4199); if (state.failed) return; } } @@ -5781,10 +5782,10 @@ public final void nonWildcardTypeArguments() throws RecognitionException { // $ANTLR start "explicitGenericInvocationSuffix" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:703:1: explicitGenericInvocationSuffix : ( super_key superSuffix | ID arguments ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:724:1: explicitGenericInvocationSuffix : ( super_key superSuffix | ID arguments ); public final void explicitGenericInvocationSuffix() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:704:5: ( super_key superSuffix | ID arguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:5: ( super_key superSuffix | ID arguments ) int alt88=2; int LA88_0 = input.LA(1); if ( (LA88_0==ID) ) { @@ -5807,23 +5808,23 @@ else if ( (true) ) { switch (alt88) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:704:7: super_key superSuffix + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:7: super_key superSuffix { - pushFollow(FOLLOW_super_key_in_explicitGenericInvocationSuffix4213); + pushFollow(FOLLOW_super_key_in_explicitGenericInvocationSuffix4216); super_key(); state._fsp--; if (state.failed) return; - pushFollow(FOLLOW_superSuffix_in_explicitGenericInvocationSuffix4215); + pushFollow(FOLLOW_superSuffix_in_explicitGenericInvocationSuffix4218); superSuffix(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:705:10: ID arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:726:10: ID arguments { - match(input,ID,FOLLOW_ID_in_explicitGenericInvocationSuffix4226); if (state.failed) return; - pushFollow(FOLLOW_arguments_in_explicitGenericInvocationSuffix4228); + match(input,ID,FOLLOW_ID_in_explicitGenericInvocationSuffix4229); if (state.failed) return; + pushFollow(FOLLOW_arguments_in_explicitGenericInvocationSuffix4231); arguments(); state._fsp--; if (state.failed) return; @@ -5846,7 +5847,7 @@ else if ( (true) ) { // $ANTLR start "selector" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:708:1: selector : ( ( DOT super_key )=> DOT super_key superSuffix | ( DOT new_key )=> DOT new_key ( nonWildcardTypeArguments )? innerCreator | ( DOT ID )=> DOT ID ( ( LEFT_PAREN )=> arguments )? | ( NULL_SAFE_DOT ID )=> NULL_SAFE_DOT ID ( ( LEFT_PAREN )=> arguments )? | ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:729:1: selector : ( ( DOT super_key )=> DOT super_key superSuffix | ( DOT new_key )=> DOT new_key ( nonWildcardTypeArguments )? innerCreator | ( DOT ID )=> DOT ID ( ( LEFT_PAREN )=> arguments )? | ( NULL_SAFE_DOT ID )=> NULL_SAFE_DOT ID ( ( LEFT_PAREN )=> arguments )? | ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE ); public final void selector() throws RecognitionException { Token DOT20=null; Token DOT21=null; @@ -5858,7 +5859,7 @@ public final void selector() throws RecognitionException { Token RIGHT_SQUARE27=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:5: ( ( DOT super_key )=> DOT super_key superSuffix | ( DOT new_key )=> DOT new_key ( nonWildcardTypeArguments )? innerCreator | ( DOT ID )=> DOT ID ( ( LEFT_PAREN )=> arguments )? | ( NULL_SAFE_DOT ID )=> NULL_SAFE_DOT ID ( ( LEFT_PAREN )=> arguments )? | ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:730:5: ( ( DOT super_key )=> DOT super_key superSuffix | ( DOT new_key )=> DOT new_key ( nonWildcardTypeArguments )? innerCreator | ( DOT ID )=> DOT ID ( ( LEFT_PAREN )=> arguments )? | ( NULL_SAFE_DOT ID )=> NULL_SAFE_DOT ID ( ( LEFT_PAREN )=> arguments )? | ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE ) int alt92=5; int LA92_0 = input.LA(1); if ( (LA92_0==DOT) ) { @@ -5896,30 +5897,30 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { switch (alt92) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:9: ( DOT super_key )=> DOT super_key superSuffix + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:730:9: ( DOT super_key )=> DOT super_key superSuffix { - DOT20=(Token)match(input,DOT,FOLLOW_DOT_in_selector4253); if (state.failed) return; + DOT20=(Token)match(input,DOT,FOLLOW_DOT_in_selector4256); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(DOT20, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_super_key_in_selector4257); + pushFollow(FOLLOW_super_key_in_selector4260); super_key(); state._fsp--; if (state.failed) return; - pushFollow(FOLLOW_superSuffix_in_selector4259); + pushFollow(FOLLOW_superSuffix_in_selector4262); superSuffix(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:710:9: ( DOT new_key )=> DOT new_key ( nonWildcardTypeArguments )? innerCreator + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:731:9: ( DOT new_key )=> DOT new_key ( nonWildcardTypeArguments )? innerCreator { - DOT21=(Token)match(input,DOT,FOLLOW_DOT_in_selector4275); if (state.failed) return; + DOT21=(Token)match(input,DOT,FOLLOW_DOT_in_selector4278); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(DOT21, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_new_key_in_selector4279); + pushFollow(FOLLOW_new_key_in_selector4282); new_key(); state._fsp--; if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:710:84: ( nonWildcardTypeArguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:731:84: ( nonWildcardTypeArguments )? int alt89=2; int LA89_0 = input.LA(1); if ( (LA89_0==LESS) ) { @@ -5927,9 +5928,9 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { } switch (alt89) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:710:85: nonWildcardTypeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:731:85: nonWildcardTypeArguments { - pushFollow(FOLLOW_nonWildcardTypeArguments_in_selector4282); + pushFollow(FOLLOW_nonWildcardTypeArguments_in_selector4285); nonWildcardTypeArguments(); state._fsp--; if (state.failed) return; @@ -5938,20 +5939,20 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { } - pushFollow(FOLLOW_innerCreator_in_selector4286); + pushFollow(FOLLOW_innerCreator_in_selector4289); innerCreator(); state._fsp--; if (state.failed) return; } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:711:9: ( DOT ID )=> DOT ID ( ( LEFT_PAREN )=> arguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:732:9: ( DOT ID )=> DOT ID ( ( LEFT_PAREN )=> arguments )? { - DOT22=(Token)match(input,DOT,FOLLOW_DOT_in_selector4302); if (state.failed) return; + DOT22=(Token)match(input,DOT,FOLLOW_DOT_in_selector4305); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(DOT22, DroolsEditorType.SYMBOL); } - ID23=(Token)match(input,ID,FOLLOW_ID_in_selector4324); if (state.failed) return; + ID23=(Token)match(input,ID,FOLLOW_ID_in_selector4327); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(ID23, DroolsEditorType.IDENTIFIER); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:713:19: ( ( LEFT_PAREN )=> arguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:734:19: ( ( LEFT_PAREN )=> arguments )? int alt90=2; int LA90_0 = input.LA(1); if ( (LA90_0==LEFT_PAREN) ) { @@ -5962,9 +5963,9 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { } switch (alt90) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:713:20: ( LEFT_PAREN )=> arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:734:20: ( LEFT_PAREN )=> arguments { - pushFollow(FOLLOW_arguments_in_selector4353); + pushFollow(FOLLOW_arguments_in_selector4356); arguments(); state._fsp--; if (state.failed) return; @@ -5976,13 +5977,13 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:714:9: ( NULL_SAFE_DOT ID )=> NULL_SAFE_DOT ID ( ( LEFT_PAREN )=> arguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:735:9: ( NULL_SAFE_DOT ID )=> NULL_SAFE_DOT ID ( ( LEFT_PAREN )=> arguments )? { - NULL_SAFE_DOT24=(Token)match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_selector4371); if (state.failed) return; + NULL_SAFE_DOT24=(Token)match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_selector4374); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(NULL_SAFE_DOT24, DroolsEditorType.SYMBOL); } - ID25=(Token)match(input,ID,FOLLOW_ID_in_selector4393); if (state.failed) return; + ID25=(Token)match(input,ID,FOLLOW_ID_in_selector4396); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(ID25, DroolsEditorType.IDENTIFIER); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:716:19: ( ( LEFT_PAREN )=> arguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:737:19: ( ( LEFT_PAREN )=> arguments )? int alt91=2; int LA91_0 = input.LA(1); if ( (LA91_0==LEFT_PAREN) ) { @@ -5993,9 +5994,9 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { } switch (alt91) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:716:20: ( LEFT_PAREN )=> arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:737:20: ( LEFT_PAREN )=> arguments { - pushFollow(FOLLOW_arguments_in_selector4422); + pushFollow(FOLLOW_arguments_in_selector4425); arguments(); state._fsp--; if (state.failed) return; @@ -6007,15 +6008,15 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:718:9: ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:739:9: ( LEFT_SQUARE )=> LEFT_SQUARE expression RIGHT_SQUARE { - LEFT_SQUARE26=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_selector4443); if (state.failed) return; + LEFT_SQUARE26=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_selector4446); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(LEFT_SQUARE26, DroolsEditorType.SYMBOL); } - pushFollow(FOLLOW_expression_in_selector4470); + pushFollow(FOLLOW_expression_in_selector4473); expression(); state._fsp--; if (state.failed) return; - RIGHT_SQUARE27=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_selector4495); if (state.failed) return; + RIGHT_SQUARE27=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_selector4498); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(RIGHT_SQUARE27, DroolsEditorType.SYMBOL); } } break; @@ -6036,10 +6037,10 @@ else if ( (LA92_0==LEFT_SQUARE) && (synpred47_DRL6Expressions())) { // $ANTLR start "superSuffix" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:723:1: superSuffix : ( arguments | DOT ID ( ( LEFT_PAREN )=> arguments )? ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:744:1: superSuffix : ( arguments | DOT ID ( ( LEFT_PAREN )=> arguments )? ); public final void superSuffix() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:724:5: ( arguments | DOT ID ( ( LEFT_PAREN )=> arguments )? ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:745:5: ( arguments | DOT ID ( ( LEFT_PAREN )=> arguments )? ) int alt94=2; int LA94_0 = input.LA(1); if ( (LA94_0==LEFT_PAREN) ) { @@ -6058,20 +6059,20 @@ else if ( (LA94_0==DOT) ) { switch (alt94) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:724:7: arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:745:7: arguments { - pushFollow(FOLLOW_arguments_in_superSuffix4514); + pushFollow(FOLLOW_arguments_in_superSuffix4517); arguments(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:10: DOT ID ( ( LEFT_PAREN )=> arguments )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:746:10: DOT ID ( ( LEFT_PAREN )=> arguments )? { - match(input,DOT,FOLLOW_DOT_in_superSuffix4525); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_superSuffix4527); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:17: ( ( LEFT_PAREN )=> arguments )? + match(input,DOT,FOLLOW_DOT_in_superSuffix4528); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_superSuffix4530); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:746:17: ( ( LEFT_PAREN )=> arguments )? int alt93=2; int LA93_0 = input.LA(1); if ( (LA93_0==LEFT_PAREN) ) { @@ -6082,9 +6083,9 @@ else if ( (LA94_0==DOT) ) { } switch (alt93) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:18: ( LEFT_PAREN )=> arguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:746:18: ( LEFT_PAREN )=> arguments { - pushFollow(FOLLOW_arguments_in_superSuffix4536); + pushFollow(FOLLOW_arguments_in_superSuffix4539); arguments(); state._fsp--; if (state.failed) return; @@ -6112,7 +6113,7 @@ else if ( (LA94_0==DOT) ) { // $ANTLR start "squareArguments" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:728:1: squareArguments returns [java.util.List args] : LEFT_SQUARE (el= expressionList )? RIGHT_SQUARE ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:749:1: squareArguments returns [java.util.List args] : LEFT_SQUARE (el= expressionList )? RIGHT_SQUARE ; public final java.util.List squareArguments() throws RecognitionException { java.util.List args = null; @@ -6120,11 +6121,11 @@ public final java.util.List squareArguments() throws RecognitionExceptio java.util.List el =null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:729:5: ( LEFT_SQUARE (el= expressionList )? RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:729:7: LEFT_SQUARE (el= expressionList )? RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:750:5: ( LEFT_SQUARE (el= expressionList )? RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:750:7: LEFT_SQUARE (el= expressionList )? RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_squareArguments4559); if (state.failed) return args; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:729:19: (el= expressionList )? + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_squareArguments4562); if (state.failed) return args; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:750:19: (el= expressionList )? int alt95=2; int LA95_0 = input.LA(1); if ( (LA95_0==BOOL||(LA95_0 >= DECIMAL && LA95_0 <= DIV)||LA95_0==DOT||LA95_0==FLOAT||LA95_0==HEX||(LA95_0 >= ID && LA95_0 <= INCR)||(LA95_0 >= LEFT_PAREN && LA95_0 <= LESS)||LA95_0==MINUS||LA95_0==NEGATION||LA95_0==NULL||LA95_0==PLUS||LA95_0==QUESTION_DIV||(LA95_0 >= STAR && LA95_0 <= TIME_INTERVAL)) ) { @@ -6132,9 +6133,9 @@ public final java.util.List squareArguments() throws RecognitionExceptio } switch (alt95) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:729:20: el= expressionList + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:750:20: el= expressionList { - pushFollow(FOLLOW_expressionList_in_squareArguments4564); + pushFollow(FOLLOW_expressionList_in_squareArguments4567); el=expressionList(); state._fsp--; if (state.failed) return args; @@ -6144,7 +6145,7 @@ public final java.util.List squareArguments() throws RecognitionExceptio } - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_squareArguments4570); if (state.failed) return args; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_squareArguments4573); if (state.failed) return args; } } @@ -6163,18 +6164,18 @@ public final java.util.List squareArguments() throws RecognitionExceptio // $ANTLR start "arguments" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:732:1: arguments : LEFT_PAREN ( expressionList )? RIGHT_PAREN ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:753:1: arguments : LEFT_PAREN ( expressionList )? RIGHT_PAREN ; public final void arguments() throws RecognitionException { Token LEFT_PAREN28=null; Token RIGHT_PAREN29=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:733:5: ( LEFT_PAREN ( expressionList )? RIGHT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:733:7: LEFT_PAREN ( expressionList )? RIGHT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:754:5: ( LEFT_PAREN ( expressionList )? RIGHT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:754:7: LEFT_PAREN ( expressionList )? RIGHT_PAREN { - LEFT_PAREN28=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_arguments4587); if (state.failed) return; + LEFT_PAREN28=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_arguments4590); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(LEFT_PAREN28, DroolsEditorType.SYMBOL); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:734:9: ( expressionList )? + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:755:9: ( expressionList )? int alt96=2; int LA96_0 = input.LA(1); if ( (LA96_0==BOOL||(LA96_0 >= DECIMAL && LA96_0 <= DIV)||LA96_0==DOT||LA96_0==FLOAT||LA96_0==HEX||(LA96_0 >= ID && LA96_0 <= INCR)||(LA96_0 >= LEFT_PAREN && LA96_0 <= LESS)||LA96_0==MINUS||LA96_0==NEGATION||LA96_0==NULL||LA96_0==PLUS||LA96_0==QUESTION_DIV||(LA96_0 >= STAR && LA96_0 <= TIME_INTERVAL)) ) { @@ -6182,9 +6183,9 @@ public final void arguments() throws RecognitionException { } switch (alt96) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:734:9: expressionList + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:755:9: expressionList { - pushFollow(FOLLOW_expressionList_in_arguments4599); + pushFollow(FOLLOW_expressionList_in_arguments4602); expressionList(); state._fsp--; if (state.failed) return; @@ -6193,7 +6194,7 @@ public final void arguments() throws RecognitionException { } - RIGHT_PAREN29=(Token)match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_arguments4610); if (state.failed) return; + RIGHT_PAREN29=(Token)match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_arguments4613); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(RIGHT_PAREN29, DroolsEditorType.SYMBOL); } } @@ -6212,7 +6213,7 @@ public final void arguments() throws RecognitionException { // $ANTLR start "expressionList" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:738:1: expressionList returns [java.util.List exprs] : f= expression ( COMMA s= expression )* ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:759:1: expressionList returns [java.util.List exprs] : f= expression ( COMMA s= expression )* ; public final java.util.List expressionList() throws RecognitionException { java.util.List exprs = null; @@ -6222,15 +6223,15 @@ public final java.util.List expressionList() throws RecognitionException exprs = new java.util.ArrayList(); try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:740:3: (f= expression ( COMMA s= expression )* ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:740:7: f= expression ( COMMA s= expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:761:3: (f= expression ( COMMA s= expression )* ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:761:7: f= expression ( COMMA s= expression )* { - pushFollow(FOLLOW_expression_in_expressionList4640); + pushFollow(FOLLOW_expression_in_expressionList4643); f=expression(); state._fsp--; if (state.failed) return exprs; if ( state.backtracking==0 ) { exprs.add( (f!=null?input.toString(f.start,f.stop):null) ); } - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:741:7: ( COMMA s= expression )* + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:762:7: ( COMMA s= expression )* loop97: while (true) { int alt97=2; @@ -6241,10 +6242,10 @@ public final java.util.List expressionList() throws RecognitionException switch (alt97) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:741:8: COMMA s= expression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:762:8: COMMA s= expression { - match(input,COMMA,FOLLOW_COMMA_in_expressionList4651); if (state.failed) return exprs; - pushFollow(FOLLOW_expression_in_expressionList4655); + match(input,COMMA,FOLLOW_COMMA_in_expressionList4654); if (state.failed) return exprs; + pushFollow(FOLLOW_expression_in_expressionList4658); s=expression(); state._fsp--; if (state.failed) return exprs; @@ -6275,10 +6276,10 @@ public final java.util.List expressionList() throws RecognitionException // $ANTLR start "assignmentOperator" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:744:1: assignmentOperator : ( EQUALS_ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | MULT_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | LESS LESS EQUALS_ASSIGN | ( GREATER GREATER GREATER )=> GREATER GREATER GREATER EQUALS_ASSIGN | ( GREATER GREATER )=> GREATER GREATER EQUALS_ASSIGN ); + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:765:1: assignmentOperator : ( EQUALS_ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | MULT_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | LESS LESS EQUALS_ASSIGN | ( GREATER GREATER GREATER )=> GREATER GREATER GREATER EQUALS_ASSIGN | ( GREATER GREATER )=> GREATER GREATER EQUALS_ASSIGN ); public final void assignmentOperator() throws RecognitionException { try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:745:5: ( EQUALS_ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | MULT_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | LESS LESS EQUALS_ASSIGN | ( GREATER GREATER GREATER )=> GREATER GREATER GREATER EQUALS_ASSIGN | ( GREATER GREATER )=> GREATER GREATER EQUALS_ASSIGN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:766:5: ( EQUALS_ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | MULT_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | LESS LESS EQUALS_ASSIGN | ( GREATER GREATER GREATER )=> GREATER GREATER GREATER EQUALS_ASSIGN | ( GREATER GREATER )=> GREATER GREATER EQUALS_ASSIGN ) int alt98=12; switch ( input.LA(1) ) { case EQUALS_ASSIGN: @@ -6368,82 +6369,82 @@ else if ( (LA98_12==EQUALS_ASSIGN) && (synpred50_DRL6Expressions())) { } switch (alt98) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:745:9: EQUALS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:766:9: EQUALS_ASSIGN { - match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4676); if (state.failed) return; + match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4679); if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:746:7: PLUS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:767:7: PLUS_ASSIGN { - match(input,PLUS_ASSIGN,FOLLOW_PLUS_ASSIGN_in_assignmentOperator4684); if (state.failed) return; + match(input,PLUS_ASSIGN,FOLLOW_PLUS_ASSIGN_in_assignmentOperator4687); if (state.failed) return; } break; case 3 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:747:7: MINUS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:768:7: MINUS_ASSIGN { - match(input,MINUS_ASSIGN,FOLLOW_MINUS_ASSIGN_in_assignmentOperator4692); if (state.failed) return; + match(input,MINUS_ASSIGN,FOLLOW_MINUS_ASSIGN_in_assignmentOperator4695); if (state.failed) return; } break; case 4 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:748:7: MULT_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:769:7: MULT_ASSIGN { - match(input,MULT_ASSIGN,FOLLOW_MULT_ASSIGN_in_assignmentOperator4700); if (state.failed) return; + match(input,MULT_ASSIGN,FOLLOW_MULT_ASSIGN_in_assignmentOperator4703); if (state.failed) return; } break; case 5 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:749:7: DIV_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:770:7: DIV_ASSIGN { - match(input,DIV_ASSIGN,FOLLOW_DIV_ASSIGN_in_assignmentOperator4708); if (state.failed) return; + match(input,DIV_ASSIGN,FOLLOW_DIV_ASSIGN_in_assignmentOperator4711); if (state.failed) return; } break; case 6 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:750:7: AND_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:771:7: AND_ASSIGN { - match(input,AND_ASSIGN,FOLLOW_AND_ASSIGN_in_assignmentOperator4716); if (state.failed) return; + match(input,AND_ASSIGN,FOLLOW_AND_ASSIGN_in_assignmentOperator4719); if (state.failed) return; } break; case 7 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:751:7: OR_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:772:7: OR_ASSIGN { - match(input,OR_ASSIGN,FOLLOW_OR_ASSIGN_in_assignmentOperator4724); if (state.failed) return; + match(input,OR_ASSIGN,FOLLOW_OR_ASSIGN_in_assignmentOperator4727); if (state.failed) return; } break; case 8 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:752:7: XOR_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:773:7: XOR_ASSIGN { - match(input,XOR_ASSIGN,FOLLOW_XOR_ASSIGN_in_assignmentOperator4732); if (state.failed) return; + match(input,XOR_ASSIGN,FOLLOW_XOR_ASSIGN_in_assignmentOperator4735); if (state.failed) return; } break; case 9 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:753:7: MOD_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:774:7: MOD_ASSIGN { - match(input,MOD_ASSIGN,FOLLOW_MOD_ASSIGN_in_assignmentOperator4740); if (state.failed) return; + match(input,MOD_ASSIGN,FOLLOW_MOD_ASSIGN_in_assignmentOperator4743); if (state.failed) return; } break; case 10 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:754:7: LESS LESS EQUALS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:775:7: LESS LESS EQUALS_ASSIGN { - match(input,LESS,FOLLOW_LESS_in_assignmentOperator4748); if (state.failed) return; - match(input,LESS,FOLLOW_LESS_in_assignmentOperator4750); if (state.failed) return; - match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4752); if (state.failed) return; + match(input,LESS,FOLLOW_LESS_in_assignmentOperator4751); if (state.failed) return; + match(input,LESS,FOLLOW_LESS_in_assignmentOperator4753); if (state.failed) return; + match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4755); if (state.failed) return; } break; case 11 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:755:7: ( GREATER GREATER GREATER )=> GREATER GREATER GREATER EQUALS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:776:7: ( GREATER GREATER GREATER )=> GREATER GREATER GREATER EQUALS_ASSIGN { - match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4769); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4771); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4773); if (state.failed) return; - match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4775); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4772); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4774); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4776); if (state.failed) return; + match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4778); if (state.failed) return; } break; case 12 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:756:7: ( GREATER GREATER )=> GREATER GREATER EQUALS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:777:7: ( GREATER GREATER )=> GREATER GREATER EQUALS_ASSIGN { - match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4790); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4792); if (state.failed) return; - match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4794); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4793); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_assignmentOperator4795); if (state.failed) return; + match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4797); if (state.failed) return; } break; @@ -6463,19 +6464,19 @@ else if ( (LA98_12==EQUALS_ASSIGN) && (synpred50_DRL6Expressions())) { // $ANTLR start "extends_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:762:1: extends_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:783:1: extends_key :{...}? =>id= ID ; public final void extends_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:763:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:763:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:784:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:784:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "extends_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_extends_key4824); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_extends_key4827); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6494,19 +6495,19 @@ public final void extends_key() throws RecognitionException { // $ANTLR start "super_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:766:1: super_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:787:1: super_key :{...}? =>id= ID ; public final void super_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:767:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:767:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:788:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:788:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "super_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.SUPER))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_super_key4853); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_super_key4856); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6528,7 +6529,7 @@ public static class instanceof_key_return extends ParserRuleReturnScope { // $ANTLR start "instanceof_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:770:1: instanceof_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:791:1: instanceof_key :{...}? =>id= ID ; public final DRL6Expressions.instanceof_key_return instanceof_key() throws RecognitionException { DRL6Expressions.instanceof_key_return retval = new DRL6Expressions.instanceof_key_return(); retval.start = input.LT(1); @@ -6536,14 +6537,14 @@ public final DRL6Expressions.instanceof_key_return instanceof_key() throws Recog Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:771:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:771:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:792:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:792:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.INSTANCEOF)))) ) { if (state.backtracking>0) {state.failed=true; return retval;} throw new FailedPredicateException(input, "instanceof_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.INSTANCEOF))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_instanceof_key4882); if (state.failed) return retval; + id=(Token)match(input,ID,FOLLOW_ID_in_instanceof_key4885); if (state.failed) return retval; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6565,19 +6566,19 @@ public final DRL6Expressions.instanceof_key_return instanceof_key() throws Recog // $ANTLR start "boolean_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:774:1: boolean_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:795:1: boolean_key :{...}? =>id= ID ; public final void boolean_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:775:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:775:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:796:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:796:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.BOOLEAN)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "boolean_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.BOOLEAN))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_boolean_key4911); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_boolean_key4914); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6596,19 +6597,19 @@ public final void boolean_key() throws RecognitionException { // $ANTLR start "char_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:778:1: char_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:799:1: char_key :{...}? =>id= ID ; public final void char_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:779:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:779:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:800:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:800:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.CHAR)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "char_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.CHAR))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_char_key4940); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_char_key4943); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6627,19 +6628,19 @@ public final void char_key() throws RecognitionException { // $ANTLR start "byte_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:782:1: byte_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:803:1: byte_key :{...}? =>id= ID ; public final void byte_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:783:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:783:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:804:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:804:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.BYTE)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "byte_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.BYTE))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_byte_key4969); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_byte_key4972); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6658,19 +6659,19 @@ public final void byte_key() throws RecognitionException { // $ANTLR start "short_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:786:1: short_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:807:1: short_key :{...}? =>id= ID ; public final void short_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:787:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:787:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:808:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:808:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "short_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.SHORT))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_short_key4998); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_short_key5001); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6689,19 +6690,19 @@ public final void short_key() throws RecognitionException { // $ANTLR start "int_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:790:1: int_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:811:1: int_key :{...}? =>id= ID ; public final void int_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:791:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:791:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:812:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:812:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.INT)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "int_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.INT))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_int_key5027); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_int_key5030); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6720,19 +6721,19 @@ public final void int_key() throws RecognitionException { // $ANTLR start "float_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:794:1: float_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:815:1: float_key :{...}? =>id= ID ; public final void float_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:795:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:795:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:816:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:816:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.FLOAT)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "float_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.FLOAT))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_float_key5056); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_float_key5059); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6751,19 +6752,19 @@ public final void float_key() throws RecognitionException { // $ANTLR start "long_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:798:1: long_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:819:1: long_key :{...}? =>id= ID ; public final void long_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:799:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:799:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:820:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:820:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.LONG)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "long_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.LONG))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_long_key5085); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_long_key5088); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6782,19 +6783,19 @@ public final void long_key() throws RecognitionException { // $ANTLR start "double_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:802:1: double_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:823:1: double_key :{...}? =>id= ID ; public final void double_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:803:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:803:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:824:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:824:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "double_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_double_key5114); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_double_key5117); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6813,19 +6814,19 @@ public final void double_key() throws RecognitionException { // $ANTLR start "void_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:806:1: void_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:827:1: void_key :{...}? =>id= ID ; public final void void_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:807:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:807:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:828:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:828:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.VOID)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "void_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.VOID))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_void_key5143); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_void_key5146); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6844,19 +6845,19 @@ public final void void_key() throws RecognitionException { // $ANTLR start "this_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:810:1: this_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:831:1: this_key :{...}? =>id= ID ; public final void this_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:811:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:811:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:832:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:832:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.THIS)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "this_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.THIS))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_this_key5172); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_this_key5175); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6875,19 +6876,19 @@ public final void this_key() throws RecognitionException { // $ANTLR start "class_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:814:1: class_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:835:1: class_key :{...}? =>id= ID ; public final void class_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:815:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:815:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:836:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:836:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.CLASS)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "class_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_class_key5201); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_class_key5204); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6906,19 +6907,19 @@ public final void class_key() throws RecognitionException { // $ANTLR start "new_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:818:1: new_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:839:1: new_key :{...}? =>id= ID ; public final void new_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:819:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:819:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:840:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:840:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.NEW)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "new_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.NEW))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_new_key5231); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_new_key5234); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6937,19 +6938,19 @@ public final void new_key() throws RecognitionException { // $ANTLR start "not_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:822:1: not_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:843:1: not_key :{...}? =>id= ID ; public final void not_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:823:5: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:823:12: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:844:5: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:844:12: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.NOT)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "not_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.NOT))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_not_key5260); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_not_key5263); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -6968,19 +6969,19 @@ public final void not_key() throws RecognitionException { // $ANTLR start "in_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:826:1: in_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:847:1: in_key :{...}? =>id= ID ; public final void in_key() throws RecognitionException { Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:827:3: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:827:10: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:848:3: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:848:10: {...}? =>id= ID { if ( !(((helper.validateIdentifierKey(DroolsSoftKeywords.IN)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "in_key", "(helper.validateIdentifierKey(DroolsSoftKeywords.IN))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_in_key5287); if (state.failed) return; + id=(Token)match(input,ID,FOLLOW_ID_in_in_key5290); if (state.failed) return; if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } } @@ -7002,7 +7003,7 @@ public static class operator_key_return extends ParserRuleReturnScope { // $ANTLR start "operator_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:830:1: operator_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:851:1: operator_key :{...}? =>id= ID ; public final DRL6Expressions.operator_key_return operator_key() throws RecognitionException { DRL6Expressions.operator_key_return retval = new DRL6Expressions.operator_key_return(); retval.start = input.LT(1); @@ -7010,15 +7011,15 @@ public final DRL6Expressions.operator_key_return operator_key() throws Recogniti Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:831:3: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:831:10: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:852:3: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:852:10: {...}? =>id= ID { if ( !(((helper.isPluggableEvaluator(false)))) ) { if (state.backtracking>0) {state.failed=true; return retval;} throw new FailedPredicateException(input, "operator_key", "(helper.isPluggableEvaluator(false))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_operator_key5312); if (state.failed) return retval; - if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } + id=(Token)match(input,ID,FOLLOW_ID_in_operator_key5315); if (state.failed) return retval; + if ( state.backtracking==0 ) { helper.logCustomOperatorWarn(id); helper.emit(id, DroolsEditorType.KEYWORD); } } retval.stop = input.LT(-1); @@ -7042,7 +7043,7 @@ public static class neg_operator_key_return extends ParserRuleReturnScope { // $ANTLR start "neg_operator_key" - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:834:1: neg_operator_key :{...}? =>id= ID ; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:855:1: neg_operator_key :{...}? =>id= ID ; public final DRL6Expressions.neg_operator_key_return neg_operator_key() throws RecognitionException { DRL6Expressions.neg_operator_key_return retval = new DRL6Expressions.neg_operator_key_return(); retval.start = input.LT(1); @@ -7050,15 +7051,15 @@ public final DRL6Expressions.neg_operator_key_return neg_operator_key() throws R Token id=null; try { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:835:3: ({...}? =>id= ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:835:10: {...}? =>id= ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:856:3: ({...}? =>id= ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:856:10: {...}? =>id= ID { if ( !(((helper.isPluggableEvaluator(true)))) ) { if (state.backtracking>0) {state.failed=true; return retval;} throw new FailedPredicateException(input, "neg_operator_key", "(helper.isPluggableEvaluator(true))"); } - id=(Token)match(input,ID,FOLLOW_ID_in_neg_operator_key5337); if (state.failed) return retval; - if ( state.backtracking==0 ) { helper.emit(id, DroolsEditorType.KEYWORD); } + id=(Token)match(input,ID,FOLLOW_ID_in_neg_operator_key5340); if (state.failed) return retval; + if ( state.backtracking==0 ) { helper.logCustomOperatorWarn(id); helper.emit(id, DroolsEditorType.KEYWORD); } } retval.stop = input.LT(-1); @@ -7078,10 +7079,10 @@ public final DRL6Expressions.neg_operator_key_return neg_operator_key() throws R // $ANTLR start synpred1_DRL6Expressions public final void synpred1_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:8: ( primitiveType ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:9: primitiveType + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:8: ( primitiveType ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:9: primitiveType { - pushFollow(FOLLOW_primitiveType_in_synpred1_DRL6Expressions548); + pushFollow(FOLLOW_primitiveType_in_synpred1_DRL6Expressions551); primitiveType(); state._fsp--; if (state.failed) return; @@ -7092,11 +7093,11 @@ public final void synpred1_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred2_DRL6Expressions public final void synpred2_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:44: ( LEFT_SQUARE RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:145:45: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:44: ( LEFT_SQUARE RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:164:45: LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred2_DRL6Expressions559); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred2_DRL6Expressions561); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred2_DRL6Expressions562); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred2_DRL6Expressions564); if (state.failed) return; } } @@ -7104,10 +7105,10 @@ public final void synpred2_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred3_DRL6Expressions public final void synpred3_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:13: ( typeArguments ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:14: typeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:13: ( typeArguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:14: typeArguments { - pushFollow(FOLLOW_typeArguments_in_synpred3_DRL6Expressions585); + pushFollow(FOLLOW_typeArguments_in_synpred3_DRL6Expressions588); typeArguments(); state._fsp--; if (state.failed) return; @@ -7118,10 +7119,10 @@ public final void synpred3_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred4_DRL6Expressions public final void synpred4_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:55: ( typeArguments ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:56: typeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:55: ( typeArguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:56: typeArguments { - pushFollow(FOLLOW_typeArguments_in_synpred4_DRL6Expressions599); + pushFollow(FOLLOW_typeArguments_in_synpred4_DRL6Expressions602); typeArguments(); state._fsp--; if (state.failed) return; @@ -7132,11 +7133,11 @@ public final void synpred4_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred5_DRL6Expressions public final void synpred5_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:92: ( LEFT_SQUARE RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:146:93: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:92: ( LEFT_SQUARE RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:165:93: LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred5_DRL6Expressions611); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred5_DRL6Expressions613); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred5_DRL6Expressions614); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred5_DRL6Expressions616); if (state.failed) return; } } @@ -7144,10 +7145,10 @@ public final void synpred5_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred6_DRL6Expressions public final void synpred6_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:172:10: ( assignmentOperator ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:172:11: assignmentOperator + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:191:10: ( assignmentOperator ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:191:11: assignmentOperator { - pushFollow(FOLLOW_assignmentOperator_in_synpred6_DRL6Expressions782); + pushFollow(FOLLOW_assignmentOperator_in_synpred6_DRL6Expressions785); assignmentOperator(); state._fsp--; if (state.failed) return; @@ -7158,11 +7159,11 @@ public final void synpred6_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred7_DRL6Expressions public final void synpred7_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:206:8: ( ID EQUALS_ASSIGN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:206:9: ID EQUALS_ASSIGN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:225:8: ( ID EQUALS_ASSIGN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:225:9: ID EQUALS_ASSIGN { - match(input,ID,FOLLOW_ID_in_synpred7_DRL6Expressions961); if (state.failed) return; - match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_synpred7_DRL6Expressions963); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred7_DRL6Expressions964); if (state.failed) return; + match(input,EQUALS_ASSIGN,FOLLOW_EQUALS_ASSIGN_in_synpred7_DRL6Expressions966); if (state.failed) return; } } @@ -7170,14 +7171,14 @@ public final void synpred7_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred8_DRL6Expressions public final void synpred8_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:344:6: ( not_key in_key ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:344:7: not_key in_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:363:6: ( not_key in_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:363:7: not_key in_key { - pushFollow(FOLLOW_not_key_in_synpred8_DRL6Expressions1629); + pushFollow(FOLLOW_not_key_in_synpred8_DRL6Expressions1632); not_key(); state._fsp--; if (state.failed) return; - pushFollow(FOLLOW_in_key_in_synpred8_DRL6Expressions1631); + pushFollow(FOLLOW_in_key_in_synpred8_DRL6Expressions1634); in_key(); state._fsp--; if (state.failed) return; @@ -7188,7 +7189,7 @@ public final void synpred8_DRL6Expressions_fragment() throws RecognitionExceptio // $ANTLR start synpred9_DRL6Expressions public final void synpred9_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:403:5: ( operator | LEFT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:422:5: ( operator | LEFT_PAREN ) int alt99=2; int LA99_0 = input.LA(1); if ( (LA99_0==EQUALS||(LA99_0 >= GREATER && LA99_0 <= GREATER_EQUALS)||(LA99_0 >= LESS && LA99_0 <= LESS_EQUALS)||LA99_0==NOT_EQUALS||LA99_0==TILDE) ) { @@ -7210,18 +7211,18 @@ else if ( (LA99_0==LEFT_PAREN) ) { switch (alt99) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:403:7: operator + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:422:7: operator { - pushFollow(FOLLOW_operator_in_synpred9_DRL6Expressions1846); + pushFollow(FOLLOW_operator_in_synpred9_DRL6Expressions1849); operator(); state._fsp--; if (state.failed) return; } break; case 2 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:403:18: LEFT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:422:18: LEFT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred9_DRL6Expressions1850); if (state.failed) return; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred9_DRL6Expressions1853); if (state.failed) return; } break; @@ -7231,11 +7232,11 @@ else if ( (LA99_0==LEFT_PAREN) ) { // $ANTLR start synpred10_DRL6Expressions public final void synpred10_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:7: ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:8: DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:7: ( DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:8: DOUBLE_PIPE ( fullAnnotation[null] )? andRestriction { - match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_synpred10_DRL6Expressions1903); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:20: ( fullAnnotation[null] )? + match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_synpred10_DRL6Expressions1906); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:20: ( fullAnnotation[null] )? int alt100=2; int LA100_0 = input.LA(1); if ( (LA100_0==AT) ) { @@ -7243,9 +7244,9 @@ public final void synpred10_DRL6Expressions_fragment() throws RecognitionExcepti } switch (alt100) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:414:20: fullAnnotation[null] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:433:20: fullAnnotation[null] { - pushFollow(FOLLOW_fullAnnotation_in_synpred10_DRL6Expressions1905); + pushFollow(FOLLOW_fullAnnotation_in_synpred10_DRL6Expressions1908); fullAnnotation(null); state._fsp--; if (state.failed) return; @@ -7254,7 +7255,7 @@ public final void synpred10_DRL6Expressions_fragment() throws RecognitionExcepti } - pushFollow(FOLLOW_andRestriction_in_synpred10_DRL6Expressions1909); + pushFollow(FOLLOW_andRestriction_in_synpred10_DRL6Expressions1912); andRestriction(); state._fsp--; if (state.failed) return; @@ -7265,11 +7266,11 @@ public final void synpred10_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred11_DRL6Expressions public final void synpred11_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:428:5: ( DOUBLE_AMPER ( fullAnnotation[null] )? operator ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:428:6: DOUBLE_AMPER ( fullAnnotation[null] )? operator + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:448:5: ( DOUBLE_AMPER ( fullAnnotation[null] )? operator ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:448:6: DOUBLE_AMPER ( fullAnnotation[null] )? operator { - match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_synpred11_DRL6Expressions1972); if (state.failed) return; - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:428:19: ( fullAnnotation[null] )? + match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_synpred11_DRL6Expressions1975); if (state.failed) return; + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:448:19: ( fullAnnotation[null] )? int alt101=2; int LA101_0 = input.LA(1); if ( (LA101_0==AT) ) { @@ -7277,9 +7278,9 @@ public final void synpred11_DRL6Expressions_fragment() throws RecognitionExcepti } switch (alt101) { case 1 : - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:428:19: fullAnnotation[null] + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:448:19: fullAnnotation[null] { - pushFollow(FOLLOW_fullAnnotation_in_synpred11_DRL6Expressions1974); + pushFollow(FOLLOW_fullAnnotation_in_synpred11_DRL6Expressions1977); fullAnnotation(null); state._fsp--; if (state.failed) return; @@ -7288,7 +7289,7 @@ public final void synpred11_DRL6Expressions_fragment() throws RecognitionExcepti } - pushFollow(FOLLOW_operator_in_synpred11_DRL6Expressions1978); + pushFollow(FOLLOW_operator_in_synpred11_DRL6Expressions1981); operator(); state._fsp--; if (state.failed) return; @@ -7299,14 +7300,14 @@ public final void synpred11_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred12_DRL6Expressions public final void synpred12_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:445:8: ( squareArguments shiftExpression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:445:9: squareArguments shiftExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:466:8: ( squareArguments shiftExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:466:9: squareArguments shiftExpression { - pushFollow(FOLLOW_squareArguments_in_synpred12_DRL6Expressions2066); + pushFollow(FOLLOW_squareArguments_in_synpred12_DRL6Expressions2069); squareArguments(); state._fsp--; if (state.failed) return; - pushFollow(FOLLOW_shiftExpression_in_synpred12_DRL6Expressions2068); + pushFollow(FOLLOW_shiftExpression_in_synpred12_DRL6Expressions2071); shiftExpression(); state._fsp--; if (state.failed) return; @@ -7317,10 +7318,10 @@ public final void synpred12_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred13_DRL6Expressions public final void synpred13_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:468:7: ( shiftOp ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:468:8: shiftOp + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:489:7: ( shiftOp ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:489:8: shiftOp { - pushFollow(FOLLOW_shiftOp_in_synpred13_DRL6Expressions2157); + pushFollow(FOLLOW_shiftOp_in_synpred13_DRL6Expressions2160); shiftOp(); state._fsp--; if (state.failed) return; @@ -7331,7 +7332,7 @@ public final void synpred13_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred14_DRL6Expressions public final void synpred14_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:479:11: ( PLUS | MINUS ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:500:11: ( PLUS | MINUS ) // src/main/resources/org/drools/drl/parser/DRL6Expressions.g: { if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) { @@ -7351,10 +7352,10 @@ public final void synpred14_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred15_DRL6Expressions public final void synpred15_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:516:9: ( castExpression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:516:10: castExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:537:9: ( castExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:537:10: castExpression { - pushFollow(FOLLOW_castExpression_in_synpred15_DRL6Expressions2489); + pushFollow(FOLLOW_castExpression_in_synpred15_DRL6Expressions2492); castExpression(); state._fsp--; if (state.failed) return; @@ -7365,10 +7366,10 @@ public final void synpred15_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred16_DRL6Expressions public final void synpred16_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:517:9: ( backReferenceExpression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:517:10: backReferenceExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:538:9: ( backReferenceExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:538:10: backReferenceExpression { - pushFollow(FOLLOW_backReferenceExpression_in_synpred16_DRL6Expressions2503); + pushFollow(FOLLOW_backReferenceExpression_in_synpred16_DRL6Expressions2506); backReferenceExpression(); state._fsp--; if (state.failed) return; @@ -7379,14 +7380,14 @@ public final void synpred16_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred17_DRL6Expressions public final void synpred17_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:525:11: ( xpathSeparator ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:525:12: xpathSeparator ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:546:11: ( xpathSeparator ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:546:12: xpathSeparator ID { - pushFollow(FOLLOW_xpathSeparator_in_synpred17_DRL6Expressions2624); + pushFollow(FOLLOW_xpathSeparator_in_synpred17_DRL6Expressions2627); xpathSeparator(); state._fsp--; if (state.failed) return; - match(input,ID,FOLLOW_ID_in_synpred17_DRL6Expressions2626); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred17_DRL6Expressions2629); if (state.failed) return; } } @@ -7394,10 +7395,10 @@ public final void synpred17_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred18_DRL6Expressions public final void synpred18_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:529:10: ( selector ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:529:11: selector + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:550:10: ( selector ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:550:11: selector { - pushFollow(FOLLOW_selector_in_synpred18_DRL6Expressions2674); + pushFollow(FOLLOW_selector_in_synpred18_DRL6Expressions2677); selector(); state._fsp--; if (state.failed) return; @@ -7408,7 +7409,7 @@ public final void synpred18_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred19_DRL6Expressions public final void synpred19_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:548:10: ( INCR | DECR ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:569:10: ( INCR | DECR ) // src/main/resources/org/drools/drl/parser/DRL6Expressions.g: { if ( input.LA(1)==DECR||input.LA(1)==INCR ) { @@ -7428,11 +7429,11 @@ public final void synpred19_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred20_DRL6Expressions public final void synpred20_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:552:8: ( LEFT_PAREN primitiveType ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:552:9: LEFT_PAREN primitiveType + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:573:8: ( LEFT_PAREN primitiveType ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:573:9: LEFT_PAREN primitiveType { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred20_DRL6Expressions2732); if (state.failed) return; - pushFollow(FOLLOW_primitiveType_in_synpred20_DRL6Expressions2734); + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred20_DRL6Expressions2735); if (state.failed) return; + pushFollow(FOLLOW_primitiveType_in_synpred20_DRL6Expressions2737); primitiveType(); state._fsp--; if (state.failed) return; @@ -7443,11 +7444,11 @@ public final void synpred20_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred21_DRL6Expressions public final void synpred21_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:553:8: ( LEFT_PAREN type ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:553:9: LEFT_PAREN type + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:574:8: ( LEFT_PAREN type ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:574:9: LEFT_PAREN type { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred21_DRL6Expressions2757); if (state.failed) return; - pushFollow(FOLLOW_type_in_synpred21_DRL6Expressions2759); + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred21_DRL6Expressions2760); if (state.failed) return; + pushFollow(FOLLOW_type_in_synpred21_DRL6Expressions2762); type(); state._fsp--; if (state.failed) return; @@ -7458,10 +7459,10 @@ public final void synpred21_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred24_DRL6Expressions public final void synpred24_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:591:7: ( LEFT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:591:8: LEFT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:7: ( LEFT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:8: LEFT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred24_DRL6Expressions3057); if (state.failed) return; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred24_DRL6Expressions3060); if (state.failed) return; } } @@ -7469,10 +7470,10 @@ public final void synpred24_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred25_DRL6Expressions public final void synpred25_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:9: ( nonWildcardTypeArguments ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:592:10: nonWildcardTypeArguments + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:9: ( nonWildcardTypeArguments ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:10: nonWildcardTypeArguments { - pushFollow(FOLLOW_nonWildcardTypeArguments_in_synpred25_DRL6Expressions3076); + pushFollow(FOLLOW_nonWildcardTypeArguments_in_synpred25_DRL6Expressions3079); nonWildcardTypeArguments(); state._fsp--; if (state.failed) return; @@ -7483,10 +7484,10 @@ public final void synpred25_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred26_DRL6Expressions public final void synpred26_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:593:9: ( literal ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:593:10: literal + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:614:9: ( literal ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:614:10: literal { - pushFollow(FOLLOW_literal_in_synpred26_DRL6Expressions3101); + pushFollow(FOLLOW_literal_in_synpred26_DRL6Expressions3104); literal(); state._fsp--; if (state.failed) return; @@ -7497,10 +7498,10 @@ public final void synpred26_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred27_DRL6Expressions public final void synpred27_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:595:9: ( super_key ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:595:10: super_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:616:9: ( super_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:616:10: super_key { - pushFollow(FOLLOW_super_key_in_synpred27_DRL6Expressions3123); + pushFollow(FOLLOW_super_key_in_synpred27_DRL6Expressions3126); super_key(); state._fsp--; if (state.failed) return; @@ -7511,10 +7512,10 @@ public final void synpred27_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred28_DRL6Expressions public final void synpred28_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:596:9: ( new_key ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:596:10: new_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:9: ( new_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:617:10: new_key { - pushFollow(FOLLOW_new_key_in_synpred28_DRL6Expressions3140); + pushFollow(FOLLOW_new_key_in_synpred28_DRL6Expressions3143); new_key(); state._fsp--; if (state.failed) return; @@ -7525,10 +7526,10 @@ public final void synpred28_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred29_DRL6Expressions public final void synpred29_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:597:9: ( primitiveType ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:597:10: primitiveType + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:618:9: ( primitiveType ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:618:10: primitiveType { - pushFollow(FOLLOW_primitiveType_in_synpred29_DRL6Expressions3157); + pushFollow(FOLLOW_primitiveType_in_synpred29_DRL6Expressions3160); primitiveType(); state._fsp--; if (state.failed) return; @@ -7539,10 +7540,10 @@ public final void synpred29_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred30_DRL6Expressions public final void synpred30_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:599:9: ( inlineMapExpression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:599:10: inlineMapExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:620:9: ( inlineMapExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:620:10: inlineMapExpression { - pushFollow(FOLLOW_inlineMapExpression_in_synpred30_DRL6Expressions3188); + pushFollow(FOLLOW_inlineMapExpression_in_synpred30_DRL6Expressions3191); inlineMapExpression(); state._fsp--; if (state.failed) return; @@ -7553,10 +7554,10 @@ public final void synpred30_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred31_DRL6Expressions public final void synpred31_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:600:9: ( inlineListExpression ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:600:10: inlineListExpression + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:621:9: ( inlineListExpression ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:621:10: inlineListExpression { - pushFollow(FOLLOW_inlineListExpression_in_synpred31_DRL6Expressions3203); + pushFollow(FOLLOW_inlineListExpression_in_synpred31_DRL6Expressions3206); inlineListExpression(); state._fsp--; if (state.failed) return; @@ -7567,10 +7568,10 @@ public final void synpred31_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred32_DRL6Expressions public final void synpred32_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:601:9: ( ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:601:10: ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:622:9: ( ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:622:10: ID { - match(input,ID,FOLLOW_ID_in_synpred32_DRL6Expressions3218); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred32_DRL6Expressions3221); if (state.failed) return; } } @@ -7578,11 +7579,11 @@ public final void synpred32_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred33_DRL6Expressions public final void synpred33_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:603:15: ( DOT ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:603:16: DOT ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:624:15: ( DOT ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:624:16: DOT ID { - match(input,DOT,FOLLOW_DOT_in_synpred33_DRL6Expressions3252); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_synpred33_DRL6Expressions3254); if (state.failed) return; + match(input,DOT,FOLLOW_DOT_in_synpred33_DRL6Expressions3255); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred33_DRL6Expressions3257); if (state.failed) return; } } @@ -7590,8 +7591,8 @@ public final void synpred33_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred34_DRL6Expressions public final void synpred34_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:605:15: ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:605:16: ( DOT | NULL_SAFE_DOT ) LEFT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:626:15: ( ( DOT | NULL_SAFE_DOT ) LEFT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:626:16: ( DOT | NULL_SAFE_DOT ) LEFT_PAREN { if ( input.LA(1)==DOT||input.LA(1)==NULL_SAFE_DOT ) { input.consume(); @@ -7603,7 +7604,7 @@ public final void synpred34_DRL6Expressions_fragment() throws RecognitionExcepti MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred34_DRL6Expressions3304); if (state.failed) return; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred34_DRL6Expressions3307); if (state.failed) return; } } @@ -7611,11 +7612,11 @@ public final void synpred34_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred35_DRL6Expressions public final void synpred35_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:610:15: ( HASH ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:610:16: HASH ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:15: ( HASH ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:631:16: HASH ID { - match(input,HASH,FOLLOW_HASH_in_synpred35_DRL6Expressions3449); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_synpred35_DRL6Expressions3451); if (state.failed) return; + match(input,HASH,FOLLOW_HASH_in_synpred35_DRL6Expressions3452); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred35_DRL6Expressions3454); if (state.failed) return; } } @@ -7623,11 +7624,11 @@ public final void synpred35_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred36_DRL6Expressions public final void synpred36_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:15: ( NULL_SAFE_DOT ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:612:16: NULL_SAFE_DOT ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:633:15: ( NULL_SAFE_DOT ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:633:16: NULL_SAFE_DOT ID { - match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_synpred36_DRL6Expressions3495); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_synpred36_DRL6Expressions3497); if (state.failed) return; + match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_synpred36_DRL6Expressions3498); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred36_DRL6Expressions3500); if (state.failed) return; } } @@ -7635,10 +7636,10 @@ public final void synpred36_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred37_DRL6Expressions public final void synpred37_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:13: ( identifierSuffix ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:613:14: identifierSuffix + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:634:13: ( identifierSuffix ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:634:14: identifierSuffix { - pushFollow(FOLLOW_identifierSuffix_in_synpred37_DRL6Expressions3525); + pushFollow(FOLLOW_identifierSuffix_in_synpred37_DRL6Expressions3528); identifierSuffix(); state._fsp--; if (state.failed) return; @@ -7649,11 +7650,11 @@ public final void synpred37_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred38_DRL6Expressions public final void synpred38_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:646:7: ( LEFT_SQUARE RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:646:8: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:7: ( LEFT_SQUARE RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:667:8: LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred38_DRL6Expressions3683); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred38_DRL6Expressions3685); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred38_DRL6Expressions3686); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred38_DRL6Expressions3688); if (state.failed) return; } } @@ -7661,10 +7662,10 @@ public final void synpred38_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred39_DRL6Expressions public final void synpred39_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:649:8: ( LEFT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:649:9: LEFT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:670:8: ( LEFT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:670:9: LEFT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred39_DRL6Expressions3788); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred39_DRL6Expressions3791); if (state.failed) return; } } @@ -7672,11 +7673,11 @@ public final void synpred39_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred40_DRL6Expressions public final void synpred40_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:107: ( LEFT_SQUARE RIGHT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:678:108: LEFT_SQUARE RIGHT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:107: ( LEFT_SQUARE RIGHT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:699:108: LEFT_SQUARE RIGHT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred40_DRL6Expressions4050); if (state.failed) return; - match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred40_DRL6Expressions4052); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred40_DRL6Expressions4053); if (state.failed) return; + match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred40_DRL6Expressions4055); if (state.failed) return; } } @@ -7684,11 +7685,11 @@ public final void synpred40_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred41_DRL6Expressions public final void synpred41_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:9: ( DOT super_key ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:709:10: DOT super_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:730:9: ( DOT super_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:730:10: DOT super_key { - match(input,DOT,FOLLOW_DOT_in_synpred41_DRL6Expressions4248); if (state.failed) return; - pushFollow(FOLLOW_super_key_in_synpred41_DRL6Expressions4250); + match(input,DOT,FOLLOW_DOT_in_synpred41_DRL6Expressions4251); if (state.failed) return; + pushFollow(FOLLOW_super_key_in_synpred41_DRL6Expressions4253); super_key(); state._fsp--; if (state.failed) return; @@ -7699,11 +7700,11 @@ public final void synpred41_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred42_DRL6Expressions public final void synpred42_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:710:9: ( DOT new_key ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:710:10: DOT new_key + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:731:9: ( DOT new_key ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:731:10: DOT new_key { - match(input,DOT,FOLLOW_DOT_in_synpred42_DRL6Expressions4270); if (state.failed) return; - pushFollow(FOLLOW_new_key_in_synpred42_DRL6Expressions4272); + match(input,DOT,FOLLOW_DOT_in_synpred42_DRL6Expressions4273); if (state.failed) return; + pushFollow(FOLLOW_new_key_in_synpred42_DRL6Expressions4275); new_key(); state._fsp--; if (state.failed) return; @@ -7714,11 +7715,11 @@ public final void synpred42_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred43_DRL6Expressions public final void synpred43_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:711:9: ( DOT ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:711:10: DOT ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:732:9: ( DOT ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:732:10: DOT ID { - match(input,DOT,FOLLOW_DOT_in_synpred43_DRL6Expressions4297); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_synpred43_DRL6Expressions4299); if (state.failed) return; + match(input,DOT,FOLLOW_DOT_in_synpred43_DRL6Expressions4300); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred43_DRL6Expressions4302); if (state.failed) return; } } @@ -7726,10 +7727,10 @@ public final void synpred43_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred44_DRL6Expressions public final void synpred44_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:713:20: ( LEFT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:713:21: LEFT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:734:20: ( LEFT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:734:21: LEFT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred44_DRL6Expressions4348); if (state.failed) return; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred44_DRL6Expressions4351); if (state.failed) return; } } @@ -7737,11 +7738,11 @@ public final void synpred44_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred45_DRL6Expressions public final void synpred45_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:714:9: ( NULL_SAFE_DOT ID ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:714:10: NULL_SAFE_DOT ID + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:735:9: ( NULL_SAFE_DOT ID ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:735:10: NULL_SAFE_DOT ID { - match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_synpred45_DRL6Expressions4366); if (state.failed) return; - match(input,ID,FOLLOW_ID_in_synpred45_DRL6Expressions4368); if (state.failed) return; + match(input,NULL_SAFE_DOT,FOLLOW_NULL_SAFE_DOT_in_synpred45_DRL6Expressions4369); if (state.failed) return; + match(input,ID,FOLLOW_ID_in_synpred45_DRL6Expressions4371); if (state.failed) return; } } @@ -7749,10 +7750,10 @@ public final void synpred45_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred46_DRL6Expressions public final void synpred46_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:716:20: ( LEFT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:716:21: LEFT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:737:20: ( LEFT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:737:21: LEFT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred46_DRL6Expressions4417); if (state.failed) return; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred46_DRL6Expressions4420); if (state.failed) return; } } @@ -7760,10 +7761,10 @@ public final void synpred46_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred47_DRL6Expressions public final void synpred47_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:718:9: ( LEFT_SQUARE ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:718:10: LEFT_SQUARE + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:739:9: ( LEFT_SQUARE ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:739:10: LEFT_SQUARE { - match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred47_DRL6Expressions4440); if (state.failed) return; + match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred47_DRL6Expressions4443); if (state.failed) return; } } @@ -7771,10 +7772,10 @@ public final void synpred47_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred48_DRL6Expressions public final void synpred48_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:18: ( LEFT_PAREN ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:725:19: LEFT_PAREN + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:746:18: ( LEFT_PAREN ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:746:19: LEFT_PAREN { - match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred48_DRL6Expressions4531); if (state.failed) return; + match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred48_DRL6Expressions4534); if (state.failed) return; } } @@ -7782,12 +7783,12 @@ public final void synpred48_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred49_DRL6Expressions public final void synpred49_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:755:7: ( GREATER GREATER GREATER ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:755:8: GREATER GREATER GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:776:7: ( GREATER GREATER GREATER ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:776:8: GREATER GREATER GREATER { - match(input,GREATER,FOLLOW_GREATER_in_synpred49_DRL6Expressions4761); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_synpred49_DRL6Expressions4763); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_synpred49_DRL6Expressions4765); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_synpred49_DRL6Expressions4764); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_synpred49_DRL6Expressions4766); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_synpred49_DRL6Expressions4768); if (state.failed) return; } } @@ -7795,11 +7796,11 @@ public final void synpred49_DRL6Expressions_fragment() throws RecognitionExcepti // $ANTLR start synpred50_DRL6Expressions public final void synpred50_DRL6Expressions_fragment() throws RecognitionException { - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:756:7: ( GREATER GREATER ) - // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:756:8: GREATER GREATER + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:777:7: ( GREATER GREATER ) + // src/main/resources/org/drools/drl/parser/DRL6Expressions.g:777:8: GREATER GREATER { - match(input,GREATER,FOLLOW_GREATER_in_synpred50_DRL6Expressions4784); if (state.failed) return; - match(input,GREATER,FOLLOW_GREATER_in_synpred50_DRL6Expressions4786); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_synpred50_DRL6Expressions4787); if (state.failed) return; + match(input,GREATER,FOLLOW_GREATER_in_synpred50_DRL6Expressions4789); if (state.failed) return; } } @@ -8482,450 +8483,450 @@ public final boolean synpred26_DRL6Expressions() { - public static final BitSet FOLLOW_STRING_in_literal92 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DECIMAL_in_literal109 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_HEX_in_literal125 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_FLOAT_in_literal145 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_BOOL_in_literal163 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NULL_in_literal182 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_TIME_INTERVAL_in_literal203 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_STAR_in_literal215 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_TILDE_in_operator256 = new BitSet(new long[]{0x000201808C100000L,0x0000000000000004L}); - public static final BitSet FOLLOW_EQUALS_in_operator267 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NOT_EQUALS_in_operator286 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_relationalOp_in_operator301 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LESS_EQUALS_in_relationalOp342 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_EQUALS_in_relationalOp358 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LESS_in_relationalOp371 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_relationalOp394 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_complexOp_in_relationalOp414 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_not_key_in_relationalOp429 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_neg_operator_key_in_relationalOp433 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_operator_key_in_relationalOp445 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_TILDE_in_complexOp477 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_complexOp481 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_type_in_typeList502 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_COMMA_in_typeList505 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_type_in_typeList507 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_typeMatch_in_type529 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_primitiveType_in_typeMatch555 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_typeMatch565 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_typeMatch567 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_ID_in_typeMatch581 = new BitSet(new long[]{0x000000C000010002L}); - public static final BitSet FOLLOW_typeArguments_in_typeMatch588 = new BitSet(new long[]{0x0000004000010002L}); - public static final BitSet FOLLOW_DOT_in_typeMatch593 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_typeMatch595 = new BitSet(new long[]{0x000000C000010002L}); - public static final BitSet FOLLOW_typeArguments_in_typeMatch602 = new BitSet(new long[]{0x0000004000010002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_typeMatch617 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_typeMatch619 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_LESS_in_typeArguments640 = new BitSet(new long[]{0x0200000080000000L}); - public static final BitSet FOLLOW_typeArgument_in_typeArguments642 = new BitSet(new long[]{0x0000000004000400L}); - public static final BitSet FOLLOW_COMMA_in_typeArguments645 = new BitSet(new long[]{0x0200000080000000L}); - public static final BitSet FOLLOW_typeArgument_in_typeArguments647 = new BitSet(new long[]{0x0000000004000400L}); - public static final BitSet FOLLOW_GREATER_in_typeArguments651 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_type_in_typeArgument668 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_QUESTION_in_typeArgument676 = new BitSet(new long[]{0x0000000080000002L}); - public static final BitSet FOLLOW_extends_key_in_typeArgument680 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_super_key_in_typeArgument684 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_type_in_typeArgument687 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expression_in_dummy711 = new BitSet(new long[]{0x5000000080000080L}); - public static final BitSet FOLLOW_set_in_dummy713 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_relationalExpression_in_dummy2747 = new BitSet(new long[]{0x0000000000000000L}); - public static final BitSet FOLLOW_EOF_in_dummy2749 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_conditionalExpression_in_expression768 = new BitSet(new long[]{0x0110A48004208022L,0x0000000000000100L}); - public static final BitSet FOLLOW_assignmentOperator_in_expression789 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_expression793 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_conditionalOrExpression_in_conditionalExpression820 = new BitSet(new long[]{0x0200000000000002L}); - public static final BitSet FOLLOW_ternaryExpression_in_conditionalExpression832 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_QUESTION_in_ternaryExpression854 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_ternaryExpression858 = new BitSet(new long[]{0x0000000000000200L}); - public static final BitSet FOLLOW_COLON_in_ternaryExpression860 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_ternaryExpression864 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_AT_in_fullAnnotation894 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_fullAnnotation898 = new BitSet(new long[]{0x0000002000010000L}); - public static final BitSet FOLLOW_DOT_in_fullAnnotation904 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_fullAnnotation908 = new BitSet(new long[]{0x0000002000010000L}); - public static final BitSet FOLLOW_annotationArgs_in_fullAnnotation929 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_annotationArgs945 = new BitSet(new long[]{0x148502F1A1017180L,0x000000000000000FL}); - public static final BitSet FOLLOW_annotationElementValuePairs_in_annotationArgs968 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_annotationValue_in_annotationArgs982 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_annotationArgs998 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1013 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_COMMA_in_annotationElementValuePairs1018 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1020 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_ID_in_annotationElementValuePair1041 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_annotationElementValuePair1043 = new BitSet(new long[]{0x048502F1A1017180L,0x000000000000000FL}); - public static final BitSet FOLLOW_annotationValue_in_annotationElementValuePair1047 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expression_in_annotationValue1070 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_annotationArray_in_annotationValue1082 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_fullAnnotation_in_annotationValue1095 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_CURLY_in_annotationArray1122 = new BitSet(new long[]{0x0C8502F1A1017180L,0x000000000000000FL}); - public static final BitSet FOLLOW_annotationValue_in_annotationArray1128 = new BitSet(new long[]{0x0800000000000400L}); - public static final BitSet FOLLOW_COMMA_in_annotationArray1151 = new BitSet(new long[]{0x048502F1A1017180L,0x000000000000000FL}); - public static final BitSet FOLLOW_annotationValue_in_annotationArray1155 = new BitSet(new long[]{0x0800000000000400L}); - public static final BitSet FOLLOW_RIGHT_CURLY_in_annotationArray1171 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_conditionalAndExpression_in_conditionalOrExpression1192 = new BitSet(new long[]{0x0000000000040002L}); - public static final BitSet FOLLOW_DOUBLE_PIPE_in_conditionalOrExpression1201 = new BitSet(new long[]{0x048502E1A1017180L,0x000000000000000FL}); - public static final BitSet FOLLOW_fullAnnotation_in_conditionalOrExpression1223 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_conditionalAndExpression_in_conditionalOrExpression1229 = new BitSet(new long[]{0x0000000000040002L}); - public static final BitSet FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1264 = new BitSet(new long[]{0x0000000000020002L}); - public static final BitSet FOLLOW_DOUBLE_AMPER_in_conditionalAndExpression1272 = new BitSet(new long[]{0x048502E1A1017180L,0x000000000000000FL}); - public static final BitSet FOLLOW_fullAnnotation_in_conditionalAndExpression1295 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1301 = new BitSet(new long[]{0x0000000000020002L}); - public static final BitSet FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1336 = new BitSet(new long[]{0x0040000000000002L}); - public static final BitSet FOLLOW_PIPE_in_inclusiveOrExpression1344 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1348 = new BitSet(new long[]{0x0040000000000002L}); - public static final BitSet FOLLOW_andExpression_in_exclusiveOrExpression1383 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L}); - public static final BitSet FOLLOW_XOR_in_exclusiveOrExpression1391 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_andExpression_in_exclusiveOrExpression1395 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L}); - public static final BitSet FOLLOW_equalityExpression_in_andExpression1430 = new BitSet(new long[]{0x0000000000000012L}); - public static final BitSet FOLLOW_AMPER_in_andExpression1438 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_equalityExpression_in_andExpression1442 = new BitSet(new long[]{0x0000000000000012L}); - public static final BitSet FOLLOW_instanceOfExpression_in_equalityExpression1477 = new BitSet(new long[]{0x0002000000100002L}); - public static final BitSet FOLLOW_EQUALS_in_equalityExpression1489 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_NOT_EQUALS_in_equalityExpression1495 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_instanceOfExpression_in_equalityExpression1511 = new BitSet(new long[]{0x0002000000100002L}); - public static final BitSet FOLLOW_inExpression_in_instanceOfExpression1546 = new BitSet(new long[]{0x0000000080000002L}); - public static final BitSet FOLLOW_instanceof_key_in_instanceOfExpression1556 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_type_in_instanceOfExpression1570 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_relationalExpression_in_inExpression1615 = new BitSet(new long[]{0x0000000080000002L}); - public static final BitSet FOLLOW_not_key_in_inExpression1635 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_in_key_in_inExpression1639 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_inExpression1641 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_inExpression1663 = new BitSet(new long[]{0x1000000000000400L}); - public static final BitSet FOLLOW_COMMA_in_inExpression1682 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_inExpression1686 = new BitSet(new long[]{0x1000000000000400L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_inExpression1707 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_in_key_in_inExpression1723 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_inExpression1725 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_inExpression1747 = new BitSet(new long[]{0x1000000000000400L}); - public static final BitSet FOLLOW_COMMA_in_inExpression1766 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_inExpression1770 = new BitSet(new long[]{0x1000000000000400L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_inExpression1791 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_shiftExpression_in_relationalExpression1832 = new BitSet(new long[]{0x000201A08C100002L,0x0000000000000004L}); - public static final BitSet FOLLOW_orRestriction_in_relationalExpression1857 = new BitSet(new long[]{0x000201A08C100002L,0x0000000000000004L}); - public static final BitSet FOLLOW_andRestriction_in_orRestriction1892 = new BitSet(new long[]{0x0000000000040002L}); - public static final BitSet FOLLOW_DOUBLE_PIPE_in_orRestriction1914 = new BitSet(new long[]{0x000201A08C100080L,0x0000000000000004L}); - public static final BitSet FOLLOW_fullAnnotation_in_orRestriction1918 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); - public static final BitSet FOLLOW_andRestriction_in_orRestriction1924 = new BitSet(new long[]{0x0000000000040002L}); - public static final BitSet FOLLOW_EOF_in_orRestriction1943 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_singleRestriction_in_andRestriction1963 = new BitSet(new long[]{0x0000000000020002L}); - public static final BitSet FOLLOW_DOUBLE_AMPER_in_andRestriction1983 = new BitSet(new long[]{0x000201A08C100080L,0x0000000000000004L}); - public static final BitSet FOLLOW_fullAnnotation_in_andRestriction2004 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); - public static final BitSet FOLLOW_singleRestriction_in_andRestriction2009 = new BitSet(new long[]{0x0000000000020002L}); - public static final BitSet FOLLOW_operator_in_singleRestriction2045 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_squareArguments_in_singleRestriction2074 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_shiftExpression_in_singleRestriction2078 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_shiftExpression_in_singleRestriction2091 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_singleRestriction2116 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); - public static final BitSet FOLLOW_orRestriction_in_singleRestriction2120 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_singleRestriction2122 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_additiveExpression_in_shiftExpression2146 = new BitSet(new long[]{0x0000008004000002L}); - public static final BitSet FOLLOW_shiftOp_in_shiftExpression2160 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_additiveExpression_in_shiftExpression2162 = new BitSet(new long[]{0x0000008004000002L}); - public static final BitSet FOLLOW_LESS_in_shiftOp2182 = new BitSet(new long[]{0x0000008000000000L}); - public static final BitSet FOLLOW_LESS_in_shiftOp2184 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_shiftOp2196 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_shiftOp2198 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_shiftOp2200 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_shiftOp2212 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_shiftOp2214 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_multiplicativeExpression_in_additiveExpression2242 = new BitSet(new long[]{0x0080020000000002L}); - public static final BitSet FOLLOW_set_in_additiveExpression2263 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_multiplicativeExpression_in_additiveExpression2271 = new BitSet(new long[]{0x0080020000000002L}); - public static final BitSet FOLLOW_unaryExpression_in_multiplicativeExpression2299 = new BitSet(new long[]{0x0000100000004002L,0x0000000000000001L}); - public static final BitSet FOLLOW_set_in_multiplicativeExpression2311 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpression_in_multiplicativeExpression2325 = new BitSet(new long[]{0x0000100000004002L,0x0000000000000001L}); - public static final BitSet FOLLOW_PLUS_in_unaryExpression2351 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpression_in_unaryExpression2355 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_MINUS_in_unaryExpression2373 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpression_in_unaryExpression2377 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_INCR_in_unaryExpression2397 = new BitSet(new long[]{0x000400E0A1001100L,0x000000000000000BL}); - public static final BitSet FOLLOW_primary_in_unaryExpression2399 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DECR_in_unaryExpression2409 = new BitSet(new long[]{0x000400E0A1001100L,0x000000000000000BL}); - public static final BitSet FOLLOW_primary_in_unaryExpression2411 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression2423 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_TILDE_in_unaryExpressionNotPlusMinus2453 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2455 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NEGATION_in_unaryExpressionNotPlusMinus2464 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2468 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_castExpression_in_unaryExpressionNotPlusMinus2492 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_backReferenceExpression_in_unaryExpressionNotPlusMinus2506 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_unaryExpressionNotPlusMinus2534 = new BitSet(new long[]{0x0000000000000200L}); - public static final BitSet FOLLOW_COLON_in_unaryExpressionNotPlusMinus2536 = new BitSet(new long[]{0x040400E0A1005100L,0x000000000000000BL}); - public static final BitSet FOLLOW_ID_in_unaryExpressionNotPlusMinus2575 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L}); - public static final BitSet FOLLOW_UNIFY_in_unaryExpressionNotPlusMinus2577 = new BitSet(new long[]{0x040400E0A1005100L,0x000000000000000BL}); - public static final BitSet FOLLOW_xpathPrimary_in_unaryExpressionNotPlusMinus2631 = new BitSet(new long[]{0x0008004100012002L}); - public static final BitSet FOLLOW_primary_in_unaryExpressionNotPlusMinus2649 = new BitSet(new long[]{0x0008004100012002L}); - public static final BitSet FOLLOW_selector_in_unaryExpressionNotPlusMinus2677 = new BitSet(new long[]{0x0008004100012002L}); - public static final BitSet FOLLOW_set_in_unaryExpressionNotPlusMinus2707 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_castExpression2739 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_primitiveType_in_castExpression2741 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_castExpression2743 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpression_in_castExpression2747 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_castExpression2764 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_type_in_castExpression2766 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_castExpression2768 = new BitSet(new long[]{0x040500E0A1015100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpressionNotPlusMinus_in_castExpression2770 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_backReferenceExpression2799 = new BitSet(new long[]{0x0000000000010000L}); - public static final BitSet FOLLOW_DOT_in_backReferenceExpression2801 = new BitSet(new long[]{0x0000000000004000L}); - public static final BitSet FOLLOW_DIV_in_backReferenceExpression2803 = new BitSet(new long[]{0x040500E0A1015100L,0x000000000000000FL}); - public static final BitSet FOLLOW_unaryExpressionNotPlusMinus_in_backReferenceExpression2807 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_boolean_key_in_primitiveType2826 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_char_key_in_primitiveType2834 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_byte_key_in_primitiveType2842 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_short_key_in_primitiveType2850 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_int_key_in_primitiveType2858 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_long_key_in_primitiveType2866 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_float_key_in_primitiveType2874 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_double_key_in_primitiveType2882 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_xpathChunk_in_xpathPrimary2930 = new BitSet(new long[]{0x0400000000004002L}); - public static final BitSet FOLLOW_xpathChunk_in_xpathPrimary2935 = new BitSet(new long[]{0x0400000000004002L}); - public static final BitSet FOLLOW_xpathSeparator_in_xpathChunk2965 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_xpathChunk2967 = new BitSet(new long[]{0x0000004010010002L}); - public static final BitSet FOLLOW_DOT_in_xpathChunk2970 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_xpathChunk2972 = new BitSet(new long[]{0x0000004010010002L}); - public static final BitSet FOLLOW_HASH_in_xpathChunk2977 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_xpathChunk2979 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_xpathChunk2984 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_xpathExpressionList_in_xpathChunk2986 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_xpathChunk2988 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expression_in_xpathExpressionList3018 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_COMMA_in_xpathExpressionList3029 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_xpathExpressionList3033 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_parExpression_in_primary3063 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_nonWildcardTypeArguments_in_primary3080 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_explicitGenericInvocationSuffix_in_primary3083 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_this_key_in_primary3087 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_arguments_in_primary3089 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_literal_in_primary3105 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_super_key_in_primary3127 = new BitSet(new long[]{0x0000002000010000L}); - public static final BitSet FOLLOW_superSuffix_in_primary3129 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_new_key_in_primary3144 = new BitSet(new long[]{0x0000008080000000L}); - public static final BitSet FOLLOW_creator_in_primary3146 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_primitiveType_in_primary3161 = new BitSet(new long[]{0x0000004000010000L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_primary3164 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_primary3166 = new BitSet(new long[]{0x0000004000010000L}); - public static final BitSet FOLLOW_DOT_in_primary3170 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_class_key_in_primary3172 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_inlineMapExpression_in_primary3192 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_inlineListExpression_in_primary3207 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_primary3223 = new BitSet(new long[]{0x0008006010010002L}); - public static final BitSet FOLLOW_DOT_in_primary3259 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_primary3263 = new BitSet(new long[]{0x0008006010010002L}); - public static final BitSet FOLLOW_set_in_primary3309 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_primary3315 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_primary3355 = new BitSet(new long[]{0x1000000000000400L}); - public static final BitSet FOLLOW_COMMA_in_primary3358 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_primary3362 = new BitSet(new long[]{0x1000000000000400L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_primary3402 = new BitSet(new long[]{0x0008006010010002L}); - public static final BitSet FOLLOW_HASH_in_primary3456 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_primary3460 = new BitSet(new long[]{0x0008006010010002L}); - public static final BitSet FOLLOW_NULL_SAFE_DOT_in_primary3502 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_primary3506 = new BitSet(new long[]{0x0008006010010002L}); - public static final BitSet FOLLOW_identifierSuffix_in_primary3528 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_inlineListExpression3549 = new BitSet(new long[]{0x248502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expressionList_in_inlineListExpression3551 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_inlineListExpression3554 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_inlineMapExpression3575 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_mapExpressionList_in_inlineMapExpression3577 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_inlineMapExpression3579 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_mapEntry_in_mapExpressionList3600 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_COMMA_in_mapExpressionList3603 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_mapEntry_in_mapExpressionList3605 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_expression_in_mapEntry3624 = new BitSet(new long[]{0x0000000000000200L}); - public static final BitSet FOLLOW_COLON_in_mapEntry3626 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_mapEntry3628 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_parExpression3649 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_parExpression3653 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_parExpression3655 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_identifierSuffix3689 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_identifierSuffix3730 = new BitSet(new long[]{0x0000004000010000L}); - public static final BitSet FOLLOW_DOT_in_identifierSuffix3774 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_class_key_in_identifierSuffix3778 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_identifierSuffix3793 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_identifierSuffix3823 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_identifierSuffix3851 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_arguments_in_identifierSuffix3867 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_nonWildcardTypeArguments_in_creator3889 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_createdName_in_creator3892 = new BitSet(new long[]{0x0000006000000000L}); - public static final BitSet FOLLOW_arrayCreatorRest_in_creator3903 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_classCreatorRest_in_creator3907 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_createdName3925 = new BitSet(new long[]{0x0000008000010002L}); - public static final BitSet FOLLOW_typeArguments_in_createdName3927 = new BitSet(new long[]{0x0000000000010002L}); - public static final BitSet FOLLOW_DOT_in_createdName3940 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_createdName3942 = new BitSet(new long[]{0x0000008000010002L}); - public static final BitSet FOLLOW_typeArguments_in_createdName3944 = new BitSet(new long[]{0x0000000000010002L}); - public static final BitSet FOLLOW_primitiveType_in_createdName3959 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_innerCreator3979 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_classCreatorRest_in_innerCreator3981 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4000 = new BitSet(new long[]{0x248502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4010 = new BitSet(new long[]{0x0000005000000000L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4013 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4015 = new BitSet(new long[]{0x0000005000000000L}); - public static final BitSet FOLLOW_arrayInitializer_in_arrayCreatorRest4019 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expression_in_arrayCreatorRest4033 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4035 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4040 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_arrayCreatorRest4042 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4044 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4056 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4058 = new BitSet(new long[]{0x0000004000000002L}); - public static final BitSet FOLLOW_arrayInitializer_in_variableInitializer4087 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expression_in_variableInitializer4101 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_CURLY_in_arrayInitializer4118 = new BitSet(new long[]{0x0C8502F1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_variableInitializer_in_arrayInitializer4121 = new BitSet(new long[]{0x0800000000000400L}); - public static final BitSet FOLLOW_COMMA_in_arrayInitializer4124 = new BitSet(new long[]{0x048502F1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_variableInitializer_in_arrayInitializer4126 = new BitSet(new long[]{0x0800000000000400L}); - public static final BitSet FOLLOW_COMMA_in_arrayInitializer4131 = new BitSet(new long[]{0x0800000000000000L}); - public static final BitSet FOLLOW_RIGHT_CURLY_in_arrayInitializer4138 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_arguments_in_classCreatorRest4155 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_nonWildcardTypeArguments_in_explicitGenericInvocation4173 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_arguments_in_explicitGenericInvocation4175 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LESS_in_nonWildcardTypeArguments4192 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_typeList_in_nonWildcardTypeArguments4194 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_nonWildcardTypeArguments4196 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_super_key_in_explicitGenericInvocationSuffix4213 = new BitSet(new long[]{0x0000002000010000L}); - public static final BitSet FOLLOW_superSuffix_in_explicitGenericInvocationSuffix4215 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_explicitGenericInvocationSuffix4226 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_arguments_in_explicitGenericInvocationSuffix4228 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_selector4253 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_super_key_in_selector4257 = new BitSet(new long[]{0x0000002000010000L}); - public static final BitSet FOLLOW_superSuffix_in_selector4259 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_selector4275 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_new_key_in_selector4279 = new BitSet(new long[]{0x0000008080000000L}); - public static final BitSet FOLLOW_nonWildcardTypeArguments_in_selector4282 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_innerCreator_in_selector4286 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_selector4302 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_selector4324 = new BitSet(new long[]{0x0000002000000002L}); - public static final BitSet FOLLOW_arguments_in_selector4353 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NULL_SAFE_DOT_in_selector4371 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_selector4393 = new BitSet(new long[]{0x0000002000000002L}); - public static final BitSet FOLLOW_arguments_in_selector4422 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_selector4443 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_selector4470 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_selector4495 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_arguments_in_superSuffix4514 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_superSuffix4525 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_superSuffix4527 = new BitSet(new long[]{0x0000002000000002L}); - public static final BitSet FOLLOW_arguments_in_superSuffix4536 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_squareArguments4559 = new BitSet(new long[]{0x248502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expressionList_in_squareArguments4564 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_squareArguments4570 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_arguments4587 = new BitSet(new long[]{0x148502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expressionList_in_arguments4599 = new BitSet(new long[]{0x1000000000000000L}); - public static final BitSet FOLLOW_RIGHT_PAREN_in_arguments4610 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expression_in_expressionList4640 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_COMMA_in_expressionList4651 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_expression_in_expressionList4655 = new BitSet(new long[]{0x0000000000000402L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4676 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_PLUS_ASSIGN_in_assignmentOperator4684 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_MINUS_ASSIGN_in_assignmentOperator4692 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_MULT_ASSIGN_in_assignmentOperator4700 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DIV_ASSIGN_in_assignmentOperator4708 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_AND_ASSIGN_in_assignmentOperator4716 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_OR_ASSIGN_in_assignmentOperator4724 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_XOR_ASSIGN_in_assignmentOperator4732 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_MOD_ASSIGN_in_assignmentOperator4740 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LESS_in_assignmentOperator4748 = new BitSet(new long[]{0x0000008000000000L}); - public static final BitSet FOLLOW_LESS_in_assignmentOperator4750 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4752 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_assignmentOperator4769 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_assignmentOperator4771 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_assignmentOperator4773 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4775 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_assignmentOperator4790 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_assignmentOperator4792 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4794 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_extends_key4824 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_super_key4853 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_instanceof_key4882 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_boolean_key4911 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_char_key4940 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_byte_key4969 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_short_key4998 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_int_key5027 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_float_key5056 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_long_key5085 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_double_key5114 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_void_key5143 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_this_key5172 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_class_key5201 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_new_key5231 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_not_key5260 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_in_key5287 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_operator_key5312 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_neg_operator_key5337 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_primitiveType_in_synpred1_DRL6Expressions548 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred2_DRL6Expressions559 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred2_DRL6Expressions561 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_typeArguments_in_synpred3_DRL6Expressions585 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_typeArguments_in_synpred4_DRL6Expressions599 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred5_DRL6Expressions611 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred5_DRL6Expressions613 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_assignmentOperator_in_synpred6_DRL6Expressions782 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_synpred7_DRL6Expressions961 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_EQUALS_ASSIGN_in_synpred7_DRL6Expressions963 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_not_key_in_synpred8_DRL6Expressions1629 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_in_key_in_synpred8_DRL6Expressions1631 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_operator_in_synpred9_DRL6Expressions1846 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred9_DRL6Expressions1850 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOUBLE_PIPE_in_synpred10_DRL6Expressions1903 = new BitSet(new long[]{0x000201A08C100080L,0x0000000000000004L}); - public static final BitSet FOLLOW_fullAnnotation_in_synpred10_DRL6Expressions1905 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); - public static final BitSet FOLLOW_andRestriction_in_synpred10_DRL6Expressions1909 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOUBLE_AMPER_in_synpred11_DRL6Expressions1972 = new BitSet(new long[]{0x000201808C100080L,0x0000000000000004L}); - public static final BitSet FOLLOW_fullAnnotation_in_synpred11_DRL6Expressions1974 = new BitSet(new long[]{0x000201808C100000L,0x0000000000000004L}); - public static final BitSet FOLLOW_operator_in_synpred11_DRL6Expressions1978 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_squareArguments_in_synpred12_DRL6Expressions2066 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); - public static final BitSet FOLLOW_shiftExpression_in_synpred12_DRL6Expressions2068 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_shiftOp_in_synpred13_DRL6Expressions2157 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_castExpression_in_synpred15_DRL6Expressions2489 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_backReferenceExpression_in_synpred16_DRL6Expressions2503 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_xpathSeparator_in_synpred17_DRL6Expressions2624 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_synpred17_DRL6Expressions2626 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_selector_in_synpred18_DRL6Expressions2674 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred20_DRL6Expressions2732 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_primitiveType_in_synpred20_DRL6Expressions2734 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred21_DRL6Expressions2757 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_type_in_synpred21_DRL6Expressions2759 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred24_DRL6Expressions3057 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_nonWildcardTypeArguments_in_synpred25_DRL6Expressions3076 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_literal_in_synpred26_DRL6Expressions3101 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_super_key_in_synpred27_DRL6Expressions3123 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_new_key_in_synpred28_DRL6Expressions3140 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_primitiveType_in_synpred29_DRL6Expressions3157 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_inlineMapExpression_in_synpred30_DRL6Expressions3188 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_inlineListExpression_in_synpred31_DRL6Expressions3203 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_ID_in_synpred32_DRL6Expressions3218 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_synpred33_DRL6Expressions3252 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_synpred33_DRL6Expressions3254 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_set_in_synpred34_DRL6Expressions3298 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred34_DRL6Expressions3304 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_HASH_in_synpred35_DRL6Expressions3449 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_synpred35_DRL6Expressions3451 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NULL_SAFE_DOT_in_synpred36_DRL6Expressions3495 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_synpred36_DRL6Expressions3497 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_identifierSuffix_in_synpred37_DRL6Expressions3525 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred38_DRL6Expressions3683 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred38_DRL6Expressions3685 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred39_DRL6Expressions3788 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred40_DRL6Expressions4050 = new BitSet(new long[]{0x2000000000000000L}); - public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred40_DRL6Expressions4052 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_synpred41_DRL6Expressions4248 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_super_key_in_synpred41_DRL6Expressions4250 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_synpred42_DRL6Expressions4270 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_new_key_in_synpred42_DRL6Expressions4272 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOT_in_synpred43_DRL6Expressions4297 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_synpred43_DRL6Expressions4299 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred44_DRL6Expressions4348 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NULL_SAFE_DOT_in_synpred45_DRL6Expressions4366 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_ID_in_synpred45_DRL6Expressions4368 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred46_DRL6Expressions4417 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred47_DRL6Expressions4440 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LEFT_PAREN_in_synpred48_DRL6Expressions4531 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_synpred49_DRL6Expressions4761 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_synpred49_DRL6Expressions4763 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_synpred49_DRL6Expressions4765 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_GREATER_in_synpred50_DRL6Expressions4784 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_GREATER_in_synpred50_DRL6Expressions4786 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_STRING_in_literal95 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DECIMAL_in_literal112 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_HEX_in_literal128 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_FLOAT_in_literal148 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_BOOL_in_literal166 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NULL_in_literal185 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_TIME_INTERVAL_in_literal206 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_STAR_in_literal218 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_TILDE_in_operator259 = new BitSet(new long[]{0x000201808C100000L,0x0000000000000004L}); + public static final BitSet FOLLOW_EQUALS_in_operator270 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NOT_EQUALS_in_operator289 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_relationalOp_in_operator304 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LESS_EQUALS_in_relationalOp345 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_EQUALS_in_relationalOp361 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LESS_in_relationalOp374 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_relationalOp397 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_complexOp_in_relationalOp417 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_not_key_in_relationalOp432 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_neg_operator_key_in_relationalOp436 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_operator_key_in_relationalOp448 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_TILDE_in_complexOp480 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_complexOp484 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_type_in_typeList505 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_COMMA_in_typeList508 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_type_in_typeList510 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_typeMatch_in_type532 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_primitiveType_in_typeMatch558 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_typeMatch568 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_typeMatch570 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_ID_in_typeMatch584 = new BitSet(new long[]{0x000000C000010002L}); + public static final BitSet FOLLOW_typeArguments_in_typeMatch591 = new BitSet(new long[]{0x0000004000010002L}); + public static final BitSet FOLLOW_DOT_in_typeMatch596 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_typeMatch598 = new BitSet(new long[]{0x000000C000010002L}); + public static final BitSet FOLLOW_typeArguments_in_typeMatch605 = new BitSet(new long[]{0x0000004000010002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_typeMatch620 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_typeMatch622 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_LESS_in_typeArguments643 = new BitSet(new long[]{0x0200000080000000L}); + public static final BitSet FOLLOW_typeArgument_in_typeArguments645 = new BitSet(new long[]{0x0000000004000400L}); + public static final BitSet FOLLOW_COMMA_in_typeArguments648 = new BitSet(new long[]{0x0200000080000000L}); + public static final BitSet FOLLOW_typeArgument_in_typeArguments650 = new BitSet(new long[]{0x0000000004000400L}); + public static final BitSet FOLLOW_GREATER_in_typeArguments654 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_type_in_typeArgument671 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_QUESTION_in_typeArgument679 = new BitSet(new long[]{0x0000000080000002L}); + public static final BitSet FOLLOW_extends_key_in_typeArgument683 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_super_key_in_typeArgument687 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_type_in_typeArgument690 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expression_in_dummy714 = new BitSet(new long[]{0x5000000080000080L}); + public static final BitSet FOLLOW_set_in_dummy716 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_relationalExpression_in_dummy2750 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_dummy2752 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_conditionalExpression_in_expression771 = new BitSet(new long[]{0x0110A48004208022L,0x0000000000000100L}); + public static final BitSet FOLLOW_assignmentOperator_in_expression792 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_expression796 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_conditionalOrExpression_in_conditionalExpression823 = new BitSet(new long[]{0x0200000000000002L}); + public static final BitSet FOLLOW_ternaryExpression_in_conditionalExpression835 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_QUESTION_in_ternaryExpression857 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_ternaryExpression861 = new BitSet(new long[]{0x0000000000000200L}); + public static final BitSet FOLLOW_COLON_in_ternaryExpression863 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_ternaryExpression867 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_AT_in_fullAnnotation897 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_fullAnnotation901 = new BitSet(new long[]{0x0000002000010000L}); + public static final BitSet FOLLOW_DOT_in_fullAnnotation907 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_fullAnnotation911 = new BitSet(new long[]{0x0000002000010000L}); + public static final BitSet FOLLOW_annotationArgs_in_fullAnnotation932 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_annotationArgs948 = new BitSet(new long[]{0x148502F1A1017180L,0x000000000000000FL}); + public static final BitSet FOLLOW_annotationElementValuePairs_in_annotationArgs971 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_annotationValue_in_annotationArgs985 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_annotationArgs1001 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1016 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_COMMA_in_annotationElementValuePairs1021 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_annotationElementValuePair_in_annotationElementValuePairs1023 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_ID_in_annotationElementValuePair1044 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_annotationElementValuePair1046 = new BitSet(new long[]{0x048502F1A1017180L,0x000000000000000FL}); + public static final BitSet FOLLOW_annotationValue_in_annotationElementValuePair1050 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expression_in_annotationValue1073 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_annotationArray_in_annotationValue1085 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_fullAnnotation_in_annotationValue1098 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_CURLY_in_annotationArray1125 = new BitSet(new long[]{0x0C8502F1A1017180L,0x000000000000000FL}); + public static final BitSet FOLLOW_annotationValue_in_annotationArray1131 = new BitSet(new long[]{0x0800000000000400L}); + public static final BitSet FOLLOW_COMMA_in_annotationArray1154 = new BitSet(new long[]{0x048502F1A1017180L,0x000000000000000FL}); + public static final BitSet FOLLOW_annotationValue_in_annotationArray1158 = new BitSet(new long[]{0x0800000000000400L}); + public static final BitSet FOLLOW_RIGHT_CURLY_in_annotationArray1174 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_conditionalAndExpression_in_conditionalOrExpression1195 = new BitSet(new long[]{0x0000000000040002L}); + public static final BitSet FOLLOW_DOUBLE_PIPE_in_conditionalOrExpression1204 = new BitSet(new long[]{0x048502E1A1017180L,0x000000000000000FL}); + public static final BitSet FOLLOW_fullAnnotation_in_conditionalOrExpression1226 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_conditionalAndExpression_in_conditionalOrExpression1232 = new BitSet(new long[]{0x0000000000040002L}); + public static final BitSet FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1267 = new BitSet(new long[]{0x0000000000020002L}); + public static final BitSet FOLLOW_DOUBLE_AMPER_in_conditionalAndExpression1275 = new BitSet(new long[]{0x048502E1A1017180L,0x000000000000000FL}); + public static final BitSet FOLLOW_fullAnnotation_in_conditionalAndExpression1298 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_inclusiveOrExpression_in_conditionalAndExpression1304 = new BitSet(new long[]{0x0000000000020002L}); + public static final BitSet FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1339 = new BitSet(new long[]{0x0040000000000002L}); + public static final BitSet FOLLOW_PIPE_in_inclusiveOrExpression1347 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_exclusiveOrExpression_in_inclusiveOrExpression1351 = new BitSet(new long[]{0x0040000000000002L}); + public static final BitSet FOLLOW_andExpression_in_exclusiveOrExpression1386 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L}); + public static final BitSet FOLLOW_XOR_in_exclusiveOrExpression1394 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_andExpression_in_exclusiveOrExpression1398 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L}); + public static final BitSet FOLLOW_equalityExpression_in_andExpression1433 = new BitSet(new long[]{0x0000000000000012L}); + public static final BitSet FOLLOW_AMPER_in_andExpression1441 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_equalityExpression_in_andExpression1445 = new BitSet(new long[]{0x0000000000000012L}); + public static final BitSet FOLLOW_instanceOfExpression_in_equalityExpression1480 = new BitSet(new long[]{0x0002000000100002L}); + public static final BitSet FOLLOW_EQUALS_in_equalityExpression1492 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_NOT_EQUALS_in_equalityExpression1498 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_instanceOfExpression_in_equalityExpression1514 = new BitSet(new long[]{0x0002000000100002L}); + public static final BitSet FOLLOW_inExpression_in_instanceOfExpression1549 = new BitSet(new long[]{0x0000000080000002L}); + public static final BitSet FOLLOW_instanceof_key_in_instanceOfExpression1559 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_type_in_instanceOfExpression1573 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_relationalExpression_in_inExpression1618 = new BitSet(new long[]{0x0000000080000002L}); + public static final BitSet FOLLOW_not_key_in_inExpression1638 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_in_key_in_inExpression1642 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_inExpression1644 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_inExpression1666 = new BitSet(new long[]{0x1000000000000400L}); + public static final BitSet FOLLOW_COMMA_in_inExpression1685 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_inExpression1689 = new BitSet(new long[]{0x1000000000000400L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_inExpression1710 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_in_key_in_inExpression1726 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_inExpression1728 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_inExpression1750 = new BitSet(new long[]{0x1000000000000400L}); + public static final BitSet FOLLOW_COMMA_in_inExpression1769 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_inExpression1773 = new BitSet(new long[]{0x1000000000000400L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_inExpression1794 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_shiftExpression_in_relationalExpression1835 = new BitSet(new long[]{0x000201A08C100002L,0x0000000000000004L}); + public static final BitSet FOLLOW_orRestriction_in_relationalExpression1860 = new BitSet(new long[]{0x000201A08C100002L,0x0000000000000004L}); + public static final BitSet FOLLOW_andRestriction_in_orRestriction1895 = new BitSet(new long[]{0x0000000000040002L}); + public static final BitSet FOLLOW_DOUBLE_PIPE_in_orRestriction1917 = new BitSet(new long[]{0x000201A08C100080L,0x0000000000000004L}); + public static final BitSet FOLLOW_fullAnnotation_in_orRestriction1921 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); + public static final BitSet FOLLOW_andRestriction_in_orRestriction1927 = new BitSet(new long[]{0x0000000000040002L}); + public static final BitSet FOLLOW_EOF_in_orRestriction1946 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_singleRestriction_in_andRestriction1966 = new BitSet(new long[]{0x0000000000020002L}); + public static final BitSet FOLLOW_DOUBLE_AMPER_in_andRestriction1986 = new BitSet(new long[]{0x000201A08C100080L,0x0000000000000004L}); + public static final BitSet FOLLOW_fullAnnotation_in_andRestriction2007 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); + public static final BitSet FOLLOW_singleRestriction_in_andRestriction2012 = new BitSet(new long[]{0x0000000000020002L}); + public static final BitSet FOLLOW_operator_in_singleRestriction2048 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_squareArguments_in_singleRestriction2077 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_shiftExpression_in_singleRestriction2081 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_shiftExpression_in_singleRestriction2094 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_singleRestriction2119 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); + public static final BitSet FOLLOW_orRestriction_in_singleRestriction2123 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_singleRestriction2125 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_additiveExpression_in_shiftExpression2149 = new BitSet(new long[]{0x0000008004000002L}); + public static final BitSet FOLLOW_shiftOp_in_shiftExpression2163 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_additiveExpression_in_shiftExpression2165 = new BitSet(new long[]{0x0000008004000002L}); + public static final BitSet FOLLOW_LESS_in_shiftOp2185 = new BitSet(new long[]{0x0000008000000000L}); + public static final BitSet FOLLOW_LESS_in_shiftOp2187 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_shiftOp2199 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_shiftOp2201 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_shiftOp2203 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_shiftOp2215 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_shiftOp2217 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_multiplicativeExpression_in_additiveExpression2245 = new BitSet(new long[]{0x0080020000000002L}); + public static final BitSet FOLLOW_set_in_additiveExpression2266 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_multiplicativeExpression_in_additiveExpression2274 = new BitSet(new long[]{0x0080020000000002L}); + public static final BitSet FOLLOW_unaryExpression_in_multiplicativeExpression2302 = new BitSet(new long[]{0x0000100000004002L,0x0000000000000001L}); + public static final BitSet FOLLOW_set_in_multiplicativeExpression2314 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpression_in_multiplicativeExpression2328 = new BitSet(new long[]{0x0000100000004002L,0x0000000000000001L}); + public static final BitSet FOLLOW_PLUS_in_unaryExpression2354 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpression_in_unaryExpression2358 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_MINUS_in_unaryExpression2376 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpression_in_unaryExpression2380 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_INCR_in_unaryExpression2400 = new BitSet(new long[]{0x000400E0A1001100L,0x000000000000000BL}); + public static final BitSet FOLLOW_primary_in_unaryExpression2402 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DECR_in_unaryExpression2412 = new BitSet(new long[]{0x000400E0A1001100L,0x000000000000000BL}); + public static final BitSet FOLLOW_primary_in_unaryExpression2414 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression2426 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_TILDE_in_unaryExpressionNotPlusMinus2456 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2458 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NEGATION_in_unaryExpressionNotPlusMinus2467 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpression_in_unaryExpressionNotPlusMinus2471 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_castExpression_in_unaryExpressionNotPlusMinus2495 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_backReferenceExpression_in_unaryExpressionNotPlusMinus2509 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_unaryExpressionNotPlusMinus2537 = new BitSet(new long[]{0x0000000000000200L}); + public static final BitSet FOLLOW_COLON_in_unaryExpressionNotPlusMinus2539 = new BitSet(new long[]{0x040400E0A1005100L,0x000000000000000BL}); + public static final BitSet FOLLOW_ID_in_unaryExpressionNotPlusMinus2578 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L}); + public static final BitSet FOLLOW_UNIFY_in_unaryExpressionNotPlusMinus2580 = new BitSet(new long[]{0x040400E0A1005100L,0x000000000000000BL}); + public static final BitSet FOLLOW_xpathPrimary_in_unaryExpressionNotPlusMinus2634 = new BitSet(new long[]{0x0008004100012002L}); + public static final BitSet FOLLOW_primary_in_unaryExpressionNotPlusMinus2652 = new BitSet(new long[]{0x0008004100012002L}); + public static final BitSet FOLLOW_selector_in_unaryExpressionNotPlusMinus2680 = new BitSet(new long[]{0x0008004100012002L}); + public static final BitSet FOLLOW_set_in_unaryExpressionNotPlusMinus2710 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_castExpression2742 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_primitiveType_in_castExpression2744 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_castExpression2746 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpression_in_castExpression2750 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_castExpression2767 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_type_in_castExpression2769 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_castExpression2771 = new BitSet(new long[]{0x040500E0A1015100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpressionNotPlusMinus_in_castExpression2773 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_backReferenceExpression2802 = new BitSet(new long[]{0x0000000000010000L}); + public static final BitSet FOLLOW_DOT_in_backReferenceExpression2804 = new BitSet(new long[]{0x0000000000004000L}); + public static final BitSet FOLLOW_DIV_in_backReferenceExpression2806 = new BitSet(new long[]{0x040500E0A1015100L,0x000000000000000FL}); + public static final BitSet FOLLOW_unaryExpressionNotPlusMinus_in_backReferenceExpression2810 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_boolean_key_in_primitiveType2829 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_char_key_in_primitiveType2837 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_byte_key_in_primitiveType2845 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_short_key_in_primitiveType2853 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_int_key_in_primitiveType2861 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_long_key_in_primitiveType2869 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_float_key_in_primitiveType2877 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_double_key_in_primitiveType2885 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_xpathChunk_in_xpathPrimary2933 = new BitSet(new long[]{0x0400000000004002L}); + public static final BitSet FOLLOW_xpathChunk_in_xpathPrimary2938 = new BitSet(new long[]{0x0400000000004002L}); + public static final BitSet FOLLOW_xpathSeparator_in_xpathChunk2968 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_xpathChunk2970 = new BitSet(new long[]{0x0000004010010002L}); + public static final BitSet FOLLOW_DOT_in_xpathChunk2973 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_xpathChunk2975 = new BitSet(new long[]{0x0000004010010002L}); + public static final BitSet FOLLOW_HASH_in_xpathChunk2980 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_xpathChunk2982 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_xpathChunk2987 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_xpathExpressionList_in_xpathChunk2989 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_xpathChunk2991 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expression_in_xpathExpressionList3021 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_COMMA_in_xpathExpressionList3032 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_xpathExpressionList3036 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_parExpression_in_primary3066 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_nonWildcardTypeArguments_in_primary3083 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_explicitGenericInvocationSuffix_in_primary3086 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_this_key_in_primary3090 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_arguments_in_primary3092 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_literal_in_primary3108 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_super_key_in_primary3130 = new BitSet(new long[]{0x0000002000010000L}); + public static final BitSet FOLLOW_superSuffix_in_primary3132 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_new_key_in_primary3147 = new BitSet(new long[]{0x0000008080000000L}); + public static final BitSet FOLLOW_creator_in_primary3149 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_primitiveType_in_primary3164 = new BitSet(new long[]{0x0000004000010000L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_primary3167 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_primary3169 = new BitSet(new long[]{0x0000004000010000L}); + public static final BitSet FOLLOW_DOT_in_primary3173 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_class_key_in_primary3175 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_inlineMapExpression_in_primary3195 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_inlineListExpression_in_primary3210 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_primary3226 = new BitSet(new long[]{0x0008006010010002L}); + public static final BitSet FOLLOW_DOT_in_primary3262 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_primary3266 = new BitSet(new long[]{0x0008006010010002L}); + public static final BitSet FOLLOW_set_in_primary3312 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_primary3318 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_primary3358 = new BitSet(new long[]{0x1000000000000400L}); + public static final BitSet FOLLOW_COMMA_in_primary3361 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_primary3365 = new BitSet(new long[]{0x1000000000000400L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_primary3405 = new BitSet(new long[]{0x0008006010010002L}); + public static final BitSet FOLLOW_HASH_in_primary3459 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_primary3463 = new BitSet(new long[]{0x0008006010010002L}); + public static final BitSet FOLLOW_NULL_SAFE_DOT_in_primary3505 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_primary3509 = new BitSet(new long[]{0x0008006010010002L}); + public static final BitSet FOLLOW_identifierSuffix_in_primary3531 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_inlineListExpression3552 = new BitSet(new long[]{0x248502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expressionList_in_inlineListExpression3554 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_inlineListExpression3557 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_inlineMapExpression3578 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_mapExpressionList_in_inlineMapExpression3580 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_inlineMapExpression3582 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_mapEntry_in_mapExpressionList3603 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_COMMA_in_mapExpressionList3606 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_mapEntry_in_mapExpressionList3608 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_expression_in_mapEntry3627 = new BitSet(new long[]{0x0000000000000200L}); + public static final BitSet FOLLOW_COLON_in_mapEntry3629 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_mapEntry3631 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_parExpression3652 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_parExpression3656 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_parExpression3658 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_identifierSuffix3692 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_identifierSuffix3733 = new BitSet(new long[]{0x0000004000010000L}); + public static final BitSet FOLLOW_DOT_in_identifierSuffix3777 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_class_key_in_identifierSuffix3781 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_identifierSuffix3796 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_identifierSuffix3826 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_identifierSuffix3854 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_arguments_in_identifierSuffix3870 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_nonWildcardTypeArguments_in_creator3892 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_createdName_in_creator3895 = new BitSet(new long[]{0x0000006000000000L}); + public static final BitSet FOLLOW_arrayCreatorRest_in_creator3906 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_classCreatorRest_in_creator3910 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_createdName3928 = new BitSet(new long[]{0x0000008000010002L}); + public static final BitSet FOLLOW_typeArguments_in_createdName3930 = new BitSet(new long[]{0x0000000000010002L}); + public static final BitSet FOLLOW_DOT_in_createdName3943 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_createdName3945 = new BitSet(new long[]{0x0000008000010002L}); + public static final BitSet FOLLOW_typeArguments_in_createdName3947 = new BitSet(new long[]{0x0000000000010002L}); + public static final BitSet FOLLOW_primitiveType_in_createdName3962 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_innerCreator3982 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_classCreatorRest_in_innerCreator3984 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4003 = new BitSet(new long[]{0x248502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4013 = new BitSet(new long[]{0x0000005000000000L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4016 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4018 = new BitSet(new long[]{0x0000005000000000L}); + public static final BitSet FOLLOW_arrayInitializer_in_arrayCreatorRest4022 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expression_in_arrayCreatorRest4036 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4038 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4043 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_arrayCreatorRest4045 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4047 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_arrayCreatorRest4059 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_arrayCreatorRest4061 = new BitSet(new long[]{0x0000004000000002L}); + public static final BitSet FOLLOW_arrayInitializer_in_variableInitializer4090 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expression_in_variableInitializer4104 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_CURLY_in_arrayInitializer4121 = new BitSet(new long[]{0x0C8502F1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_variableInitializer_in_arrayInitializer4124 = new BitSet(new long[]{0x0800000000000400L}); + public static final BitSet FOLLOW_COMMA_in_arrayInitializer4127 = new BitSet(new long[]{0x048502F1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_variableInitializer_in_arrayInitializer4129 = new BitSet(new long[]{0x0800000000000400L}); + public static final BitSet FOLLOW_COMMA_in_arrayInitializer4134 = new BitSet(new long[]{0x0800000000000000L}); + public static final BitSet FOLLOW_RIGHT_CURLY_in_arrayInitializer4141 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_arguments_in_classCreatorRest4158 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_nonWildcardTypeArguments_in_explicitGenericInvocation4176 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_arguments_in_explicitGenericInvocation4178 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LESS_in_nonWildcardTypeArguments4195 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_typeList_in_nonWildcardTypeArguments4197 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_nonWildcardTypeArguments4199 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_super_key_in_explicitGenericInvocationSuffix4216 = new BitSet(new long[]{0x0000002000010000L}); + public static final BitSet FOLLOW_superSuffix_in_explicitGenericInvocationSuffix4218 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_explicitGenericInvocationSuffix4229 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_arguments_in_explicitGenericInvocationSuffix4231 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_selector4256 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_super_key_in_selector4260 = new BitSet(new long[]{0x0000002000010000L}); + public static final BitSet FOLLOW_superSuffix_in_selector4262 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_selector4278 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_new_key_in_selector4282 = new BitSet(new long[]{0x0000008080000000L}); + public static final BitSet FOLLOW_nonWildcardTypeArguments_in_selector4285 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_innerCreator_in_selector4289 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_selector4305 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_selector4327 = new BitSet(new long[]{0x0000002000000002L}); + public static final BitSet FOLLOW_arguments_in_selector4356 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NULL_SAFE_DOT_in_selector4374 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_selector4396 = new BitSet(new long[]{0x0000002000000002L}); + public static final BitSet FOLLOW_arguments_in_selector4425 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_selector4446 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_selector4473 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_selector4498 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_arguments_in_superSuffix4517 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_superSuffix4528 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_superSuffix4530 = new BitSet(new long[]{0x0000002000000002L}); + public static final BitSet FOLLOW_arguments_in_superSuffix4539 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_squareArguments4562 = new BitSet(new long[]{0x248502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expressionList_in_squareArguments4567 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_squareArguments4573 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_arguments4590 = new BitSet(new long[]{0x148502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expressionList_in_arguments4602 = new BitSet(new long[]{0x1000000000000000L}); + public static final BitSet FOLLOW_RIGHT_PAREN_in_arguments4613 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expression_in_expressionList4643 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_COMMA_in_expressionList4654 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_expression_in_expressionList4658 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4679 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_PLUS_ASSIGN_in_assignmentOperator4687 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_MINUS_ASSIGN_in_assignmentOperator4695 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_MULT_ASSIGN_in_assignmentOperator4703 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DIV_ASSIGN_in_assignmentOperator4711 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_AND_ASSIGN_in_assignmentOperator4719 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_OR_ASSIGN_in_assignmentOperator4727 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_XOR_ASSIGN_in_assignmentOperator4735 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_MOD_ASSIGN_in_assignmentOperator4743 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LESS_in_assignmentOperator4751 = new BitSet(new long[]{0x0000008000000000L}); + public static final BitSet FOLLOW_LESS_in_assignmentOperator4753 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4755 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_assignmentOperator4772 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_assignmentOperator4774 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_assignmentOperator4776 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4778 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_assignmentOperator4793 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_assignmentOperator4795 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_assignmentOperator4797 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_extends_key4827 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_super_key4856 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_instanceof_key4885 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_boolean_key4914 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_char_key4943 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_byte_key4972 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_short_key5001 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_int_key5030 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_float_key5059 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_long_key5088 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_double_key5117 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_void_key5146 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_this_key5175 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_class_key5204 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_new_key5234 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_not_key5263 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_in_key5290 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_operator_key5315 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_neg_operator_key5340 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_primitiveType_in_synpred1_DRL6Expressions551 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred2_DRL6Expressions562 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred2_DRL6Expressions564 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_typeArguments_in_synpred3_DRL6Expressions588 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_typeArguments_in_synpred4_DRL6Expressions602 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred5_DRL6Expressions614 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred5_DRL6Expressions616 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_assignmentOperator_in_synpred6_DRL6Expressions785 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_synpred7_DRL6Expressions964 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_EQUALS_ASSIGN_in_synpred7_DRL6Expressions966 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_not_key_in_synpred8_DRL6Expressions1632 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_in_key_in_synpred8_DRL6Expressions1634 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_operator_in_synpred9_DRL6Expressions1849 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred9_DRL6Expressions1853 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOUBLE_PIPE_in_synpred10_DRL6Expressions1906 = new BitSet(new long[]{0x000201A08C100080L,0x0000000000000004L}); + public static final BitSet FOLLOW_fullAnnotation_in_synpred10_DRL6Expressions1908 = new BitSet(new long[]{0x000201A08C100000L,0x0000000000000004L}); + public static final BitSet FOLLOW_andRestriction_in_synpred10_DRL6Expressions1912 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOUBLE_AMPER_in_synpred11_DRL6Expressions1975 = new BitSet(new long[]{0x000201808C100080L,0x0000000000000004L}); + public static final BitSet FOLLOW_fullAnnotation_in_synpred11_DRL6Expressions1977 = new BitSet(new long[]{0x000201808C100000L,0x0000000000000004L}); + public static final BitSet FOLLOW_operator_in_synpred11_DRL6Expressions1981 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_squareArguments_in_synpred12_DRL6Expressions2069 = new BitSet(new long[]{0x048502E1A1017100L,0x000000000000000FL}); + public static final BitSet FOLLOW_shiftExpression_in_synpred12_DRL6Expressions2071 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_shiftOp_in_synpred13_DRL6Expressions2160 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_castExpression_in_synpred15_DRL6Expressions2492 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_backReferenceExpression_in_synpred16_DRL6Expressions2506 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_xpathSeparator_in_synpred17_DRL6Expressions2627 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_synpred17_DRL6Expressions2629 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_selector_in_synpred18_DRL6Expressions2677 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred20_DRL6Expressions2735 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_primitiveType_in_synpred20_DRL6Expressions2737 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred21_DRL6Expressions2760 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_type_in_synpred21_DRL6Expressions2762 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred24_DRL6Expressions3060 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_nonWildcardTypeArguments_in_synpred25_DRL6Expressions3079 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_literal_in_synpred26_DRL6Expressions3104 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_super_key_in_synpred27_DRL6Expressions3126 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_new_key_in_synpred28_DRL6Expressions3143 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_primitiveType_in_synpred29_DRL6Expressions3160 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_inlineMapExpression_in_synpred30_DRL6Expressions3191 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_inlineListExpression_in_synpred31_DRL6Expressions3206 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_synpred32_DRL6Expressions3221 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_synpred33_DRL6Expressions3255 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_synpred33_DRL6Expressions3257 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_set_in_synpred34_DRL6Expressions3301 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred34_DRL6Expressions3307 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_HASH_in_synpred35_DRL6Expressions3452 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_synpred35_DRL6Expressions3454 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NULL_SAFE_DOT_in_synpred36_DRL6Expressions3498 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_synpred36_DRL6Expressions3500 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_identifierSuffix_in_synpred37_DRL6Expressions3528 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred38_DRL6Expressions3686 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred38_DRL6Expressions3688 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred39_DRL6Expressions3791 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred40_DRL6Expressions4053 = new BitSet(new long[]{0x2000000000000000L}); + public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred40_DRL6Expressions4055 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_synpred41_DRL6Expressions4251 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_super_key_in_synpred41_DRL6Expressions4253 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_synpred42_DRL6Expressions4273 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_new_key_in_synpred42_DRL6Expressions4275 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOT_in_synpred43_DRL6Expressions4300 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_synpred43_DRL6Expressions4302 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred44_DRL6Expressions4351 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NULL_SAFE_DOT_in_synpred45_DRL6Expressions4369 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_ID_in_synpred45_DRL6Expressions4371 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred46_DRL6Expressions4420 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred47_DRL6Expressions4443 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LEFT_PAREN_in_synpred48_DRL6Expressions4534 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_synpred49_DRL6Expressions4764 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_synpred49_DRL6Expressions4766 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_synpred49_DRL6Expressions4768 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_GREATER_in_synpred50_DRL6Expressions4787 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_GREATER_in_synpred50_DRL6Expressions4789 = new BitSet(new long[]{0x0000000000000002L}); } diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Parser.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Parser.java index f2181a37b86..55efa971837 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Parser.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Parser.java @@ -1558,6 +1558,7 @@ public AttributeDescr attribute(AttributeSupportBuilder as) { DroolsSoftKeywords.GROUP)) { attribute = stringAttribute(as, new String[]{DroolsSoftKeywords.AGENDA, "-", DroolsSoftKeywords.GROUP}); + helper.logAgendaGroupWarn(attribute); } else if (helper.validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && helper.validateLT(2, "-") && @@ -2155,6 +2156,7 @@ private BaseDescr lhsOr(final CEDescrBuilder ce, while (input.LA(1) == DRL6Lexer.AT) { // annotation* annotation(or); + helper.logAnnotationInLhsPatternWarn(or); if (state.failed) return null; } @@ -2212,6 +2214,7 @@ private BaseDescr lhsOr(final CEDescrBuilder ce, null, null, DroolsEditorType.SYMBOL); + helper.logInfixOrWarn(or); } else { match(input, DRL6Lexer.ID, @@ -2225,6 +2228,7 @@ private BaseDescr lhsOr(final CEDescrBuilder ce, while (input.LA(1) == DRL6Lexer.AT) { // annotation* annotation(or); + helper.logAnnotationInLhsPatternWarn(or); if (state.failed) return null; } @@ -2299,6 +2303,7 @@ private BaseDescr lhsAnd(final CEDescrBuilder ce, while (input.LA(1) == DRL6Lexer.AT) { // annotation* annotation(and); + helper.logAnnotationInLhsPatternWarn(and); if (state.failed) return null; } @@ -2354,6 +2359,7 @@ private BaseDescr lhsAnd(final CEDescrBuilder ce, null, null, DroolsEditorType.SYMBOL); + helper.logInfixAndWarn(and); } else { match(input, DRL6Lexer.ID, @@ -2367,6 +2373,7 @@ private BaseDescr lhsAnd(final CEDescrBuilder ce, while (input.LA(1) == DRL6Lexer.AT) { // annotation* annotation(and); + helper.logAnnotationInLhsPatternWarn(and); if (state.failed) return null; } diff --git a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/ParserHelper.java b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/ParserHelper.java index 28ac2c7a32c..58c10cc5240 100644 --- a/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/ParserHelper.java +++ b/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/ParserHelper.java @@ -20,19 +20,26 @@ import java.util.ArrayDeque; import java.util.ArrayList; +import java.util.Arrays; import java.util.Deque; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; import org.antlr.runtime.CommonToken; import org.antlr.runtime.RecognitionException; import org.antlr.runtime.RecognizerSharedState; import org.antlr.runtime.Token; import org.antlr.runtime.TokenStream; +import org.drools.drl.ast.descr.AnnotatedBaseDescr; import org.drools.drl.ast.descr.AttributeDescr; import org.drools.drl.ast.descr.BaseDescr; +import org.drools.drl.ast.descr.RelationalExprDescr; +import org.drools.drl.ast.descr.RuleDescr; import org.drools.drl.ast.dsl.AbstractClassTypeDeclarationBuilder; import org.drools.drl.ast.dsl.AccumulateDescrBuilder; import org.drools.drl.ast.dsl.AccumulateImportDescrBuilder; @@ -65,13 +72,18 @@ import org.drools.drl.ast.dsl.UnitDescrBuilder; import org.drools.drl.ast.dsl.WindowDeclarationDescrBuilder; import org.drools.drl.parser.DroolsParserException; +import org.drools.drl.parser.impl.Operator; import org.kie.internal.builder.conf.LanguageLevelOption; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This is a class to hold all the helper functions/methods used * by the DRL parser */ public class ParserHelper { + public static final Logger LOG = LoggerFactory.getLogger(ParserHelper.class ); + public final String[] statementKeywords = new String[]{ DroolsSoftKeywords.PACKAGE, DroolsSoftKeywords.UNIT, @@ -100,6 +112,17 @@ public class ParserHelper { private final LanguageLevelOption languageLevel; + private static final Set BUILT_IN_OPERATORS = Arrays.stream(Operator.BuiltInOperator.values()) + .map(Operator.BuiltInOperator::getSymbol) + .collect(Collectors.toSet()); + + private static int logCounterHalfConstraint = 0; + private static int logCounterCustomOperator = 0; + private static int logCounterInfixAnd = 0; + private static int logCounterInfixOr = 0; + private static int logCounterAnnotationInLhsPattern = 0; + private static int logCounterAgendaGroup = 0; + public ParserHelper(TokenStream input, RecognizerSharedState state, LanguageLevelOption languageLevel) { @@ -656,4 +679,123 @@ void setEnd( DescrBuilder< ? , ? > db ) { public String[] getStatementKeywords() { return statementKeywords; } + + public static void logHalfConstraintWarn(String logicalConstraint, BaseDescr descr) { + if (descr instanceof RelationalExprDescr relational) { + String halfConstraintStr = logicalConstraint + " " + relational.getOperator() + " " + relational.getRight().toString(); + logHalfConstraintWarn("The use of a half constraint '" + halfConstraintStr + "' is deprecated" + + " and will be removed in the future version (LanguageLevel.DRL10)." + + " Please add a left operand."); + } + } + + public static void logHalfConstraintWarn(String message) { + if (logCounterHalfConstraint > 10) { + return; // suppress further warnings + } + + logCounterHalfConstraint++; + LOG.warn(message); + if (logCounterHalfConstraint == 10) { + LOG.warn("Further warnings about half constraints will be suppressed."); + } + } + + public static void logCustomOperatorWarn(Token token) { + if (logCounterCustomOperator > 1) { + return; // suppress further warnings + } + + String operator = token.getText(); + if (BUILT_IN_OPERATORS.contains(operator)) { + return; // built-in operator + } + logCounterCustomOperator++; + LOG.warn("Custom operator will require a prefix '##' in the future version (LanguageLevel.DRL10)." + + " If you use LanguageLevel.DRL10, you need to change '{}' to '##{}'." + + " You don't need to change the rule while you use the default LanguageLevel.DRL6.", operator, operator); + } + + public static void logInfixOrWarn(CEDescrBuilder descrBuilder) { + if (logCounterInfixOr > 5) { + return; // suppress further warnings + } + + Optional ruleDescrOpt = getParentRuleDescr(descrBuilder); + if (ruleDescrOpt.isEmpty()) { + return; + } + + logCounterInfixOr++; + LOG.warn("Connecting patterns with '||' is deprecated and will be removed in the future version (LanguageLevel.DRL10)." + + " Please replace '||' with 'or' in rule '{}'. '||' in a constraint will remain supported.", ruleDescrOpt.get().getName()); + if (logCounterInfixOr == 5) { + LOG.warn("Further warnings about '||' will be suppressed."); + } + } + + public static void logInfixAndWarn(CEDescrBuilder descrBuilder) { + if (logCounterInfixAnd > 5) { + return; // suppress further warnings + } + + Optional ruleDescrOpt = getParentRuleDescr(descrBuilder); + if (ruleDescrOpt.isEmpty()) { + return; + } + + logCounterInfixAnd++; + LOG.warn("Connecting patterns with '&&' is deprecated and will be removed in the future version (LanguageLevel.DRL10)." + + " Please replace '&&' with 'and' in rule '{}'. '&&' in a constraint will remain supported.", ruleDescrOpt.get().getName()); + if (logCounterInfixAnd == 5) { + LOG.warn("Further warnings about '&&' will be suppressed."); + } + } + + private static Optional getParentRuleDescr(DescrBuilder descrBuilder) { + while (descrBuilder != null) { + if (descrBuilder instanceof RuleDescrBuilder) { + return Optional.of(((RuleDescrBuilder) descrBuilder).getDescr()); + } else if (descrBuilder instanceof PackageDescrBuilder) { + return Optional.empty(); + } + descrBuilder = descrBuilder.getParent(); + } + return Optional.empty(); + } + + public static void logAnnotationInLhsPatternWarn(CEDescrBuilder descrBuilder) { + if (logCounterAnnotationInLhsPattern > 5) { + return; // suppress further warnings + } + + Optional ruleDescrOpt = getParentRuleDescr(descrBuilder); + if (ruleDescrOpt.isEmpty()) { + return; + } + + BaseDescr descr = descrBuilder.getDescr(); + if (descr instanceof AnnotatedBaseDescr annotated) { + String annotationNames = annotated.getAnnotationNames().stream().collect(Collectors.joining(", ")); + logCounterAnnotationInLhsPattern++; + LOG.warn("Annotation inside LHS patterns is deprecated and will be removed in the future version (LanguageLevel.DRL10)." + + " Found '{}' in rule '{}'. Annotation in other places will remain supported.", annotationNames, ruleDescrOpt.get().getName()); + if (logCounterAnnotationInLhsPattern == 5) { + LOG.warn("Further warnings about Annotation inside LHS patterns will be suppressed."); + } + } + } + + public static void logAgendaGroupWarn(AttributeDescr attributeDescr) { + if (logCounterAgendaGroup > 5) { + return; // suppress further warnings + } + + logCounterAgendaGroup++; + LOG.warn("'agenda-group \"{}\"' is found. 'agenda-group' is deprecated and will be dropped in the future version (LanguageLevel.DRL10)." + + " Please replace 'agenda-group' with 'ruleflow-group', which works as the same as 'agenda-group'.", attributeDescr.getValue()); + if (logCounterAgendaGroup == 5) { + LOG.warn("Further warnings about 'agenda-group' will be suppressed."); + } + } } diff --git a/drools-drl/drools-drl-parser/src/main/resources/org/drools/drl/parser/DRL6Expressions.g b/drools-drl/drools-drl-parser/src/main/resources/org/drools/drl/parser/DRL6Expressions.g index 29b35035924..fc4e24f1870 100644 --- a/drools-drl/drools-drl-parser/src/main/resources/org/drools/drl/parser/DRL6Expressions.g +++ b/drools-drl/drools-drl-parser/src/main/resources/org/drools/drl/parser/DRL6Expressions.g @@ -432,6 +432,7 @@ orRestriction returns [BaseDescr result] : left=andRestriction { if( buildDescr ) { $result = $left.result; } } ( (DOUBLE_PIPE fullAnnotation[null]? andRestriction)=>lop=DOUBLE_PIPE args=fullAnnotation[null]? right=andRestriction { if( buildDescr ) { + helper.logHalfConstraintWarn("||", right); ConstraintConnectiveDescr descr = ConstraintConnectiveDescr.newOr(); descr.addOrMerge( $result ); descr.addOrMerge( $right.result ); @@ -448,6 +449,7 @@ andRestriction returns [BaseDescr result] { if ( isNotEOF() ) helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR ); } args=fullAnnotation[null]?right=singleRestriction { if( buildDescr ) { + helper.logHalfConstraintWarn("&&", right); ConstraintConnectiveDescr descr = ConstraintConnectiveDescr.newAnd(); descr.addOrMerge( $result ); descr.addOrMerge( $right.result ); @@ -847,9 +849,9 @@ in_key ; operator_key - : {(helper.isPluggableEvaluator(false))}?=> id=ID { helper.emit($ID, DroolsEditorType.KEYWORD); } + : {(helper.isPluggableEvaluator(false))}?=> id=ID { helper.logCustomOperatorWarn(id); helper.emit($ID, DroolsEditorType.KEYWORD); } ; neg_operator_key - : {(helper.isPluggableEvaluator(true))}?=> id=ID { helper.emit($ID, DroolsEditorType.KEYWORD); } + : {(helper.isPluggableEvaluator(true))}?=> id=ID { helper.logCustomOperatorWarn(id); helper.emit($ID, DroolsEditorType.KEYWORD); } ; diff --git a/drools-legacy-test-util/src/test/java/org/drools/mvel/CommonTestMethodBase.java b/drools-legacy-test-util/src/test/java/org/drools/mvel/CommonTestMethodBase.java index 9a662471249..c0605331816 100644 --- a/drools-legacy-test-util/src/test/java/org/drools/mvel/CommonTestMethodBase.java +++ b/drools-legacy-test-util/src/test/java/org/drools/mvel/CommonTestMethodBase.java @@ -28,6 +28,7 @@ import org.drools.core.common.InternalAgenda; import org.drools.core.impl.RuleBaseFactory; import org.drools.core.integrationtests.SerializationHelper; +import org.drools.drl.parser.DrlParser; import org.drools.kiesession.rulebase.InternalKnowledgeBase; import org.drools.kiesession.rulebase.KnowledgeBaseFactory; import org.kie.api.KieBase; @@ -126,6 +127,7 @@ protected KieBase loadKnowledgeBaseFromString( protected KieBase loadKnowledgeBaseFromString( KnowledgeBuilderConfiguration config, KieBaseConfiguration kBaseConfig, String... drlContentStrings) { KnowledgeBuilder kbuilder = config == null ? KnowledgeBuilderFactory.newKnowledgeBuilder() : KnowledgeBuilderFactory.newKnowledgeBuilder(config); for (String drlContentString : drlContentStrings) { + drlContentString = replaceAgendaGroupIfRequired(drlContentString); kbuilder.add(ResourceFactory.newByteArrayResource(drlContentString .getBytes()), ResourceType.DRL); } @@ -141,6 +143,14 @@ protected KieBase loadKnowledgeBaseFromString( KnowledgeBuilderConfiguration con return kbase; } + public static String replaceAgendaGroupIfRequired(String drl) { + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // new parser (DRL10) supports only ruleflow-group, dropping agenda-group + return drl.replaceAll("agenda-group", "ruleflow-group"); + } + return drl; + } + protected KieBase loadKnowledgeBase(KnowledgeBuilderConfiguration kbuilderConf, KieBaseConfiguration kbaseConf, String... classPathResources) { Collection knowledgePackages = loadKnowledgePackages(kbuilderConf, classPathResources); diff --git a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/DrlxParseUtil.java b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/DrlxParseUtil.java index 7e90c86b7d9..adeee76be3a 100644 --- a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/DrlxParseUtil.java +++ b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/DrlxParseUtil.java @@ -92,6 +92,7 @@ import org.drools.model.Index; import org.drools.model.codegen.execmodel.errors.IncompatibleGetterOverloadError; import org.drools.model.codegen.execmodel.errors.InvalidExpressionErrorResult; +import org.drools.model.codegen.execmodel.util.ParserLogUtils; import org.drools.modelcompiler.consequence.DroolsImpl; import org.drools.mvel.parser.DrlxParser; import org.drools.mvel.parser.ast.expr.BigDecimalLiteralExpr; @@ -363,13 +364,14 @@ public static Optional findRootNodeViaParent(Node expr) { public static Node replaceAllHalfBinaryChildren(Node parent) { parent.findAll(HalfBinaryExpr.class) - .forEach(n -> n.replace(trasformHalfBinaryToBinary(n))); + .forEach(n -> n.replace(trasformHalfBinaryToBinary(n, Optional.empty()))); return parent; } - public static Expression trasformHalfBinaryToBinary(Expression drlxExpr) { + public static Expression trasformHalfBinaryToBinary(Expression drlxExpr, Optional ruleContextOpt) { final Optional parent = drlxExpr.getParentNode(); if(drlxExpr instanceof HalfBinaryExpr && parent.isPresent()) { + ParserLogUtils.logHalfConstraintWarn(drlxExpr, ruleContextOpt); HalfBinaryExpr halfBinaryExpr = (HalfBinaryExpr) drlxExpr; Expression parentLeft = findLeftLeafOfNameExprTraversingParent( halfBinaryExpr ); Operator operator = toBinaryExprOperator(halfBinaryExpr.getOperator()); diff --git a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/ConstraintParser.java b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/ConstraintParser.java index fbc43b71673..5bb7999cfdb 100644 --- a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/ConstraintParser.java +++ b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/ConstraintParser.java @@ -48,6 +48,7 @@ import com.github.javaparser.ast.expr.UnaryExpr; import com.github.javaparser.ast.nodeTypes.NodeWithArguments; import com.github.javaparser.ast.nodeTypes.NodeWithOptionalScope; +import org.drools.model.codegen.execmodel.util.ParserLogUtils; import org.drools.util.DateUtils; import org.drools.model.Index; import org.drools.model.codegen.execmodel.PackageModel; @@ -631,7 +632,7 @@ private DrlxParseResult parseBinaryExpr(BinaryExpr binaryExpr, Class patternT if ( isLogicalOperator( operator ) && isCombinable( binaryExpr ) ) { DrlxParseResult leftResult = compileToJavaRecursive(patternType, bindingId, constraint, binaryExpr.getLeft(), hasBind, isPositional ); Expression rightExpr = binaryExpr.getRight() instanceof HalfPointFreeExpr ? - completeHalfExpr( (( PointFreeExpr ) binaryExpr.getLeft()).getLeft(), ( HalfPointFreeExpr ) binaryExpr.getRight()) : + completeHalfExpr( (( PointFreeExpr ) binaryExpr.getLeft()).getLeft(), ( HalfPointFreeExpr ) binaryExpr.getRight(), context) : binaryExpr.getRight(); DrlxParseResult rightResult = compileToJavaRecursive(patternType, bindingId, constraint, rightExpr, hasBind, isPositional ); return isMultipleResult(leftResult, operator, rightResult) ? @@ -826,7 +827,8 @@ private boolean isCombinable( BinaryExpr binaryExpr ) { return !(binaryExpr.getRight() instanceof HalfBinaryExpr) && ( !(binaryExpr.getRight() instanceof HalfPointFreeExpr) || binaryExpr.getLeft() instanceof PointFreeExpr ); } - private static PointFreeExpr completeHalfExpr(Expression left, HalfPointFreeExpr halfRight) { + private static PointFreeExpr completeHalfExpr(Expression left, HalfPointFreeExpr halfRight, RuleContext context) { + ParserLogUtils.logHalfConstraintWarn(halfRight, Optional.of(context)); return new PointFreeExpr( halfRight.getTokenRange().orElse( null ), left, halfRight.getRight(), halfRight.getOperator(), halfRight.isNegated(), halfRight.getArg1(), halfRight.getArg2(), halfRight.getArg3(), halfRight.getArg4() ); } diff --git a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java index e6937594506..6b6a64ba35b 100644 --- a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java +++ b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java @@ -242,7 +242,7 @@ private Optional toTypedExpressionRec(Expression drlxExpr) { } if (drlxExpr instanceof HalfBinaryExpr) { - final Expression binaryExpr = trasformHalfBinaryToBinary(drlxExpr); + final Expression binaryExpr = trasformHalfBinaryToBinary(drlxExpr, Optional.of(ruleContext)); if (binaryExpr instanceof BinaryExpr && ((BinaryExpr)binaryExpr).getLeft() == drlxExpr) { throw new CannotTypeExpressionException("left leaf is the same : drlxExpr = " + drlxExpr + ", originalExpression = " + context.getOriginalExpression()); } diff --git a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/util/ParserLogUtils.java b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/util/ParserLogUtils.java new file mode 100644 index 00000000000..5b59641aa87 --- /dev/null +++ b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/util/ParserLogUtils.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.drools.model.codegen.execmodel.util; + +import java.util.Optional; + +import com.github.javaparser.ast.expr.BinaryExpr; +import com.github.javaparser.ast.expr.Expression; +import org.drools.drl.parser.lang.ParserHelper; +import org.drools.model.codegen.execmodel.generator.RuleContext; +import org.drools.mvel.parser.printer.PrintUtil; + +/* + * This class is used to log parser warnings + * in case that org.drools.drl.parser.lang.ParserHelper's log methods cannot handle, + * because executable-model delegates constraint parsing to drools-mvel-parser. + */ +public class ParserLogUtils { + + public static void logHalfConstraintWarn(Expression expression, Optional ruleContextOpt) { + String halfConstraintStr = PrintUtil.printNode(expression); + String parentOperatorStr = expression.getParentNode() + .filter(BinaryExpr.class::isInstance) + .map(BinaryExpr.class::cast) + .map(binary -> binary.getOperator().asString()) + .orElse(""); + String ruleName = ruleContextOpt.map(RuleContext::getRuleDescr) + .map(descr -> descr.getName()) + .orElse(""); + ParserHelper.logHalfConstraintWarn("The use of a half constraint '" + parentOperatorStr + " " + halfConstraintStr + "'" + + " is deprecated and will be removed in the future version (LanguageLevel.DRL10)." + + " Please add a left operand in rule '" + ruleName + "'."); + } +} \ No newline at end of file diff --git a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/BaseModelTest.java b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/BaseModelTest.java index 20e3bfe6141..9a6dc9e0c0a 100644 --- a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/BaseModelTest.java +++ b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/BaseModelTest.java @@ -27,6 +27,7 @@ import org.drools.compiler.kie.builder.impl.InternalKieModule; import org.drools.core.reteoo.EntryPointNode; import org.drools.core.reteoo.ObjectTypeNode; +import org.drools.drl.parser.DrlParser; import org.drools.kiesession.rulebase.InternalKnowledgeBase; import org.drools.model.codegen.ExecutableModelProject; import org.kie.api.KieServices; @@ -185,7 +186,15 @@ public KieFile( int index, String content ) { public KieFile( String path, String content ) { this.path = path; - this.content = content; + this.content = replaceAgendaGroupIfRequired(content); + } + + public static String replaceAgendaGroupIfRequired(String drl) { + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // new parser (DRL10) supports only ruleflow-group, dropping agenda-group + return drl.replaceAll("agenda-group", "ruleflow-group"); + } + return drl; } } diff --git a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/CompilerTest.java b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/CompilerTest.java index abe40ca412c..f1fa582c60c 100644 --- a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/CompilerTest.java +++ b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/CompilerTest.java @@ -45,6 +45,7 @@ import org.drools.model.codegen.execmodel.domain.Woman; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Timeout; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.definition.type.FactType; @@ -145,6 +146,7 @@ public void testEqualityCheckOnNull(RUN_TYPE runType) { assertThat(results.iterator().next().getValue()).isEqualTo("Mario"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testOrWithFixedLeftOperand(RUN_TYPE runType) { @@ -2095,6 +2097,7 @@ public void testNumericLimits(RUN_TYPE runType) { } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testMapAbbreviatedComparison(RUN_TYPE runType) { diff --git a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/HalfBinaryTest.java b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/HalfBinaryTest.java index df52b350958..0050075db76 100644 --- a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/HalfBinaryTest.java +++ b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/HalfBinaryTest.java @@ -23,12 +23,14 @@ import org.drools.model.codegen.execmodel.domain.Address; import org.drools.model.codegen.execmodel.domain.Person; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.runtime.KieSession; import static org.assertj.core.api.Assertions.assertThat; +@DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") public class HalfBinaryTest extends BaseModelTest { @ParameterizedTest diff --git a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/MvelOperatorsTest.java b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/MvelOperatorsTest.java index 9986cba4046..134f4ca745a 100644 --- a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/MvelOperatorsTest.java +++ b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/MvelOperatorsTest.java @@ -24,6 +24,7 @@ import java.util.Map; import org.drools.model.codegen.execmodel.domain.Person; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.builder.Message; @@ -82,6 +83,7 @@ public void testStrNot(RUN_TYPE runType) { assertThat(ksession.fireAllRules()).isEqualTo(2); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testStrHalf(RUN_TYPE runType) { @@ -100,6 +102,7 @@ public void testStrHalf(RUN_TYPE runType) { assertThat(ksession.fireAllRules()).isEqualTo(3); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testStrHalfOrAndAmpersand(RUN_TYPE runType) { @@ -125,7 +128,7 @@ public void testRange(RUN_TYPE runType) { "import " + Person.class.getCanonicalName() + "\n" + "global java.util.List list\n" + "rule R when\n" + - " Person( age > 30 && <= 40, $name : name )" + + " Person( age > 30 && age <= 40, $name : name )" + "then\n" + " list.add($name);" + "end "; @@ -152,7 +155,7 @@ public void testExcludedRange(RUN_TYPE runType) { "import " + Person.class.getCanonicalName() + "\n" + "global java.util.List list\n" + "rule R when\n" + - " Person( age <= 30 || > 40, $name : name )" + + " Person( age <= 30 || age > 40, $name : name )" + "then\n" + " list.add($name);" + "end "; diff --git a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/NullSafeDereferencingTest.java b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/NullSafeDereferencingTest.java index a442f36b28c..daae50378b1 100644 --- a/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/NullSafeDereferencingTest.java +++ b/drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/NullSafeDereferencingTest.java @@ -26,6 +26,7 @@ import org.drools.model.codegen.execmodel.domain.MysteriousMan; import org.drools.model.codegen.execmodel.domain.Person; import org.drools.model.codegen.execmodel.domain.Result; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.runtime.KieSession; @@ -253,6 +254,7 @@ public void testNullSafeDereferncingOnSecondField(RUN_TYPE runType) { assertThat(results.get(0).getValue()).isEqualTo("John2"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testNullSafeDereferncingWithOrHalfBinary(RUN_TYPE runType) { diff --git a/drools-model/drools-mvel-parser/src/main/java/org/drools/mvel/parser/TokenTypes.java b/drools-model/drools-mvel-parser/src/main/java/org/drools/mvel/parser/TokenTypes.java index fc5805813d3..7a478ed270c 100644 --- a/drools-model/drools-mvel-parser/src/main/java/org/drools/mvel/parser/TokenTypes.java +++ b/drools-model/drools-mvel-parser/src/main/java/org/drools/mvel/parser/TokenTypes.java @@ -213,6 +213,7 @@ public static JavaToken.Category getCategory(int kind) { case COMMA: case DOT: case AT: + case CUSTOM_OPERATOR_PREFIX: return JavaToken.Category.SEPARATOR; case MVEL_STARTS_WITH: case MVEL_ENDS_WITH: diff --git a/drools-model/drools-mvel-parser/src/main/javacc/mvel.jj b/drools-model/drools-mvel-parser/src/main/javacc/mvel.jj index d4752e980d5..3312b597e06 100644 --- a/drools-model/drools-mvel-parser/src/main/javacc/mvel.jj +++ b/drools-model/drools-mvel-parser/src/main/javacc/mvel.jj @@ -425,6 +425,7 @@ TOKEN : | < MVEL_ENDS_WITH: "str[endsWith]" > | < MVEL_LENGTH: "str[length]" > | < DOT_DOT_SLASH: "../" > +| < CUSTOM_OPERATOR_PREFIX: "##" > | < HASHMARK: "#" > | < EXCL_DOT: "!." > | < PASSIVE_OOPATH: "?/" > @@ -6419,6 +6420,7 @@ Expression PointFreeExpr(): { negated = true; } )* ( + [ ] operator = SimpleName() temporalLiteralArguments = TemporalLiteralArguments() ( diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java index 388844d6da8..c1f2ca0c131 100644 --- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java +++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java @@ -34,6 +34,7 @@ import org.drools.commands.impl.CommandBasedStatefulKnowledgeSessionImpl; import org.drools.commands.impl.FireAllRulesInterceptor; import org.drools.commands.impl.LoggingInterceptor; +import org.drools.mvel.CommonTestMethodBase; import org.drools.mvel.compiler.Person; import org.drools.persistence.PersistableRunner; import org.drools.persistence.util.DroolsPersistenceUtil; @@ -329,6 +330,8 @@ public void testSetFocus(String locking) { str += "end\n"; str += "\n"; + str = CommonTestMethodBase.replaceAgendaGroupIfRequired(str); + KieServices ks = KieServices.Factory.get(); KieFileSystem kfs = ks.newKieFileSystem().write( "src/main/resources/r1.drl", str ); diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/AgendaRuleFlowGroupsTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/AgendaRuleFlowGroupsTest.java index d05f9bcacd4..153638511f8 100644 --- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/AgendaRuleFlowGroupsTest.java +++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/AgendaRuleFlowGroupsTest.java @@ -31,6 +31,7 @@ import org.drools.persistence.util.DroolsPersistenceUtil; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.drools.io.ClassPathResource; @@ -98,7 +99,8 @@ public void testRuleFlowGroupOnly(boolean locking) throws Exception { assertThat(groups[0].getName()).isEqualTo("MAIN"); assertThat(groups[1].getName()).isEqualTo("ruleflow-group"); } - + + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testAgendaGroupOnly(boolean locking) throws Exception { @@ -126,7 +128,8 @@ public void testAgendaGroupOnly(boolean locking) throws Exception { assertThat(groups[1].getName()).isEqualTo("agenda-group"); } - + + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testAgendaGroupAndRuleFlowGroup(boolean locking) throws Exception { @@ -234,6 +237,7 @@ public Void execute(Context context) { } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest @MethodSource("parameters") public void testConflictingAgendaAndRuleflowGroups() throws Exception { diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java index 5619f959a91..1579861195b 100644 --- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java +++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java @@ -37,6 +37,7 @@ import org.drools.core.FlowSessionConfiguration; import org.drools.core.SessionConfiguration; import org.drools.core.impl.RuleBaseFactory; +import org.drools.mvel.CommonTestMethodBase; import org.drools.mvel.compiler.Address; import org.drools.mvel.compiler.Person; import org.drools.persistence.PersistableRunner; @@ -361,7 +362,7 @@ public void testSetFocusWithOOPath() { } private void testFocus(final boolean withOOPath) { - final String str = "package org.kie.test\n" + + String str = "package org.kie.test\n" + "global java.util.List list\n" + "rule rule1\n" + "agenda-group \"badfocus\"" + @@ -372,6 +373,8 @@ private void testFocus(final boolean withOOPath) { "end\n" + "\n"; + str = CommonTestMethodBase.replaceAgendaGroupIfRequired(str); + final KieBase kbase = new KieHelper().addContent(str, ResourceType.DRL).build(); final KieSession ksession = KieServices.get().getStoreServices().newKieSession(kbase, null, env); diff --git a/drools-ruleunits/drools-ruleunits-impl/src/test/java/org/drools/ruleunits/impl/RuleUnitProviderImplTest.java b/drools-ruleunits/drools-ruleunits-impl/src/test/java/org/drools/ruleunits/impl/RuleUnitProviderImplTest.java index 822ab51fb3d..d13f5782ba3 100644 --- a/drools-ruleunits/drools-ruleunits-impl/src/test/java/org/drools/ruleunits/impl/RuleUnitProviderImplTest.java +++ b/drools-ruleunits/drools-ruleunits-impl/src/test/java/org/drools/ruleunits/impl/RuleUnitProviderImplTest.java @@ -34,6 +34,7 @@ import org.drools.ruleunits.impl.listener.TestRuleEventListener; import org.drools.ruleunits.impl.listener.TestRuleRuntimeEventListener; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.kie.api.builder.CompilationErrorsException; import org.kie.api.event.rule.ObjectDeletedEvent; import org.kie.api.event.rule.ObjectInsertedEvent; @@ -179,6 +180,7 @@ public void wrongType() { } } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test public void agendaGroup() { try { diff --git a/drools-serialization-protobuf/src/test/java/org/drools/serialization/protobuf/MarshallingTest.java b/drools-serialization-protobuf/src/test/java/org/drools/serialization/protobuf/MarshallingTest.java index f80c8a7ee42..e49c934cdc9 100644 --- a/drools-serialization-protobuf/src/test/java/org/drools/serialization/protobuf/MarshallingTest.java +++ b/drools-serialization-protobuf/src/test/java/org/drools/serialization/protobuf/MarshallingTest.java @@ -77,6 +77,7 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.kie.api.KieBase; import org.kie.api.KieBaseConfiguration; import org.kie.api.KieServices; @@ -1560,6 +1561,7 @@ public void testActivationGroups() throws Exception { assertThat(list.get(1)).isEqualTo("rule4"); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @Test public void testAgendaGroups() throws Exception { String rule1 = "package org.drools.compiler.test;\n"; diff --git a/drools-serialization-protobuf/src/test/resources/org/drools/serialization/protobuf/test_Serializable.drl b/drools-serialization-protobuf/src/test/resources/org/drools/serialization/protobuf/test_Serializable.drl index bd4e757963a..c9e9c73503b 100644 --- a/drools-serialization-protobuf/src/test/resources/org/drools/serialization/protobuf/test_Serializable.drl +++ b/drools-serialization-protobuf/src/test/resources/org/drools/serialization/protobuf/test_Serializable.drl @@ -38,7 +38,7 @@ end rule "match Person 2" - agenda-group "xxx" + ruleflow-group "xxx" salience ($age2 - $age1) when $person : Person(name=="mark", $age1 : age ) @@ -53,7 +53,7 @@ rule "match Person 2" end rule "match Person 3" - agenda-group "xxx" + ruleflow-group "xxx" dialect "mvel" when not Person( name == "mark" ) @@ -62,7 +62,7 @@ rule "match Person 3" end rule "match Integer" - agenda-group "yyy" + ruleflow-group "yyy" auto-focus true when Person( name == "bob" ) diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AlphaNodeRangeIndexingTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AlphaNodeRangeIndexingTest.java index 42820e0ee03..2ea5cda66ae 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AlphaNodeRangeIndexingTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AlphaNodeRangeIndexingTest.java @@ -475,17 +475,18 @@ public void testUnderThreshold(KieBaseTestConfiguration kieBaseTestConfiguration @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testSurroundingRange(KieBaseTestConfiguration kieBaseTestConfiguration) { + // incubator-kie-drools#6228 : `age >= 0 && age < 20` doesn't enable range index in exec-model final String drl = "package org.drools.compiler.test\n" + "import " + Person.class.getCanonicalName() + "\n" + "rule test1\n when\n" + - " Person( age >= 0 && < 20 )\n" + + " Person( age >= 0, age < 20 )\n" + "then\n end\n" + "rule test2\n when\n" + - " Person( age >= 20 && < 40 )\n" + + " Person( age >= 20, age < 40 )\n" + "then\n end\n" + "rule test3\n when\n" + - " Person( age >= 40 && < 60 )\n" + + " Person( age >= 40, age < 60 )\n" + "then\n end\n"; final KieBase kbase = createKieBaseWithRangeIndexThresholdValue(kieBaseTestConfiguration, drl, 3); diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AnnotationsTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AnnotationsTest.java index 267e636c286..0ece362d7ee 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AnnotationsTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/AnnotationsTest.java @@ -30,6 +30,7 @@ import org.drools.testcoverage.common.util.KieBaseUtil; import org.drools.testcoverage.common.util.KieUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.KieBase; @@ -273,6 +274,7 @@ public void testAnnotationNameClashWithRegularClass(KieBaseTestConfiguration kie int[] numbers(); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testAnnotationOnLHSAndMerging(KieBaseTestConfiguration kieBaseTestConfiguration) { diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/ConstraintsTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/ConstraintsTest.java index ca9a368903e..67490e905fd 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/ConstraintsTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/ConstraintsTest.java @@ -33,6 +33,7 @@ import org.drools.testcoverage.common.util.KieBaseUtil; import org.drools.testcoverage.common.util.KieUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.KieBase; @@ -280,7 +281,7 @@ public void testConnectorsAndOperators(KieBaseTestConfiguration kieBaseTestConfi "rule \"operator\"\n" + " when\n" + " $t1 : StockTick( company == \"RHT\" )\n" + - " $t2 : StockTick( company == \"IBM\", this after $t1 || before $t1 )\n" + + " $t2 : StockTick( company == \"IBM\", this after $t1 || this before $t1 )\n" + " then\n" + " // do something\n" + "end "; @@ -373,6 +374,7 @@ public void testDeepNestedConstraints(KieBaseTestConfiguration kieBaseTestConfig } } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testMultiRestrictionFieldConstraint(KieBaseTestConfiguration kieBaseTestConfiguration) { diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorOnlyDrlTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorOnlyDrlTest.java index d6835f92ab5..6f4404618a7 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorOnlyDrlTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorOnlyDrlTest.java @@ -26,6 +26,7 @@ import org.drools.base.base.ValueResolver; import org.drools.base.base.ValueType; import org.drools.compiler.rule.builder.EvaluatorDefinition; +import org.drools.drl.parser.DrlParser; import org.drools.drl.parser.impl.Operator; import org.drools.base.rule.accessor.Evaluator; import org.drools.base.rule.accessor.FieldValue; @@ -42,6 +43,8 @@ public class CustomOperatorOnlyDrlTest { + private static final String F_STR = DrlParser.ANTLR4_PARSER_ENABLED ? "##F_str" : "F_str"; + public static Stream parameters() { // TODO EM DROOLS-6302 return TestParametersUtil2.getKieBaseCloudConfigurations(false).stream(); @@ -74,7 +77,7 @@ public void testCustomOperatorCombiningConstraints(KieBaseTestConfiguration kieB "when\n" + " gnId : GN()\n" + " la : t547147( )\n" + - " v1717 : Tra48( gnId.gNo == gNo, name F_str[startsWith] la.c547148 || postCode F_str[contains] la.c547149 )\n" + + " v1717 : Tra48( gnId.gNo == gNo, name " + F_STR + "[startsWith] la.c547148 || postCode " + F_STR + "[contains] la.c547149 )\n" + "then\n" + "end\n"; diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorTest.java index 0161f772935..5295b801e20 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CustomOperatorTest.java @@ -27,6 +27,7 @@ import org.drools.base.base.ValueResolver; import org.drools.base.base.ValueType; import org.drools.compiler.rule.builder.EvaluatorDefinition; +import org.drools.drl.parser.DrlParser; import org.drools.drl.parser.impl.Operator; import org.drools.base.rule.accessor.Evaluator; import org.drools.base.rule.accessor.FieldValue; @@ -49,6 +50,8 @@ public class CustomOperatorTest { + private static final String SUPERSET_OF = DrlParser.ANTLR4_PARSER_ENABLED ? "##supersetOf" : "supersetOf"; + public static Stream parameters() { return TestParametersUtil2.getKieBaseCloudConfigurations(true).stream(); } @@ -58,7 +61,16 @@ public static Stream parameters() { public void testCustomOperatorUsingCollections(KieBaseTestConfiguration kieBaseTestConfiguration) { String constraints = " $alice : Person(name == \"Alice\")\n" + - " $bob : Person(name == \"Bob\", addresses supersetOf $alice.addresses)\n"; + " $bob : Person(name == \"Bob\", addresses " + SUPERSET_OF + " $alice.addresses)\n"; + customOperatorUsingCollections(kieBaseTestConfiguration, constraints); + } + + @ParameterizedTest(name = "KieBase type={0}") + @MethodSource("parameters") + public void testCustomOperatorUsingCollectionsWithNot(KieBaseTestConfiguration kieBaseTestConfiguration) { + String constraints = + " $alice : Person(name == \"Alice\")\n" + + " $bob : Person(name == \"Bob\", $alice.addresses not " + SUPERSET_OF + " this.addresses)\n"; customOperatorUsingCollections(kieBaseTestConfiguration, constraints); } @@ -67,8 +79,8 @@ public void testCustomOperatorUsingCollections(KieBaseTestConfiguration kieBaseT public void testNoOperatorInstancesCreatedAtRuntime(KieBaseTestConfiguration kieBaseTestConfiguration) { String constraints = " $alice : Person(name == \"Alice\")\n" + - " $bob : Person(name == \"Bob\", addresses supersetOf $alice.addresses)\n" + - " Person(name == \"Bob\", addresses supersetOf $alice.addresses)\n"; + " $bob : Person(name == \"Bob\", addresses " + SUPERSET_OF + " $alice.addresses)\n" + + " Person(name == \"Bob\", addresses " + SUPERSET_OF + " $alice.addresses)\n"; customOperatorUsingCollections(kieBaseTestConfiguration, constraints); @@ -81,7 +93,7 @@ public void testCustomOperatorUsingCollectionsInverted(KieBaseTestConfiguration // DROOLS-6983 String constraints = " $bob : Person(name == \"Bob\")\n" + - " $alice : Person(name == \"Alice\", $bob.addresses supersetOf this.addresses)\n"; + " $alice : Person(name == \"Alice\", $bob.addresses " + SUPERSET_OF + " this.addresses)\n"; customOperatorUsingCollections(kieBaseTestConfiguration, constraints); } @@ -201,7 +213,7 @@ public boolean evaluateCachedRight(final ValueResolver reteEvaluator, final Vari } public boolean evaluateAll(final Collection leftCollection, final Collection rightCollection) { - return rightCollection.containsAll(leftCollection); + return getOperator().isNegated() ^ rightCollection.containsAll(leftCollection); } } @@ -212,7 +224,7 @@ public void testCustomOperatorOnKieModule(KieBaseTestConfiguration kieBaseTestCo "import " + Person.class.getCanonicalName() + ";\n" + "rule R when\n" + " $alice : Person(name == \"Alice\")\n" + - " $bob : Person(name == \"Bob\", addresses supersetOf $alice.addresses)\n" + + " $bob : Person(name == \"Bob\", addresses " + SUPERSET_OF + " $alice.addresses)\n" + "then\n" + "end\n"; diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/IndexingTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/IndexingTest.java index 1d0e530e664..fc6200142af 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/IndexingTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/IndexingTest.java @@ -616,7 +616,7 @@ public void testRange(KieBaseTestConfiguration kieBaseTestConfiguration) { "import " + Person.class.getCanonicalName() + ";\n" + "rule R1 salience 10 when\n" + " Person( $age : age, $doubleAge : doubleAge )\n" + - " not Cheese( price > $age && < $doubleAge )\n" + + " not Cheese( price > $age && price < $doubleAge )\n" + "then\n" + "end\n" + "rule R3 salience 5 when\n" + @@ -654,7 +654,7 @@ public void testRange2(KieBaseTestConfiguration kieBaseTestConfiguration) throws "rule R1 when\n" + " A( $a : a )\n" + " B( $b : b )\n" + - " exists C( c > $a && < $b )\n" + + " exists C( c > $a && c < $b )\n" + "then\n" + "end"; diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/StreamsTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/StreamsTest.java index 82341ecac21..a0aa9b662a9 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/StreamsTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/StreamsTest.java @@ -206,7 +206,7 @@ public void testModifyRetracOnEntryPointFacts(KieBaseTestConfiguration kieBaseTe "\n" + "rule \"Test entry point 1\"\n" + "when\n" + - " $st : StockTick( company == \"ACME\", price > 10 && < 100 ) from entry-point \"stream1\"\n" + + " $st : StockTick( company == \"ACME\", price > 10 && price < 100 ) from entry-point \"stream1\"\n" + "then\n" + " results.add( Double.valueOf( $st.getPrice() ) );\n" + " modify( $st ) { setPrice( 110 ) }\n" + diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/ForAllTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/ForAllTest.java index 7b1a6f500bf..297f92d9610 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/ForAllTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/ForAllTest.java @@ -53,7 +53,7 @@ public void test1P1CFiring1(KieBaseTestConfiguration kieBaseTestConfiguration) { @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void test1P1CFiring2(KieBaseTestConfiguration kieBaseTestConfiguration) { - check(kieBaseTestConfiguration, "age == 8 || == 45", 1, new Person("Mario", 45), new Person("Sofia", 8)); + check(kieBaseTestConfiguration, "age == 8 || age == 45", 1, new Person("Mario", 45), new Person("Sofia", 8)); } @ParameterizedTest(name = "KieBase type={0}") diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/OrTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/OrTest.java index 16d6b7a28e3..6525dcd8a5e 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/OrTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/OrTest.java @@ -33,6 +33,7 @@ import org.drools.testcoverage.common.util.KieBaseUtil; import org.drools.testcoverage.common.util.KieUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.KieBase; @@ -351,6 +352,7 @@ public void testOrWithFrom(KieBaseTestConfiguration kieBaseTestConfiguration) { } } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testOrWithReturnValueRestriction(KieBaseTestConfiguration kieBaseTestConfiguration) { diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/beliefsystem/jtms/JTMSTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/beliefsystem/jtms/JTMSTest.java index 9aa335b5e66..7ba4bd8b753 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/beliefsystem/jtms/JTMSTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/beliefsystem/jtms/JTMSTest.java @@ -113,7 +113,7 @@ public void testPosNegNonConflictingInsertions(KieBaseTestConfiguration kieBaseT "\n" + "rule \"Positive\"\n" + "when\n" + - " $n : String( this != 'go1' || == 'go2' ) \n" + + " $n : String( this != 'go1' || this == 'go2' ) \n" + "then\n" + " final String s = '+' + $n;" + " final List l = list;" + @@ -121,7 +121,7 @@ public void testPosNegNonConflictingInsertions(KieBaseTestConfiguration kieBaseT "end\n" + "rule \"Negative\"\n" + "when\n" + - " $n : String( _.neg, this != 'go1' || == 'go2' ) \n" + + " $n : String( _.neg, this != 'go1' || this == 'go2' ) \n" + "then\n" + " final String s = '-' + $n; \n" + " final List l = list; \n" + diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/DeclarativeAgendaTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/DeclarativeAgendaTest.java index c1cf2398f5f..38ece70bb54 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/DeclarativeAgendaTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/DeclarativeAgendaTest.java @@ -919,7 +919,6 @@ public void testFiredRuleDoNotRefireAfterUnblock(KieBaseTestConfiguration kieBas "end\n"; final KieServices ks = KieServices.Factory.get(); - KieFileSystem kfs = ks.newKieFileSystem(); KieModuleModel kmodule = ks.newKieModuleModel(); KieBaseModel baseModel = kmodule.newKieBaseModel("defaultKBase") @@ -928,10 +927,7 @@ public void testFiredRuleDoNotRefireAfterUnblock(KieBaseTestConfiguration kieBas baseModel.newKieSessionModel("defaultKSession") .setDefault(true); - kfs.writeKModuleXML(kmodule.toXML()); - kfs.write("src/main/resources/block_rule.drl", drl); - final KieBuilder kieBuilder = KieUtil.getKieBuilderFromKieFileSystem(kieBaseTestConfiguration, kfs, false); - assertThat(kieBuilder.getResults().getMessages(org.kie.api.builder.Message.Level.ERROR).size()).isEqualTo(0); + KieUtil.getKieBuilderFromDrls(kieBaseTestConfiguration, kmodule, true, drl); KieSession ksession = ks.newKieContainer(ks.getRepository().getDefaultReleaseId()).newKieSession(); diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/JBRULESTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/JBRULESTest.java index 81c339d50ac..e8baedadcf6 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/JBRULESTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/JBRULESTest.java @@ -40,6 +40,7 @@ import org.drools.testcoverage.common.util.KieBaseUtil; import org.drools.testcoverage.common.util.KieUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.KieBase; @@ -144,6 +145,7 @@ public void testJBRULES_2995(KieBaseTestConfiguration kieBaseTestConfiguration) assertThat(rules).isEqualTo(1); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testJBRULES2872(KieBaseTestConfiguration kieBaseTestConfiguration) { @@ -252,7 +254,7 @@ public void testJBRULES3323(KieBaseTestConfiguration kieBaseTestConfiguration) t rule.append( "when\n" ); rule.append( "$foo : Foo($leftId : id, $leftBar : bar != null)\n" ); rule.append( "$fooSet : Set()\n" ); - rule.append( "from accumulate ( Foo(id > $leftId, bar != null && != $leftBar, $bar : bar),\n" ); + rule.append( "from accumulate ( Foo(id > $leftId, bar != null && bar != $leftBar, $bar : bar),\n" ); rule.append( "collectSet( $bar ) )\n" ); rule.append( "then\n" ); rule.append( "//System.out.println(\"ok\");\n" ); diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/Misc2Test.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/Misc2Test.java index 3a91b6698dd..d37fd0bfc66 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/Misc2Test.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/Misc2Test.java @@ -8902,7 +8902,7 @@ public void testMergeMVELDialect(KieBaseTestConfiguration kieBaseTestConfigurati "rule rule1 \n" + " when\n" + " (PersonHolder($addresses : person.addresses))\n" + - " &&\n" + + " and\n" + " (Address (street == \"AAA\") from $addresses)\n" + " then\n" + "end"; @@ -9050,6 +9050,8 @@ public void testKieHelperReleaseId(KieBaseTestConfiguration kieBaseTestConfigura assertThat(ksession.fireAllRules()).isEqualTo(1); } + private static final String SUPERSET_OF = DrlParser.ANTLR4_PARSER_ENABLED ? "##supersetOf" : "supersetOf"; + @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testKieHelperKieModuleModel(KieBaseTestConfiguration kieBaseTestConfiguration) throws Exception { @@ -9060,7 +9062,7 @@ public void testKieHelperKieModuleModel(KieBaseTestConfiguration kieBaseTestConf "import " + Person.class.getCanonicalName() + ";\n" + "rule R when\n" + " $alice : Person(name == \"Alice\")\n" + - " $bob : Person(name == \"Bob\", addresses supersetOf $alice.addresses)\n" + + " $bob : Person(name == \"Bob\", addresses " + SUPERSET_OF + " $alice.addresses)\n" + "then\n" + "end\n"; diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/NullSafeDereferencingTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/NullSafeDereferencingTest.java index edcdc2764f1..1184130fa56 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/NullSafeDereferencingTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/NullSafeDereferencingTest.java @@ -27,6 +27,7 @@ import org.drools.testcoverage.common.util.KieBaseTestConfiguration; import org.drools.testcoverage.common.util.KieBaseUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.KieBase; @@ -235,6 +236,7 @@ public void testDoubleNullSafe(KieBaseTestConfiguration kieBaseTestConfiguration ksession.dispose(); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void testMixedNullSafes(KieBaseTestConfiguration kieBaseTestConfiguration) { @@ -316,7 +318,7 @@ public void testNullSafeInnerConstraint(KieBaseTestConfiguration kieBaseTestConf "rule \"Complex Type Attribute\"\n" + "when\n" + " $con : Content()\n" + - " Context( ctx == $con || == $con!.complexContent!.extension )\n" + + " Context( ctx == $con || ctx == $con!.complexContent!.extension )\n" + "then\n" + " System.out.println( $con ); \n" + "end\n" + diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/session/UpdateTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/session/UpdateTest.java index 24a89fcf07d..32c7c8c794a 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/session/UpdateTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/session/UpdateTest.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.stream.Stream; +import org.drools.drl.parser.DrlParser; import org.drools.mvel.compiler.Address; import org.drools.mvel.compiler.Asset; import org.drools.mvel.compiler.AssetCard; @@ -46,6 +47,7 @@ import org.kie.api.command.Setter; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.rule.FactHandle; +import org.kie.internal.builder.conf.LanguageLevelOption; import org.kie.internal.command.CommandFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_CEP_ComplexOperator.drl b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_CEP_ComplexOperator.drl index 7c154a486ac..6b760f0e4c5 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_CEP_ComplexOperator.drl +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_CEP_ComplexOperator.drl @@ -32,7 +32,7 @@ end rule "before" when $a : StockTick( company == "DROO" ) - $b : StockTick( company != $a.company, this before[5,8] $a.time || after[20,22] $a ) + $b : StockTick( company != $a.company, this before[5,8] $a.time || this after[20,22] $a ) then list.add( new StockTick[] { $a, $b } ); end diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_ConstraintConnectors.drl b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_ConstraintConnectors.drl index 2028756d5e8..d87772c59c5 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_ConstraintConnectors.drl +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/compiler/integrationtests/test_ConstraintConnectors.drl @@ -26,7 +26,7 @@ global java.util.List results; rule "1. && operator" salience 10 when - $person : Person( age > 30 && < 40 && hair == "red" ) + $person : Person( age > 30 && age < 40 && hair == "red" ) then results.add( $person ); end @@ -34,7 +34,7 @@ end rule "2. || operator" salience 8 when - $person : Person( age > 70 && < 90 || hair == "green" ) + $person : Person( age > 70 && age < 90 || hair == "green" ) then results.add( $person ); end diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/strevaluator_test.drl b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/strevaluator_test.drl index 773af9402f4..bb4e660ab37 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/strevaluator_test.drl +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/strevaluator_test.drl @@ -68,7 +68,7 @@ end rule testmultiple when - $m : RoutingMessage( routingValue str[startsWith] "R1" && str[endsWith] "R2" && str[length] 17) + $m : RoutingMessage( routingValue str[startsWith] "R1" && routingValue str[endsWith] "R2" && routingValue str[length] 17) then list.add("Message starts with R1, ends with R2 and it's length is 17"); end diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_OrCEFollowedByCollect.drl b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_OrCEFollowedByCollect.drl index b22f6bc40f7..51d717f2cb7 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_OrCEFollowedByCollect.drl +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_OrCEFollowedByCollect.drl @@ -24,7 +24,7 @@ import java.util.ArrayList rule "collect after or'd evals" when $bonFromage : Cheesery() - (eval(true) || eval(true)) + (eval(true) or eval(true)) ArrayList( size > 1 ) from collect(Cheese( type == "cheddar") from $bonFromage.cheeses) then end \ No newline at end of file diff --git a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/util/KieUtil.java b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/util/KieUtil.java index 4cf82ef2b13..9339101870a 100644 --- a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/util/KieUtil.java +++ b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/util/KieUtil.java @@ -17,8 +17,12 @@ * under the License. */ package org.drools.testcoverage.common.util; - +; +import java.io.IOException; +import java.io.InputStream; import java.io.StringReader; +import java.io.UncheckedIOException; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -34,6 +38,11 @@ import org.drools.core.reteoo.JoinNode; import org.drools.core.impl.InternalRuleBase; import org.drools.core.reteoo.ObjectTypeNode; +import org.drools.decisiontable.InputType; +import org.drools.decisiontable.SpreadsheetCompiler; +import org.drools.drl.parser.DrlParser; +import org.drools.io.ClassPathResource; +import org.drools.io.InternalResource; import org.kie.api.KieBase; import org.kie.api.KieServices; import org.kie.api.builder.KieBuilder; @@ -46,7 +55,10 @@ import org.kie.api.command.KieCommands; import org.kie.api.io.KieResources; import org.kie.api.io.Resource; +import org.kie.api.io.ResourceConfiguration; +import org.kie.api.io.ResourceType; import org.kie.api.runtime.KieContainer; +import org.kie.internal.builder.DecisionTableConfiguration; import org.kie.internal.builder.conf.AlphaNetworkCompilerOption; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,19 +106,106 @@ public static KieFileSystem getKieFileSystemWithKieModule(final KieModuleModel k final ReleaseId releaseId, final Resource... resources) { final KieFileSystem fileSystem = KieServices.Factory.get().newKieFileSystem(); fileSystem.generateAndWritePomXML(releaseId); - for (final Resource resource : resources) { + for (Resource resource : resources) { + resource = newResourceForNewParserIfRequired(resource); fileSystem.write(resource); } fileSystem.writeKModuleXML(kieModuleModel.toXML()); return fileSystem; } + private static Resource newResourceForNewParserIfRequired(Resource resource) { + if (DrlParser.ANTLR4_PARSER_ENABLED && resource instanceof InternalResource internalResource) { + if (isDrl(internalResource)) { + String encoding = internalResource.getEncoding(); + String drl; + if (encoding != null) { + try { + drl = new String(internalResource.getBytes(), encoding); + } catch (UnsupportedEncodingException e) { + throw new UncheckedIOException(e); + } + } else { + drl = new String(internalResource.getBytes()); + } + return convertResourceForNewParser(internalResource, drl); + } if (internalResource.getResourceType() == ResourceType.DTABLE) { + ResourceConfiguration resourceConfiguration = internalResource.getConfiguration(); + SpreadsheetCompiler compiler = new SpreadsheetCompiler(); + try (InputStream is = internalResource.getInputStream()) { + String drl; + if (resourceConfiguration instanceof DecisionTableConfiguration decisionTableConfiguration && decisionTableConfiguration.getWorksheetName() != null) { + drl = compiler.compile(is, decisionTableConfiguration.getWorksheetName()); + } else { + drl = compiler.compile(is, getInputType(internalResource)); + } + Resource resourceForNewParser = convertResourceForNewParser(internalResource, drl); + // overwrite + resourceForNewParser.setSourcePath(internalResource.getSourcePath() + ".drl"); + resourceForNewParser.setTargetPath(internalResource.getTargetPath() + ".drl"); + resourceForNewParser.setResourceType(ResourceType.DRL); + return resourceForNewParser; + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + } + return resource; + } + + private static boolean isDrl(InternalResource internalResource) { + String sourcePath = internalResource.getSourcePath(); + String targetPath = internalResource.getTargetPath(); + return internalResource.getResourceType() == ResourceType.DRL || + (internalResource.getResourceType() == null && + ((sourcePath != null && sourcePath.endsWith(".drl")) || + (targetPath != null && targetPath.endsWith(".drl")))); + } + + private static Resource convertResourceForNewParser(InternalResource internalResource, String drl) { + Resource resourceForNewParserTest = getResources().newReaderResource(new StringReader(replaceAgendaGroupIfRequired(drl))); + resourceForNewParserTest.setSourcePath(internalResource.getSourcePath()); + resourceForNewParserTest.setTargetPath(internalResource.getTargetPath()); + resourceForNewParserTest.setResourceType(internalResource.getResourceType()); + return resourceForNewParserTest; + } + + public static String replaceAgendaGroupIfRequired(String drl) { + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // new parser (DRL10) supports only ruleflow-group, dropping agenda-group + return drl.replaceAll("agenda-group", "ruleflow-group"); + } + return drl; + } + + private static InputType getInputType(InternalResource internalResource) { + if (!(internalResource instanceof ClassPathResource classPathResource)) { + return InputType.CSV; + } + String path = classPathResource.getPath(); + switch (path.substring(path.lastIndexOf('.') + 1)) { + case "xls", "xlsx": + return InputType.XLS; + case "csv": + return InputType.CSV; + default: + throw new IllegalArgumentException("Unsupported input type: " + path); + } + } + public static KieBuilder getKieBuilderFromDrls(final KieBaseTestConfiguration kieBaseTestConfiguration, final boolean failIfBuildError, final String... drls) { final List resources = getResourcesFromDrls(drls); return getKieBuilderFromResources(kieBaseTestConfiguration, failIfBuildError, resources.toArray(new Resource[]{})); } + public static KieBuilder getKieBuilderFromDrls(final KieBaseTestConfiguration kieBaseTestConfiguration, final KieModuleModel kieModuleModel, + final boolean failIfBuildError, final String... drls) { + final List resources = getResourcesFromDrls(drls); + final KieFileSystem kieFileSystem = getKieFileSystemWithKieModule(kieModuleModel, KieServices.get().getRepository().getDefaultReleaseId(), resources.toArray(new Resource[]{})); + return getKieBuilderFromKieFileSystem(kieBaseTestConfiguration, kieFileSystem, failIfBuildError); + } + public static KieBuilder getKieBuilderFromDrls(final KieBaseTestConfiguration kieBaseTestConfiguration,final Map kieModuleConfigurationProperties, final boolean failIfBuildError, final String... drls) { final List resources = getResourcesFromDrls(drls); diff --git a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/functional/TemplatesTest.java b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/functional/TemplatesTest.java index d08eaecd1af..1fd1be9f8f7 100644 --- a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/functional/TemplatesTest.java +++ b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/functional/TemplatesTest.java @@ -69,20 +69,20 @@ public static Stream parameters() { + "global java.util.List list;\n\n"; final String rule2_when = "rule \"is appropriate 2\"\n" + "\twhen\n" - + "\t\tVegetable( $name : name == \"carrot\", $field : weight >= 0 && <= 1000, $price : price <= 2, " + + "\t\tVegetable( $name : name == \"carrot\", $field : weight >= 0 && weight <= 1000, $price : price <= 2, " + "$taste : taste == Taste.HORRIBLE )\n"; final String rule2_then = "\tthen\n\t\tlist.add( $name );\nend\n\n"; final String rule1_when = "rule \"is appropriate 1\"\n" + "\twhen\n" - + "\t\tVegetable( $name : name == \"cucumber\", $field : length >= 20 && <= 40, $price : price <= 15, " + + "\t\tVegetable( $name : name == \"cucumber\", $field : length >= 20 && length <= 40, $price : price <= 15, " + "$taste : taste == Taste.EXCELENT )\n"; final String rule1_then = "\tthen\n\t\tlist.add( $name );\nend\n\n"; final String rule0_when = "rule \"is appropriate 0\"\n" + "\twhen\n" - + "\t\tVegetable( $name : name == \"tomato\", $field : weight >= 200 && <= 1000, $price : price <= 6, " - + "$taste : taste == Taste.GOOD || == Taste.EXCELENT )\n"; + + "\t\tVegetable( $name : name == \"tomato\", $field : weight >= 200 && weight <= 1000, $price : price <= 6, " + + "$taste : taste == Taste.GOOD || taste == Taste.EXCELENT )\n"; final String rule0_then = "\tthen\n\t\tlist.add( $name );\nend\n\n"; EXPECTED_RULES.append(head); @@ -135,7 +135,7 @@ public void loadingFromDLRMapsCorrectnessCheck(KieBaseTestConfiguration kieBaseT @MethodSource("parameters") public void loadingFromDLRArrayCorrectnessCheck(KieBaseTestConfiguration kieBaseTestConfiguration) throws Exception { final String[][] rows = new String[3][6]; - rows[0] = new String[]{"tomato", "weight", "200", "1000", "6", "== Taste.GOOD || == Taste.EXCELENT"}; + rows[0] = new String[]{"tomato", "weight", "200", "1000", "6", "== Taste.GOOD || taste == Taste.EXCELENT"}; rows[1] = new String[]{"cucumber", "length", "20", "40", "15", "== Taste.EXCELENT"}; rows[2] = new String[]{"carrot", "weight", "0", "1000", "2", "== Taste.HORRIBLE"}; @@ -336,7 +336,7 @@ private Collection> getMapsParam() { mapTomato.put("fieldLower", 200); mapTomato.put("fieldUpper", 1000); mapTomato.put("price", 6); - mapTomato.put("tastes", "== Taste.GOOD || == Taste.EXCELENT"); + mapTomato.put("tastes", "== Taste.GOOD || taste == Taste.EXCELENT"); maps.add(mapTomato); final Map mapCucumber = new HashMap(); @@ -420,7 +420,7 @@ public String getTastes() { String conn = ""; for (Taste t : tasteSet) { sb.append(conn).append(" == Taste.").append(t); - conn = " ||"; + conn = " || taste"; } return sb.toString(); } diff --git a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/AbstractCompositeRestrictionTest.java b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/AbstractCompositeRestrictionTest.java index 9454031c660..bd03fe49e29 100644 --- a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/AbstractCompositeRestrictionTest.java +++ b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/AbstractCompositeRestrictionTest.java @@ -24,6 +24,7 @@ import org.drools.testcoverage.common.util.KieBaseTestConfiguration; import org.drools.testcoverage.common.util.KieUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.kie.api.KieServices; @@ -42,6 +43,7 @@ public static Stream parameters() { return TestParametersUtil2.getKieBaseConfigurations().stream(); } + @DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") @ParameterizedTest(name = "KieBase type={0}") @MethodSource("parameters") public void test(KieBaseTestConfiguration kieBaseTestConfiguration) { diff --git a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/MultiRestrictionPatternTest.java b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/MultiRestrictionPatternTest.java index 01fcb74a43c..e98774efd99 100644 --- a/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/MultiRestrictionPatternTest.java +++ b/drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/regression/MultiRestrictionPatternTest.java @@ -28,6 +28,7 @@ import org.drools.testcoverage.common.util.KieSessionTestConfiguration; import org.drools.testcoverage.common.util.KieUtil; import org.drools.testcoverage.common.util.TestParametersUtil2; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -41,6 +42,7 @@ * Test to verify BRMS-364 (multi-restriction pattern throws UnsupportedOpEx) is * fixed */ +@DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true") public class MultiRestrictionPatternTest extends KieSessionTest { private static final String DRL_FILE = "BRMS-364.drl"; diff --git a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template1_spreadsheet.drl.xls b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template1_spreadsheet.drl.xls index a5bea4dd27b..a271469e6c3 100644 Binary files a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template1_spreadsheet.drl.xls and b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template1_spreadsheet.drl.xls differ diff --git a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_1.drl b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_1.drl index 2a1764ba46f..164fe37cc31 100644 --- a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_1.drl +++ b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_1.drl @@ -36,7 +36,7 @@ template "appropriateToBuy" rule "is appropriate @{row.rowNumber}" when - Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && <= @{fieldUpper}, $price : price <= @{price}, $taste : taste @{tastes} ) + Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && @{field} <= @{fieldUpper}, $price : price <= @{price}, $taste : taste @{tastes} ) then list.add( $name ); end diff --git a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_2.drl b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_2.drl index cffa7054095..a4e94f2fe5d 100644 --- a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_2.drl +++ b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/functional/template_2.drl @@ -36,7 +36,7 @@ template "appropriateToBuy" rule "is appropriate @{row.rowNumber}" when - Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && <= @{fieldUpper}, $price : price <= @{price}, $taste : taste @{tastes} ) + Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && @{field} <= @{fieldUpper}, $price : price <= @{price}, $taste : taste @{tastes} ) then list.add( $name ); end @@ -114,7 +114,7 @@ template "goodPriceAndSize" rule "is of good price and size @{row.rowNumber}" when - Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && <= @{fieldUpper}, $price : price <= @{price} ) + Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && @{field} <= @{fieldUpper}, $price : price <= @{price} ) then list.add( $name ); end @@ -136,7 +136,7 @@ end template rule "is of right size and taste @{row.rowNumber}" when - Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && <= @{fieldUpper}, $taste : taste @{tastes} ) + Vegetable( $name : name == "@{name}", $field : @{field} >= @{fieldLower} && @{field} <= @{fieldUpper}, $taste : taste @{tastes} ) then list.add( $name ); end diff --git a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/regression/sessionInsertMultithreadingTest.drl b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/regression/sessionInsertMultithreadingTest.drl index d6352282945..fc41fa64702 100644 --- a/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/regression/sessionInsertMultithreadingTest.drl +++ b/drools-test-coverage/test-suite/src/test/resources/org/drools/testcoverage/regression/sessionInsertMultithreadingTest.drl @@ -24,7 +24,7 @@ import org.drools.testcoverage.common.model.Message rule "Name" when - $p : Person ( name == "" || == null ) + $p : Person ( name == "" || name == null ) then modify ($p) { setName("Aquaman"); @@ -34,7 +34,7 @@ end rule "Message" no-loop when - $m : Message ( message == "" || == null ) + $m : Message ( message == "" || message == null ) then modify ($m) { setMessage("Hello world"); @@ -53,7 +53,7 @@ end rule "Message from" salience -10 when - $p : Person ( name != "" && != null && id != 0) + $p : Person ( name != "" && name != null && id != 0) $m : Message ( message == "Hello world" ) then modify ($m) { diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/CommonTraitTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/CommonTraitTest.java index efa4b0786d1..b3c69c325b6 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/CommonTraitTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/CommonTraitTest.java @@ -18,16 +18,27 @@ */ package org.drools.traits.compiler; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; + +import org.drools.drl.parser.DrlParser; import org.drools.kiesession.rulebase.InternalKnowledgeBase; import org.drools.kiesession.rulebase.KnowledgeBaseFactory; import org.drools.traits.core.base.evaluators.IsAEvaluatorDefinition; import org.junit.jupiter.api.BeforeAll; import org.kie.api.KieBase; +import org.kie.api.conf.KieBaseOption; import org.kie.api.io.ResourceType; import org.kie.internal.builder.KnowledgeBuilder; import org.kie.internal.builder.KnowledgeBuilderFactory; import org.kie.internal.builder.conf.EvaluatorOption; +import org.kie.internal.builder.conf.KnowledgeBuilderOption; +import org.kie.internal.builder.conf.PropertySpecificOption; +import org.kie.internal.builder.conf.SingleValueKieBuilderOption; import org.kie.internal.io.ResourceFactory; +import org.kie.internal.utils.KieHelper; import static org.assertj.core.api.Assertions.fail; @@ -40,9 +51,9 @@ public static void beforeClass() { protected KieBase loadKnowledgeBaseFromString(String... drlContentStrings) { KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - for (String drlContentString : drlContentStrings) { - kbuilder.add(ResourceFactory.newByteArrayResource(drlContentString - .getBytes()), ResourceType.DRL); + for (String drl : drlContentStrings) { + drl = replaceCustomOperatorIfRequired(drl); + kbuilder.add(ResourceFactory.newByteArrayResource(drl.getBytes()), ResourceType.DRL); } if (kbuilder.hasErrors()) { @@ -52,4 +63,31 @@ protected KieBase loadKnowledgeBaseFromString(String... drlContentStrings) { kbase.addPackages(kbuilder.getKnowledgePackages()); return kbase; } + + protected KieBase loadKnowledgeBaseFromDrlFile(String drlFilePath) { + try (InputStream is = getClass().getClassLoader().getResourceAsStream(drlFilePath)) { + String drl = replaceCustomOperatorIfRequired(new String(is.readAllBytes(), StandardCharsets.UTF_8)); + return loadKnowledgeBaseFromString(drl); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + protected KieBase loadKnowledgeBaseWithKnowledgeBuilderOption(String drl, KnowledgeBuilderOption... knowledgeBuilderOptions) { + drl = replaceCustomOperatorIfRequired(drl); + return new KieHelper(knowledgeBuilderOptions).addContent(drl, ResourceType.DRL ).build(); + } + + protected KieBase loadKnowledgeBaseWithKieBaseOption(String drl, KieBaseOption... kieBaseOption) { + drl = replaceCustomOperatorIfRequired(drl); + return new KieHelper().addContent(drl, ResourceType.DRL ).build(kieBaseOption); + } + + protected static String replaceCustomOperatorIfRequired(String drl) { + if (DrlParser.ANTLR4_PARSER_ENABLED) { + // new parser (DRL10) requires a prefix '##' for a custom operator + return drl.replaceAll(" isA ", " ##isA "); + } + return drl; + } } diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LegacyTraitTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LegacyTraitTest.java index 47f7e41b0d7..eef811d440a 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LegacyTraitTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LegacyTraitTest.java @@ -56,18 +56,7 @@ public static Collection modes() { } private KieSession getSessionFromString(String drl) { - KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - knowledgeBuilder.add(ResourceFactory.newByteArrayResource(drl.getBytes()), - ResourceType.DRL); - if (knowledgeBuilder.hasErrors()) { - throw new RuntimeException(knowledgeBuilder.getErrors().toString()); - } - - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages(knowledgeBuilder.getKnowledgePackages()); - - KieSession session = kbase.newKieSession(); - return session; + return loadKnowledgeBaseFromString(drl).newKieSession(); } // Getters and setters are both needed. They should refer to an attribute with the same name diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LogicalTraitTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LogicalTraitTest.java index a500b0bb8fe..a15e4a3c51f 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LogicalTraitTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/LogicalTraitTest.java @@ -68,14 +68,7 @@ public static Stream parameters() { @MethodSource("parameters") public void testShadowAlias(VirtualPropertyMode mode) throws Exception { - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newClassPathResource( "org/drools/compiler/factmodel/traits/testTraitedAliasing.drl" ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); - + KieBase kbase = loadKnowledgeBaseFromDrlFile( "org/drools/compiler/factmodel/traits/testTraitedAliasing.drl" ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); KieSession ks = kbase.newKieSession(); @@ -132,13 +125,7 @@ public void testShadowAliasTraitOnClass(VirtualPropertyMode mode) { " list.add( \"ok\" );" + "end \n"; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -208,13 +195,7 @@ public void testShadowAliasClassOnTrait(VirtualPropertyMode mode) { "" + ""; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -279,13 +260,7 @@ public void testShadowAliasTraitOnTrait(VirtualPropertyMode mode) { "" + ""; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -525,7 +500,7 @@ public void testHardGetSetOnLogicallyTraitedField(VirtualPropertyMode mode) { " modify( $o ) { getValue().setNum( 99 ); } " + "end "; - KieBase knowledgeBase = new KieHelper(PropertySpecificOption.ALLOWED).addContent( drl, ResourceType.DRL ).build(); + KieBase knowledgeBase = loadKnowledgeBaseWithKnowledgeBuilderOption( drl, PropertySpecificOption.ALLOWED ); TraitFactoryImpl.setMode(mode, knowledgeBase ); KieSession knowledgeSession = knowledgeBase.newKieSession(); @@ -736,13 +711,7 @@ public void shadowAliasSelf(VirtualPropertyMode mode) { "" + ""; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -825,13 +794,7 @@ public void traitOnSet(VirtualPropertyMode mode) { "" + ""; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -935,13 +898,7 @@ public void testShadowAliasTraitOnClassLogicalRetract(VirtualPropertyMode mode) "" + ""; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -1056,13 +1013,7 @@ public void testShadowAliasClassOnTraitLogicalRetract(VirtualPropertyMode mode) " list.add( $f2.getId() );" + "end \n"; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); @@ -1121,13 +1072,7 @@ public void testSerial(VirtualPropertyMode mode) { "" + ""; - KnowledgeBuilder kbuilderImpl = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilderImpl.add( ResourceFactory.newByteArrayResource( drl.getBytes() ), ResourceType.DRL ); - if ( kbuilderImpl.hasErrors() ) { - fail( kbuilderImpl.getErrors().toString() ); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages( kbuilderImpl.getKnowledgePackages() ); + KieBase kbase = loadKnowledgeBaseFromString( drl ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitFieldsAndLegacyClassesTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitFieldsAndLegacyClassesTest.java index 0ecf89bd251..c12828c4c2d 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitFieldsAndLegacyClassesTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitFieldsAndLegacyClassesTest.java @@ -468,7 +468,7 @@ public void testTraitFieldUpdate4(VirtualPropertyMode mode) { "\n"; - KieBase kBase = new KieHelper(PropertySpecificOption.ALLOWED).addContent( drl, ResourceType.DRL ).build(); + KieBase kBase = loadKnowledgeBaseWithKnowledgeBuilderOption(drl, PropertySpecificOption.ALLOWED); TraitFactoryImpl.setMode(mode, kBase ); KieSession knowledgeSession = kBase.newKieSession(); diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitMapCoreTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitMapCoreTest.java index d4d9cae880c..e7c59734353 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitMapCoreTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitMapCoreTest.java @@ -298,7 +298,7 @@ public void testMapCoreAliasing( ) { "\n" + "rule Log \n" + "when \n" + - " $p : PersonMap( name == \"john\", age > 10 && < 35 )\n" + + " $p : PersonMap( name == \"john\", age > 10 && age < 35 )\n" + "then \n" + " modify ( $p ) { \n" + " setHeight( 184.0 ), \n" + diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitTest.java index ddfa9a038e2..451ebdf3c31 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/factmodel/traits/TraitTest.java @@ -116,20 +116,16 @@ public static Stream parameters() { return Stream.of(VirtualPropertyMode.MAP, VirtualPropertyMode.TRIPLES); } - private KieSession getSession(String... ruleFiles) { - KieHelper kieHelper = new KieHelper(); - for (String file : ruleFiles) { - kieHelper.kfs.write(new ClassPathResource(file)); - } - return kieHelper.build().newKieSession(); + private KieSession getSession(String ruleFile) { + return loadKnowledgeBaseFromDrlFile(ruleFile).newKieSession(); } private KieSession getSessionFromString(String drl) { - return new KieHelper().addContent(drl, ResourceType.DRL).build().newKieSession(); + return loadKnowledgeBaseFromString(drl).newKieSession(); } private KieBase getKieBaseFromString(String drl, KieBaseOption... options) { - return new KieHelper().addContent(drl, ResourceType.DRL).build(options); + return loadKnowledgeBaseWithKieBaseOption(drl, options); } @ParameterizedTest() @@ -169,16 +165,8 @@ public void testRetract(VirtualPropertyMode mode) { public void testTraitWrapGetAndSet(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); - kb.addPackages(kbuilder.getKnowledgePackages()); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -334,15 +322,7 @@ public void testTraitProxy(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -383,15 +363,7 @@ public void testTraitProxy(VirtualPropertyMode mode) throws Exception { public void testWrapperSize(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -467,16 +439,7 @@ public void testWrapperSize(VirtualPropertyMode mode) throws Exception { public void testWrapperEmpty(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -526,16 +489,7 @@ public void testWrapperEmpty(VirtualPropertyMode mode) throws Exception { public void testWrapperContainsKey(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); - + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -621,15 +575,7 @@ public void testWrapperContainsKey(VirtualPropertyMode mode) throws Exception { public void testInternalComponents1(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -673,15 +619,7 @@ public void testInternalComponents1(VirtualPropertyMode mode) throws Exception { public void testWrapperKeySetAndValues(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -737,15 +675,7 @@ public int compare(Object o1, Object o2) { public void testWrapperClearAndRemove(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl.setMode(mode, kb); TraitFactoryImpl tFactory = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); @@ -1284,16 +1214,10 @@ public void traitsInBatchExecution(VirtualPropertyMode mode) { " list.add(2);\n" + "end"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(str.getBytes()), ResourceType.DRL); - - if (kbuilder.hasErrors()) { - throw new RuntimeException(kbuilder.getErrors().toString()); - } + KieBase kbase = loadKnowledgeBaseFromString( str ); List list = new ArrayList<>(); - KieBase kbase = kbuilder.newKieBase(); TraitFactoryImpl.setMode(mode, kbase); StatelessKieSession ksession = kbase.newStatelessKieSession(); @@ -1555,13 +1479,7 @@ public void testTMSConsistencyWithNonTraitableBeans(VirtualPropertyMode mode) { "end\n"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - kbase.addPackages(kbuilder.getKnowledgePackages()); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); KieSession ksession = kbase.newKieSession(); TraitFactoryImpl.setMode(mode, ksession.getKieBase()); @@ -1624,15 +1542,7 @@ public void testTraitsLegacyWrapperCoherence(VirtualPropertyMode mode) { " list.add(m); \n" + "end \n"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(ResourceFactory.newByteArrayResource(str.getBytes()), ResourceType.DRL); - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - - kbase.addPackages(kbuilder.getKnowledgePackages()); + KieBase kbase = loadKnowledgeBaseFromString( str ); KieSession ksession = kbase.newKieSession(); TraitFactoryImpl.setMode(mode, ksession.getKieBase()); @@ -1670,15 +1580,7 @@ public void testHasTypes(VirtualPropertyMode mode) throws Exception { String source = "org/drools/compiler/factmodel/traits/testTraitDon.drl"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - Resource res = ResourceFactory.newClassPathResource(source); - assertThat(res).isNotNull(); - kbuilder.add(res, ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalRuleBase kb = KnowledgeBaseFactory.newKnowledgeBase(); - kb.addPackages(kbuilder.getKnowledgePackages()); + InternalRuleBase kb = (InternalRuleBase) loadKnowledgeBaseFromDrlFile(source); TraitFactoryImpl traitBuilder = (TraitFactoryImpl) RuntimeComponentFactory.get().getTraitFactory(kb); TraitFactoryImpl.setMode(mode, kb); @@ -1740,15 +1642,7 @@ public void testTraitRedundancy(VirtualPropertyMode mode) { " shed($p, IStudent.class);\n" + "end \n"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(ResourceFactory.newByteArrayResource(str.getBytes()), ResourceType.DRL); - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - - kbase.addPackages(kbuilder.getKnowledgePackages()); + KieBase kbase = loadKnowledgeBaseFromString( str ); KieSession ksession = kbase.newKieSession(); TraitFactoryImpl.setMode(mode, ksession.getKieBase()); @@ -1792,18 +1686,9 @@ public void traitSimpleTypes(VirtualPropertyMode mode) { "" + "rule \"Init\" when then insert(new ExamMark()); end \n"; - - - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); - kbase.addPackages(kbuilder.getKnowledgePackages()); - KieSession ksession = kbase.newKieSession(); ksession.fireAllRules(); @@ -1872,16 +1757,9 @@ public void testTraitEncoding(VirtualPropertyMode mode) { "end\n" ; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); + InternalKnowledgeBase kbase = (InternalKnowledgeBase) loadKnowledgeBaseFromString( s1 ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); - kbase.addPackages(kbuilder.getKnowledgePackages()); - TraitRegistryImpl tr = (TraitRegistryImpl) ((TraitRuntimeComponentFactory) RuntimeComponentFactory.get()).getTraitRegistry(kbase); LOGGER.debug(tr.getHierarchy().toString()); @@ -1914,15 +1792,8 @@ public void testTraitActualTypeCodeWithCoreMap(VirtualPropertyMode mode) { void testTraitActualTypeCodeWithEntities(String trig, VirtualPropertyMode mode) { - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ClassPathResource("org/drools/compiler/factmodel/traits/testComplexDonShed.drl"), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - TraitFactoryImpl.setMode(mode, (KieBase) kbase); - - kbase.addPackages(kbuilder.getKnowledgePackages()); + KieBase kbase = loadKnowledgeBaseFromDrlFile("org/drools/compiler/factmodel/traits/testComplexDonShed.drl"); + TraitFactoryImpl.setMode(mode, kbase); KieSession ksession = kbase.newKieSession(); @@ -2026,16 +1897,9 @@ public void testTraitModifyCore(VirtualPropertyMode mode) { "end " + ""; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); TraitFactoryImpl.setMode(mode, (InternalRuleBase) kbase); - kbase.addPackages(kbuilder.getKnowledgePackages()); - KieSession ksession = kbase.newKieSession(); List list = new ArrayList<>(); ksession.setGlobal("list", list); @@ -2114,15 +1978,8 @@ public void testTraitModifyCore2(VirtualPropertyMode mode) { " modify ($p) { setName(\"alan\"); } " + "end "; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - TraitFactoryImpl.setMode(mode, (KieBase) kbase); // not relevant - - kbase.addPackages(kbuilder.getKnowledgePackages()); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); + TraitFactoryImpl.setMode(mode, kbase); // not relevant KieSession ksession = kbase.newKieSession(); int k = ksession.fireAllRules(); @@ -2177,15 +2034,9 @@ public void testTraitModifyCore2a(VirtualPropertyMode mode) { "then \n" + "end \n"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - TraitFactoryImpl.setMode(mode, (KieBase) kbase); // not relevant + KieBase kbase = loadKnowledgeBaseFromString( s1 ); + TraitFactoryImpl.setMode(mode, kbase); // not relevant - kbase.addPackages(kbuilder.getKnowledgePackages()); KieSession ksession = kbase.newKieSession(); List list = new ArrayList<>(); @@ -2279,15 +2130,8 @@ public void testTraitModifyCore3(VirtualPropertyMode mode) { "end \n" + ""; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); - TraitFactoryImpl.setMode(mode, (KieBase) kbase); // not relevant - - kbase.addPackages(kbuilder.getKnowledgePackages()); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); + TraitFactoryImpl.setMode(mode, kbase); // not relevant List list = new ArrayList<>(); KieSession ksession = kbase.newKieSession(); @@ -2392,16 +2236,9 @@ public void testTraitModifyCoreWithPropertyReactivity(VirtualPropertyMode mode) " modify ($p) { setSchool(\"myschool\"), setAge(44), setName(\"alan\"); } " + "end \n"; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); TraitFactoryImpl.setMode(mode, (KieBase) kbase); // not relevant - kbase.addPackages(kbuilder.getKnowledgePackages()); - List list = new ArrayList(); KieSession ksession = kbase.newKieSession(); ksession.setGlobal("list", list); @@ -3403,16 +3240,9 @@ public void testShedThing(VirtualPropertyMode mode) { "end \n" + ""; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); TraitFactoryImpl.setMode(mode, (KieBase) kbase); // not relevant - kbase.addPackages(kbuilder.getKnowledgePackages()); - List list = new ArrayList(); KieSession ksession = kbase.newKieSession(); ksession.setGlobal("list", list); @@ -3475,16 +3305,9 @@ public void testdeleteThings(VirtualPropertyMode mode) { "end \n" + ""; - KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kbuilder.add(new ByteArrayResource(s1.getBytes()), ResourceType.DRL); - if (kbuilder.hasErrors()) { - fail(kbuilder.getErrors().toString()); - } - InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); + KieBase kbase = loadKnowledgeBaseFromString( s1 ); TraitFactoryImpl.setMode(mode, (KieBase) kbase); // not relevant - kbase.addPackages(kbuilder.getKnowledgePackages()); - List list = new ArrayList(); KieSession ksession = kbase.newKieSession(); ksession.setGlobal("list", list); @@ -3985,7 +3808,7 @@ public void testPropagation(VirtualPropertyMode mode) { drl += ") then list.add(\"H" + x + "\"); end \n"; } - KieSession ks = new KieHelper().addContent(drl, ResourceType.DRL).build().newKieSession(); + KieSession ks = getSessionFromString(drl); TraitFactoryImpl.setMode(mode, ks.getKieBase()); List list = new ArrayList<>(); @@ -4870,7 +4693,7 @@ public void testClassLiteralsWithOr(VirtualPropertyMode mode) { ""; - KieBase kbase = new KieHelper(PropertySpecificOption.ALLOWED).addContent(drl, ResourceType.DRL).build(); + KieBase kbase = loadKnowledgeBaseWithKnowledgeBuilderOption(drl, PropertySpecificOption.ALLOWED); TraitFactoryImpl.setMode(mode, kbase); List list = new ArrayList<>(); @@ -5224,7 +5047,7 @@ public void testPartitionWithSiblingsOnDelete(VirtualPropertyMode mode) { "rule RC when C() then list.add('C'); end " + " "; - KieBase kbase = new KieHelper().addContent(drl, ResourceType.DRL).build(); + KieBase kbase = getKieBaseFromString(drl); TraitFactoryImpl.setMode(mode, kbase); KieSession ksession = kbase.newKieSession(); @@ -5819,8 +5642,7 @@ public void testPreserveAllSetBitMask(VirtualPropertyMode mode) { " modify ($y) {} " + "end "; - KieHelper helper = new KieHelper(); - KieBase kieBase = helper.addContent(drl, ResourceType.DRL).getKieContainer().getKieBase(); + KieBase kieBase = getKieBaseFromString(drl); TraitFactoryImpl.setMode(mode, kieBase); KieSession kSession = kieBase.newKieSession(); diff --git a/drools-traits/src/test/java/org/drools/traits/compiler/integrationtests/TraitTypeGenerationTest.java b/drools-traits/src/test/java/org/drools/traits/compiler/integrationtests/TraitTypeGenerationTest.java index 51d42a2f5c4..dfee3078074 100644 --- a/drools-traits/src/test/java/org/drools/traits/compiler/integrationtests/TraitTypeGenerationTest.java +++ b/drools-traits/src/test/java/org/drools/traits/compiler/integrationtests/TraitTypeGenerationTest.java @@ -186,6 +186,8 @@ public void testIsAWith2KContainers() { " students.add(student);\n" + "end"; + str = replaceCustomOperatorIfRequired(str); + KieServices ks = KieServices.Factory.get(); KieFileSystem kfs = ks.newKieFileSystem(); @@ -370,15 +372,7 @@ public void testMultipleInheritanceWithPosition1() throws Exception { " mfield1 : int = 201 @position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(5); @@ -406,15 +400,7 @@ public void testMultipleInheritanceWithPosition2() throws Exception { " mfield0 : int = 200 @position(0)\n" + " mfield1 : int = 201 @position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(5); @@ -442,15 +428,7 @@ public void testMultipleInheritanceWithPosition3() throws Exception { " mfield0 : int = 200 //@position(0)\n" + " mfield1 : int = 201 @position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(5); @@ -478,15 +456,7 @@ public void testMultipleInheritanceWithPosition4() throws Exception { " mfield0 : int = 200 @position(0)\n" + " mfield1 : int = 201 @position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(5); @@ -514,15 +484,7 @@ public void testMultipleInheritanceWithPosition5() throws Exception { " mfield0 : int = 200 @position(7)\n" + " mfield1 : int = 201 @position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(5); @@ -556,15 +518,7 @@ public void testMultipleInheritanceWithPosition6() throws Exception { " mfield0 : int = 200 //@position(0)\n" + " mfield1 : int = 201 //@position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(6); @@ -599,15 +553,7 @@ public void testMultipleInheritanceWithPosition7() throws Exception { " mfield0 : int = 200 @position(0)\n" + " mfield1 : int = 201 @position(2)\n" + "end"; - KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); - kBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); - if (kBuilder.hasErrors()) { - LOGGER.error(kBuilder.getErrors().toString()); - } - assertThat(kBuilder.hasErrors()).isFalse(); - - InternalKnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); - knowledgeBase.addPackages(kBuilder.getKnowledgePackages()); + KieBase knowledgeBase = loadKnowledgeBaseFromString( drl ); FactType sw = knowledgeBase.getFactType("org.drools.test", "MultiInhPosTrait"); assertThat(sw.getFields()).hasSize(6); diff --git a/drools-verifier/drools-verifier-drl/pom.xml b/drools-verifier/drools-verifier-drl/pom.xml index 2b93a9c78b1..474178b3a6b 100644 --- a/drools-verifier/drools-verifier-drl/pom.xml +++ b/drools-verifier/drools-verifier-drl/pom.xml @@ -179,5 +179,26 @@ + + + enableNewParser + + + enableNewParser + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + true + + + + + diff --git a/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/builder/VerifierKnowledgeBaseBuilder.java b/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/builder/VerifierKnowledgeBaseBuilder.java index 10410deba94..528932959cb 100644 --- a/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/builder/VerifierKnowledgeBaseBuilder.java +++ b/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/builder/VerifierKnowledgeBaseBuilder.java @@ -22,6 +22,7 @@ import java.util.Iterator; import java.util.List; +import org.drools.compiler.builder.impl.KnowledgeBuilderImpl; import org.drools.kiesession.rulebase.InternalKnowledgeBase; import org.drools.kiesession.rulebase.KnowledgeBaseFactory; import org.drools.verifier.VerifierConfiguration; @@ -31,6 +32,7 @@ import org.kie.internal.builder.KnowledgeBuilder; import org.kie.internal.builder.KnowledgeBuilderError; import org.kie.internal.builder.KnowledgeBuilderFactory; +import org.kie.internal.builder.conf.LanguageLevelOption; public class VerifierKnowledgeBaseBuilder { @@ -41,6 +43,11 @@ public KieBase newVerifierKnowledgeBase(VerifierConfiguration configuration) { InternalKnowledgeBase verifierKnowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); + LanguageLevelOption option = ((KnowledgeBuilderImpl) kbuilder).getBuilderConfiguration().getOption(LanguageLevelOption.KEY); + if (option == LanguageLevelOption.DRL10) { + // Temporarily verifier rules can be migrated to DRL10 (= fix half constraint). Need to be discussed. + throw new UnsupportedOperationException("Verifier does not support DRL10"); + } if ( configuration.getVerifyingResources() != null ) { for ( Resource resource : configuration.getVerifyingResources().keySet() ) { diff --git a/kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java b/kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java index ca8b96ee91a..86266a0f2d3 100644 --- a/kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java +++ b/kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java @@ -25,7 +25,7 @@ */ public enum LanguageLevelOption implements SingleValueRuleBuilderOption { - DRL5(false), DRL6(false), DRL6_STRICT(true); + DRL5(false), DRL6(false), DRL6_STRICT(true), DRL10(false); private final boolean useJavaAnnotations;