[jboss-svn-commits] JBL Code SVN: r25234 - in labs/jbossrules/trunk: drools-compiler and 11 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Feb 11 20:07:21 EST 2009
Author: tirelli
Date: 2009-02-11 20:07:20 -0500 (Wed, 11 Feb 2009)
New Revision: 25234
Added:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingEntryTest.java
Removed:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java
Modified:
labs/jbossrules/trunk/drools-ant/src/main/java/org/drools/contrib/DroolsCompilerAntTask.java
labs/jbossrules/trunk/drools-compiler/pom.xml
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/rules/SuggestionCompletionLoader.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DescrBuilderTree.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AbstractDSLMappingEntry.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLTokenizedMappingFile.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMapping.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/ErrorsParserTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/Tree2TestDRL.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLTokenizedMappingFileTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/ClassTypeResolver.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/ClassTypeResolverTest.java
Log:
JBRULES-1964: fixing DSL regressions
Modified: labs/jbossrules/trunk/drools-ant/src/main/java/org/drools/contrib/DroolsCompilerAntTask.java
===================================================================
--- labs/jbossrules/trunk/drools-ant/src/main/java/org/drools/contrib/DroolsCompilerAntTask.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-ant/src/main/java/org/drools/contrib/DroolsCompilerAntTask.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -36,6 +36,7 @@
import org.drools.decisiontable.SpreadsheetCompiler;
import org.drools.lang.Expander;
import org.drools.lang.dsl.DSLMappingFile;
+import org.drools.lang.dsl.DSLTokenizedMappingFile;
import org.drools.lang.dsl.DefaultExpander;
import org.drools.lang.dsl.DefaultExpanderResolver;
import org.drools.rule.Package;
@@ -265,7 +266,7 @@
DefaultExpanderResolver resolver = new DefaultExpanderResolver();
final File dir = new File(this.srcdir.getAbsolutePath());
- DSLMappingFile file = new DSLMappingFile();
+ DSLMappingFile file = new DSLTokenizedMappingFile();
FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {
Modified: labs/jbossrules/trunk/drools-compiler/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-compiler/pom.xml 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/pom.xml 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,21 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>drools</artifactId>
<groupId>org.drools</groupId>
<version>5.0.0.SNAPSHOT</version>
</parent>
+
<artifactId>drools-compiler</artifactId>
<packaging>jar</packaging>
<name>Drools :: Compiler</name>
+
<dependencies>
-<!-- Internal dependencies -->
+ <!-- Internal dependencies -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
</dependency>
-<!-- External dependencies -->
+ <!-- External dependencies -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
@@ -42,54 +48,84 @@
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
</dependency>
-<!--
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </dependency>
- -->
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <configuration>
- <tasks>
- <path id="base.classpath">
- <pathelement path="${user.home}/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
- <pathelement path="${user.home}/.m2/repository/org/antlr/stringtemplate/3.2/stringtemplate-3.2.jar"/>
- <pathelement path="${user.home}/.m2/repository/org/antlr/antlr/3.1.1/antlr-3.1.1.jar"/>
- </path>
- <property name="antlr_classpath" refid="maven.compile.classpath" />
- <echo message="Generating Antlr Grammars"/>
- <java classname="org.antlr.Tool" fork="true">
- <arg line="-lib src/main/resources/org/drools/lang src/main/resources/org/drools/lang/DRL.g src/main/resources/org/drools/lang/DescrBuilderTree.g"/>
- <classpath refid="base.classpath" />
- </java>
- <move todir="src/main/java/org/drools/lang/">
- <fileset dir="src/main/resources/org/drools/lang">
- <include name="**/*.java"/>
- </fileset>
- </move>
- <java classname="org.antlr.Tool" fork="true">
- <arg line="-lib src/main/resources/org/drools/lang src/main/resources/org/drools/lang/Tree2TestDRL.g"/>
- <classpath refid="base.classpath" />
- </java>
- <move todir="src/test/java/org/drools/lang/">
- <fileset dir="src/main/resources/org/drools/lang">
- <include name="**/*.java"/>
- </fileset>
- </move>
- <delete>
- <fileset dir="src/main/resources/org/drools/lang">
- <include name="**/*.tokens"/>
- <include name="DRL__.g"/>
- </fileset>
- </delete>
- </tasks>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
+ <profiles>
+ <profile>
+ <id>grammars</id>
+ <activation>
+ <property>
+ <name>grammars</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+
+ <configuration>
+ <tasks if="generategrammars">
+ <path id="base.classpath">
+ <pathelement
+ path="${user.home}/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar" />
+ <pathelement
+ path="${user.home}/.m2/repository/org/antlr/stringtemplate/3.2/stringtemplate-3.2.jar" />
+ <pathelement
+ path="${user.home}/.m2/repository/org/antlr/antlr/3.1.1/antlr-3.1.1.jar" />
+ </path>
+ <property name="antlr_classpath" refid="maven.compile.classpath" />
+ <echo message="Generating Antlr Grammars" />
+ <java classname="org.antlr.Tool" fork="true">
+ <arg
+ line="-lib src/main/resources/org/drools/lang src/main/resources/org/drools/lang/DRL.g src/main/resources/org/drools/lang/DescrBuilderTree.g" />
+ <classpath refid="base.classpath" />
+ </java>
+ <move todir="src/main/java/org/drools/lang/">
+ <fileset dir="src/main/resources/org/drools/lang">
+ <include name="**/*.java" />
+ </fileset>
+ </move>
+ <java classname="org.antlr.Tool" fork="true">
+ <arg
+ line="-lib src/main/resources/org/drools/lang src/main/resources/org/drools/lang/Tree2TestDRL.g" />
+ <classpath refid="base.classpath" />
+ </java>
+ <move todir="src/test/java/org/drools/lang/">
+ <fileset dir="src/main/resources/org/drools/lang">
+ <include name="**/*.java" />
+ </fileset>
+ </move>
+ <java classname="org.antlr.Tool" fork="true">
+ <arg
+ line="-lib src/main/resources/org/drools/lang/dsl src/main/resources/org/drools/lang/dsl/DSLMap.g src/main/resources/org/drools/lang/dsl/DSLMapWalker.g" />
+ <classpath refid="base.classpath" />
+ </java>
+ <move todir="src/main/java/org/drools/lang/dsl/">
+ <fileset dir="src/main/resources/org/drools/lang/dsl">
+ <include name="**/*.java" />
+ </fileset>
+ </move>
+ <delete>
+ <fileset dir="src/main/resources/org/drools/lang">
+ <include name="**/*.tokens" />
+ <include name="DRL__.g" />
+ <include name="dsl/DSLMap__.g" />
+ </fileset>
+ </delete>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -502,7 +502,7 @@
((InternalResource) resource).setResourceType( type );
addPackageFromXml( resource );
} else if ( ResourceType.BRL.equals( type )) {
- ((InternalResource) resource).setResourceType( type );
+ ((InternalResource) resource).setResourceType( type );
addPackageFromBrl( resource );
} else if ( ResourceType.DRF.equals( type )) {
((InternalResource) resource).setResourceType( type );
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/rules/SuggestionCompletionLoader.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/rules/SuggestionCompletionLoader.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/rules/SuggestionCompletionLoader.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -225,9 +225,9 @@
for (final Iterator entries = mapping.getEntries().iterator(); entries.hasNext();) {
final AbstractDSLMappingEntry entry = (AbstractDSLMappingEntry) entries.next();
if (entry.getSection() == DSLMappingEntry.CONDITION) {
- this.builder.addDSLConditionSentence(entry.getSentence());
+ this.builder.addDSLConditionSentence(entry.getMappingKey());
} else if (entry.getSection() == DSLMappingEntry.CONSEQUENCE) {
- this.builder.addDSLActionSentence(entry.getSentence());
+ this.builder.addDSLActionSentence(entry.getMappingKey());
} else if (entry.getSection() == DSLMappingEntry.KEYWORD) {
this.builder.addDSLMapping(entry);
} else if (entry.getSection() == DSLMappingEntry.ANY) {
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilder.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilder.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -173,9 +173,9 @@
return (DSLSentence[]) ls.toArray( new DSLSentence[ls.size()] );
}
- public void addDSLMapping(AbstractDSLMappingEntry entry) {
+ public void addDSLMapping(DSLMappingEntry entry) {
DSLSentence sen = new DSLSentence();
- sen.sentence = entry.getSentence();
+ sen.sentence = entry.getMappingKey();
if (entry.getSection() == DSLMappingEntry.CONDITION) {
this.conditionDSLSentences.add(sen);
} else if (entry.getSection() == DSLMappingEntry.CONSEQUENCE) {
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,4 +1,4 @@
-// $ANTLR 3.1.1 src/main/resources/org/drools/lang/DRL.g 2009-02-05 11:36:21
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/DRL.g 2009-02-11 15:20:22
package org.drools.lang;
@@ -2259,11 +2259,11 @@
protected DFA20 dfa20 = new DFA20(this);
static final String DFA20_eotS =
- "\2\uffff\1\42\1\45\1\uffff\1\42\7\26\1\uffff\1\60\1\uffff\1\62\1"+
- "\uffff\1\42\1\65\1\67\11\uffff\2\42\1\uffff\1\42\4\uffff\11\26\15"+
- "\uffff\11\26\1\116\1\117\1\26\1\121\2\26\1\124\1\125\1\126\2\uffff"+
- "\1\116\1\uffff\2\26\3\uffff\3\26\1\134\1\26\1\uffff\1\26\1\137\1"+
- "\uffff";
+ "\2\uffff\1\42\1\45\1\uffff\1\42\7\26\1\uffff\1\60\1\uffff\1\62"+
+ "\1\uffff\1\42\1\65\1\67\11\uffff\2\42\1\uffff\1\42\4\uffff\11\26"+
+ "\15\uffff\11\26\1\116\1\117\1\26\1\121\2\26\1\124\1\125\1\126\2"+
+ "\uffff\1\116\1\uffff\2\26\3\uffff\3\26\1\134\1\26\1\uffff\1\26\1"+
+ "\137\1\uffff";
static final String DFA20_eofS =
"\140\uffff";
static final String DFA20_minS =
@@ -2274,13 +2274,13 @@
"\2\60\1\145\1\60\1\155\1\145\3\60\2\uffff\1\60\1\uffff\1\165\1\143"+
"\3\uffff\1\154\1\164\1\141\1\60\1\164\1\uffff\1\145\1\60\1\uffff";
static final String DFA20_maxS =
- "\1\u00ff\1\uffff\1\76\1\71\1\uffff\1\uffff\2\162\1\143\1\157\1\165"+
- "\1\166\1\150\1\uffff\1\75\1\uffff\1\52\1\uffff\3\75\11\uffff\1\46"+
- "\1\174\1\uffff\1\57\4\uffff\1\165\1\145\1\154\1\157\1\143\2\154"+
- "\2\145\15\uffff\1\145\1\156\1\163\1\155\1\165\2\154\1\162\1\156"+
- "\2\u00ff\1\145\1\u00ff\1\155\1\145\3\u00ff\2\uffff\1\u00ff\1\uffff"+
- "\1\165\1\143\3\uffff\1\154\1\164\1\141\1\u00ff\1\164\1\uffff\1\145"+
- "\1\u00ff\1\uffff";
+ "\1\u00ff\1\uffff\1\76\1\71\1\uffff\1\uffff\2\162\1\143\1\157\1"+
+ "\165\1\166\1\150\1\uffff\1\75\1\uffff\1\52\1\uffff\3\75\11\uffff"+
+ "\1\46\1\174\1\uffff\1\57\4\uffff\1\165\1\145\1\154\1\157\1\143\2"+
+ "\154\2\145\15\uffff\1\145\1\156\1\163\1\155\1\165\2\154\1\162\1"+
+ "\156\2\u00ff\1\145\1\u00ff\1\155\1\145\3\u00ff\2\uffff\1\u00ff\1"+
+ "\uffff\1\165\1\143\3\uffff\1\154\1\164\1\141\1\u00ff\1\164\1\uffff"+
+ "\1\145\1\u00ff\1\uffff";
static final String DFA20_acceptS =
"\1\uffff\1\1\2\uffff\1\4\10\uffff\1\15\1\uffff\1\17\1\uffff\1\21"+
"\3\uffff\2\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40\2\uffff\1\44\1"+
@@ -2290,11 +2290,11 @@
static final String DFA20_specialS =
"\5\uffff\1\0\132\uffff}>";
static final String[] DFA20_transitionS = {
- "\2\1\1\uffff\2\1\22\uffff\1\1\1\22\1\4\1\40\1\25\1\42\1\36\1"+
- "\5\1\27\1\30\2\42\1\35\1\2\1\20\1\41\12\3\1\21\1\17\1\24\1\16"+
- "\1\23\1\42\1\15\32\26\1\31\1\42\1\32\1\42\1\25\1\26\1\10\1\26"+
- "\1\11\2\26\1\7\7\26\1\12\1\13\4\26\1\6\2\26\1\14\3\26\1\33\1"+
- "\37\1\34\102\uffff\100\26",
+ "\2\1\1\uffff\2\1\22\uffff\1\1\1\22\1\4\1\40\1\25\1\42\1\36"+
+ "\1\5\1\27\1\30\2\42\1\35\1\2\1\20\1\41\12\3\1\21\1\17\1\24\1"+
+ "\16\1\23\1\42\1\15\32\26\1\31\1\42\1\32\1\42\1\25\1\26\1\10"+
+ "\1\26\1\11\2\26\1\7\7\26\1\12\1\13\4\26\1\6\2\26\1\14\3\26\1"+
+ "\33\1\37\1\34\102\uffff\100\26",
"",
"\12\3\4\uffff\1\43",
"\1\44\1\uffff\12\3",
@@ -2363,25 +2363,25 @@
"\1\113",
"\1\114",
"\1\115",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
"\1\120",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
"\1\122",
"\1\123",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
"",
"",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
"",
"\1\127",
"\1\130",
@@ -2391,13 +2391,13 @@
"\1\131",
"\1\132",
"\1\133",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
"\1\135",
"",
"\1\136",
- "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff\100"+
- "\26",
+ "\12\26\7\uffff\32\26\4\uffff\1\26\1\uffff\32\26\105\uffff"+
+ "\100\26",
""
};
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,4 +1,4 @@
-// $ANTLR 3.1.1 src/main/resources/org/drools/lang/DRL.g 2009-02-05 11:36:20
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/DRL.g 2009-02-11 15:20:20
package org.drools.lang;
@@ -657,7 +657,7 @@
// AST REWRITE
- // elements: package_id, package_key
+ // elements: package_key, package_id
// token labels:
// rule labels: retval
// token list labels:
@@ -1098,7 +1098,7 @@
// AST REWRITE
- // elements: import_key, import_name
+ // elements: import_name, import_key
// token labels:
// rule labels: retval
// token list labels:
@@ -1506,7 +1506,7 @@
// AST REWRITE
- // elements: global_id, data_type, global_key
+ // elements: data_type, global_key, global_id
// token labels:
// rule labels: retval
// token list labels:
@@ -1716,7 +1716,7 @@
// AST REWRITE
- // elements: curly_chunk, parameters, function_id, function_key, data_type
+ // elements: curly_chunk, data_type, parameters, function_key, function_id
// token labels:
// rule labels: retval
// token list labels:
@@ -1957,7 +1957,7 @@
// AST REWRITE
- // elements: query_id, query_key, parameters, normal_lhs_block, end_key
+ // elements: end_key, parameters, query_key, normal_lhs_block, query_id
// token labels:
// rule labels: retval
// token list labels:
@@ -2245,7 +2245,7 @@
// AST REWRITE
- // elements: RIGHT_PAREN, param_definition
+ // elements: param_definition, RIGHT_PAREN
// token labels:
// rule labels: retval
// token list labels:
@@ -2578,7 +2578,7 @@
// AST REWRITE
- // elements: declare_key, type_declare_id, decl_field, end_key, decl_metadata
+ // elements: declare_key, type_declare_id, decl_field, decl_metadata, end_key
// token labels:
// rule labels: retval
// token list labels:
@@ -2777,7 +2777,7 @@
// AST REWRITE
- // elements: paren_chunk, AT, ID
+ // elements: paren_chunk, ID, AT
// token labels:
// rule labels: retval
// token list labels:
@@ -2937,7 +2937,7 @@
// AST REWRITE
- // elements: decl_metadata, data_type, ID, decl_field_initialization
+ // elements: decl_field_initialization, ID, data_type, decl_metadata
// token labels:
// rule labels: retval
// token list labels:
@@ -3248,7 +3248,7 @@
// AST REWRITE
- // elements: end_key, template_id, template_key, template_slot
+ // elements: end_key, template_slot, template_id, template_key
// token labels:
// rule labels: retval
// token list labels:
@@ -3784,7 +3784,7 @@
// AST REWRITE
- // elements: decl_metadata, rule_id, when_part, rule_id, extend_key, rhs_chunk, rule_attributes, rule_key
+ // elements: rule_id, extend_key, when_part, rule_id, rule_attributes, decl_metadata, rule_key, rhs_chunk
// token labels:
// rule labels: retval
// token list labels:
@@ -3978,7 +3978,7 @@
// AST REWRITE
- // elements: normal_lhs_block, WHEN
+ // elements: WHEN, normal_lhs_block
// token labels:
// rule labels: retval
// token list labels:
@@ -5830,7 +5830,7 @@
// AST REWRITE
- // elements: lhs_and, RIGHT_PAREN
+ // elements: RIGHT_PAREN, lhs_and
// token labels:
// rule labels: retval
// token list labels:
@@ -6341,7 +6341,7 @@
// AST REWRITE
- // elements: lhs_and, lhs_unary
+ // elements: lhs_unary, lhs_and
// token labels:
// rule labels: retval
// token list labels:
@@ -6704,7 +6704,7 @@
else if ( (LA56_0==ID) ) {
int LA56_2 = input.LA(2);
- if ( (((synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.NOT))))||(synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.FORALL))))||((synpred6_DRL()&&(validateNotWithBinding()))&&((validateIdentifierKey(DroolsSoftKeywords.NOT))))||synpred6_DRL()||(synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.EXISTS))))||(synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.EVAL)))))) ) {
+ if ( (((synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.EXISTS))))||synpred6_DRL()||(synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.NOT))))||(synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.EVAL))))||(synpred6_DRL()&&((validateIdentifierKey(DroolsSoftKeywords.FORALL))))||((synpred6_DRL()&&(validateNotWithBinding()))&&((validateIdentifierKey(DroolsSoftKeywords.NOT)))))) ) {
alt56=1;
}
else if ( (true) ) {
@@ -6780,7 +6780,7 @@
// AST REWRITE
- // elements: lhs_pattern, exists_key, RIGHT_PAREN, lhs_or
+ // elements: lhs_or, RIGHT_PAREN, lhs_pattern, exists_key
// token labels:
// rule labels: retval
// token list labels:
@@ -6883,7 +6883,7 @@
// AST REWRITE
- // elements: not_key, fact_binding
+ // elements: fact_binding, not_key
// token labels:
// rule labels: retval
// token list labels:
@@ -7085,7 +7085,7 @@
// AST REWRITE
- // elements: not_key, RIGHT_PAREN, lhs_pattern, lhs_or
+ // elements: RIGHT_PAREN, lhs_pattern, lhs_or, not_key
// token labels:
// rule labels: retval
// token list labels:
@@ -7201,7 +7201,7 @@
// AST REWRITE
- // elements: eval_key, paren_chunk
+ // elements: paren_chunk, eval_key
// token labels:
// rule labels: retval
// token list labels:
@@ -7335,7 +7335,7 @@
// AST REWRITE
- // elements: lhs_pattern, forall_key, RIGHT_PAREN
+ // elements: RIGHT_PAREN, lhs_pattern, forall_key
// token labels:
// rule labels: retval
// token list labels:
@@ -7780,7 +7780,7 @@
// AST REWRITE
- // elements: id1, id2, paren_chunk
+ // elements: id2, paren_chunk, id1
// token labels: id1, id2
// rule labels: retval
// token list labels:
@@ -7982,7 +7982,7 @@
// AST REWRITE
- // elements: RIGHT_PAREN, ACCUMULATE, lhs_or, accumulate_id_clause, accumulate_init_clause
+ // elements: accumulate_init_clause, ACCUMULATE, RIGHT_PAREN, lhs_or, accumulate_id_clause
// token labels:
// rule labels: retval
// token list labels:
@@ -8250,7 +8250,7 @@
// AST REWRITE
- // elements: reverse_key, pc1, result_key, action_key, pc3, init_key, pc4, pc2
+ // elements: result_key, action_key, init_key, pc1, pc3, reverse_key, pc2, pc4
// token labels:
// rule labels: pc2, pc4, pc3, pc1, retval
// token list labels:
@@ -8290,7 +8290,7 @@
adaptor.addChild(root_1, root_2);
}
// src/main/resources/org/drools/lang/DRL.g:979:69: ( ^( reverse_key $pc3) )?
- if ( stream_reverse_key.hasNext()||stream_pc3.hasNext() ) {
+ if ( stream_pc3.hasNext()||stream_reverse_key.hasNext() ) {
// src/main/resources/org/drools/lang/DRL.g:979:69: ^( reverse_key $pc3)
{
Object root_2 = (Object)adaptor.nil();
@@ -8302,8 +8302,8 @@
}
}
+ stream_pc3.reset();
stream_reverse_key.reset();
- stream_pc3.reset();
// src/main/resources/org/drools/lang/DRL.g:979:90: ^( result_key $pc4)
{
Object root_2 = (Object)adaptor.nil();
@@ -8713,7 +8713,7 @@
// AST REWRITE
- // elements: COLLECT, RIGHT_PAREN, pattern_source
+ // elements: pattern_source, COLLECT, RIGHT_PAREN
// token labels:
// rule labels: retval
// token list labels:
@@ -9060,7 +9060,7 @@
// AST REWRITE
- // elements: ID, expression_chain, paren_chunk
+ // elements: expression_chain, paren_chunk, ID
// token labels:
// rule labels: retval
// token list labels:
@@ -9225,7 +9225,7 @@
// AST REWRITE
- // elements: ID, square_chunk, expression_chain, paren_chunk
+ // elements: paren_chunk, square_chunk, expression_chain, ID
// token labels:
// rule labels: retval
// token list labels:
@@ -9539,7 +9539,7 @@
// AST REWRITE
- // elements: fact_binding_expression, fact, RIGHT_PAREN, label
+ // elements: fact_binding_expression, fact, label, RIGHT_PAREN
// token labels:
// rule labels: retval
// token list labels:
@@ -9742,7 +9742,7 @@
// AST REWRITE
- // elements: fact_binding_expression, fact
+ // elements: fact, fact_binding_expression
// token labels:
// rule labels: retval
// token list labels:
@@ -9883,7 +9883,7 @@
// AST REWRITE
- // elements: RIGHT_PAREN, pattern_type, constraints
+ // elements: constraints, pattern_type, RIGHT_PAREN
// token labels:
// rule labels: retval
// token list labels:
@@ -10538,7 +10538,7 @@
// AST REWRITE
- // elements: accessor_path, label, accessor_path, paren_chunk, label, or_restr_connective
+ // elements: accessor_path, label, paren_chunk, accessor_path, label, or_restr_connective
// token labels:
// rule labels: retval
// token list labels:
@@ -12600,7 +12600,7 @@
// AST REWRITE
- // elements: ID, square_chunk
+ // elements: square_chunk, ID
// token labels:
// rule labels: retval
// token list labels:
@@ -16895,9 +16895,9 @@
else if ( (LA5_1==LEFT_PAREN) && ((((validateIdentifierKey(DroolsSoftKeywords.SALIENCE)))||((validateIdentifierKey(DroolsSoftKeywords.ENABLED)))||((validateIdentifierKey(DroolsSoftKeywords.DURATION)))))) {s = 4;}
- else if ( (LA5_1==ID) && (((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(!
((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))|!
|((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdenti
fierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(!
DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywor!
ds.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((
validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validat!
eIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((valida!
teIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsS
oftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKe!
ywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "fun!
ction") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((
validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((!
validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifie!
rKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKe
ywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2!
, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "fun!
ction") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((v
alidateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSo!
ftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoft!
Keywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||
(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((vali!
dateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIde!
ntifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftK
eywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords!
.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLA!
RE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((valid
ateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validat!
eIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((valida!
teIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey
(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.D!
ECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE!
))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validate
IdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentif!
ierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey!
(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywo
rds.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "f!
unction") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMP!
ORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((valid
ateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifie!
rKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(D!
roolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywor
ds.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((v!
alidateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((va!
lidateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifie
rKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(Dro!
olsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.!
IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((v
alidateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1,!
"import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateI!
dentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoft
Keywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "!
function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywor!
ds.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((val
idateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIde!
ntifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(D!
roolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywo
rds.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftK!
eywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))!
||(((validateLT(1, "import") && validateLT(2, "function") ))&&((valida
teIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((valida!
teLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKe!
y(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKe
ywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function"!
) ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTI!
ON)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((valida
teIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdent!
ifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierK!
ey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeyw
ords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE))!
)&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((v!
alidateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentif
ierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(Dr!
oolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifier!
Key(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftK
eywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function!
") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPOR!
T)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((valida
teLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierK!
ey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(Dro!
olsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.
FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((!
validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((vali!
dateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKe
y(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(Drool!
sSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywor!
ds.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(
(validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((valida!
teIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, Dro!
olsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(
2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "fun!
ction") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE!
)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validat
eIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1,!
DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKe!
y(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.T
EMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE!
)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateL!
T(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKe
y(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKe!
ywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && valida!
teLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMP
ORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMP!
ORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((va!
lidateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, Dr
oolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifier!
Key(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validat!
eLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPO
RT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||!((((((valid!
ateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, D!
roolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywor
ds.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLAT!
E))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))))!
)||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifie
rKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(Dro!
olsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKe!
ywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))|
|(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((vali!
dateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))))) {s = 5;}
+ else if ( (LA5_1==ID) && (((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((vali!
dateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifie!
rKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoft
Keywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeyword!
s.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECL!
ARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((vali
dateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIde!
ntifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "i!
mport") && validateLT(2, "function") ))&&((validateIdentifierKey(Drool
sSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))!
))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(!
(((((validateLT(1, "import") && validateLT(2, "function") ))&&((valida
teIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, Drool!
sSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") &!
& validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeyw
ords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IM!
PORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((valida!
teIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1
, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSof!
tKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMP!
ORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((vali
dateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "i!
mport") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIden!
tifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(Drools
SoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCT!
ION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.!
FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((valida
teLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validate!
IdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateI!
dentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSof
tKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validate!
LT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE!
))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validat
eLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentif!
ierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "impor!
t") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSof
tKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)!
))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") !
))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateI
dentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifi!
erKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(!
DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywor
ds.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))!
&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((v!
alidateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, Dr
oolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(Dr!
oolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftK!
eywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))
||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((va!
lidateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentif!
ierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && v
alidateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(Droo!
lsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords!
.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))|
|((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((vali!
dateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateId!
entifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(Droo
lsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeyword!
s.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(!
2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))
))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((v!
alidateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validat!
eIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(D
roolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.!
FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMP!
ORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((valida
teIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(Droo!
lsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKe!
y(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKey
words.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.I!
MPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)!
))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validate
LT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, D!
roolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords!
.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function")
))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((va!
lidateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((!
validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1,
DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(!
DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(Drools!
SoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&
&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function"!
) ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(!
((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdent
ifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsS!
oftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, Drool!
sSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE
)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))!
))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((valid!
ateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKe
y(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsS!
oftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPL!
ATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((
validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validat!
eIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((valida!
teLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, Drools
SoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeyword!
s.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE!
)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((
validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(Dro!
olsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSof!
tKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBA
L)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateId!
entifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifi!
erKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && vali
dateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GL!
OBAL)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPOR!
T)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdenti
fierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey!
(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIden!
tifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(Drools
SoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKey!
words.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, "import") && validateLT(2, "function"!
) ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validat
eIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKe!
y(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(D!
roolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords
.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((((((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT)!
)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))))) {s = 5;}
- else if ( (LA5_1==STRING) && ((!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((vali!
dateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, !
DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsS
oftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords!
.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))|!
|((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1
, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSof!
tKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.!
TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY))
)||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((valida!
teIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifi!
erKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeyword
s.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)!
)))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((!
(((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdenti
fierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(Dro!
olsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKey!
words.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!
(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((valida!
teIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifi!
erKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftK
eywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.Q!
UERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||(!
(validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1,
DroolsSoftKeywords.TEMPLATE))))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoft!
Keywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.D!
IALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((va
lidateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdent!
ifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(Drool!
sSoftKeywords.QUERY)))||!(((((validateIdentifierKey(DroolsSoftKeywords
.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||!
((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validate!
IdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSof
tKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.T!
EMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))!
)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((valida
teIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifie!
rKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))))) {s = 6;}
+ else if ( (LA5_1==STRING) && ((!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((vali!
dateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, !
DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsS
oftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords!
.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))|!
|((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1
, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSof!
tKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.!
TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY))
)||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((valida!
teIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifi!
erKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeyword
s.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)!
)))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!((!
(((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdenti
fierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(Dro!
olsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKey!
words.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!
(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((valida!
teLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, Dr!
oolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSof
tKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!
!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((vali!
dateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey
(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoft!
Keywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||!(((((validateIdentifierKey(DroolsSoftKeywords.Q!
UERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((vali
dateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, D!
roolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftK!
eywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords
.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||!
((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validate!
IdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSof
tKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.T!
EMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE)))!
)))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((valida
teIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifie!
rKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))||!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))))) {s = 6;}
else if ( (LA5_1==INT) && ((((validateIdentifierKey(DroolsSoftKeywords.SALIENCE)))||((validateIdentifierKey(DroolsSoftKeywords.DURATION)))))) {s = 7;}
@@ -16924,7 +16924,7 @@
else if ( ((((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))) ) {s = 13;}
- else if ( (!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))) ) {s = 14;}
+ else if ( (!(((((validateIdentifierKey(DroolsSoftKeywords.QUERY)))||((validateIdentifierKey(DroolsSoftKeywords.GLOBAL)))||((validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateIdentifierKey(DroolsSoftKeywords.FUNCTION)))||(((validateLT(1, "import") && validateLT(2, "function") ))&&((validateIdentifierKey(DroolsSoftKeywords.IMPORT))))||(((validateLT(1, DroolsSoftKeywords.DECLARE)))&&((validateIdentifierKey(DroolsSoftKeywords.DECLARE))))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))))))) ) {s = 14;}
else if ( (((validateIdentifierKey(DroolsSoftKeywords.QUERY)))) ) {s = 15;}
@@ -17591,14 +17591,14 @@
"\2\122\7\uffff\1\122\6\uffff\1\4\6\uffff\1\0\6\uffff\2\0\1\uffff"+
"\5\0\2\uffff";
static final String DFA88_maxS =
- "\1\153\1\156\7\uffff\1\156\6\uffff\1\174\6\uffff\1\0\6\uffff\2\0"+
- "\1\uffff\5\0\2\uffff";
+ "\1\153\1\156\7\uffff\1\156\6\uffff\1\174\6\uffff\1\0\6\uffff\2"+
+ "\0\1\uffff\5\0\2\uffff";
static final String DFA88_acceptS =
- "\2\uffff\1\2\5\uffff\1\3\1\uffff\1\2\6\uffff\2\2\5\uffff\1\2\7\uffff"+
- "\1\2\6\uffff\1\1";
+ "\2\uffff\1\2\5\uffff\1\3\1\uffff\1\2\6\uffff\2\2\5\uffff\1\2\7"+
+ "\uffff\1\2\6\uffff\1\1";
static final String DFA88_specialS =
- "\1\0\1\1\7\uffff\1\2\6\uffff\1\3\6\uffff\1\4\6\uffff\1\5\1\6\1\uffff"+
- "\1\7\1\10\1\11\1\12\1\13\2\uffff}>";
+ "\1\0\1\1\7\uffff\1\2\6\uffff\1\3\6\uffff\1\4\6\uffff\1\5\1\6\1"+
+ "\uffff\1\7\1\10\1\11\1\12\1\13\2\uffff}>";
static final String[] DFA88_transitionS = {
"\1\1\3\uffff\1\10\17\uffff\6\2",
"\1\11\2\uffff\1\12\1\20\6\uffff\2\12\15\uffff\3\12",
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DescrBuilderTree.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DescrBuilderTree.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DescrBuilderTree.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,4 +1,4 @@
-// $ANTLR 3.1.1 src/main/resources/org/drools/lang/DescrBuilderTree.g 2009-02-05 11:36:22
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/DescrBuilderTree.g 2009-02-11 15:20:22
package org.drools.lang;
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AbstractDSLMappingEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AbstractDSLMappingEntry.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AbstractDSLMappingEntry.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,164 +1,172 @@
package org.drools.lang.dsl;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
-import org.drools.lang.dsl.DSLMappingEntry.MetaData;
-import org.drools.lang.dsl.DSLMappingEntry.Section;
+public abstract class AbstractDSLMappingEntry
+ implements
+ DSLMappingEntry {
+ private Section section;
+ private MetaData metadata;
+ private String key;
+ private String value;
+ private Map<String, Integer> variables = new HashMap<String, Integer>();
+ private Pattern keyPattern;
+ private String valuePattern;
-public abstract class AbstractDSLMappingEntry {
+ public AbstractDSLMappingEntry() {
+ super();
+ }
- protected Section section;
- protected MetaData metadata;
- protected String key;
- protected String value;
- protected String sentence;
- protected Map variables = Collections.EMPTY_MAP;
- protected Pattern keyPattern;
- protected String valuePattern;
-
-
- public AbstractDSLMappingEntry() {
- super();
- }
+ /**
+ * @inheritDoc
+ */
+ public Section getSection() {
+ return this.section;
+ }
- /**
- * @inheritDoc
- */
- public Section getSection() {
- return this.section;
- }
+ /**
+ * @inheritDoc
+ */
+ public DSLMappingEntry.MetaData getMetaData() {
+ return this.metadata;
+ }
- /**
- * @inheritDoc
- */
- public DSLMappingEntry.MetaData getMetaData() {
- return this.metadata;
- }
+ /**
+ * @inheritDoc
+ */
+ public String getMappingKey() {
+ return this.key;
+ }
- /**
- * @inheritDoc
- */
- public String getMappingKey() {
- return this.key;
- }
+ public void setMappingKey(final String key) {
+ this.key = key;
+ }
- /**
- * @inheritDoc
- */
- public String getMappingValue() {
- return this.value;
- }
+ public void setMappingValue(final String value) {
+ this.value = value;
+ }
- /**
- * @param section the section to set
- */
- public void setSection(final Section section) {
- this.section = section;
- }
+ public void setKeyPattern(Pattern keyPattern) {
+ this.keyPattern = keyPattern;
+ }
- /**
- * @param metadata the metadata to set
- */
- public void setMetaData(final MetaData metadata) {
- this.metadata = metadata;
- }
+ /**
+ * @inheritDoc
+ */
+ public String getMappingValue() {
+ return this.value;
+ }
- /**
- * @return the keyPattern
- */
- public Pattern getKeyPattern() {
- return this.keyPattern;
- }
+ /**
+ * @param section the section to set
+ */
+ public void setSection(final Section section) {
+ this.section = section;
+ }
- /**
- * @return the valuePattern
- */
- public String getValuePattern() {
- return this.valuePattern;
- }
+ /**
+ * @param metadata the metadata to set
+ */
+ public void setMetaData(final MetaData metadata) {
+ this.metadata = metadata;
+ }
- /**
- * @return the variables
- */
- public Map getVariables() {
- return this.variables;
- }
+ /**
+ * @return the keyPattern
+ */
+ public Pattern getKeyPattern() {
+ return this.keyPattern;
+ }
- public String toPatternString() {
- return this.section + "[" + this.metadata + "]" + this.keyPattern.pattern() + "=" + this.valuePattern;
- }
+ /**
+ * @return the valuePattern
+ */
+ public String getValuePattern() {
+ return this.valuePattern;
+ }
- public String toString() {
- return this.section + "[" + this.metadata + "]" + this.key + "=" + this.value;
- }
+ public void setValuePattern(final String valuePattern) {
+ this.valuePattern = valuePattern;
+ }
- public void setSentence(String sentence){
- this.sentence = sentence;
+ /**
+ * @return the variables
+ */
+ public Map<String, Integer> getVariables() {
+ return this.variables;
}
-
- public String getSentence(){
- return this.sentence;
- }
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((this.key == null) ? 0 : this.key.hashCode());
- result = PRIME * result + ((this.metadata == null) ? 0 : this.metadata.hashCode());
- result = PRIME * result + ((this.section == null) ? 0 : this.section.hashCode());
- result = PRIME * result + ((this.value == null) ? 0 : this.value.hashCode());
- return result;
- }
- public boolean equals(final Object obj) {
- if ( this == obj ) {
- return true;
- }
- if ( obj == null ) {
- return false;
- }
- if ( getClass() != obj.getClass() ) {
- return false;
- }
- final AbstractDSLMappingEntry other = (AbstractDSLMappingEntry) obj;
- if ( this.key == null ) {
- if ( other.key != null ) {
- return false;
- }
- } else if ( !this.key.equals( other.key ) ) {
- return false;
- }
- if ( this.metadata == null ) {
- if ( other.metadata != null ) {
- return false;
- }
- } else if ( !this.metadata.equals( other.metadata ) ) {
- return false;
- }
- if ( this.section == null ) {
- if ( other.section != null ) {
- return false;
- }
- } else if ( !this.section.equals( other.section ) ) {
- return false;
- }
- if ( this.value == null ) {
- if ( other.value != null ) {
- return false;
- }
- } else if ( !this.value.equals( other.value ) ) {
- return false;
- }
- return true;
- }
+ public void setVariables(final Map<String, Integer> variables) {
+ this.variables = variables;
+ }
- public List getErrors() {
- // TODO Need to implement validation here
- return Collections.EMPTY_LIST;
- }
+ public String toPatternString() {
+ return this.section + "[" + this.metadata + "]" + this.keyPattern.pattern() + "=" + this.valuePattern;
+ }
+ public String toString() {
+ return this.section + "[" + this.metadata + "]" + this.key + "=" + this.value;
+ }
+
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result + ((this.key == null) ? 0 : this.key.hashCode());
+ result = PRIME * result + ((this.metadata == null) ? 0 : this.metadata.hashCode());
+ result = PRIME * result + ((this.section == null) ? 0 : this.section.hashCode());
+ result = PRIME * result + ((this.value == null) ? 0 : this.value.hashCode());
+ return result;
+ }
+
+ public boolean equals(final Object obj) {
+ if ( this == obj ) {
+ return true;
+ }
+ if ( obj == null ) {
+ return false;
+ }
+ if ( getClass() != obj.getClass() ) {
+ return false;
+ }
+ final AbstractDSLMappingEntry other = (AbstractDSLMappingEntry) obj;
+ if ( this.key == null ) {
+ if ( other.key != null ) {
+ return false;
+ }
+ } else if ( !this.key.equals( other.key ) ) {
+ return false;
+ }
+ if ( this.metadata == null ) {
+ if ( other.metadata != null ) {
+ return false;
+ }
+ } else if ( !this.metadata.equals( other.metadata ) ) {
+ return false;
+ }
+ if ( this.section == null ) {
+ if ( other.section != null ) {
+ return false;
+ }
+ } else if ( !this.section.equals( other.section ) ) {
+ return false;
+ }
+ if ( this.value == null ) {
+ if ( other.value != null ) {
+ return false;
+ }
+ } else if ( !this.value.equals( other.value ) ) {
+ return false;
+ }
+ return true;
+ }
+
+ public List getErrors() {
+ return Collections.EMPTY_LIST;
+ }
+
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -16,19 +16,21 @@
package org.drools.lang.dsl;
-import java.util.Collections;
-import java.util.Iterator;
import java.util.Map;
import java.util.regex.Pattern;
+import org.mvel2.util.ParseTools;
+
/**
* An ANTLR-driven implementation for the DSL Mapping Entry interface
*
* @author mattgeis
*/
-public class AntlrDSLMappingEntry extends AbstractDSLMappingEntry
- implements
- DSLMappingEntry {
+public class AntlrDSLMappingEntry extends AbstractDSLMappingEntry {
+
+ private static final String HEAD_TAG = "__HEAD__";
+ private static final String TAIL_TAG = "__TAIL__";
+
private boolean headMatchGroupAdded = false;
private boolean tailMatchGroupAdded = false;
@@ -37,119 +39,159 @@
DSLMappingEntry.EMPTY_METADATA,
null,
null,
- null);
+ null,
+ null );
}
public AntlrDSLMappingEntry(final Section section,
final MetaData metadata,
final String key,
final String value,
- final String sentence) {
- this.section = section;
- this.metadata = metadata;
- this.setMappingKey( key );
- this.setMappingValue( value );
- this.sentence = sentence;
+ final String keyPattern,
+ final String valuePattern) {
+ setSection( section );
+ setMetaData( metadata );
+ setMappingKey( key );
+ setMappingValue( value );
+ setKeyPattern( keyPattern );
+ setValuePattern( valuePattern );
}
/**
* @param key
* the key to set
*/
- public void setMappingKey(String key) {
+ public void setKeyPattern(final String keyPat) {
//the "key" in this case is already mostly formed into
//a pattern by ANTLR, and just requires a bit of post-processing.
- if ( key != null ) {
- key = key.trim();
- }
- this.key = key;
+ if ( keyPat != null ) {
+ String trimmed = keyPat.trim();
+ // escaping the special character $
+ String keyPattern = trimmed.replaceAll( "\\$",
+ "\\\\\\$" );
- if ( key != null ) {
- int substr = 0;
- // escape '$' to avoid errors
- //final String escapedKey = key.replaceAll("\\$", "\\\\\\$");
- // retrieving variables list and creating key pattern
- final StringBuffer buf = new StringBuffer();
-
- if ( !key.startsWith( "^" ) ) {
+ if ( !keyPattern.startsWith( "^" ) ) {
// making it start with a space char or a line start
- buf.append( "(\\W|^)" ).append( key );
- redistributeVariables();
+ keyPattern = "(\\W|^)" + keyPattern;
+ // adding a dummy variable due to index shift
+ getVariables().put( HEAD_TAG,
+ Integer.valueOf( 0 ) );
headMatchGroupAdded = true;
}
// if pattern ends with a pure variable whose pattern could create
// a greedy match, append a line end to avoid multiple line matching
- if ( buf.toString().endsWith( "(.*?)" ) ) {
- buf.append( "$" );
+ if ( keyPattern.endsWith( "(.*?)" ) ) {
+ keyPattern += "$";
} else {
- buf.append( "(\\W|$)" );
+ keyPattern += "(\\W|$)";
+ getVariables().put( TAIL_TAG,
+ Integer.valueOf( 1 ) );
tailMatchGroupAdded = true;
}
+
+ // fix variables offset
+ fixVariableOffsets();
// setting the key pattern and making it space insensitive
- String pat = buf.toString();
//first, look to see if it's
- if ( key.substring( substr ).trim().startsWith( "-" ) && (!key.substring( substr ).trim().startsWith( "-\\s*" )) ) {
- pat = pat.substring( 0,
- pat.indexOf( '-' ) + 1 ) + "\\s*" + pat.substring( pat.indexOf( '-' ) + 1 ).trim();
+ if ( trimmed.startsWith( "-" ) && (!trimmed.startsWith( "-\\s*" )) ) {
+ int index = keyPattern.indexOf( '-' ) + 1;
+ keyPattern = keyPattern.substring( 0,
+ index ) + "\\s*" + keyPattern.substring( index ).trim();
}
- //may not need to do this at all
- //pat = pat.replaceAll("\\s+", "\\\\s+");
- this.keyPattern = Pattern.compile( pat,
- Pattern.DOTALL | Pattern.MULTILINE );
+ // making the pattern space insensitive
+ keyPattern = keyPattern.replaceAll( "\\s+",
+ "\\\\s+" );
+ // normalize duplications
+ keyPattern = keyPattern.replaceAll( "(\\\\s\\+)+",
+ "\\\\s+" );
+
+ setKeyPattern( Pattern.compile( keyPattern,
+ Pattern.DOTALL | Pattern.MULTILINE ) );
+
} else {
- this.keyPattern = null;
+ setKeyPattern( (Pattern) null );
}
- // update value mapping
- //this.setMappingValue(this.value);
}
- /**
- * The keys for this map are integers, starting at 1. However,
- * in certain cases we insert a matching group at the start of the
- * pattern, which means that 1 should become 2, 2 become 3, etc.
- */
- private void redistributeVariables() {
- for ( Iterator it = variables.entrySet().iterator(); it.hasNext(); ) {
- Map.Entry entry = (Map.Entry) it.next();
- Integer i = (Integer) entry.getValue();
- variables.put( entry.getKey(),
- new Integer( i.intValue() + 1 ) );
+ private void fixVariableOffsets() {
+ char[] input = getMappingKey().toCharArray();
+ int counter = 1;
+ boolean insideCurly = false;
+ if( headMatchGroupAdded ) {
+ getVariables().put( HEAD_TAG, Integer.valueOf( counter ) );
+ counter++;
}
+ for ( int i = 0; i < input.length; i++ ) {
+ switch ( input[i] ) {
+ case '\\' :
+ // next char is escaped
+ i++;
+ break;
+ case '(' :
+ counter++;
+ break;
+ case '{' :
+ if( insideCurly ) {
+ i = ParseTools.balancedCapture( input, i, '{' );
+ } else {
+ insideCurly = true;
+ updateVariableIndex( i,
+ counter );
+ counter++;
+ }
+ break;
+ case '}' :
+ if ( insideCurly )
+ insideCurly = false;
+ }
+ }
+ if( tailMatchGroupAdded ) {
+ getVariables().put( TAIL_TAG, Integer.valueOf( counter ) );
+ }
}
+
+
+ private void updateVariableIndex(int offset,
+ int counter) {
+ String subs = getMappingKey().substring( offset );
+ for ( Map.Entry<String, Integer> entry : getVariables().entrySet() ) {
+ if ( subs.startsWith( "{" + entry.getKey() ) &&
+ (( subs.charAt( entry.getKey().length()+1 ) == '}' ) ||
+ ( subs.charAt( entry.getKey().length()+1 ) == ':' ) )) {
+ entry.setValue( Integer.valueOf( counter ) );
+ break;
+ }
+ }
+ }
+
/**
* @param value
* the value to set
*/
- public void setMappingValue(String value) {
+ public void setValuePattern(String value) {
if ( value != null ) {
StringBuffer valuePatternBuffer = new StringBuffer();
- StringBuffer valueBuffer = new StringBuffer();
if ( headMatchGroupAdded ) {
valuePatternBuffer.append( "$1" );
- valueBuffer.append( "$1" );
}
valuePatternBuffer.append( value );
- valueBuffer.append( value );
+ if ( value.endsWith( " " ) ) {
+ valuePatternBuffer.deleteCharAt( valuePatternBuffer.length() - 1 );
+ }
if ( tailMatchGroupAdded ) {
- int maxGroupIndex = 0;
- if ( !variables.isEmpty() ) {
- Integer tailMatchGroupIndex = (Integer) Collections.max( variables.values() );
- maxGroupIndex = tailMatchGroupIndex.intValue();
- } else if ( headMatchGroupAdded ) {
- //if empty, but head group matched, set max group to 1
- maxGroupIndex++;
- }
- maxGroupIndex++;
- valuePatternBuffer.append( "$" + maxGroupIndex );
- valueBuffer.append( "$" + maxGroupIndex );
+ int tailIndex = getVariables().get( TAIL_TAG ).intValue();
+ valuePatternBuffer.append( "$" + tailIndex );
}
- this.valuePattern = valuePatternBuffer.toString();
- this.value = valueBuffer.toString();
+ String pat = valuePatternBuffer.toString();
+ for( Map.Entry<String, Integer> entry : getVariables().entrySet() ) {
+ pat = pat.replaceAll( "\\{"+entry.getKey()+"(:(.*?))?\\}", "\\$"+entry.getValue() );
+ }
+ super.setValuePattern( pat );
}
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,853 +1,853 @@
-// $ANTLR 3.1.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g 2008-11-21 15:39:55
-
- package org.drools.lang.dsl;
- import java.util.List;
- import java.util.ArrayList;
-// import org.drools.lang.dsl.DSLMappingParseException;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-public class DSLMapLexer extends Lexer {
- public static final int COMMA=27;
- public static final int RIGHT_CURLY=30;
- public static final int VT_ENTRY_VAL=14;
- public static final int WS=31;
- public static final int MISC=35;
- public static final int VT_META=12;
- public static final int VT_CONSEQUENCE=9;
- public static final int VT_SPACE=20;
- public static final int LINE_COMMENT=22;
- public static final int VT_ANY=11;
- public static final int VT_LITERAL=17;
- public static final int DOT=33;
- public static final int EQUALS=23;
- public static final int VT_DSL_GRAMMAR=4;
- public static final int VT_CONDITION=8;
- public static final int VT_VAR_DEF=15;
- public static final int VT_ENTRY=6;
- public static final int VT_PATTERN=18;
- public static final int LITERAL=26;
- public static final int EscapeSequence=32;
- public static final int VT_COMMENT=5;
- public static final int EOF=-1;
- public static final int EOL=21;
- public static final int LEFT_SQUARE=24;
- public static final int VT_ENTRY_KEY=13;
- public static final int VT_SCOPE=7;
- public static final int COLON=28;
- public static final int VT_KEYWORD=10;
- public static final int VT_QUAL=19;
- public static final int VT_VAR_REF=16;
- public static final int LEFT_CURLY=29;
- public static final int POUND=34;
- public static final int RIGHT_SQUARE=25;
-
- // delegates
- // delegators
-
- public DSLMapLexer() {;}
- public DSLMapLexer(CharStream input) {
- this(input, new RecognizerSharedState());
- }
- public DSLMapLexer(CharStream input, RecognizerSharedState state) {
- super(input,state);
-
- }
- public String getGrammarFileName() { return "/Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g"; }
-
- // $ANTLR start "WS"
- public final void mWS() throws RecognitionException {
- try {
- int _type = WS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:269:9: ( ( ' ' | '\\t' | '\\f' )+ )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:269:17: ( ' ' | '\\t' | '\\f' )+
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:269:17: ( ' ' | '\\t' | '\\f' )+
- int cnt1=0;
- loop1:
- do {
- int alt1=2;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0=='\t'||LA1_0=='\f'||LA1_0==' ') ) {
- alt1=1;
- }
-
-
- switch (alt1) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:
- {
- if ( input.LA(1)=='\t'||input.LA(1)=='\f'||input.LA(1)==' ' ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt1 >= 1 ) break loop1;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(1, input);
- throw eee;
- }
- cnt1++;
- } while (true);
-
- if ( state.backtracking==0 ) {
- _channel=HIDDEN;
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "WS"
-
- // $ANTLR start "EOL"
- public final void mEOL() throws RecognitionException {
- try {
- int _type = EOL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:276:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:277:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:277:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
- int alt2=3;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0=='\r') ) {
- int LA2_1 = input.LA(2);
-
- if ( (LA2_1=='\n') && (synpred1_DSLMap())) {
- alt2=1;
- }
- else {
- alt2=2;}
- }
- else if ( (LA2_0=='\n') ) {
- alt2=3;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 2, 0, input);
-
- throw nvae;
- }
- switch (alt2) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:277:14: ( '\\r\\n' )=> '\\r\\n'
- {
- match("\r\n"); if (state.failed) return ;
-
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:278:25: '\\r'
- {
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:279:25: '\\n'
- {
- match('\n'); if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "EOL"
-
- // $ANTLR start "EscapeSequence"
- public final void mEscapeSequence() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:285:5: ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:285:9: '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' )
- {
- match('\\'); if (state.failed) return ;
- if ( (input.LA(1)>='\"' && input.LA(1)<='$')||(input.LA(1)>='&' && input.LA(1)<='+')||(input.LA(1)>='-' && input.LA(1)<='.')||input.LA(1)=='0'||input.LA(1)=='='||input.LA(1)=='?'||(input.LA(1)>='A' && input.LA(1)<='B')||(input.LA(1)>='D' && input.LA(1)<='E')||input.LA(1)=='G'||input.LA(1)=='Q'||input.LA(1)=='S'||input.LA(1)=='W'||(input.LA(1)>='Z' && input.LA(1)<='^')||(input.LA(1)>='a' && input.LA(1)<='f')||(input.LA(1)>='n' && input.LA(1)<='p')||(input.LA(1)>='r' && input.LA(1)<='u')||(input.LA(1)>='w' && input.LA(1)<='x')||(input.LA(1)>='z' && input.LA(1)<='}') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
-
- }
- finally {
- }
- }
- // $ANTLR end "EscapeSequence"
-
- // $ANTLR start "LEFT_SQUARE"
- public final void mLEFT_SQUARE() throws RecognitionException {
- try {
- int _type = LEFT_SQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:292:9: ( '[' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:292:11: '['
- {
- match('['); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LEFT_SQUARE"
-
- // $ANTLR start "RIGHT_SQUARE"
- public final void mRIGHT_SQUARE() throws RecognitionException {
- try {
- int _type = RIGHT_SQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:296:9: ( ']' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:296:11: ']'
- {
- match(']'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RIGHT_SQUARE"
-
- // $ANTLR start "LEFT_CURLY"
- public final void mLEFT_CURLY() throws RecognitionException {
- try {
- int _type = LEFT_CURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:300:9: ( '{' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:300:11: '{'
- {
- match('{'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LEFT_CURLY"
-
- // $ANTLR start "RIGHT_CURLY"
- public final void mRIGHT_CURLY() throws RecognitionException {
- try {
- int _type = RIGHT_CURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:304:9: ( '}' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:304:11: '}'
- {
- match('}'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RIGHT_CURLY"
-
- // $ANTLR start "EQUALS"
- public final void mEQUALS() throws RecognitionException {
- try {
- int _type = EQUALS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:307:8: ( '=' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:307:10: '='
- {
- match('='); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "EQUALS"
-
- // $ANTLR start "DOT"
- public final void mDOT() throws RecognitionException {
- try {
- int _type = DOT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:310:5: ( '.' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:310:7: '.'
- {
- match('.'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOT"
-
- // $ANTLR start "POUND"
- public final void mPOUND() throws RecognitionException {
- try {
- int _type = POUND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:313:9: ( '#' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:313:11: '#'
- {
- match('#'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "POUND"
-
- // $ANTLR start "COLON"
- public final void mCOLON() throws RecognitionException {
- try {
- int _type = COLON;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:316:7: ( ':' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:316:9: ':'
- {
- match(':'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COLON"
-
- // $ANTLR start "COMMA"
- public final void mCOMMA() throws RecognitionException {
- try {
- int _type = COMMA;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:319:7: ( ',' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:319:9: ','
- {
- match(','); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COMMA"
-
- // $ANTLR start "LINE_COMMENT"
- public final void mLINE_COMMENT() throws RecognitionException {
- try {
- int _type = LINE_COMMENT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:327:2: ( POUND ( options {greedy=false; } : . )* EOL )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:327:4: POUND ( options {greedy=false; } : . )* EOL
- {
- mPOUND(); if (state.failed) return ;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:327:10: ( options {greedy=false; } : . )*
- loop3:
- do {
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0=='\r') ) {
- alt3=2;
- }
- else if ( (LA3_0=='\n') ) {
- alt3=2;
- }
- else if ( ((LA3_0>='\u0000' && LA3_0<='\t')||(LA3_0>='\u000B' && LA3_0<='\f')||(LA3_0>='\u000E' && LA3_0<='\uFFFF')) ) {
- alt3=1;
- }
-
-
- switch (alt3) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:327:37: .
- {
- matchAny(); if (state.failed) return ;
-
- }
- break;
-
- default :
- break loop3;
- }
- } while (true);
-
- mEOL(); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LINE_COMMENT"
-
- // $ANTLR start "LITERAL"
- public final void mLITERAL() throws RecognitionException {
- try {
- int _type = LITERAL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+ )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
- int cnt4=0;
- loop4:
- do {
- int alt4=9;
- alt4 = dfa4.predict(input);
- switch (alt4) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:5: 'a' .. 'z'
- {
- matchRange('a','z'); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:14: 'A' .. 'Z'
- {
- matchRange('A','Z'); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:23: '_'
- {
- match('_'); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:27: '0' .. '9'
- {
- matchRange('0','9'); if (state.failed) return ;
-
- }
- break;
- case 5 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:36: '\\u00c0' .. '\\u00ff'
- {
- matchRange('\u00C0','\u00FF'); if (state.failed) return ;
-
- }
- break;
- case 6 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:55: MISC
- {
- mMISC(); if (state.failed) return ;
-
- }
- break;
- case 7 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:60: EscapeSequence
- {
- mEscapeSequence(); if (state.failed) return ;
-
- }
- break;
- case 8 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:335:75: DOT
- {
- mDOT(); if (state.failed) return ;
-
- }
- break;
-
- default :
- if ( cnt4 >= 1 ) break loop4;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(4, input);
- throw eee;
- }
- cnt4++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LITERAL"
-
- // $ANTLR start "MISC"
- public final void mMISC() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:339:7: ( '>' | '<' | '!' | '@' | '$' | '%' | '^' | '*' | '-' | '+' | '?' | COMMA | '/' | '\\'' | '\"' | '|' | '&' | '(' | ')' | ';' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:
- {
- if ( (input.LA(1)>='!' && input.LA(1)<='\"')||(input.LA(1)>='$' && input.LA(1)<='-')||input.LA(1)=='/'||(input.LA(1)>=';' && input.LA(1)<='<')||(input.LA(1)>='>' && input.LA(1)<='@')||input.LA(1)=='^'||input.LA(1)=='|' ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
-
- }
- finally {
- }
- }
- // $ANTLR end "MISC"
-
- public void mTokens() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:8: ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | COMMA | LINE_COMMENT | LITERAL )
- int alt5=13;
- alt5 = dfa5.predict(input);
- switch (alt5) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:10: WS
- {
- mWS(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:13: EOL
- {
- mEOL(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:17: LEFT_SQUARE
- {
- mLEFT_SQUARE(); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:29: RIGHT_SQUARE
- {
- mRIGHT_SQUARE(); if (state.failed) return ;
-
- }
- break;
- case 5 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:42: LEFT_CURLY
- {
- mLEFT_CURLY(); if (state.failed) return ;
-
- }
- break;
- case 6 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:53: RIGHT_CURLY
- {
- mRIGHT_CURLY(); if (state.failed) return ;
-
- }
- break;
- case 7 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:65: EQUALS
- {
- mEQUALS(); if (state.failed) return ;
-
- }
- break;
- case 8 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:72: DOT
- {
- mDOT(); if (state.failed) return ;
-
- }
- break;
- case 9 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:76: POUND
- {
- mPOUND(); if (state.failed) return ;
-
- }
- break;
- case 10 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:82: COLON
- {
- mCOLON(); if (state.failed) return ;
-
- }
- break;
- case 11 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:88: COMMA
- {
- mCOMMA(); if (state.failed) return ;
-
- }
- break;
- case 12 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:94: LINE_COMMENT
- {
- mLINE_COMMENT(); if (state.failed) return ;
-
- }
- break;
- case 13 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:1:107: LITERAL
- {
- mLITERAL(); if (state.failed) return ;
-
- }
- break;
-
- }
-
- }
-
- // $ANTLR start synpred1_DSLMap
- public final void synpred1_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:277:14: ( '\\r\\n' )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:277:16: '\\r\\n'
- {
- match("\r\n"); if (state.failed) return ;
-
-
- }
- }
- // $ANTLR end synpred1_DSLMap
-
- public final boolean synpred1_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred1_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
-
-
- protected DFA4 dfa4 = new DFA4(this);
- protected DFA5 dfa5 = new DFA5(this);
- static final String DFA4_eotS =
- "\1\1\11\uffff";
- static final String DFA4_eofS =
- "\12\uffff";
- static final String DFA4_minS =
- "\1\41\11\uffff";
- static final String DFA4_maxS =
- "\1\u00ff\11\uffff";
- static final String DFA4_acceptS =
- "\1\uffff\1\11\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10";
- static final String DFA4_specialS =
- "\12\uffff}>";
- static final String[] DFA4_transitionS = {
- "\2\7\1\uffff\12\7\1\11\1\7\12\5\1\uffff\2\7\1\uffff\3\7\32\3"+
- "\1\uffff\1\10\1\uffff\1\7\1\4\1\uffff\32\2\1\uffff\1\7\103\uffff"+
- "\100\6",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- ""
- };
-
- static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
- static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
- static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
- static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
- static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
- static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
- static final short[][] DFA4_transition;
-
- static {
- int numStates = DFA4_transitionS.length;
- DFA4_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
- }
- }
-
- class DFA4 extends DFA {
-
- public DFA4(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 4;
- this.eot = DFA4_eot;
- this.eof = DFA4_eof;
- this.min = DFA4_min;
- this.max = DFA4_max;
- this.accept = DFA4_accept;
- this.special = DFA4_special;
- this.transition = DFA4_transition;
- }
- public String getDescription() {
- return "()+ loopback of 335:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+";
- }
- }
- static final String DFA5_eotS =
- "\10\uffff\1\15\1\16\1\uffff\1\20\5\uffff";
- static final String DFA5_eofS =
- "\21\uffff";
- static final String DFA5_minS =
- "\1\11\7\uffff\1\41\1\0\1\uffff\1\41\5\uffff";
- static final String DFA5_maxS =
- "\1\u00ff\7\uffff\1\u00ff\1\uffff\1\uffff\1\u00ff\5\uffff";
- static final String DFA5_acceptS =
- "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\uffff\1\12\1\uffff\1\15\1"+
- "\10\1\11\1\14\1\13";
- static final String DFA5_specialS =
- "\11\uffff\1\0\7\uffff}>";
- static final String[] DFA5_transitionS = {
- "\1\1\1\2\1\uffff\1\1\1\2\22\uffff\1\1\2\14\1\11\10\14\1\13\1"+
- "\14\1\10\13\14\1\12\2\14\1\7\35\14\1\3\1\14\1\4\2\14\1\uffff"+
- "\32\14\1\5\1\14\1\6\102\uffff\100\14",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\2\14\1\uffff\26\14\1\uffff\2\14\1\uffff\35\14\1\uffff\1\14"+
- "\1\uffff\2\14\1\uffff\32\14\1\uffff\1\14\103\uffff\100\14",
- "\0\17",
- "",
- "\2\14\1\uffff\26\14\1\uffff\2\14\1\uffff\35\14\1\uffff\1\14"+
- "\1\uffff\2\14\1\uffff\32\14\1\uffff\1\14\103\uffff\100\14",
- "",
- "",
- "",
- "",
- ""
- };
-
- static final short[] DFA5_eot = DFA.unpackEncodedString(DFA5_eotS);
- static final short[] DFA5_eof = DFA.unpackEncodedString(DFA5_eofS);
- static final char[] DFA5_min = DFA.unpackEncodedStringToUnsignedChars(DFA5_minS);
- static final char[] DFA5_max = DFA.unpackEncodedStringToUnsignedChars(DFA5_maxS);
- static final short[] DFA5_accept = DFA.unpackEncodedString(DFA5_acceptS);
- static final short[] DFA5_special = DFA.unpackEncodedString(DFA5_specialS);
- static final short[][] DFA5_transition;
-
- static {
- int numStates = DFA5_transitionS.length;
- DFA5_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA5_transition[i] = DFA.unpackEncodedString(DFA5_transitionS[i]);
- }
- }
-
- class DFA5 extends DFA {
-
- public DFA5(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 5;
- this.eot = DFA5_eot;
- this.eof = DFA5_eof;
- this.min = DFA5_min;
- this.max = DFA5_max;
- this.accept = DFA5_accept;
- this.special = DFA5_special;
- this.transition = DFA5_transition;
- }
- public String getDescription() {
- return "1:1: Tokens : ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | COMMA | LINE_COMMENT | LITERAL );";
- }
- public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
- IntStream input = _input;
- int _s = s;
- switch ( s ) {
- case 0 :
- int LA5_9 = input.LA(1);
-
- s = -1;
- if ( ((LA5_9>='\u0000' && LA5_9<='\uFFFF')) ) {s = 15;}
-
- else s = 14;
-
- if ( s>=0 ) return s;
- break;
- }
- if (state.backtracking>0) {state.failed=true; return -1;}
- NoViableAltException nvae =
- new NoViableAltException(getDescription(), 5, _s, input);
- error(nvae);
- throw nvae;
- }
- }
-
-
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/dsl/DSLMap.g 2009-02-11 15:20:25
+
+ package org.drools.lang.dsl;
+ import java.util.List;
+ import java.util.ArrayList;
+// import org.drools.lang.dsl.DSLMappingParseException;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+public class DSLMapLexer extends Lexer {
+ public static final int COMMA=27;
+ public static final int RIGHT_CURLY=30;
+ public static final int VT_ENTRY_VAL=14;
+ public static final int WS=31;
+ public static final int MISC=35;
+ public static final int VT_META=12;
+ public static final int VT_CONSEQUENCE=9;
+ public static final int VT_SPACE=20;
+ public static final int LINE_COMMENT=22;
+ public static final int VT_ANY=11;
+ public static final int VT_LITERAL=17;
+ public static final int DOT=33;
+ public static final int EQUALS=23;
+ public static final int VT_DSL_GRAMMAR=4;
+ public static final int VT_CONDITION=8;
+ public static final int VT_VAR_DEF=15;
+ public static final int VT_ENTRY=6;
+ public static final int VT_PATTERN=18;
+ public static final int LITERAL=26;
+ public static final int EscapeSequence=32;
+ public static final int VT_COMMENT=5;
+ public static final int EOF=-1;
+ public static final int EOL=21;
+ public static final int LEFT_SQUARE=24;
+ public static final int VT_ENTRY_KEY=13;
+ public static final int VT_SCOPE=7;
+ public static final int COLON=28;
+ public static final int VT_KEYWORD=10;
+ public static final int VT_QUAL=19;
+ public static final int VT_VAR_REF=16;
+ public static final int LEFT_CURLY=29;
+ public static final int POUND=34;
+ public static final int RIGHT_SQUARE=25;
+
+ // delegates
+ // delegators
+
+ public DSLMapLexer() {;}
+ public DSLMapLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public DSLMapLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "src/main/resources/org/drools/lang/dsl/DSLMap.g"; }
+
+ // $ANTLR start "WS"
+ public final void mWS() throws RecognitionException {
+ try {
+ int _type = WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:269:9: ( ( ' ' | '\\t' | '\\f' )+ )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:269:17: ( ' ' | '\\t' | '\\f' )+
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:269:17: ( ' ' | '\\t' | '\\f' )+
+ int cnt1=0;
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='\t'||LA1_0=='\f'||LA1_0==' ') ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:
+ {
+ if ( input.LA(1)=='\t'||input.LA(1)=='\f'||input.LA(1)==' ' ) {
+ input.consume();
+ state.failed=false;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt1 >= 1 ) break loop1;
+ if (state.backtracking>0) {state.failed=true; return ;}
+ EarlyExitException eee =
+ new EarlyExitException(1, input);
+ throw eee;
+ }
+ cnt1++;
+ } while (true);
+
+ if ( state.backtracking==0 ) {
+ _channel=HIDDEN;
+ }
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "WS"
+
+ // $ANTLR start "EOL"
+ public final void mEOL() throws RecognitionException {
+ try {
+ int _type = EOL;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:276:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:277:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:277:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ int alt2=3;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0=='\r') ) {
+ int LA2_1 = input.LA(2);
+
+ if ( (LA2_1=='\n') && (synpred1_DSLMap())) {
+ alt2=1;
+ }
+ else {
+ alt2=2;}
+ }
+ else if ( (LA2_0=='\n') ) {
+ alt2=3;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:277:14: ( '\\r\\n' )=> '\\r\\n'
+ {
+ match("\r\n"); if (state.failed) return ;
+
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:278:25: '\\r'
+ {
+ match('\r'); if (state.failed) return ;
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:279:25: '\\n'
+ {
+ match('\n'); if (state.failed) return ;
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "EOL"
+
+ // $ANTLR start "EscapeSequence"
+ public final void mEscapeSequence() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:285:5: ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:285:9: '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' )
+ {
+ match('\\'); if (state.failed) return ;
+ if ( (input.LA(1)>='\"' && input.LA(1)<='$')||(input.LA(1)>='&' && input.LA(1)<='+')||(input.LA(1)>='-' && input.LA(1)<='.')||input.LA(1)=='0'||input.LA(1)=='='||input.LA(1)=='?'||(input.LA(1)>='A' && input.LA(1)<='B')||(input.LA(1)>='D' && input.LA(1)<='E')||input.LA(1)=='G'||input.LA(1)=='Q'||input.LA(1)=='S'||input.LA(1)=='W'||(input.LA(1)>='Z' && input.LA(1)<='^')||(input.LA(1)>='a' && input.LA(1)<='f')||(input.LA(1)>='n' && input.LA(1)<='p')||(input.LA(1)>='r' && input.LA(1)<='u')||(input.LA(1)>='w' && input.LA(1)<='x')||(input.LA(1)>='z' && input.LA(1)<='}') ) {
+ input.consume();
+ state.failed=false;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "EscapeSequence"
+
+ // $ANTLR start "LEFT_SQUARE"
+ public final void mLEFT_SQUARE() throws RecognitionException {
+ try {
+ int _type = LEFT_SQUARE;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:292:9: ( '[' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:292:11: '['
+ {
+ match('['); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "LEFT_SQUARE"
+
+ // $ANTLR start "RIGHT_SQUARE"
+ public final void mRIGHT_SQUARE() throws RecognitionException {
+ try {
+ int _type = RIGHT_SQUARE;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:296:9: ( ']' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:296:11: ']'
+ {
+ match(']'); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RIGHT_SQUARE"
+
+ // $ANTLR start "LEFT_CURLY"
+ public final void mLEFT_CURLY() throws RecognitionException {
+ try {
+ int _type = LEFT_CURLY;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:300:9: ( '{' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:300:11: '{'
+ {
+ match('{'); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "LEFT_CURLY"
+
+ // $ANTLR start "RIGHT_CURLY"
+ public final void mRIGHT_CURLY() throws RecognitionException {
+ try {
+ int _type = RIGHT_CURLY;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:304:9: ( '}' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:304:11: '}'
+ {
+ match('}'); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RIGHT_CURLY"
+
+ // $ANTLR start "EQUALS"
+ public final void mEQUALS() throws RecognitionException {
+ try {
+ int _type = EQUALS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:307:8: ( '=' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:307:10: '='
+ {
+ match('='); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "EQUALS"
+
+ // $ANTLR start "DOT"
+ public final void mDOT() throws RecognitionException {
+ try {
+ int _type = DOT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:310:5: ( '.' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:310:7: '.'
+ {
+ match('.'); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "DOT"
+
+ // $ANTLR start "POUND"
+ public final void mPOUND() throws RecognitionException {
+ try {
+ int _type = POUND;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:313:9: ( '#' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:313:11: '#'
+ {
+ match('#'); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "POUND"
+
+ // $ANTLR start "COLON"
+ public final void mCOLON() throws RecognitionException {
+ try {
+ int _type = COLON;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:316:7: ( ':' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:316:9: ':'
+ {
+ match(':'); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "COLON"
+
+ // $ANTLR start "COMMA"
+ public final void mCOMMA() throws RecognitionException {
+ try {
+ int _type = COMMA;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:319:7: ( ',' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:319:9: ','
+ {
+ match(','); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "COMMA"
+
+ // $ANTLR start "LINE_COMMENT"
+ public final void mLINE_COMMENT() throws RecognitionException {
+ try {
+ int _type = LINE_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:327:2: ( POUND ( options {greedy=false; } : . )* EOL )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:327:4: POUND ( options {greedy=false; } : . )* EOL
+ {
+ mPOUND(); if (state.failed) return ;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:327:10: ( options {greedy=false; } : . )*
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0=='\r') ) {
+ alt3=2;
+ }
+ else if ( (LA3_0=='\n') ) {
+ alt3=2;
+ }
+ else if ( ((LA3_0>='\u0000' && LA3_0<='\t')||(LA3_0>='\u000B' && LA3_0<='\f')||(LA3_0>='\u000E' && LA3_0<='\uFFFF')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:327:37: .
+ {
+ matchAny(); if (state.failed) return ;
+
+ }
+ break;
+
+ default :
+ break loop3;
+ }
+ } while (true);
+
+ mEOL(); if (state.failed) return ;
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "LINE_COMMENT"
+
+ // $ANTLR start "LITERAL"
+ public final void mLITERAL() throws RecognitionException {
+ try {
+ int _type = LITERAL;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+ )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
+ int cnt4=0;
+ loop4:
+ do {
+ int alt4=9;
+ alt4 = dfa4.predict(input);
+ switch (alt4) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:5: 'a' .. 'z'
+ {
+ matchRange('a','z'); if (state.failed) return ;
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:14: 'A' .. 'Z'
+ {
+ matchRange('A','Z'); if (state.failed) return ;
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:23: '_'
+ {
+ match('_'); if (state.failed) return ;
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:27: '0' .. '9'
+ {
+ matchRange('0','9'); if (state.failed) return ;
+
+ }
+ break;
+ case 5 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:36: '\\u00c0' .. '\\u00ff'
+ {
+ matchRange('\u00C0','\u00FF'); if (state.failed) return ;
+
+ }
+ break;
+ case 6 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:55: MISC
+ {
+ mMISC(); if (state.failed) return ;
+
+ }
+ break;
+ case 7 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:60: EscapeSequence
+ {
+ mEscapeSequence(); if (state.failed) return ;
+
+ }
+ break;
+ case 8 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:335:75: DOT
+ {
+ mDOT(); if (state.failed) return ;
+
+ }
+ break;
+
+ default :
+ if ( cnt4 >= 1 ) break loop4;
+ if (state.backtracking>0) {state.failed=true; return ;}
+ EarlyExitException eee =
+ new EarlyExitException(4, input);
+ throw eee;
+ }
+ cnt4++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "LITERAL"
+
+ // $ANTLR start "MISC"
+ public final void mMISC() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:339:7: ( '>' | '<' | '!' | '@' | '$' | '%' | '^' | '*' | '-' | '+' | '?' | COMMA | '/' | '\\'' | '\"' | '|' | '&' | '(' | ')' | ';' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:
+ {
+ if ( (input.LA(1)>='!' && input.LA(1)<='\"')||(input.LA(1)>='$' && input.LA(1)<='-')||input.LA(1)=='/'||(input.LA(1)>=';' && input.LA(1)<='<')||(input.LA(1)>='>' && input.LA(1)<='@')||input.LA(1)=='^'||input.LA(1)=='|' ) {
+ input.consume();
+ state.failed=false;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "MISC"
+
+ public void mTokens() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:8: ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | COMMA | LINE_COMMENT | LITERAL )
+ int alt5=13;
+ alt5 = dfa5.predict(input);
+ switch (alt5) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:10: WS
+ {
+ mWS(); if (state.failed) return ;
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:13: EOL
+ {
+ mEOL(); if (state.failed) return ;
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:17: LEFT_SQUARE
+ {
+ mLEFT_SQUARE(); if (state.failed) return ;
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:29: RIGHT_SQUARE
+ {
+ mRIGHT_SQUARE(); if (state.failed) return ;
+
+ }
+ break;
+ case 5 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:42: LEFT_CURLY
+ {
+ mLEFT_CURLY(); if (state.failed) return ;
+
+ }
+ break;
+ case 6 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:53: RIGHT_CURLY
+ {
+ mRIGHT_CURLY(); if (state.failed) return ;
+
+ }
+ break;
+ case 7 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:65: EQUALS
+ {
+ mEQUALS(); if (state.failed) return ;
+
+ }
+ break;
+ case 8 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:72: DOT
+ {
+ mDOT(); if (state.failed) return ;
+
+ }
+ break;
+ case 9 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:76: POUND
+ {
+ mPOUND(); if (state.failed) return ;
+
+ }
+ break;
+ case 10 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:82: COLON
+ {
+ mCOLON(); if (state.failed) return ;
+
+ }
+ break;
+ case 11 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:88: COMMA
+ {
+ mCOMMA(); if (state.failed) return ;
+
+ }
+ break;
+ case 12 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:94: LINE_COMMENT
+ {
+ mLINE_COMMENT(); if (state.failed) return ;
+
+ }
+ break;
+ case 13 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:1:107: LITERAL
+ {
+ mLITERAL(); if (state.failed) return ;
+
+ }
+ break;
+
+ }
+
+ }
+
+ // $ANTLR start synpred1_DSLMap
+ public final void synpred1_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:277:14: ( '\\r\\n' )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:277:16: '\\r\\n'
+ {
+ match("\r\n"); if (state.failed) return ;
+
+
+ }
+ }
+ // $ANTLR end synpred1_DSLMap
+
+ public final boolean synpred1_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred1_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+
+
+ protected DFA4 dfa4 = new DFA4(this);
+ protected DFA5 dfa5 = new DFA5(this);
+ static final String DFA4_eotS =
+ "\1\1\11\uffff";
+ static final String DFA4_eofS =
+ "\12\uffff";
+ static final String DFA4_minS =
+ "\1\41\11\uffff";
+ static final String DFA4_maxS =
+ "\1\u00ff\11\uffff";
+ static final String DFA4_acceptS =
+ "\1\uffff\1\11\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10";
+ static final String DFA4_specialS =
+ "\12\uffff}>";
+ static final String[] DFA4_transitionS = {
+ "\2\7\1\uffff\12\7\1\11\1\7\12\5\1\uffff\2\7\1\uffff\3\7\32"+
+ "\3\1\uffff\1\10\1\uffff\1\7\1\4\1\uffff\32\2\1\uffff\1\7\103"+
+ "\uffff\100\6",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ };
+
+ static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
+ static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
+ static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
+ static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
+ static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
+ static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
+ static final short[][] DFA4_transition;
+
+ static {
+ int numStates = DFA4_transitionS.length;
+ DFA4_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
+ }
+ }
+
+ class DFA4 extends DFA {
+
+ public DFA4(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 4;
+ this.eot = DFA4_eot;
+ this.eof = DFA4_eof;
+ this.min = DFA4_min;
+ this.max = DFA4_max;
+ this.accept = DFA4_accept;
+ this.special = DFA4_special;
+ this.transition = DFA4_transition;
+ }
+ public String getDescription() {
+ return "()+ loopback of 335:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+";
+ }
+ }
+ static final String DFA5_eotS =
+ "\10\uffff\1\15\1\16\1\uffff\1\20\5\uffff";
+ static final String DFA5_eofS =
+ "\21\uffff";
+ static final String DFA5_minS =
+ "\1\11\7\uffff\1\41\1\0\1\uffff\1\41\5\uffff";
+ static final String DFA5_maxS =
+ "\1\u00ff\7\uffff\1\u00ff\1\uffff\1\uffff\1\u00ff\5\uffff";
+ static final String DFA5_acceptS =
+ "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\uffff\1\12\1\uffff\1\15"+
+ "\1\10\1\11\1\14\1\13";
+ static final String DFA5_specialS =
+ "\11\uffff\1\0\7\uffff}>";
+ static final String[] DFA5_transitionS = {
+ "\1\1\1\2\1\uffff\1\1\1\2\22\uffff\1\1\2\14\1\11\10\14\1\13"+
+ "\1\14\1\10\13\14\1\12\2\14\1\7\35\14\1\3\1\14\1\4\2\14\1\uffff"+
+ "\32\14\1\5\1\14\1\6\102\uffff\100\14",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\2\14\1\uffff\26\14\1\uffff\2\14\1\uffff\35\14\1\uffff\1\14"+
+ "\1\uffff\2\14\1\uffff\32\14\1\uffff\1\14\103\uffff\100\14",
+ "\0\17",
+ "",
+ "\2\14\1\uffff\26\14\1\uffff\2\14\1\uffff\35\14\1\uffff\1\14"+
+ "\1\uffff\2\14\1\uffff\32\14\1\uffff\1\14\103\uffff\100\14",
+ "",
+ "",
+ "",
+ "",
+ ""
+ };
+
+ static final short[] DFA5_eot = DFA.unpackEncodedString(DFA5_eotS);
+ static final short[] DFA5_eof = DFA.unpackEncodedString(DFA5_eofS);
+ static final char[] DFA5_min = DFA.unpackEncodedStringToUnsignedChars(DFA5_minS);
+ static final char[] DFA5_max = DFA.unpackEncodedStringToUnsignedChars(DFA5_maxS);
+ static final short[] DFA5_accept = DFA.unpackEncodedString(DFA5_acceptS);
+ static final short[] DFA5_special = DFA.unpackEncodedString(DFA5_specialS);
+ static final short[][] DFA5_transition;
+
+ static {
+ int numStates = DFA5_transitionS.length;
+ DFA5_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA5_transition[i] = DFA.unpackEncodedString(DFA5_transitionS[i]);
+ }
+ }
+
+ class DFA5 extends DFA {
+
+ public DFA5(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 5;
+ this.eot = DFA5_eot;
+ this.eof = DFA5_eof;
+ this.min = DFA5_min;
+ this.max = DFA5_max;
+ this.accept = DFA5_accept;
+ this.special = DFA5_special;
+ this.transition = DFA5_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | COMMA | LINE_COMMENT | LITERAL );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA5_9 = input.LA(1);
+
+ s = -1;
+ if ( ((LA5_9>='\u0000' && LA5_9<='\uFFFF')) ) {s = 15;}
+
+ else s = 14;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ if (state.backtracking>0) {state.failed=true; return -1;}
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 5, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,3313 +1,3313 @@
-// $ANTLR 3.1.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g 2008-11-21 15:39:54
-
- package org.drools.lang.dsl;
- import java.util.List;
- import java.util.ArrayList;
-// import org.drools.lang.dsl.DSLMappingParseException;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-
-import org.antlr.runtime.tree.*;
-
-public class DSLMapParser extends Parser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_DSL_GRAMMAR", "VT_COMMENT", "VT_ENTRY", "VT_SCOPE", "VT_CONDITION", "VT_CONSEQUENCE", "VT_KEYWORD", "VT_ANY", "VT_META", "VT_ENTRY_KEY", "VT_ENTRY_VAL", "VT_VAR_DEF", "VT_VAR_REF", "VT_LITERAL", "VT_PATTERN", "VT_QUAL", "VT_SPACE", "EOL", "LINE_COMMENT", "EQUALS", "LEFT_SQUARE", "RIGHT_SQUARE", "LITERAL", "COMMA", "COLON", "LEFT_CURLY", "RIGHT_CURLY", "WS", "EscapeSequence", "DOT", "POUND", "MISC"
- };
- public static final int COMMA=27;
- public static final int RIGHT_CURLY=30;
- public static final int VT_ENTRY_VAL=14;
- public static final int WS=31;
- public static final int MISC=35;
- public static final int VT_META=12;
- public static final int VT_CONSEQUENCE=9;
- public static final int VT_SPACE=20;
- public static final int LINE_COMMENT=22;
- public static final int VT_ANY=11;
- public static final int VT_LITERAL=17;
- public static final int DOT=33;
- public static final int EQUALS=23;
- public static final int VT_DSL_GRAMMAR=4;
- public static final int VT_CONDITION=8;
- public static final int VT_ENTRY=6;
- public static final int VT_VAR_DEF=15;
- public static final int LITERAL=26;
- public static final int VT_PATTERN=18;
- public static final int EscapeSequence=32;
- public static final int VT_COMMENT=5;
- public static final int EOF=-1;
- public static final int EOL=21;
- public static final int LEFT_SQUARE=24;
- public static final int VT_ENTRY_KEY=13;
- public static final int COLON=28;
- public static final int VT_SCOPE=7;
- public static final int VT_KEYWORD=10;
- public static final int POUND=34;
- public static final int LEFT_CURLY=29;
- public static final int VT_VAR_REF=16;
- public static final int VT_QUAL=19;
- public static final int RIGHT_SQUARE=25;
-
- // delegates
- // delegators
-
-
- public DSLMapParser(TokenStream input) {
- this(input, new RecognizerSharedState());
- }
- public DSLMapParser(TokenStream input, RecognizerSharedState state) {
- super(input, state);
-
- }
-
- protected TreeAdaptor adaptor = new CommonTreeAdaptor();
-
- public void setTreeAdaptor(TreeAdaptor adaptor) {
- this.adaptor = adaptor;
- }
- public TreeAdaptor getTreeAdaptor() {
- return adaptor;
- }
-
- public String[] getTokenNames() { return DSLMapParser.tokenNames; }
- public String getGrammarFileName() { return "/Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g"; }
-
-
- //we may not need the check on [], as the LITERAL token being examined
- //should not have them.
-
- private List errorList = new ArrayList();
- public List getErrorList(){
- return errorList;
- }
-
- private boolean validateLT(int LTNumber, String text){
- if (null == input) return false;
- if (null == input.LT(LTNumber)) return false;
- if (null == input.LT(LTNumber).getText()) return false;
-
- String text2Validate = input.LT(LTNumber).getText();
- if (text2Validate.startsWith("[") && text2Validate.endsWith("]")){
- text2Validate = text2Validate.substring(1, text2Validate.length() - 1);
- }
-
- return text2Validate.equalsIgnoreCase(text);
- }
-
- private boolean validateIdentifierKey(String text){
- return validateLT(1, text);
- }
-
- //public void reportError(RecognitionException re) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- // if (errorRecovery) {
- // return;
- // }
- // errorRecovery = true;
- //
- // String error = "Error parsing mapping entry: " + getErrorMessage(re, tokenNames);
- // DSLMappingParseException exception = new DSLMappingParseException (error, re.line);
- // errorList.add(exception);
- //}
-
-
-
- public static class mapping_file_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "mapping_file"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:86:1: mapping_file : ( statement )* -> ^( VT_DSL_GRAMMAR ( statement )* ) ;
- public final DSLMapParser.mapping_file_return mapping_file() throws RecognitionException {
- DSLMapParser.mapping_file_return retval = new DSLMapParser.mapping_file_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- DSLMapParser.statement_return statement1 = null;
-
-
- RewriteRuleSubtreeStream stream_statement=new RewriteRuleSubtreeStream(adaptor,"rule statement");
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:87:2: ( ( statement )* -> ^( VT_DSL_GRAMMAR ( statement )* ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:87:4: ( statement )*
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:87:4: ( statement )*
- loop1:
- do {
- int alt1=2;
- int LA1_0 = input.LA(1);
-
- if ( ((LA1_0>=EOL && LA1_0<=LINE_COMMENT)||LA1_0==LEFT_SQUARE) ) {
- alt1=1;
- }
-
-
- switch (alt1) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: statement
- {
- pushFollow(FOLLOW_statement_in_mapping_file273);
- statement1=statement();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_statement.add(statement1.getTree());
-
- }
- break;
-
- default :
- break loop1;
- }
- } while (true);
-
-
-
- // AST REWRITE
- // elements: statement
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 88:2: -> ^( VT_DSL_GRAMMAR ( statement )* )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:88:5: ^( VT_DSL_GRAMMAR ( statement )* )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_DSL_GRAMMAR, "VT_DSL_GRAMMAR"), root_1);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:88:22: ( statement )*
- while ( stream_statement.hasNext() ) {
- adaptor.addChild(root_1, stream_statement.nextTree());
-
- }
- stream_statement.reset();
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "mapping_file"
-
- public static class statement_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "statement"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:91:1: statement : ( entry | comment | EOL );
- public final DSLMapParser.statement_return statement() throws RecognitionException {
- DSLMapParser.statement_return retval = new DSLMapParser.statement_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token EOL4=null;
- DSLMapParser.entry_return entry2 = null;
-
- DSLMapParser.comment_return comment3 = null;
-
-
- Object EOL4_tree=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:92:2: ( entry | comment | EOL )
- int alt2=3;
- switch ( input.LA(1) ) {
- case LEFT_SQUARE:
- {
- alt2=1;
- }
- break;
- case LINE_COMMENT:
- {
- alt2=2;
- }
- break;
- case EOL:
- {
- alt2=3;
- }
- break;
- default:
- if (state.backtracking>0) {state.failed=true; return retval;}
- NoViableAltException nvae =
- new NoViableAltException("", 2, 0, input);
-
- throw nvae;
- }
-
- switch (alt2) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:92:4: entry
- {
- root_0 = (Object)adaptor.nil();
-
- pushFollow(FOLLOW_entry_in_statement296);
- entry2=entry();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, entry2.getTree());
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:93:4: comment
- {
- root_0 = (Object)adaptor.nil();
-
- pushFollow(FOLLOW_comment_in_statement303);
- comment3=comment();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, comment3.getTree());
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:94:4: EOL
- {
- root_0 = (Object)adaptor.nil();
-
- EOL4=(Token)match(input,EOL,FOLLOW_EOL_in_statement309); if (state.failed) return retval;
-
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "statement"
-
- public static class comment_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "comment"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:99:1: comment : LINE_COMMENT -> ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT ) ;
- public final DSLMapParser.comment_return comment() throws RecognitionException {
- DSLMapParser.comment_return retval = new DSLMapParser.comment_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token LINE_COMMENT5=null;
-
- Object LINE_COMMENT5_tree=null;
- RewriteRuleTokenStream stream_LINE_COMMENT=new RewriteRuleTokenStream(adaptor,"token LINE_COMMENT");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:99:9: ( LINE_COMMENT -> ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:99:11: LINE_COMMENT
- {
- LINE_COMMENT5=(Token)match(input,LINE_COMMENT,FOLLOW_LINE_COMMENT_in_comment325); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LINE_COMMENT.add(LINE_COMMENT5);
-
-
-
- // AST REWRITE
- // elements: LINE_COMMENT
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 100:2: -> ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:100:5: ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_COMMENT, LINE_COMMENT5, "COMMENT"), root_1);
-
- adaptor.addChild(root_1, stream_LINE_COMMENT.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "comment"
-
- public static class entry_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "entry"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:1: entry : scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) ;
- public final DSLMapParser.entry_return entry() throws RecognitionException {
- DSLMapParser.entry_return retval = new DSLMapParser.entry_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token EQUALS9=null;
- Token EOL11=null;
- Token EOF12=null;
- DSLMapParser.scope_section_return scope_section6 = null;
-
- DSLMapParser.meta_section_return meta_section7 = null;
-
- DSLMapParser.key_section_return key_section8 = null;
-
- DSLMapParser.value_section_return value_section10 = null;
-
-
- Object EQUALS9_tree=null;
- Object EOL11_tree=null;
- Object EOF12_tree=null;
- RewriteRuleTokenStream stream_EQUALS=new RewriteRuleTokenStream(adaptor,"token EQUALS");
- RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,"token EOF");
- RewriteRuleTokenStream stream_EOL=new RewriteRuleTokenStream(adaptor,"token EOL");
- RewriteRuleSubtreeStream stream_key_section=new RewriteRuleSubtreeStream(adaptor,"rule key_section");
- RewriteRuleSubtreeStream stream_value_section=new RewriteRuleSubtreeStream(adaptor,"rule value_section");
- RewriteRuleSubtreeStream stream_scope_section=new RewriteRuleSubtreeStream(adaptor,"rule scope_section");
- RewriteRuleSubtreeStream stream_meta_section=new RewriteRuleSubtreeStream(adaptor,"rule meta_section");
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:8: ( scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:10: scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF )
- {
- pushFollow(FOLLOW_scope_section_in_entry350);
- scope_section6=scope_section();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_scope_section.add(scope_section6.getTree());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:24: ( meta_section )?
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0==LEFT_SQUARE) ) {
- int LA3_1 = input.LA(2);
-
- if ( (LA3_1==LITERAL) ) {
- int LA3_3 = input.LA(3);
-
- if ( (LA3_3==RIGHT_SQUARE) ) {
- int LA3_4 = input.LA(4);
-
- if ( (synpred4_DSLMap()) ) {
- alt3=1;
- }
- }
- }
- else if ( (LA3_1==RIGHT_SQUARE) ) {
- int LA3_4 = input.LA(3);
-
- if ( (synpred4_DSLMap()) ) {
- alt3=1;
- }
- }
- }
- switch (alt3) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: meta_section
- {
- pushFollow(FOLLOW_meta_section_in_entry352);
- meta_section7=meta_section();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_meta_section.add(meta_section7.getTree());
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_key_section_in_entry355);
- key_section8=key_section();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_key_section.add(key_section8.getTree());
- EQUALS9=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_entry357); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_EQUALS.add(EQUALS9);
-
- pushFollow(FOLLOW_value_section_in_entry359);
- value_section10=value_section();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_value_section.add(value_section10.getTree());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:71: ( EOL | EOF )
- int alt4=2;
- int LA4_0 = input.LA(1);
-
- if ( (LA4_0==EOL) ) {
- alt4=1;
- }
- else if ( (LA4_0==EOF) ) {
- alt4=2;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return retval;}
- NoViableAltException nvae =
- new NoViableAltException("", 4, 0, input);
-
- throw nvae;
- }
- switch (alt4) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:72: EOL
- {
- EOL11=(Token)match(input,EOL,FOLLOW_EOL_in_entry362); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_EOL.add(EOL11);
-
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:76: EOF
- {
- EOF12=(Token)match(input,EOF,FOLLOW_EOF_in_entry364); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_EOF.add(EOF12);
-
-
- }
- break;
-
- }
-
-
-
- // AST REWRITE
- // elements: scope_section, key_section, value_section, meta_section
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 105:2: -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:105:5: ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY, "VT_ENTRY"), root_1);
-
- adaptor.addChild(root_1, stream_scope_section.nextTree());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:105:30: ( meta_section )?
- if ( stream_meta_section.hasNext() ) {
- adaptor.addChild(root_1, stream_meta_section.nextTree());
-
- }
- stream_meta_section.reset();
- adaptor.addChild(root_1, stream_key_section.nextTree());
- adaptor.addChild(root_1, stream_value_section.nextTree());
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch ( RecognitionException e ) {
-
- reportError( e );
-
- }
- catch ( RewriteEmptyStreamException e ) {
-
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "entry"
-
- public static class scope_section_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "scope_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:115:1: scope_section : LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE -> ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? ) ;
- public final DSLMapParser.scope_section_return scope_section() throws RecognitionException {
- DSLMapParser.scope_section_return retval = new DSLMapParser.scope_section_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token LEFT_SQUARE13=null;
- Token RIGHT_SQUARE14=null;
- DSLMapParser.condition_key_return value1 = null;
-
- DSLMapParser.consequence_key_return value2 = null;
-
- DSLMapParser.keyword_key_return value3 = null;
-
- DSLMapParser.any_key_return value4 = null;
-
-
- Object LEFT_SQUARE13_tree=null;
- Object RIGHT_SQUARE14_tree=null;
- RewriteRuleTokenStream stream_LEFT_SQUARE=new RewriteRuleTokenStream(adaptor,"token LEFT_SQUARE");
- RewriteRuleTokenStream stream_RIGHT_SQUARE=new RewriteRuleTokenStream(adaptor,"token RIGHT_SQUARE");
- RewriteRuleSubtreeStream stream_condition_key=new RewriteRuleSubtreeStream(adaptor,"rule condition_key");
- RewriteRuleSubtreeStream stream_any_key=new RewriteRuleSubtreeStream(adaptor,"rule any_key");
- RewriteRuleSubtreeStream stream_keyword_key=new RewriteRuleSubtreeStream(adaptor,"rule keyword_key");
- RewriteRuleSubtreeStream stream_consequence_key=new RewriteRuleSubtreeStream(adaptor,"rule consequence_key");
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:116:2: ( LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE -> ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:116:4: LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE
- {
- LEFT_SQUARE13=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_scope_section410); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LEFT_SQUARE.add(LEFT_SQUARE13);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:117:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )
- int alt5=4;
- int LA5_0 = input.LA(1);
-
- if ( (LA5_0==LITERAL) ) {
- int LA5_1 = input.LA(2);
-
- if ( ((synpred6_DSLMap()&&(validateIdentifierKey("condition")||validateIdentifierKey("when")))) ) {
- alt5=1;
- }
- else if ( ((synpred7_DSLMap()&&(validateIdentifierKey("consequence")||validateIdentifierKey("then")))) ) {
- alt5=2;
- }
- else if ( ((synpred8_DSLMap()&&(validateIdentifierKey("keyword")))) ) {
- alt5=3;
- }
- else if ( ((validateIdentifierKey("*"))) ) {
- alt5=4;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return retval;}
- NoViableAltException nvae =
- new NoViableAltException("", 5, 1, input);
-
- throw nvae;
- }
- }
- else {
- if (state.backtracking>0) {state.failed=true; return retval;}
- NoViableAltException nvae =
- new NoViableAltException("", 5, 0, input);
-
- throw nvae;
- }
- switch (alt5) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:117:4: value1= condition_key
- {
- pushFollow(FOLLOW_condition_key_in_scope_section418);
- value1=condition_key();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_condition_key.add(value1.getTree());
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:118:5: value2= consequence_key
- {
- pushFollow(FOLLOW_consequence_key_in_scope_section427);
- value2=consequence_key();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_consequence_key.add(value2.getTree());
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:119:5: value3= keyword_key
- {
- pushFollow(FOLLOW_keyword_key_in_scope_section435);
- value3=keyword_key();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_keyword_key.add(value3.getTree());
-
- }
- break;
- case 4 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:120:5: value4= any_key
- {
- pushFollow(FOLLOW_any_key_in_scope_section443);
- value4=any_key();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_any_key.add(value4.getTree());
-
- }
- break;
-
- }
-
- RIGHT_SQUARE14=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_scope_section451); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_RIGHT_SQUARE.add(RIGHT_SQUARE14);
-
-
-
- // AST REWRITE
- // elements: value4, value3, value1, value2
- // token labels:
- // rule labels: value1, value4, value2, retval, value3
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_value1=new RewriteRuleSubtreeStream(adaptor,"token value1",value1!=null?value1.tree:null);
- RewriteRuleSubtreeStream stream_value4=new RewriteRuleSubtreeStream(adaptor,"token value4",value4!=null?value4.tree:null);
- RewriteRuleSubtreeStream stream_value2=new RewriteRuleSubtreeStream(adaptor,"token value2",value2!=null?value2.tree:null);
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
- RewriteRuleSubtreeStream stream_value3=new RewriteRuleSubtreeStream(adaptor,"token value3",value3!=null?value3.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 123:2: -> ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:123:5: ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_SCOPE, LEFT_SQUARE13, "SCOPE SECTION"), root_1);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:123:47: ( $value1)?
- if ( stream_value1.hasNext() ) {
- adaptor.addChild(root_1, stream_value1.nextTree());
-
- }
- stream_value1.reset();
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:123:56: ( $value2)?
- if ( stream_value2.hasNext() ) {
- adaptor.addChild(root_1, stream_value2.nextTree());
-
- }
- stream_value2.reset();
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:123:65: ( $value3)?
- if ( stream_value3.hasNext() ) {
- adaptor.addChild(root_1, stream_value3.nextTree());
-
- }
- stream_value3.reset();
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:123:74: ( $value4)?
- if ( stream_value4.hasNext() ) {
- adaptor.addChild(root_1, stream_value4.nextTree());
-
- }
- stream_value4.reset();
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "scope_section"
-
- public static class meta_section_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "meta_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:129:1: meta_section : LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE -> ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? ) ;
- public final DSLMapParser.meta_section_return meta_section() throws RecognitionException {
- DSLMapParser.meta_section_return retval = new DSLMapParser.meta_section_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token LEFT_SQUARE15=null;
- Token LITERAL16=null;
- Token RIGHT_SQUARE17=null;
-
- Object LEFT_SQUARE15_tree=null;
- Object LITERAL16_tree=null;
- Object RIGHT_SQUARE17_tree=null;
- RewriteRuleTokenStream stream_LEFT_SQUARE=new RewriteRuleTokenStream(adaptor,"token LEFT_SQUARE");
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
- RewriteRuleTokenStream stream_RIGHT_SQUARE=new RewriteRuleTokenStream(adaptor,"token RIGHT_SQUARE");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:130:2: ( LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE -> ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:130:4: LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE
- {
- LEFT_SQUARE15=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_meta_section491); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LEFT_SQUARE.add(LEFT_SQUARE15);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:130:16: ( LITERAL )?
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( (LA6_0==LITERAL) ) {
- alt6=1;
- }
- switch (alt6) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: LITERAL
- {
- LITERAL16=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_meta_section493); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(LITERAL16);
-
-
- }
- break;
-
- }
-
- RIGHT_SQUARE17=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_meta_section496); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_RIGHT_SQUARE.add(RIGHT_SQUARE17);
-
-
-
- // AST REWRITE
- // elements: LITERAL
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 131:2: -> ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:131:5: ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_META, LEFT_SQUARE15, "META SECTION"), root_1);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:131:45: ( LITERAL )?
- if ( stream_LITERAL.hasNext() ) {
- adaptor.addChild(root_1, stream_LITERAL.nextNode());
-
- }
- stream_LITERAL.reset();
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "meta_section"
-
- public static class key_section_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "key_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:134:1: key_section : (ks= key_sentence )+ -> ^( VT_ENTRY_KEY ( key_sentence )+ ) ;
- public final DSLMapParser.key_section_return key_section() throws RecognitionException {
- DSLMapParser.key_section_return retval = new DSLMapParser.key_section_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- DSLMapParser.key_sentence_return ks = null;
-
-
- RewriteRuleSubtreeStream stream_key_sentence=new RewriteRuleSubtreeStream(adaptor,"rule key_sentence");
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:135:2: ( (ks= key_sentence )+ -> ^( VT_ENTRY_KEY ( key_sentence )+ ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:135:4: (ks= key_sentence )+
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:135:6: (ks= key_sentence )+
- int cnt7=0;
- loop7:
- do {
- int alt7=2;
- int LA7_0 = input.LA(1);
-
- if ( ((LA7_0>=LEFT_SQUARE && LA7_0<=LITERAL)||(LA7_0>=COLON && LA7_0<=LEFT_CURLY)) ) {
- alt7=1;
- }
-
-
- switch (alt7) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: ks= key_sentence
- {
- pushFollow(FOLLOW_key_sentence_in_key_section520);
- ks=key_sentence();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_key_sentence.add(ks.getTree());
-
- }
- break;
-
- default :
- if ( cnt7 >= 1 ) break loop7;
- if (state.backtracking>0) {state.failed=true; return retval;}
- EarlyExitException eee =
- new EarlyExitException(7, input);
- throw eee;
- }
- cnt7++;
- } while (true);
-
-
-
- // AST REWRITE
- // elements: key_sentence
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 136:2: -> ^( VT_ENTRY_KEY ( key_sentence )+ )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:136:5: ^( VT_ENTRY_KEY ( key_sentence )+ )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY_KEY, "VT_ENTRY_KEY"), root_1);
-
- if ( !(stream_key_sentence.hasNext()) ) {
- throw new RewriteEarlyExitException();
- }
- while ( stream_key_sentence.hasNext() ) {
- adaptor.addChild(root_1, stream_key_sentence.nextTree());
-
- }
- stream_key_sentence.reset();
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "key_section"
-
- public static class key_sentence_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "key_sentence"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:139:1: key_sentence : ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] );
- public final DSLMapParser.key_sentence_return key_sentence() throws RecognitionException {
- DSLMapParser.key_sentence_return retval = new DSLMapParser.key_sentence_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- DSLMapParser.key_chunk_return cb = null;
-
- DSLMapParser.variable_definition_return variable_definition18 = null;
-
-
- RewriteRuleSubtreeStream stream_key_chunk=new RewriteRuleSubtreeStream(adaptor,"rule key_chunk");
-
- String text = "";
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:143:2: ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] )
- int alt8=2;
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0==LEFT_CURLY) ) {
- alt8=1;
- }
- else if ( ((LA8_0>=LEFT_SQUARE && LA8_0<=LITERAL)||LA8_0==COLON) ) {
- alt8=2;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return retval;}
- NoViableAltException nvae =
- new NoViableAltException("", 8, 0, input);
-
- throw nvae;
- }
- switch (alt8) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:143:4: variable_definition
- {
- root_0 = (Object)adaptor.nil();
-
- pushFollow(FOLLOW_variable_definition_in_key_sentence551);
- variable_definition18=variable_definition();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, variable_definition18.getTree());
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:144:4: cb= key_chunk
- {
- pushFollow(FOLLOW_key_chunk_in_key_sentence558);
- cb=key_chunk();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_key_chunk.add(cb.getTree());
- if ( state.backtracking==0 ) {
- text = (cb!=null?input.toString(cb.start,cb.stop):null);
- }
-
-
- // AST REWRITE
- // elements:
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 145:2: -> VT_LITERAL[$cb.start, text]
- {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_LITERAL, (cb!=null?((Token)cb.start):null), text));
-
- }
-
- retval.tree = root_0;}
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "key_sentence"
-
- public static class key_chunk_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "key_chunk"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:148:1: key_chunk : ( literal )+ ;
- public final DSLMapParser.key_chunk_return key_chunk() throws RecognitionException {
- DSLMapParser.key_chunk_return retval = new DSLMapParser.key_chunk_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- DSLMapParser.literal_return literal19 = null;
-
-
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:149:2: ( ( literal )+ )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: ( literal )+
- {
- root_0 = (Object)adaptor.nil();
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: ( literal )+
- int cnt9=0;
- loop9:
- do {
- int alt9=2;
- int LA9_0 = input.LA(1);
-
- if ( ((LA9_0>=LEFT_SQUARE && LA9_0<=LITERAL)||LA9_0==COLON) ) {
- int LA9_2 = input.LA(2);
-
- if ( (synpred12_DSLMap()) ) {
- alt9=1;
- }
-
-
- }
-
-
- switch (alt9) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: literal
- {
- pushFollow(FOLLOW_literal_in_key_chunk579);
- literal19=literal();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, literal19.getTree());
-
- }
- break;
-
- default :
- if ( cnt9 >= 1 ) break loop9;
- if (state.backtracking>0) {state.failed=true; return retval;}
- EarlyExitException eee =
- new EarlyExitException(9, input);
- throw eee;
- }
- cnt9++;
- } while (true);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "key_chunk"
-
- public static class value_section_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "value_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:152:1: value_section : ( value_sentence )+ -> ^( VT_ENTRY_VAL ( value_sentence )+ ) ;
- public final DSLMapParser.value_section_return value_section() throws RecognitionException {
- DSLMapParser.value_section_return retval = new DSLMapParser.value_section_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- DSLMapParser.value_sentence_return value_sentence20 = null;
-
-
- RewriteRuleSubtreeStream stream_value_sentence=new RewriteRuleSubtreeStream(adaptor,"rule value_sentence");
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:153:2: ( ( value_sentence )+ -> ^( VT_ENTRY_VAL ( value_sentence )+ ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:153:4: ( value_sentence )+
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:153:4: ( value_sentence )+
- int cnt10=0;
- loop10:
- do {
- int alt10=2;
- int LA10_0 = input.LA(1);
-
- if ( ((LA10_0>=EQUALS && LA10_0<=LEFT_CURLY)) ) {
- alt10=1;
- }
-
-
- switch (alt10) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: value_sentence
- {
- pushFollow(FOLLOW_value_sentence_in_value_section594);
- value_sentence20=value_sentence();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_value_sentence.add(value_sentence20.getTree());
-
- }
- break;
-
- default :
- if ( cnt10 >= 1 ) break loop10;
- if (state.backtracking>0) {state.failed=true; return retval;}
- EarlyExitException eee =
- new EarlyExitException(10, input);
- throw eee;
- }
- cnt10++;
- } while (true);
-
-
-
- // AST REWRITE
- // elements: value_sentence
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 154:2: -> ^( VT_ENTRY_VAL ( value_sentence )+ )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:154:5: ^( VT_ENTRY_VAL ( value_sentence )+ )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY_VAL, "VT_ENTRY_VAL"), root_1);
-
- if ( !(stream_value_sentence.hasNext()) ) {
- throw new RewriteEarlyExitException();
- }
- while ( stream_value_sentence.hasNext() ) {
- adaptor.addChild(root_1, stream_value_sentence.nextTree());
-
- }
- stream_value_sentence.reset();
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "value_section"
-
- public static class value_sentence_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "value_sentence"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:157:1: value_sentence : ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] );
- public final DSLMapParser.value_sentence_return value_sentence() throws RecognitionException {
- DSLMapParser.value_sentence_return retval = new DSLMapParser.value_sentence_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- DSLMapParser.value_chunk_return vc = null;
-
- DSLMapParser.variable_reference_return variable_reference21 = null;
-
-
- RewriteRuleSubtreeStream stream_value_chunk=new RewriteRuleSubtreeStream(adaptor,"rule value_chunk");
-
- String text = "";
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:161:2: ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] )
- int alt11=2;
- int LA11_0 = input.LA(1);
-
- if ( (LA11_0==LEFT_CURLY) ) {
- alt11=1;
- }
- else if ( ((LA11_0>=EQUALS && LA11_0<=COLON)) ) {
- alt11=2;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return retval;}
- NoViableAltException nvae =
- new NoViableAltException("", 11, 0, input);
-
- throw nvae;
- }
- switch (alt11) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:161:4: variable_reference
- {
- root_0 = (Object)adaptor.nil();
-
- pushFollow(FOLLOW_variable_reference_in_value_sentence625);
- variable_reference21=variable_reference();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, variable_reference21.getTree());
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:162:4: vc= value_chunk
- {
- pushFollow(FOLLOW_value_chunk_in_value_sentence632);
- vc=value_chunk();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_value_chunk.add(vc.getTree());
- if ( state.backtracking==0 ) {
- text = (vc!=null?input.toString(vc.start,vc.stop):null);
- }
-
-
- // AST REWRITE
- // elements:
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 163:2: -> VT_LITERAL[$vc.start, text]
- {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_LITERAL, (vc!=null?((Token)vc.start):null), text));
-
- }
-
- retval.tree = root_0;}
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "value_sentence"
-
- public static class value_chunk_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "value_chunk"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:166:1: value_chunk : ( literal | EQUALS | COMMA )+ ;
- public final DSLMapParser.value_chunk_return value_chunk() throws RecognitionException {
- DSLMapParser.value_chunk_return retval = new DSLMapParser.value_chunk_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token EQUALS23=null;
- Token COMMA24=null;
- DSLMapParser.literal_return literal22 = null;
-
-
- Object EQUALS23_tree=null;
- Object COMMA24_tree=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:2: ( ( literal | EQUALS | COMMA )+ )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:4: ( literal | EQUALS | COMMA )+
- {
- root_0 = (Object)adaptor.nil();
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:4: ( literal | EQUALS | COMMA )+
- int cnt12=0;
- loop12:
- do {
- int alt12=4;
- switch ( input.LA(1) ) {
- case LEFT_SQUARE:
- case RIGHT_SQUARE:
- case LITERAL:
- case COLON:
- {
- int LA12_2 = input.LA(2);
-
- if ( (synpred15_DSLMap()) ) {
- alt12=1;
- }
-
-
- }
- break;
- case EQUALS:
- {
- int LA12_3 = input.LA(2);
-
- if ( (synpred16_DSLMap()) ) {
- alt12=2;
- }
-
-
- }
- break;
- case COMMA:
- {
- int LA12_4 = input.LA(2);
-
- if ( (synpred17_DSLMap()) ) {
- alt12=3;
- }
-
-
- }
- break;
-
- }
-
- switch (alt12) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:5: literal
- {
- pushFollow(FOLLOW_literal_in_value_chunk654);
- literal22=literal();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, literal22.getTree());
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:13: EQUALS
- {
- EQUALS23=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_value_chunk656); if (state.failed) return retval;
- if ( state.backtracking==0 ) {
- EQUALS23_tree = (Object)adaptor.create(EQUALS23);
- adaptor.addChild(root_0, EQUALS23_tree);
- }
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:20: COMMA
- {
- COMMA24=(Token)match(input,COMMA,FOLLOW_COMMA_in_value_chunk658); if (state.failed) return retval;
- if ( state.backtracking==0 ) {
- COMMA24_tree = (Object)adaptor.create(COMMA24);
- adaptor.addChild(root_0, COMMA24_tree);
- }
-
- }
- break;
-
- default :
- if ( cnt12 >= 1 ) break loop12;
- if (state.backtracking>0) {state.failed=true; return retval;}
- EarlyExitException eee =
- new EarlyExitException(12, input);
- throw eee;
- }
- cnt12++;
- } while (true);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "value_chunk"
-
- public static class literal_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "literal"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:170:1: literal : ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE ) ;
- public final DSLMapParser.literal_return literal() throws RecognitionException {
- DSLMapParser.literal_return retval = new DSLMapParser.literal_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token set25=null;
-
- Object set25_tree=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:171:2: ( ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:171:4: ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE )
- {
- root_0 = (Object)adaptor.nil();
-
- set25=(Token)input.LT(1);
- if ( (input.LA(1)>=LEFT_SQUARE && input.LA(1)<=LITERAL)||input.LA(1)==COLON ) {
- input.consume();
- if ( state.backtracking==0 ) adaptor.addChild(root_0, (Object)adaptor.create(set25));
- state.errorRecovery=false;state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return retval;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- throw mse;
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "literal"
-
- public static class variable_definition_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "variable_definition"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:175:1: variable_definition : lc= LEFT_CURLY name= LITERAL ( ( COLON q= LITERAL )? COLON pat= pattern )? rc= RIGHT_CURLY -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {hasSpaceBefore!
&& hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE -> ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) ;
- public final DSLMapParser.variable_definition_return variable_definition() throws RecognitionException {
- DSLMapParser.variable_definition_return retval = new DSLMapParser.variable_definition_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token lc=null;
- Token name=null;
- Token q=null;
- Token rc=null;
- Token COLON26=null;
- Token COLON27=null;
- DSLMapParser.pattern_return pat = null;
-
-
- Object lc_tree=null;
- Object name_tree=null;
- Object q_tree=null;
- Object rc_tree=null;
- Object COLON26_tree=null;
- Object COLON27_tree=null;
- RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
- RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
- RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
- RewriteRuleSubtreeStream stream_pattern=new RewriteRuleSubtreeStream(adaptor,"rule pattern");
-
- String text = "";
- boolean hasSpaceBefore = false;
- boolean hasSpaceAfter = false;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:181:2: (lc= LEFT_CURLY name= LITERAL ( ( COLON q= LITERAL )? COLON pat= pattern )? rc= RIGHT_CURLY -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {hasSpaceBefore && hasSpaceA!
fter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE -> ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:181:4: lc= LEFT_CURLY name= LITERAL ( ( COLON q= LITERAL )? COLON pat= pattern )? rc= RIGHT_CURLY
- {
- lc=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition710); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LEFT_CURLY.add(lc);
-
- if ( state.backtracking==0 ) {
-
- CommonToken back2 = (CommonToken)input.LT(-2);
- if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true;
-
- }
- name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition721); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(name);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:186:15: ( ( COLON q= LITERAL )? COLON pat= pattern )?
- int alt14=2;
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0==COLON) ) {
- alt14=1;
- }
- switch (alt14) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:186:17: ( COLON q= LITERAL )? COLON pat= pattern
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:186:17: ( COLON q= LITERAL )?
- int alt13=2;
- int LA13_0 = input.LA(1);
-
- if ( (LA13_0==COLON) ) {
- int LA13_1 = input.LA(2);
-
- if ( (LA13_1==LITERAL) ) {
- int LA13_2 = input.LA(3);
-
- if ( (LA13_2==COLON) ) {
- int LA13_4 = input.LA(4);
-
- if ( (synpred21_DSLMap()) ) {
- alt13=1;
- }
- }
- }
- }
- switch (alt13) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:186:18: COLON q= LITERAL
- {
- COLON26=(Token)match(input,COLON,FOLLOW_COLON_in_variable_definition726); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_COLON.add(COLON26);
-
- q=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition730); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(q);
-
-
- }
- break;
-
- }
-
- COLON27=(Token)match(input,COLON,FOLLOW_COLON_in_variable_definition734); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_COLON.add(COLON27);
-
- pushFollow(FOLLOW_pattern_in_variable_definition738);
- pat=pattern();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_pattern.add(pat.getTree());
- if ( state.backtracking==0 ) {
- text = (pat!=null?input.toString(pat.start,pat.stop):null);
- }
-
- }
- break;
-
- }
-
- rc=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition747); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(rc);
-
- if ( state.backtracking==0 ) {
-
- CommonToken rc1 = (CommonToken)input.LT(1);
- if(!"=".equals(rc1.getText()) && ((CommonToken)rc).getStopIndex() < rc1.getStartIndex() - 1) hasSpaceAfter = true;
-
- }
-
-
- // AST REWRITE
- // elements: name, q, name, q, q, q, name, q, q, q, q, name, name, name, name, name, name, q
- // token labels: q, name
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleTokenStream stream_q=new RewriteRuleTokenStream(adaptor,"token q",q);
- RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 191:2: -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
- if (hasSpaceBefore && !"".equals(text) && !hasSpaceAfter) {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:191:70: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:191:89: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:191:99: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
- adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
- else // 192:2: -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
- if (!hasSpaceBefore && !"".equals(text) && !hasSpaceAfter) {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:192:63: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:192:82: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:192:92: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
- adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
- else // 193:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- if (hasSpaceBefore && !hasSpaceAfter) {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:193:51: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:193:70: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:193:80: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
- else // 194:2: -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- if (!hasSpaceBefore && !hasSpaceAfter) {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:194:44: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:194:63: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:194:73: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
- else // 196:2: -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE
- if (hasSpaceBefore && !"".equals(text) && hasSpaceAfter) {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:196:69: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:196:88: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:196:98: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
- adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
-
- adaptor.addChild(root_0, root_1);
- }
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
-
- }
- else // 197:2: -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE
- if (!hasSpaceBefore && !"".equals(text) && hasSpaceAfter) {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:197:62: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:197:81: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:197:91: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
- adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
-
- adaptor.addChild(root_0, root_1);
- }
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
-
- }
- else // 198:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE
- if (hasSpaceBefore && hasSpaceAfter) {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:198:50: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:198:69: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:198:79: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
-
- adaptor.addChild(root_0, root_1);
- }
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
-
- }
- else // 199:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE
- if (!hasSpaceBefore && hasSpaceAfter) {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:199:43: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:199:62: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:199:72: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
-
- adaptor.addChild(root_0, root_1);
- }
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
-
- }
- else // 200:2: -> ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:200:5: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:200:24: ^( VT_QUAL ( $q)? )
- {
- Object root_2 = (Object)adaptor.nil();
- root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:200:34: ( $q)?
- if ( stream_q.hasNext() ) {
- adaptor.addChild(root_2, stream_q.nextNode());
-
- }
- stream_q.reset();
-
- adaptor.addChild(root_1, root_2);
- }
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "variable_definition"
-
- public static class variable_definition2_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "variable_definition2"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:203:1: variable_definition2 : LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) ;
- public final DSLMapParser.variable_definition2_return variable_definition2() throws RecognitionException {
- DSLMapParser.variable_definition2_return retval = new DSLMapParser.variable_definition2_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token name=null;
- Token LEFT_CURLY28=null;
- Token COLON29=null;
- Token RIGHT_CURLY30=null;
- DSLMapParser.pattern_return pat = null;
-
-
- Object name_tree=null;
- Object LEFT_CURLY28_tree=null;
- Object COLON29_tree=null;
- Object RIGHT_CURLY30_tree=null;
- RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
- RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
- RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
- RewriteRuleSubtreeStream stream_pattern=new RewriteRuleSubtreeStream(adaptor,"rule pattern");
-
- String text = "";
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:207:2: ( LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:207:4: LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY
- {
- LEFT_CURLY28=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition2990); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY28);
-
- name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition2994); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(name);
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:207:28: ( COLON pat= pattern )?
- int alt15=2;
- int LA15_0 = input.LA(1);
-
- if ( (LA15_0==COLON) ) {
- alt15=1;
- }
- switch (alt15) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:207:30: COLON pat= pattern
- {
- COLON29=(Token)match(input,COLON,FOLLOW_COLON_in_variable_definition2998); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_COLON.add(COLON29);
-
- pushFollow(FOLLOW_pattern_in_variable_definition21002);
- pat=pattern();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_pattern.add(pat.getTree());
- if ( state.backtracking==0 ) {
- text = (pat!=null?input.toString(pat.start,pat.stop):null);
- }
-
- }
- break;
-
- }
-
- RIGHT_CURLY30=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition21009); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY30);
-
-
-
- // AST REWRITE
- // elements: name, name
- // token labels: name
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 208:2: -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
- if (!"".equals(text)) {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:208:25: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
- adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
- else // 209:2: -> ^( VT_VAR_DEF $name)
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:209:5: ^( VT_VAR_DEF $name)
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "variable_definition2"
-
- public static class pattern_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "pattern"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:213:1: pattern : ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ ;
- public final DSLMapParser.pattern_return pattern() throws RecognitionException {
- DSLMapParser.pattern_return retval = new DSLMapParser.pattern_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token LEFT_CURLY32=null;
- Token RIGHT_CURLY34=null;
- Token LEFT_SQUARE35=null;
- Token RIGHT_SQUARE37=null;
- DSLMapParser.literal_return literal31 = null;
-
- DSLMapParser.literal_return literal33 = null;
-
- DSLMapParser.pattern_return pattern36 = null;
-
-
- Object LEFT_CURLY32_tree=null;
- Object RIGHT_CURLY34_tree=null;
- Object LEFT_SQUARE35_tree=null;
- Object RIGHT_SQUARE37_tree=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:214:9: ( ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:214:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
- {
- root_0 = (Object)adaptor.nil();
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:214:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
- int cnt16=0;
- loop16:
- do {
- int alt16=4;
- switch ( input.LA(1) ) {
- case RIGHT_SQUARE:
- {
- int LA16_2 = input.LA(2);
-
- if ( (synpred24_DSLMap()) ) {
- alt16=1;
- }
-
-
- }
- break;
- case LEFT_SQUARE:
- {
- int LA16_3 = input.LA(2);
-
- if ( (synpred24_DSLMap()) ) {
- alt16=1;
- }
- else if ( (synpred26_DSLMap()) ) {
- alt16=3;
- }
-
-
- }
- break;
- case LEFT_CURLY:
- {
- alt16=2;
- }
- break;
- case LITERAL:
- case COLON:
- {
- alt16=1;
- }
- break;
-
- }
-
- switch (alt16) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:214:13: literal
- {
- pushFollow(FOLLOW_literal_in_pattern1060);
- literal31=literal();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, literal31.getTree());
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:215:13: LEFT_CURLY literal RIGHT_CURLY
- {
- LEFT_CURLY32=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_pattern1074); if (state.failed) return retval;
- if ( state.backtracking==0 ) {
- LEFT_CURLY32_tree = (Object)adaptor.create(LEFT_CURLY32);
- adaptor.addChild(root_0, LEFT_CURLY32_tree);
- }
- pushFollow(FOLLOW_literal_in_pattern1076);
- literal33=literal();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, literal33.getTree());
- RIGHT_CURLY34=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_pattern1078); if (state.failed) return retval;
- if ( state.backtracking==0 ) {
- RIGHT_CURLY34_tree = (Object)adaptor.create(RIGHT_CURLY34);
- adaptor.addChild(root_0, RIGHT_CURLY34_tree);
- }
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:216:13: LEFT_SQUARE pattern RIGHT_SQUARE
- {
- LEFT_SQUARE35=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_pattern1092); if (state.failed) return retval;
- if ( state.backtracking==0 ) {
- LEFT_SQUARE35_tree = (Object)adaptor.create(LEFT_SQUARE35);
- adaptor.addChild(root_0, LEFT_SQUARE35_tree);
- }
- pushFollow(FOLLOW_pattern_in_pattern1094);
- pattern36=pattern();
-
- state._fsp--;
- if (state.failed) return retval;
- if ( state.backtracking==0 ) adaptor.addChild(root_0, pattern36.getTree());
- RIGHT_SQUARE37=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_pattern1096); if (state.failed) return retval;
- if ( state.backtracking==0 ) {
- RIGHT_SQUARE37_tree = (Object)adaptor.create(RIGHT_SQUARE37);
- adaptor.addChild(root_0, RIGHT_SQUARE37_tree);
- }
-
- }
- break;
-
- default :
- if ( cnt16 >= 1 ) break loop16;
- if (state.backtracking>0) {state.failed=true; return retval;}
- EarlyExitException eee =
- new EarlyExitException(16, input);
- throw eee;
- }
- cnt16++;
- } while (true);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "pattern"
-
- public static class variable_reference_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "variable_reference"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:221:1: variable_reference : lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) ;
- public final DSLMapParser.variable_reference_return variable_reference() throws RecognitionException {
- DSLMapParser.variable_reference_return retval = new DSLMapParser.variable_reference_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token lc=null;
- Token name=null;
- Token rc=null;
-
- Object lc_tree=null;
- Object name_tree=null;
- Object rc_tree=null;
- RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
- RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
-
-
- boolean hasSpaceBefore = false;
- boolean hasSpaceAfter = false;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:226:2: (lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:226:4: lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY
- {
- lc=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference1131); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LEFT_CURLY.add(lc);
-
- if ( state.backtracking==0 ) {
-
- CommonToken back2 = (CommonToken)input.LT(-2);
- if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true;
-
- }
- name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference1142); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(name);
-
- rc=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference1146); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(rc);
-
- if ( state.backtracking==0 ) {
- if(((CommonToken)rc).getStopIndex() < ((CommonToken)input.LT(1)).getStartIndex() - 1) hasSpaceAfter = true;
- }
-
-
- // AST REWRITE
- // elements: name, name, name, name
- // token labels: name
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 233:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE
- if (hasSpaceBefore && hasSpaceAfter) {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:233:49: ^( VT_VAR_REF $name)
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
-
- }
- else // 234:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name)
- if (hasSpaceBefore && !hasSpaceAfter) {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:234:50: ^( VT_VAR_REF $name)
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
- else // 235:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE
- if (!hasSpaceBefore && hasSpaceAfter) {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:235:42: ^( VT_VAR_REF $name)
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
- adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
-
- }
- else // 236:2: -> ^( VT_VAR_REF $name)
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:236:6: ^( VT_VAR_REF $name)
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "variable_reference"
-
- public static class variable_reference2_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "variable_reference2"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:240:1: variable_reference2 : LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) ;
- public final DSLMapParser.variable_reference2_return variable_reference2() throws RecognitionException {
- DSLMapParser.variable_reference2_return retval = new DSLMapParser.variable_reference2_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token name=null;
- Token LEFT_CURLY38=null;
- Token RIGHT_CURLY39=null;
-
- Object name_tree=null;
- Object LEFT_CURLY38_tree=null;
- Object RIGHT_CURLY39_tree=null;
- RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
- RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:241:2: ( LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:241:4: LEFT_CURLY name= LITERAL RIGHT_CURLY
- {
- LEFT_CURLY38=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference21224); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY38);
-
- name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference21228); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(name);
-
- RIGHT_CURLY39=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference21230); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY39);
-
-
-
- // AST REWRITE
- // elements: name
- // token labels: name
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 242:2: -> ^( VT_VAR_REF $name)
- {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:242:5: ^( VT_VAR_REF $name)
- {
- Object root_1 = (Object)adaptor.nil();
- root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
-
- adaptor.addChild(root_1, stream_name.nextNode());
-
- adaptor.addChild(root_0, root_1);
- }
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "variable_reference2"
-
- public static class condition_key_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "condition_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:246:1: condition_key : {...}?value= LITERAL -> VT_CONDITION[$value] ;
- public final DSLMapParser.condition_key_return condition_key() throws RecognitionException {
- DSLMapParser.condition_key_return retval = new DSLMapParser.condition_key_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token value=null;
-
- Object value_tree=null;
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:247:2: ({...}?value= LITERAL -> VT_CONDITION[$value] )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:247:4: {...}?value= LITERAL
- {
- if ( !((validateIdentifierKey("condition")||validateIdentifierKey("when"))) ) {
- if (state.backtracking>0) {state.failed=true; return retval;}
- throw new FailedPredicateException(input, "condition_key", "validateIdentifierKey(\"condition\")||validateIdentifierKey(\"when\")");
- }
- value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_condition_key1259); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(value);
-
-
-
- // AST REWRITE
- // elements:
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 248:2: -> VT_CONDITION[$value]
- {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_CONDITION, value));
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "condition_key"
-
- public static class consequence_key_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "consequence_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:251:1: consequence_key : {...}?value= LITERAL -> VT_CONSEQUENCE[$value] ;
- public final DSLMapParser.consequence_key_return consequence_key() throws RecognitionException {
- DSLMapParser.consequence_key_return retval = new DSLMapParser.consequence_key_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token value=null;
-
- Object value_tree=null;
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:252:2: ({...}?value= LITERAL -> VT_CONSEQUENCE[$value] )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:252:4: {...}?value= LITERAL
- {
- if ( !((validateIdentifierKey("consequence")||validateIdentifierKey("then"))) ) {
- if (state.backtracking>0) {state.failed=true; return retval;}
- throw new FailedPredicateException(input, "consequence_key", "validateIdentifierKey(\"consequence\")||validateIdentifierKey(\"then\")");
- }
- value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_consequence_key1282); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(value);
-
-
-
- // AST REWRITE
- // elements:
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 253:2: -> VT_CONSEQUENCE[$value]
- {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_CONSEQUENCE, value));
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "consequence_key"
-
- public static class keyword_key_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "keyword_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:256:1: keyword_key : {...}?value= LITERAL -> VT_KEYWORD[$value] ;
- public final DSLMapParser.keyword_key_return keyword_key() throws RecognitionException {
- DSLMapParser.keyword_key_return retval = new DSLMapParser.keyword_key_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token value=null;
-
- Object value_tree=null;
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:257:2: ({...}?value= LITERAL -> VT_KEYWORD[$value] )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:257:4: {...}?value= LITERAL
- {
- if ( !((validateIdentifierKey("keyword"))) ) {
- if (state.backtracking>0) {state.failed=true; return retval;}
- throw new FailedPredicateException(input, "keyword_key", "validateIdentifierKey(\"keyword\")");
- }
- value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_keyword_key1305); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(value);
-
-
-
- // AST REWRITE
- // elements:
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 258:2: -> VT_KEYWORD[$value]
- {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_KEYWORD, value));
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "keyword_key"
-
- public static class any_key_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "any_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:261:1: any_key : {...}?value= LITERAL -> VT_ANY[$value] ;
- public final DSLMapParser.any_key_return any_key() throws RecognitionException {
- DSLMapParser.any_key_return retval = new DSLMapParser.any_key_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token value=null;
-
- Object value_tree=null;
- RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:262:2: ({...}?value= LITERAL -> VT_ANY[$value] )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:262:4: {...}?value= LITERAL
- {
- if ( !((validateIdentifierKey("*"))) ) {
- if (state.backtracking>0) {state.failed=true; return retval;}
- throw new FailedPredicateException(input, "any_key", "validateIdentifierKey(\"*\")");
- }
- value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_any_key1328); if (state.failed) return retval;
- if ( state.backtracking==0 ) stream_LITERAL.add(value);
-
-
-
- // AST REWRITE
- // elements:
- // token labels:
- // rule labels: retval
- // token list labels:
- // rule list labels:
- if ( state.backtracking==0 ) {
- retval.tree = root_0;
- RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
-
- root_0 = (Object)adaptor.nil();
- // 263:2: -> VT_ANY[$value]
- {
- adaptor.addChild(root_0, (Object)adaptor.create(VT_ANY, value));
-
- }
-
- retval.tree = root_0;}
- }
-
- retval.stop = input.LT(-1);
-
- if ( state.backtracking==0 ) {
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- return retval;
- }
- // $ANTLR end "any_key"
-
- // $ANTLR start synpred4_DSLMap
- public final void synpred4_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:24: ( meta_section )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:104:24: meta_section
- {
- pushFollow(FOLLOW_meta_section_in_synpred4_DSLMap352);
- meta_section();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred4_DSLMap
-
- // $ANTLR start synpred6_DSLMap
- public final void synpred6_DSLMap_fragment() throws RecognitionException {
- DSLMapParser.condition_key_return value1 = null;
-
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:117:4: (value1= condition_key )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:117:4: value1= condition_key
- {
- pushFollow(FOLLOW_condition_key_in_synpred6_DSLMap418);
- value1=condition_key();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred6_DSLMap
-
- // $ANTLR start synpred7_DSLMap
- public final void synpred7_DSLMap_fragment() throws RecognitionException {
- DSLMapParser.consequence_key_return value2 = null;
-
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:118:5: (value2= consequence_key )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:118:5: value2= consequence_key
- {
- pushFollow(FOLLOW_consequence_key_in_synpred7_DSLMap427);
- value2=consequence_key();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred7_DSLMap
-
- // $ANTLR start synpred8_DSLMap
- public final void synpred8_DSLMap_fragment() throws RecognitionException {
- DSLMapParser.keyword_key_return value3 = null;
-
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:119:5: (value3= keyword_key )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:119:5: value3= keyword_key
- {
- pushFollow(FOLLOW_keyword_key_in_synpred8_DSLMap435);
- value3=keyword_key();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred8_DSLMap
-
- // $ANTLR start synpred12_DSLMap
- public final void synpred12_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: ( literal )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: literal
- {
- pushFollow(FOLLOW_literal_in_synpred12_DSLMap579);
- literal();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred12_DSLMap
-
- // $ANTLR start synpred15_DSLMap
- public final void synpred15_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:5: ( literal )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:5: literal
- {
- pushFollow(FOLLOW_literal_in_synpred15_DSLMap654);
- literal();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred15_DSLMap
-
- // $ANTLR start synpred16_DSLMap
- public final void synpred16_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:13: ( EQUALS )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:13: EQUALS
- {
- match(input,EQUALS,FOLLOW_EQUALS_in_synpred16_DSLMap656); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred16_DSLMap
-
- // $ANTLR start synpred17_DSLMap
- public final void synpred17_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:20: ( COMMA )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:167:20: COMMA
- {
- match(input,COMMA,FOLLOW_COMMA_in_synpred17_DSLMap658); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred17_DSLMap
-
- // $ANTLR start synpred21_DSLMap
- public final void synpred21_DSLMap_fragment() throws RecognitionException {
- Token q=null;
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:186:18: ( COLON q= LITERAL )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:186:18: COLON q= LITERAL
- {
- match(input,COLON,FOLLOW_COLON_in_synpred21_DSLMap726); if (state.failed) return ;
- q=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_synpred21_DSLMap730); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred21_DSLMap
-
- // $ANTLR start synpred24_DSLMap
- public final void synpred24_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:214:13: ( literal )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:214:13: literal
- {
- pushFollow(FOLLOW_literal_in_synpred24_DSLMap1060);
- literal();
-
- state._fsp--;
- if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred24_DSLMap
-
- // $ANTLR start synpred26_DSLMap
- public final void synpred26_DSLMap_fragment() throws RecognitionException {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:216:13: ( LEFT_SQUARE pattern RIGHT_SQUARE )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMap.g:216:13: LEFT_SQUARE pattern RIGHT_SQUARE
- {
- match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred26_DSLMap1092); if (state.failed) return ;
- pushFollow(FOLLOW_pattern_in_synpred26_DSLMap1094);
- pattern();
-
- state._fsp--;
- if (state.failed) return ;
- match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred26_DSLMap1096); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred26_DSLMap
-
- // Delegated rules
-
- public final boolean synpred21_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred21_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred15_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred15_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred12_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred12_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred24_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred24_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred7_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred7_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred6_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred6_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred17_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred17_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred8_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred8_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred26_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred26_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred4_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred4_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred16_DSLMap() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred16_DSLMap_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
-
-
-
-
- public static final BitSet FOLLOW_statement_in_mapping_file273 = new BitSet(new long[]{0x0000000001600002L});
- public static final BitSet FOLLOW_entry_in_statement296 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_comment_in_statement303 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EOL_in_statement309 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LINE_COMMENT_in_comment325 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_scope_section_in_entry350 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_meta_section_in_entry352 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_key_section_in_entry355 = new BitSet(new long[]{0x0000000000800000L});
- public static final BitSet FOLLOW_EQUALS_in_entry357 = new BitSet(new long[]{0x000000003F800000L});
- public static final BitSet FOLLOW_value_section_in_entry359 = new BitSet(new long[]{0x0000000000200000L});
- public static final BitSet FOLLOW_EOL_in_entry362 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EOF_in_entry364 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_scope_section410 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_condition_key_in_scope_section418 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_consequence_key_in_scope_section427 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_keyword_key_in_scope_section435 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_any_key_in_scope_section443 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_scope_section451 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_meta_section491 = new BitSet(new long[]{0x0000000006000000L});
- public static final BitSet FOLLOW_LITERAL_in_meta_section493 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_meta_section496 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_key_sentence_in_key_section520 = new BitSet(new long[]{0x0000000037000002L});
- public static final BitSet FOLLOW_variable_definition_in_key_sentence551 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_key_chunk_in_key_sentence558 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_key_chunk579 = new BitSet(new long[]{0x0000000037000002L});
- public static final BitSet FOLLOW_value_sentence_in_value_section594 = new BitSet(new long[]{0x000000003F800002L});
- public static final BitSet FOLLOW_variable_reference_in_value_sentence625 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_value_chunk_in_value_sentence632 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_value_chunk654 = new BitSet(new long[]{0x000000003F800002L});
- public static final BitSet FOLLOW_EQUALS_in_value_chunk656 = new BitSet(new long[]{0x000000003F800002L});
- public static final BitSet FOLLOW_COMMA_in_value_chunk658 = new BitSet(new long[]{0x000000003F800002L});
- public static final BitSet FOLLOW_set_in_literal674 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition710 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_LITERAL_in_variable_definition721 = new BitSet(new long[]{0x0000000050000000L});
- public static final BitSet FOLLOW_COLON_in_variable_definition726 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_LITERAL_in_variable_definition730 = new BitSet(new long[]{0x0000000010000000L});
- public static final BitSet FOLLOW_COLON_in_variable_definition734 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_pattern_in_variable_definition738 = new BitSet(new long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition747 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition2990 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_LITERAL_in_variable_definition2994 = new BitSet(new long[]{0x0000000050000000L});
- public static final BitSet FOLLOW_COLON_in_variable_definition2998 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_pattern_in_variable_definition21002 = new BitSet(new long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition21009 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_pattern1060 = new BitSet(new long[]{0x0000000037000002L});
- public static final BitSet FOLLOW_LEFT_CURLY_in_pattern1074 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_literal_in_pattern1076 = new BitSet(new long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_RIGHT_CURLY_in_pattern1078 = new BitSet(new long[]{0x0000000037000002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_pattern1092 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_pattern_in_pattern1094 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_pattern1096 = new BitSet(new long[]{0x0000000037000002L});
- public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference1131 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_LITERAL_in_variable_reference1142 = new BitSet(new long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference1146 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference21224 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_LITERAL_in_variable_reference21228 = new BitSet(new long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference21230 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LITERAL_in_condition_key1259 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LITERAL_in_consequence_key1282 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LITERAL_in_keyword_key1305 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LITERAL_in_any_key1328 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_meta_section_in_synpred4_DSLMap352 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_condition_key_in_synpred6_DSLMap418 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_consequence_key_in_synpred7_DSLMap427 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_keyword_key_in_synpred8_DSLMap435 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_synpred12_DSLMap579 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_synpred15_DSLMap654 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EQUALS_in_synpred16_DSLMap656 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_COMMA_in_synpred17_DSLMap658 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_COLON_in_synpred21_DSLMap726 = new BitSet(new long[]{0x0000000004000000L});
- public static final BitSet FOLLOW_LITERAL_in_synpred21_DSLMap730 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_synpred24_DSLMap1060 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred26_DSLMap1092 = new BitSet(new long[]{0x0000000037000000L});
- public static final BitSet FOLLOW_pattern_in_synpred26_DSLMap1094 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred26_DSLMap1096 = new BitSet(new long[]{0x0000000000000002L});
-
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/dsl/DSLMap.g 2009-02-11 15:20:25
+
+ package org.drools.lang.dsl;
+ import java.util.List;
+ import java.util.ArrayList;
+// import org.drools.lang.dsl.DSLMappingParseException;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.tree.*;
+
+public class DSLMapParser extends Parser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_DSL_GRAMMAR", "VT_COMMENT", "VT_ENTRY", "VT_SCOPE", "VT_CONDITION", "VT_CONSEQUENCE", "VT_KEYWORD", "VT_ANY", "VT_META", "VT_ENTRY_KEY", "VT_ENTRY_VAL", "VT_VAR_DEF", "VT_VAR_REF", "VT_LITERAL", "VT_PATTERN", "VT_QUAL", "VT_SPACE", "EOL", "LINE_COMMENT", "EQUALS", "LEFT_SQUARE", "RIGHT_SQUARE", "LITERAL", "COMMA", "COLON", "LEFT_CURLY", "RIGHT_CURLY", "WS", "EscapeSequence", "DOT", "POUND", "MISC"
+ };
+ public static final int COMMA=27;
+ public static final int RIGHT_CURLY=30;
+ public static final int VT_ENTRY_VAL=14;
+ public static final int WS=31;
+ public static final int MISC=35;
+ public static final int VT_META=12;
+ public static final int VT_CONSEQUENCE=9;
+ public static final int VT_SPACE=20;
+ public static final int LINE_COMMENT=22;
+ public static final int VT_ANY=11;
+ public static final int VT_LITERAL=17;
+ public static final int DOT=33;
+ public static final int EQUALS=23;
+ public static final int VT_DSL_GRAMMAR=4;
+ public static final int VT_CONDITION=8;
+ public static final int VT_ENTRY=6;
+ public static final int VT_VAR_DEF=15;
+ public static final int LITERAL=26;
+ public static final int VT_PATTERN=18;
+ public static final int EscapeSequence=32;
+ public static final int VT_COMMENT=5;
+ public static final int EOF=-1;
+ public static final int EOL=21;
+ public static final int LEFT_SQUARE=24;
+ public static final int VT_ENTRY_KEY=13;
+ public static final int COLON=28;
+ public static final int VT_SCOPE=7;
+ public static final int VT_KEYWORD=10;
+ public static final int POUND=34;
+ public static final int LEFT_CURLY=29;
+ public static final int VT_VAR_REF=16;
+ public static final int VT_QUAL=19;
+ public static final int RIGHT_SQUARE=25;
+
+ // delegates
+ // delegators
+
+
+ public DSLMapParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public DSLMapParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+ protected TreeAdaptor adaptor = new CommonTreeAdaptor();
+
+ public void setTreeAdaptor(TreeAdaptor adaptor) {
+ this.adaptor = adaptor;
+ }
+ public TreeAdaptor getTreeAdaptor() {
+ return adaptor;
+ }
+
+ public String[] getTokenNames() { return DSLMapParser.tokenNames; }
+ public String getGrammarFileName() { return "src/main/resources/org/drools/lang/dsl/DSLMap.g"; }
+
+
+ //we may not need the check on [], as the LITERAL token being examined
+ //should not have them.
+
+ private List errorList = new ArrayList();
+ public List getErrorList(){
+ return errorList;
+ }
+
+ private boolean validateLT(int LTNumber, String text){
+ if (null == input) return false;
+ if (null == input.LT(LTNumber)) return false;
+ if (null == input.LT(LTNumber).getText()) return false;
+
+ String text2Validate = input.LT(LTNumber).getText();
+ if (text2Validate.startsWith("[") && text2Validate.endsWith("]")){
+ text2Validate = text2Validate.substring(1, text2Validate.length() - 1);
+ }
+
+ return text2Validate.equalsIgnoreCase(text);
+ }
+
+ private boolean validateIdentifierKey(String text){
+ return validateLT(1, text);
+ }
+
+ //public void reportError(RecognitionException re) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ // if (errorRecovery) {
+ // return;
+ // }
+ // errorRecovery = true;
+ //
+ // String error = "Error parsing mapping entry: " + getErrorMessage(re, tokenNames);
+ // DSLMappingParseException exception = new DSLMappingParseException (error, re.line);
+ // errorList.add(exception);
+ //}
+
+
+
+ public static class mapping_file_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "mapping_file"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:86:1: mapping_file : ( statement )* -> ^( VT_DSL_GRAMMAR ( statement )* ) ;
+ public final DSLMapParser.mapping_file_return mapping_file() throws RecognitionException {
+ DSLMapParser.mapping_file_return retval = new DSLMapParser.mapping_file_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ DSLMapParser.statement_return statement1 = null;
+
+
+ RewriteRuleSubtreeStream stream_statement=new RewriteRuleSubtreeStream(adaptor,"rule statement");
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:87:2: ( ( statement )* -> ^( VT_DSL_GRAMMAR ( statement )* ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:87:4: ( statement )*
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:87:4: ( statement )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>=EOL && LA1_0<=LINE_COMMENT)||LA1_0==LEFT_SQUARE) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: statement
+ {
+ pushFollow(FOLLOW_statement_in_mapping_file273);
+ statement1=statement();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_statement.add(statement1.getTree());
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+
+
+ // AST REWRITE
+ // elements: statement
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 88:2: -> ^( VT_DSL_GRAMMAR ( statement )* )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:88:5: ^( VT_DSL_GRAMMAR ( statement )* )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_DSL_GRAMMAR, "VT_DSL_GRAMMAR"), root_1);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:88:22: ( statement )*
+ while ( stream_statement.hasNext() ) {
+ adaptor.addChild(root_1, stream_statement.nextTree());
+
+ }
+ stream_statement.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "mapping_file"
+
+ public static class statement_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "statement"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:91:1: statement : ( entry | comment | EOL );
+ public final DSLMapParser.statement_return statement() throws RecognitionException {
+ DSLMapParser.statement_return retval = new DSLMapParser.statement_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token EOL4=null;
+ DSLMapParser.entry_return entry2 = null;
+
+ DSLMapParser.comment_return comment3 = null;
+
+
+ Object EOL4_tree=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:92:2: ( entry | comment | EOL )
+ int alt2=3;
+ switch ( input.LA(1) ) {
+ case LEFT_SQUARE:
+ {
+ alt2=1;
+ }
+ break;
+ case LINE_COMMENT:
+ {
+ alt2=2;
+ }
+ break;
+ case EOL:
+ {
+ alt2=3;
+ }
+ break;
+ default:
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 2, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt2) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:92:4: entry
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_entry_in_statement296);
+ entry2=entry();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, entry2.getTree());
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:93:4: comment
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_comment_in_statement303);
+ comment3=comment();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, comment3.getTree());
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:94:4: EOL
+ {
+ root_0 = (Object)adaptor.nil();
+
+ EOL4=(Token)match(input,EOL,FOLLOW_EOL_in_statement309); if (state.failed) return retval;
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "statement"
+
+ public static class comment_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "comment"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:99:1: comment : LINE_COMMENT -> ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT ) ;
+ public final DSLMapParser.comment_return comment() throws RecognitionException {
+ DSLMapParser.comment_return retval = new DSLMapParser.comment_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LINE_COMMENT5=null;
+
+ Object LINE_COMMENT5_tree=null;
+ RewriteRuleTokenStream stream_LINE_COMMENT=new RewriteRuleTokenStream(adaptor,"token LINE_COMMENT");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:99:9: ( LINE_COMMENT -> ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:99:11: LINE_COMMENT
+ {
+ LINE_COMMENT5=(Token)match(input,LINE_COMMENT,FOLLOW_LINE_COMMENT_in_comment325); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LINE_COMMENT.add(LINE_COMMENT5);
+
+
+
+ // AST REWRITE
+ // elements: LINE_COMMENT
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 100:2: -> ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:100:5: ^( VT_COMMENT[$LINE_COMMENT, \"COMMENT\"] LINE_COMMENT )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_COMMENT, LINE_COMMENT5, "COMMENT"), root_1);
+
+ adaptor.addChild(root_1, stream_LINE_COMMENT.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "comment"
+
+ public static class entry_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "entry"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:1: entry : scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) ;
+ public final DSLMapParser.entry_return entry() throws RecognitionException {
+ DSLMapParser.entry_return retval = new DSLMapParser.entry_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token EQUALS9=null;
+ Token EOL11=null;
+ Token EOF12=null;
+ DSLMapParser.scope_section_return scope_section6 = null;
+
+ DSLMapParser.meta_section_return meta_section7 = null;
+
+ DSLMapParser.key_section_return key_section8 = null;
+
+ DSLMapParser.value_section_return value_section10 = null;
+
+
+ Object EQUALS9_tree=null;
+ Object EOL11_tree=null;
+ Object EOF12_tree=null;
+ RewriteRuleTokenStream stream_EQUALS=new RewriteRuleTokenStream(adaptor,"token EQUALS");
+ RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,"token EOF");
+ RewriteRuleTokenStream stream_EOL=new RewriteRuleTokenStream(adaptor,"token EOL");
+ RewriteRuleSubtreeStream stream_key_section=new RewriteRuleSubtreeStream(adaptor,"rule key_section");
+ RewriteRuleSubtreeStream stream_value_section=new RewriteRuleSubtreeStream(adaptor,"rule value_section");
+ RewriteRuleSubtreeStream stream_scope_section=new RewriteRuleSubtreeStream(adaptor,"rule scope_section");
+ RewriteRuleSubtreeStream stream_meta_section=new RewriteRuleSubtreeStream(adaptor,"rule meta_section");
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:8: ( scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:10: scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF )
+ {
+ pushFollow(FOLLOW_scope_section_in_entry350);
+ scope_section6=scope_section();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_scope_section.add(scope_section6.getTree());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:24: ( meta_section )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==LEFT_SQUARE) ) {
+ int LA3_1 = input.LA(2);
+
+ if ( (LA3_1==LITERAL) ) {
+ int LA3_3 = input.LA(3);
+
+ if ( (LA3_3==RIGHT_SQUARE) ) {
+ int LA3_4 = input.LA(4);
+
+ if ( (synpred4_DSLMap()) ) {
+ alt3=1;
+ }
+ }
+ }
+ else if ( (LA3_1==RIGHT_SQUARE) ) {
+ int LA3_4 = input.LA(3);
+
+ if ( (synpred4_DSLMap()) ) {
+ alt3=1;
+ }
+ }
+ }
+ switch (alt3) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: meta_section
+ {
+ pushFollow(FOLLOW_meta_section_in_entry352);
+ meta_section7=meta_section();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_meta_section.add(meta_section7.getTree());
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_key_section_in_entry355);
+ key_section8=key_section();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_key_section.add(key_section8.getTree());
+ EQUALS9=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_entry357); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_EQUALS.add(EQUALS9);
+
+ pushFollow(FOLLOW_value_section_in_entry359);
+ value_section10=value_section();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_value_section.add(value_section10.getTree());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:71: ( EOL | EOF )
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==EOL) ) {
+ alt4=1;
+ }
+ else if ( (LA4_0==EOF) ) {
+ alt4=2;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 4, 0, input);
+
+ throw nvae;
+ }
+ switch (alt4) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:72: EOL
+ {
+ EOL11=(Token)match(input,EOL,FOLLOW_EOL_in_entry362); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_EOL.add(EOL11);
+
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:76: EOF
+ {
+ EOF12=(Token)match(input,EOF,FOLLOW_EOF_in_entry364); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_EOF.add(EOF12);
+
+
+ }
+ break;
+
+ }
+
+
+
+ // AST REWRITE
+ // elements: scope_section, meta_section, value_section, key_section
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 105:2: -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:105:5: ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY, "VT_ENTRY"), root_1);
+
+ adaptor.addChild(root_1, stream_scope_section.nextTree());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:105:30: ( meta_section )?
+ if ( stream_meta_section.hasNext() ) {
+ adaptor.addChild(root_1, stream_meta_section.nextTree());
+
+ }
+ stream_meta_section.reset();
+ adaptor.addChild(root_1, stream_key_section.nextTree());
+ adaptor.addChild(root_1, stream_value_section.nextTree());
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch ( RecognitionException e ) {
+
+ reportError( e );
+
+ }
+ catch ( RewriteEmptyStreamException e ) {
+
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "entry"
+
+ public static class scope_section_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "scope_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:115:1: scope_section : LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE -> ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? ) ;
+ public final DSLMapParser.scope_section_return scope_section() throws RecognitionException {
+ DSLMapParser.scope_section_return retval = new DSLMapParser.scope_section_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LEFT_SQUARE13=null;
+ Token RIGHT_SQUARE14=null;
+ DSLMapParser.condition_key_return value1 = null;
+
+ DSLMapParser.consequence_key_return value2 = null;
+
+ DSLMapParser.keyword_key_return value3 = null;
+
+ DSLMapParser.any_key_return value4 = null;
+
+
+ Object LEFT_SQUARE13_tree=null;
+ Object RIGHT_SQUARE14_tree=null;
+ RewriteRuleTokenStream stream_LEFT_SQUARE=new RewriteRuleTokenStream(adaptor,"token LEFT_SQUARE");
+ RewriteRuleTokenStream stream_RIGHT_SQUARE=new RewriteRuleTokenStream(adaptor,"token RIGHT_SQUARE");
+ RewriteRuleSubtreeStream stream_condition_key=new RewriteRuleSubtreeStream(adaptor,"rule condition_key");
+ RewriteRuleSubtreeStream stream_any_key=new RewriteRuleSubtreeStream(adaptor,"rule any_key");
+ RewriteRuleSubtreeStream stream_keyword_key=new RewriteRuleSubtreeStream(adaptor,"rule keyword_key");
+ RewriteRuleSubtreeStream stream_consequence_key=new RewriteRuleSubtreeStream(adaptor,"rule consequence_key");
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:116:2: ( LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE -> ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:116:4: LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE
+ {
+ LEFT_SQUARE13=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_scope_section410); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LEFT_SQUARE.add(LEFT_SQUARE13);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:117:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )
+ int alt5=4;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==LITERAL) ) {
+ int LA5_1 = input.LA(2);
+
+ if ( ((synpred6_DSLMap()&&(validateIdentifierKey("condition")||validateIdentifierKey("when")))) ) {
+ alt5=1;
+ }
+ else if ( ((synpred7_DSLMap()&&(validateIdentifierKey("consequence")||validateIdentifierKey("then")))) ) {
+ alt5=2;
+ }
+ else if ( ((synpred8_DSLMap()&&(validateIdentifierKey("keyword")))) ) {
+ alt5=3;
+ }
+ else if ( ((validateIdentifierKey("*"))) ) {
+ alt5=4;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 5, 1, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 5, 0, input);
+
+ throw nvae;
+ }
+ switch (alt5) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:117:4: value1= condition_key
+ {
+ pushFollow(FOLLOW_condition_key_in_scope_section418);
+ value1=condition_key();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_condition_key.add(value1.getTree());
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:118:5: value2= consequence_key
+ {
+ pushFollow(FOLLOW_consequence_key_in_scope_section427);
+ value2=consequence_key();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_consequence_key.add(value2.getTree());
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:119:5: value3= keyword_key
+ {
+ pushFollow(FOLLOW_keyword_key_in_scope_section435);
+ value3=keyword_key();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_keyword_key.add(value3.getTree());
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:120:5: value4= any_key
+ {
+ pushFollow(FOLLOW_any_key_in_scope_section443);
+ value4=any_key();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_any_key.add(value4.getTree());
+
+ }
+ break;
+
+ }
+
+ RIGHT_SQUARE14=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_scope_section451); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_RIGHT_SQUARE.add(RIGHT_SQUARE14);
+
+
+
+ // AST REWRITE
+ // elements: value3, value1, value2, value4
+ // token labels:
+ // rule labels: value1, value4, value2, retval, value3
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_value1=new RewriteRuleSubtreeStream(adaptor,"token value1",value1!=null?value1.tree:null);
+ RewriteRuleSubtreeStream stream_value4=new RewriteRuleSubtreeStream(adaptor,"token value4",value4!=null?value4.tree:null);
+ RewriteRuleSubtreeStream stream_value2=new RewriteRuleSubtreeStream(adaptor,"token value2",value2!=null?value2.tree:null);
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+ RewriteRuleSubtreeStream stream_value3=new RewriteRuleSubtreeStream(adaptor,"token value3",value3!=null?value3.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 123:2: -> ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:123:5: ^( VT_SCOPE[$LEFT_SQUARE, \"SCOPE SECTION\"] ( $value1)? ( $value2)? ( $value3)? ( $value4)? )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_SCOPE, LEFT_SQUARE13, "SCOPE SECTION"), root_1);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:123:47: ( $value1)?
+ if ( stream_value1.hasNext() ) {
+ adaptor.addChild(root_1, stream_value1.nextTree());
+
+ }
+ stream_value1.reset();
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:123:56: ( $value2)?
+ if ( stream_value2.hasNext() ) {
+ adaptor.addChild(root_1, stream_value2.nextTree());
+
+ }
+ stream_value2.reset();
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:123:65: ( $value3)?
+ if ( stream_value3.hasNext() ) {
+ adaptor.addChild(root_1, stream_value3.nextTree());
+
+ }
+ stream_value3.reset();
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:123:74: ( $value4)?
+ if ( stream_value4.hasNext() ) {
+ adaptor.addChild(root_1, stream_value4.nextTree());
+
+ }
+ stream_value4.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "scope_section"
+
+ public static class meta_section_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "meta_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:129:1: meta_section : LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE -> ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? ) ;
+ public final DSLMapParser.meta_section_return meta_section() throws RecognitionException {
+ DSLMapParser.meta_section_return retval = new DSLMapParser.meta_section_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LEFT_SQUARE15=null;
+ Token LITERAL16=null;
+ Token RIGHT_SQUARE17=null;
+
+ Object LEFT_SQUARE15_tree=null;
+ Object LITERAL16_tree=null;
+ Object RIGHT_SQUARE17_tree=null;
+ RewriteRuleTokenStream stream_LEFT_SQUARE=new RewriteRuleTokenStream(adaptor,"token LEFT_SQUARE");
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+ RewriteRuleTokenStream stream_RIGHT_SQUARE=new RewriteRuleTokenStream(adaptor,"token RIGHT_SQUARE");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:130:2: ( LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE -> ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:130:4: LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE
+ {
+ LEFT_SQUARE15=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_meta_section491); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LEFT_SQUARE.add(LEFT_SQUARE15);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:130:16: ( LITERAL )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==LITERAL) ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: LITERAL
+ {
+ LITERAL16=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_meta_section493); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(LITERAL16);
+
+
+ }
+ break;
+
+ }
+
+ RIGHT_SQUARE17=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_meta_section496); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_RIGHT_SQUARE.add(RIGHT_SQUARE17);
+
+
+
+ // AST REWRITE
+ // elements: LITERAL
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 131:2: -> ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:131:5: ^( VT_META[$LEFT_SQUARE, \"META SECTION\"] ( LITERAL )? )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_META, LEFT_SQUARE15, "META SECTION"), root_1);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:131:45: ( LITERAL )?
+ if ( stream_LITERAL.hasNext() ) {
+ adaptor.addChild(root_1, stream_LITERAL.nextNode());
+
+ }
+ stream_LITERAL.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "meta_section"
+
+ public static class key_section_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "key_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:134:1: key_section : (ks= key_sentence )+ -> ^( VT_ENTRY_KEY ( key_sentence )+ ) ;
+ public final DSLMapParser.key_section_return key_section() throws RecognitionException {
+ DSLMapParser.key_section_return retval = new DSLMapParser.key_section_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ DSLMapParser.key_sentence_return ks = null;
+
+
+ RewriteRuleSubtreeStream stream_key_sentence=new RewriteRuleSubtreeStream(adaptor,"rule key_sentence");
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:135:2: ( (ks= key_sentence )+ -> ^( VT_ENTRY_KEY ( key_sentence )+ ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:135:4: (ks= key_sentence )+
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:135:6: (ks= key_sentence )+
+ int cnt7=0;
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( ((LA7_0>=LEFT_SQUARE && LA7_0<=LITERAL)||(LA7_0>=COLON && LA7_0<=LEFT_CURLY)) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: ks= key_sentence
+ {
+ pushFollow(FOLLOW_key_sentence_in_key_section520);
+ ks=key_sentence();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_key_sentence.add(ks.getTree());
+
+ }
+ break;
+
+ default :
+ if ( cnt7 >= 1 ) break loop7;
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ EarlyExitException eee =
+ new EarlyExitException(7, input);
+ throw eee;
+ }
+ cnt7++;
+ } while (true);
+
+
+
+ // AST REWRITE
+ // elements: key_sentence
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 136:2: -> ^( VT_ENTRY_KEY ( key_sentence )+ )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:136:5: ^( VT_ENTRY_KEY ( key_sentence )+ )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY_KEY, "VT_ENTRY_KEY"), root_1);
+
+ if ( !(stream_key_sentence.hasNext()) ) {
+ throw new RewriteEarlyExitException();
+ }
+ while ( stream_key_sentence.hasNext() ) {
+ adaptor.addChild(root_1, stream_key_sentence.nextTree());
+
+ }
+ stream_key_sentence.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "key_section"
+
+ public static class key_sentence_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "key_sentence"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:139:1: key_sentence : ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] );
+ public final DSLMapParser.key_sentence_return key_sentence() throws RecognitionException {
+ DSLMapParser.key_sentence_return retval = new DSLMapParser.key_sentence_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ DSLMapParser.key_chunk_return cb = null;
+
+ DSLMapParser.variable_definition_return variable_definition18 = null;
+
+
+ RewriteRuleSubtreeStream stream_key_chunk=new RewriteRuleSubtreeStream(adaptor,"rule key_chunk");
+
+ String text = "";
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:143:2: ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==LEFT_CURLY) ) {
+ alt8=1;
+ }
+ else if ( ((LA8_0>=LEFT_SQUARE && LA8_0<=LITERAL)||LA8_0==COLON) ) {
+ alt8=2;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:143:4: variable_definition
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_variable_definition_in_key_sentence551);
+ variable_definition18=variable_definition();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, variable_definition18.getTree());
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:144:4: cb= key_chunk
+ {
+ pushFollow(FOLLOW_key_chunk_in_key_sentence558);
+ cb=key_chunk();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_key_chunk.add(cb.getTree());
+ if ( state.backtracking==0 ) {
+ text = (cb!=null?input.toString(cb.start,cb.stop):null);
+ }
+
+
+ // AST REWRITE
+ // elements:
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 145:2: -> VT_LITERAL[$cb.start, text]
+ {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_LITERAL, (cb!=null?((Token)cb.start):null), text));
+
+ }
+
+ retval.tree = root_0;}
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "key_sentence"
+
+ public static class key_chunk_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "key_chunk"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:148:1: key_chunk : ( literal )+ ;
+ public final DSLMapParser.key_chunk_return key_chunk() throws RecognitionException {
+ DSLMapParser.key_chunk_return retval = new DSLMapParser.key_chunk_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ DSLMapParser.literal_return literal19 = null;
+
+
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:149:2: ( ( literal )+ )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: ( literal )+
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: ( literal )+
+ int cnt9=0;
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( ((LA9_0>=LEFT_SQUARE && LA9_0<=LITERAL)||LA9_0==COLON) ) {
+ int LA9_2 = input.LA(2);
+
+ if ( (synpred12_DSLMap()) ) {
+ alt9=1;
+ }
+
+
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: literal
+ {
+ pushFollow(FOLLOW_literal_in_key_chunk579);
+ literal19=literal();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, literal19.getTree());
+
+ }
+ break;
+
+ default :
+ if ( cnt9 >= 1 ) break loop9;
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ EarlyExitException eee =
+ new EarlyExitException(9, input);
+ throw eee;
+ }
+ cnt9++;
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "key_chunk"
+
+ public static class value_section_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "value_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:152:1: value_section : ( value_sentence )+ -> ^( VT_ENTRY_VAL ( value_sentence )+ ) ;
+ public final DSLMapParser.value_section_return value_section() throws RecognitionException {
+ DSLMapParser.value_section_return retval = new DSLMapParser.value_section_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ DSLMapParser.value_sentence_return value_sentence20 = null;
+
+
+ RewriteRuleSubtreeStream stream_value_sentence=new RewriteRuleSubtreeStream(adaptor,"rule value_sentence");
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:153:2: ( ( value_sentence )+ -> ^( VT_ENTRY_VAL ( value_sentence )+ ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:153:4: ( value_sentence )+
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:153:4: ( value_sentence )+
+ int cnt10=0;
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( ((LA10_0>=EQUALS && LA10_0<=LEFT_CURLY)) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:0:0: value_sentence
+ {
+ pushFollow(FOLLOW_value_sentence_in_value_section594);
+ value_sentence20=value_sentence();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_value_sentence.add(value_sentence20.getTree());
+
+ }
+ break;
+
+ default :
+ if ( cnt10 >= 1 ) break loop10;
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ EarlyExitException eee =
+ new EarlyExitException(10, input);
+ throw eee;
+ }
+ cnt10++;
+ } while (true);
+
+
+
+ // AST REWRITE
+ // elements: value_sentence
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 154:2: -> ^( VT_ENTRY_VAL ( value_sentence )+ )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:154:5: ^( VT_ENTRY_VAL ( value_sentence )+ )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY_VAL, "VT_ENTRY_VAL"), root_1);
+
+ if ( !(stream_value_sentence.hasNext()) ) {
+ throw new RewriteEarlyExitException();
+ }
+ while ( stream_value_sentence.hasNext() ) {
+ adaptor.addChild(root_1, stream_value_sentence.nextTree());
+
+ }
+ stream_value_sentence.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "value_section"
+
+ public static class value_sentence_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "value_sentence"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:157:1: value_sentence : ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] );
+ public final DSLMapParser.value_sentence_return value_sentence() throws RecognitionException {
+ DSLMapParser.value_sentence_return retval = new DSLMapParser.value_sentence_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ DSLMapParser.value_chunk_return vc = null;
+
+ DSLMapParser.variable_reference_return variable_reference21 = null;
+
+
+ RewriteRuleSubtreeStream stream_value_chunk=new RewriteRuleSubtreeStream(adaptor,"rule value_chunk");
+
+ String text = "";
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:161:2: ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] )
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==LEFT_CURLY) ) {
+ alt11=1;
+ }
+ else if ( ((LA11_0>=EQUALS && LA11_0<=COLON)) ) {
+ alt11=2;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("", 11, 0, input);
+
+ throw nvae;
+ }
+ switch (alt11) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:161:4: variable_reference
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_variable_reference_in_value_sentence625);
+ variable_reference21=variable_reference();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, variable_reference21.getTree());
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:162:4: vc= value_chunk
+ {
+ pushFollow(FOLLOW_value_chunk_in_value_sentence632);
+ vc=value_chunk();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_value_chunk.add(vc.getTree());
+ if ( state.backtracking==0 ) {
+ text = (vc!=null?input.toString(vc.start,vc.stop):null);
+ }
+
+
+ // AST REWRITE
+ // elements:
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 163:2: -> VT_LITERAL[$vc.start, text]
+ {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_LITERAL, (vc!=null?((Token)vc.start):null), text));
+
+ }
+
+ retval.tree = root_0;}
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "value_sentence"
+
+ public static class value_chunk_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "value_chunk"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:166:1: value_chunk : ( literal | EQUALS | COMMA )+ ;
+ public final DSLMapParser.value_chunk_return value_chunk() throws RecognitionException {
+ DSLMapParser.value_chunk_return retval = new DSLMapParser.value_chunk_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token EQUALS23=null;
+ Token COMMA24=null;
+ DSLMapParser.literal_return literal22 = null;
+
+
+ Object EQUALS23_tree=null;
+ Object COMMA24_tree=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:2: ( ( literal | EQUALS | COMMA )+ )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:4: ( literal | EQUALS | COMMA )+
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:4: ( literal | EQUALS | COMMA )+
+ int cnt12=0;
+ loop12:
+ do {
+ int alt12=4;
+ switch ( input.LA(1) ) {
+ case LEFT_SQUARE:
+ case RIGHT_SQUARE:
+ case LITERAL:
+ case COLON:
+ {
+ int LA12_2 = input.LA(2);
+
+ if ( (synpred15_DSLMap()) ) {
+ alt12=1;
+ }
+
+
+ }
+ break;
+ case EQUALS:
+ {
+ int LA12_3 = input.LA(2);
+
+ if ( (synpred16_DSLMap()) ) {
+ alt12=2;
+ }
+
+
+ }
+ break;
+ case COMMA:
+ {
+ int LA12_4 = input.LA(2);
+
+ if ( (synpred17_DSLMap()) ) {
+ alt12=3;
+ }
+
+
+ }
+ break;
+
+ }
+
+ switch (alt12) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:5: literal
+ {
+ pushFollow(FOLLOW_literal_in_value_chunk654);
+ literal22=literal();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, literal22.getTree());
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:13: EQUALS
+ {
+ EQUALS23=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_value_chunk656); if (state.failed) return retval;
+ if ( state.backtracking==0 ) {
+ EQUALS23_tree = (Object)adaptor.create(EQUALS23);
+ adaptor.addChild(root_0, EQUALS23_tree);
+ }
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:20: COMMA
+ {
+ COMMA24=(Token)match(input,COMMA,FOLLOW_COMMA_in_value_chunk658); if (state.failed) return retval;
+ if ( state.backtracking==0 ) {
+ COMMA24_tree = (Object)adaptor.create(COMMA24);
+ adaptor.addChild(root_0, COMMA24_tree);
+ }
+
+ }
+ break;
+
+ default :
+ if ( cnt12 >= 1 ) break loop12;
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ EarlyExitException eee =
+ new EarlyExitException(12, input);
+ throw eee;
+ }
+ cnt12++;
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "value_chunk"
+
+ public static class literal_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "literal"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:170:1: literal : ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE ) ;
+ public final DSLMapParser.literal_return literal() throws RecognitionException {
+ DSLMapParser.literal_return retval = new DSLMapParser.literal_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token set25=null;
+
+ Object set25_tree=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:171:2: ( ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:171:4: ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE )
+ {
+ root_0 = (Object)adaptor.nil();
+
+ set25=(Token)input.LT(1);
+ if ( (input.LA(1)>=LEFT_SQUARE && input.LA(1)<=LITERAL)||input.LA(1)==COLON ) {
+ input.consume();
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, (Object)adaptor.create(set25));
+ state.errorRecovery=false;state.failed=false;
+ }
+ else {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ throw mse;
+ }
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "literal"
+
+ public static class variable_definition_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "variable_definition"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:175:1: variable_definition : lc= LEFT_CURLY name= LITERAL ( ( COLON q= LITERAL )? COLON pat= pattern )? rc= RIGHT_CURLY -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL!
( $q)? ) ) VT_SPACE -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE -> ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) ;
+ public final DSLMapParser.variable_definition_return variable_definition() throws RecognitionException {
+ DSLMapParser.variable_definition_return retval = new DSLMapParser.variable_definition_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token lc=null;
+ Token name=null;
+ Token q=null;
+ Token rc=null;
+ Token COLON26=null;
+ Token COLON27=null;
+ DSLMapParser.pattern_return pat = null;
+
+
+ Object lc_tree=null;
+ Object name_tree=null;
+ Object q_tree=null;
+ Object rc_tree=null;
+ Object COLON26_tree=null;
+ Object COLON27_tree=null;
+ RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
+ RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+ RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
+ RewriteRuleSubtreeStream stream_pattern=new RewriteRuleSubtreeStream(adaptor,"rule pattern");
+
+ String text = "";
+ boolean hasSpaceBefore = false;
+ boolean hasSpaceAfter = false;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:181:2: (lc= LEFT_CURLY name= LITERAL ( ( COLON q= LITERAL )? COLON pat= pattern )? rc= RIGHT_CURLY -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) V!
T_SPACE -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE -> ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:181:4: lc= LEFT_CURLY name= LITERAL ( ( COLON q= LITERAL )? COLON pat= pattern )? rc= RIGHT_CURLY
+ {
+ lc=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition710); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LEFT_CURLY.add(lc);
+
+ if ( state.backtracking==0 ) {
+
+ CommonToken back2 = (CommonToken)input.LT(-2);
+ if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true;
+
+ }
+ name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition721); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(name);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:186:15: ( ( COLON q= LITERAL )? COLON pat= pattern )?
+ int alt14=2;
+ int LA14_0 = input.LA(1);
+
+ if ( (LA14_0==COLON) ) {
+ alt14=1;
+ }
+ switch (alt14) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:186:17: ( COLON q= LITERAL )? COLON pat= pattern
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:186:17: ( COLON q= LITERAL )?
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( (LA13_0==COLON) ) {
+ int LA13_1 = input.LA(2);
+
+ if ( (LA13_1==LITERAL) ) {
+ int LA13_2 = input.LA(3);
+
+ if ( (LA13_2==COLON) ) {
+ int LA13_4 = input.LA(4);
+
+ if ( (synpred21_DSLMap()) ) {
+ alt13=1;
+ }
+ }
+ }
+ }
+ switch (alt13) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:186:18: COLON q= LITERAL
+ {
+ COLON26=(Token)match(input,COLON,FOLLOW_COLON_in_variable_definition726); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_COLON.add(COLON26);
+
+ q=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition730); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(q);
+
+
+ }
+ break;
+
+ }
+
+ COLON27=(Token)match(input,COLON,FOLLOW_COLON_in_variable_definition734); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_COLON.add(COLON27);
+
+ pushFollow(FOLLOW_pattern_in_variable_definition738);
+ pat=pattern();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_pattern.add(pat.getTree());
+ if ( state.backtracking==0 ) {
+ text = (pat!=null?input.toString(pat.start,pat.stop):null);
+ }
+
+ }
+ break;
+
+ }
+
+ rc=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition747); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(rc);
+
+ if ( state.backtracking==0 ) {
+
+ CommonToken rc1 = (CommonToken)input.LT(1);
+ if(!"=".equals(rc1.getText()) && ((CommonToken)rc).getStopIndex() < rc1.getStartIndex() - 1) hasSpaceAfter = true;
+
+ }
+
+
+ // AST REWRITE
+ // elements: name, q, q, name, q, q, name, q, name, name, name, q, name, name, q, q, q, name
+ // token labels: q, name
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleTokenStream stream_q=new RewriteRuleTokenStream(adaptor,"token q",q);
+ RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 191:2: -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
+ if (hasSpaceBefore && !"".equals(text) && !hasSpaceAfter) {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:191:70: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:191:89: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:191:99: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+ adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+ else // 192:2: -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
+ if (!hasSpaceBefore && !"".equals(text) && !hasSpaceAfter) {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:192:63: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:192:82: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:192:92: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+ adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+ else // 193:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ if (hasSpaceBefore && !hasSpaceAfter) {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:193:51: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:193:70: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:193:80: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+ else // 194:2: -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ if (!hasSpaceBefore && !hasSpaceAfter) {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:194:44: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:194:63: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:194:73: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+ else // 196:2: -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE
+ if (hasSpaceBefore && !"".equals(text) && hasSpaceAfter) {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:196:69: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:196:88: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:196:98: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+ adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
+
+ adaptor.addChild(root_0, root_1);
+ }
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+
+ }
+ else // 197:2: -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] ) VT_SPACE
+ if (!hasSpaceBefore && !"".equals(text) && hasSpaceAfter) {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:197:62: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) VT_PATTERN[$pat.start, text] )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:197:81: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:197:91: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+ adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
+
+ adaptor.addChild(root_0, root_1);
+ }
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+
+ }
+ else // 198:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE
+ if (hasSpaceBefore && hasSpaceAfter) {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:198:50: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:198:69: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:198:79: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+
+ adaptor.addChild(root_0, root_1);
+ }
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+
+ }
+ else // 199:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) ) VT_SPACE
+ if (!hasSpaceBefore && hasSpaceAfter) {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:199:43: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:199:62: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:199:72: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+
+ adaptor.addChild(root_0, root_1);
+ }
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+
+ }
+ else // 200:2: -> ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:200:5: ^( VT_VAR_DEF $name ^( VT_QUAL ( $q)? ) )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:200:24: ^( VT_QUAL ( $q)? )
+ {
+ Object root_2 = (Object)adaptor.nil();
+ root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_QUAL, "VT_QUAL"), root_2);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:200:34: ( $q)?
+ if ( stream_q.hasNext() ) {
+ adaptor.addChild(root_2, stream_q.nextNode());
+
+ }
+ stream_q.reset();
+
+ adaptor.addChild(root_1, root_2);
+ }
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "variable_definition"
+
+ public static class variable_definition2_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "variable_definition2"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:203:1: variable_definition2 : LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) ;
+ public final DSLMapParser.variable_definition2_return variable_definition2() throws RecognitionException {
+ DSLMapParser.variable_definition2_return retval = new DSLMapParser.variable_definition2_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token name=null;
+ Token LEFT_CURLY28=null;
+ Token COLON29=null;
+ Token RIGHT_CURLY30=null;
+ DSLMapParser.pattern_return pat = null;
+
+
+ Object name_tree=null;
+ Object LEFT_CURLY28_tree=null;
+ Object COLON29_tree=null;
+ Object RIGHT_CURLY30_tree=null;
+ RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
+ RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+ RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
+ RewriteRuleSubtreeStream stream_pattern=new RewriteRuleSubtreeStream(adaptor,"rule pattern");
+
+ String text = "";
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:207:2: ( LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:207:4: LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY
+ {
+ LEFT_CURLY28=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition2990); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY28);
+
+ name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition2994); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(name);
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:207:28: ( COLON pat= pattern )?
+ int alt15=2;
+ int LA15_0 = input.LA(1);
+
+ if ( (LA15_0==COLON) ) {
+ alt15=1;
+ }
+ switch (alt15) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:207:30: COLON pat= pattern
+ {
+ COLON29=(Token)match(input,COLON,FOLLOW_COLON_in_variable_definition2998); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_COLON.add(COLON29);
+
+ pushFollow(FOLLOW_pattern_in_variable_definition21002);
+ pat=pattern();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_pattern.add(pat.getTree());
+ if ( state.backtracking==0 ) {
+ text = (pat!=null?input.toString(pat.start,pat.stop):null);
+ }
+
+ }
+ break;
+
+ }
+
+ RIGHT_CURLY30=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition21009); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY30);
+
+
+
+ // AST REWRITE
+ // elements: name, name
+ // token labels: name
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 208:2: -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+ if (!"".equals(text)) {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:208:25: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+ adaptor.addChild(root_1, (Object)adaptor.create(VT_PATTERN, (pat!=null?((Token)pat.start):null), text));
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+ else // 209:2: -> ^( VT_VAR_DEF $name)
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:209:5: ^( VT_VAR_DEF $name)
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "variable_definition2"
+
+ public static class pattern_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "pattern"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:213:1: pattern : ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ ;
+ public final DSLMapParser.pattern_return pattern() throws RecognitionException {
+ DSLMapParser.pattern_return retval = new DSLMapParser.pattern_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LEFT_CURLY32=null;
+ Token RIGHT_CURLY34=null;
+ Token LEFT_SQUARE35=null;
+ Token RIGHT_SQUARE37=null;
+ DSLMapParser.literal_return literal31 = null;
+
+ DSLMapParser.literal_return literal33 = null;
+
+ DSLMapParser.pattern_return pattern36 = null;
+
+
+ Object LEFT_CURLY32_tree=null;
+ Object RIGHT_CURLY34_tree=null;
+ Object LEFT_SQUARE35_tree=null;
+ Object RIGHT_SQUARE37_tree=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:214:9: ( ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:214:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:214:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
+ int cnt16=0;
+ loop16:
+ do {
+ int alt16=4;
+ switch ( input.LA(1) ) {
+ case RIGHT_SQUARE:
+ {
+ int LA16_2 = input.LA(2);
+
+ if ( (synpred24_DSLMap()) ) {
+ alt16=1;
+ }
+
+
+ }
+ break;
+ case LEFT_SQUARE:
+ {
+ int LA16_3 = input.LA(2);
+
+ if ( (synpred24_DSLMap()) ) {
+ alt16=1;
+ }
+ else if ( (synpred26_DSLMap()) ) {
+ alt16=3;
+ }
+
+
+ }
+ break;
+ case LEFT_CURLY:
+ {
+ alt16=2;
+ }
+ break;
+ case LITERAL:
+ case COLON:
+ {
+ alt16=1;
+ }
+ break;
+
+ }
+
+ switch (alt16) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:214:13: literal
+ {
+ pushFollow(FOLLOW_literal_in_pattern1060);
+ literal31=literal();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, literal31.getTree());
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:215:13: LEFT_CURLY literal RIGHT_CURLY
+ {
+ LEFT_CURLY32=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_pattern1074); if (state.failed) return retval;
+ if ( state.backtracking==0 ) {
+ LEFT_CURLY32_tree = (Object)adaptor.create(LEFT_CURLY32);
+ adaptor.addChild(root_0, LEFT_CURLY32_tree);
+ }
+ pushFollow(FOLLOW_literal_in_pattern1076);
+ literal33=literal();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, literal33.getTree());
+ RIGHT_CURLY34=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_pattern1078); if (state.failed) return retval;
+ if ( state.backtracking==0 ) {
+ RIGHT_CURLY34_tree = (Object)adaptor.create(RIGHT_CURLY34);
+ adaptor.addChild(root_0, RIGHT_CURLY34_tree);
+ }
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:216:13: LEFT_SQUARE pattern RIGHT_SQUARE
+ {
+ LEFT_SQUARE35=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_pattern1092); if (state.failed) return retval;
+ if ( state.backtracking==0 ) {
+ LEFT_SQUARE35_tree = (Object)adaptor.create(LEFT_SQUARE35);
+ adaptor.addChild(root_0, LEFT_SQUARE35_tree);
+ }
+ pushFollow(FOLLOW_pattern_in_pattern1094);
+ pattern36=pattern();
+
+ state._fsp--;
+ if (state.failed) return retval;
+ if ( state.backtracking==0 ) adaptor.addChild(root_0, pattern36.getTree());
+ RIGHT_SQUARE37=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_pattern1096); if (state.failed) return retval;
+ if ( state.backtracking==0 ) {
+ RIGHT_SQUARE37_tree = (Object)adaptor.create(RIGHT_SQUARE37);
+ adaptor.addChild(root_0, RIGHT_SQUARE37_tree);
+ }
+
+ }
+ break;
+
+ default :
+ if ( cnt16 >= 1 ) break loop16;
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ EarlyExitException eee =
+ new EarlyExitException(16, input);
+ throw eee;
+ }
+ cnt16++;
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "pattern"
+
+ public static class variable_reference_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "variable_reference"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:221:1: variable_reference : lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) ;
+ public final DSLMapParser.variable_reference_return variable_reference() throws RecognitionException {
+ DSLMapParser.variable_reference_return retval = new DSLMapParser.variable_reference_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token lc=null;
+ Token name=null;
+ Token rc=null;
+
+ Object lc_tree=null;
+ Object name_tree=null;
+ Object rc_tree=null;
+ RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+ RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
+
+
+ boolean hasSpaceBefore = false;
+ boolean hasSpaceAfter = false;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:226:2: (lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:226:4: lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY
+ {
+ lc=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference1131); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LEFT_CURLY.add(lc);
+
+ if ( state.backtracking==0 ) {
+
+ CommonToken back2 = (CommonToken)input.LT(-2);
+ if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true;
+
+ }
+ name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference1142); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(name);
+
+ rc=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference1146); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(rc);
+
+ if ( state.backtracking==0 ) {
+ if(((CommonToken)rc).getStopIndex() < ((CommonToken)input.LT(1)).getStartIndex() - 1) hasSpaceAfter = true;
+ }
+
+
+ // AST REWRITE
+ // elements: name, name, name, name
+ // token labels: name
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 233:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE
+ if (hasSpaceBefore && hasSpaceAfter) {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:233:49: ^( VT_VAR_REF $name)
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+
+ }
+ else // 234:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name)
+ if (hasSpaceBefore && !hasSpaceAfter) {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:234:50: ^( VT_VAR_REF $name)
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+ else // 235:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE
+ if (!hasSpaceBefore && hasSpaceAfter) {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:235:42: ^( VT_VAR_REF $name)
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
+
+ }
+ else // 236:2: -> ^( VT_VAR_REF $name)
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:236:6: ^( VT_VAR_REF $name)
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "variable_reference"
+
+ public static class variable_reference2_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "variable_reference2"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:240:1: variable_reference2 : LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) ;
+ public final DSLMapParser.variable_reference2_return variable_reference2() throws RecognitionException {
+ DSLMapParser.variable_reference2_return retval = new DSLMapParser.variable_reference2_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token name=null;
+ Token LEFT_CURLY38=null;
+ Token RIGHT_CURLY39=null;
+
+ Object name_tree=null;
+ Object LEFT_CURLY38_tree=null;
+ Object RIGHT_CURLY39_tree=null;
+ RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+ RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:241:2: ( LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:241:4: LEFT_CURLY name= LITERAL RIGHT_CURLY
+ {
+ LEFT_CURLY38=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference21224); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY38);
+
+ name=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference21228); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(name);
+
+ RIGHT_CURLY39=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference21230); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY39);
+
+
+
+ // AST REWRITE
+ // elements: name
+ // token labels: name
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 242:2: -> ^( VT_VAR_REF $name)
+ {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:242:5: ^( VT_VAR_REF $name)
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
+
+ adaptor.addChild(root_1, stream_name.nextNode());
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "variable_reference2"
+
+ public static class condition_key_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "condition_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:246:1: condition_key : {...}?value= LITERAL -> VT_CONDITION[$value] ;
+ public final DSLMapParser.condition_key_return condition_key() throws RecognitionException {
+ DSLMapParser.condition_key_return retval = new DSLMapParser.condition_key_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token value=null;
+
+ Object value_tree=null;
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:247:2: ({...}?value= LITERAL -> VT_CONDITION[$value] )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:247:4: {...}?value= LITERAL
+ {
+ if ( !((validateIdentifierKey("condition")||validateIdentifierKey("when"))) ) {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ throw new FailedPredicateException(input, "condition_key", "validateIdentifierKey(\"condition\")||validateIdentifierKey(\"when\")");
+ }
+ value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_condition_key1259); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(value);
+
+
+
+ // AST REWRITE
+ // elements:
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 248:2: -> VT_CONDITION[$value]
+ {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_CONDITION, value));
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "condition_key"
+
+ public static class consequence_key_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "consequence_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:251:1: consequence_key : {...}?value= LITERAL -> VT_CONSEQUENCE[$value] ;
+ public final DSLMapParser.consequence_key_return consequence_key() throws RecognitionException {
+ DSLMapParser.consequence_key_return retval = new DSLMapParser.consequence_key_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token value=null;
+
+ Object value_tree=null;
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:252:2: ({...}?value= LITERAL -> VT_CONSEQUENCE[$value] )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:252:4: {...}?value= LITERAL
+ {
+ if ( !((validateIdentifierKey("consequence")||validateIdentifierKey("then"))) ) {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ throw new FailedPredicateException(input, "consequence_key", "validateIdentifierKey(\"consequence\")||validateIdentifierKey(\"then\")");
+ }
+ value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_consequence_key1282); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(value);
+
+
+
+ // AST REWRITE
+ // elements:
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 253:2: -> VT_CONSEQUENCE[$value]
+ {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_CONSEQUENCE, value));
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "consequence_key"
+
+ public static class keyword_key_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "keyword_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:256:1: keyword_key : {...}?value= LITERAL -> VT_KEYWORD[$value] ;
+ public final DSLMapParser.keyword_key_return keyword_key() throws RecognitionException {
+ DSLMapParser.keyword_key_return retval = new DSLMapParser.keyword_key_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token value=null;
+
+ Object value_tree=null;
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:257:2: ({...}?value= LITERAL -> VT_KEYWORD[$value] )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:257:4: {...}?value= LITERAL
+ {
+ if ( !((validateIdentifierKey("keyword"))) ) {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ throw new FailedPredicateException(input, "keyword_key", "validateIdentifierKey(\"keyword\")");
+ }
+ value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_keyword_key1305); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(value);
+
+
+
+ // AST REWRITE
+ // elements:
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 258:2: -> VT_KEYWORD[$value]
+ {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_KEYWORD, value));
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "keyword_key"
+
+ public static class any_key_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start "any_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:261:1: any_key : {...}?value= LITERAL -> VT_ANY[$value] ;
+ public final DSLMapParser.any_key_return any_key() throws RecognitionException {
+ DSLMapParser.any_key_return retval = new DSLMapParser.any_key_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token value=null;
+
+ Object value_tree=null;
+ RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:262:2: ({...}?value= LITERAL -> VT_ANY[$value] )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:262:4: {...}?value= LITERAL
+ {
+ if ( !((validateIdentifierKey("*"))) ) {
+ if (state.backtracking>0) {state.failed=true; return retval;}
+ throw new FailedPredicateException(input, "any_key", "validateIdentifierKey(\"*\")");
+ }
+ value=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_any_key1328); if (state.failed) return retval;
+ if ( state.backtracking==0 ) stream_LITERAL.add(value);
+
+
+
+ // AST REWRITE
+ // elements:
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( state.backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 263:2: -> VT_ANY[$value]
+ {
+ adaptor.addChild(root_0, (Object)adaptor.create(VT_ANY, value));
+
+ }
+
+ retval.tree = root_0;}
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( state.backtracking==0 ) {
+
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
+
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end "any_key"
+
+ // $ANTLR start synpred4_DSLMap
+ public final void synpred4_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:24: ( meta_section )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:104:24: meta_section
+ {
+ pushFollow(FOLLOW_meta_section_in_synpred4_DSLMap352);
+ meta_section();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred4_DSLMap
+
+ // $ANTLR start synpred6_DSLMap
+ public final void synpred6_DSLMap_fragment() throws RecognitionException {
+ DSLMapParser.condition_key_return value1 = null;
+
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:117:4: (value1= condition_key )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:117:4: value1= condition_key
+ {
+ pushFollow(FOLLOW_condition_key_in_synpred6_DSLMap418);
+ value1=condition_key();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred6_DSLMap
+
+ // $ANTLR start synpred7_DSLMap
+ public final void synpred7_DSLMap_fragment() throws RecognitionException {
+ DSLMapParser.consequence_key_return value2 = null;
+
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:118:5: (value2= consequence_key )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:118:5: value2= consequence_key
+ {
+ pushFollow(FOLLOW_consequence_key_in_synpred7_DSLMap427);
+ value2=consequence_key();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred7_DSLMap
+
+ // $ANTLR start synpred8_DSLMap
+ public final void synpred8_DSLMap_fragment() throws RecognitionException {
+ DSLMapParser.keyword_key_return value3 = null;
+
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:119:5: (value3= keyword_key )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:119:5: value3= keyword_key
+ {
+ pushFollow(FOLLOW_keyword_key_in_synpred8_DSLMap435);
+ value3=keyword_key();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred8_DSLMap
+
+ // $ANTLR start synpred12_DSLMap
+ public final void synpred12_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: ( literal )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:149:4: literal
+ {
+ pushFollow(FOLLOW_literal_in_synpred12_DSLMap579);
+ literal();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred12_DSLMap
+
+ // $ANTLR start synpred15_DSLMap
+ public final void synpred15_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:5: ( literal )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:5: literal
+ {
+ pushFollow(FOLLOW_literal_in_synpred15_DSLMap654);
+ literal();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred15_DSLMap
+
+ // $ANTLR start synpred16_DSLMap
+ public final void synpred16_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:13: ( EQUALS )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:13: EQUALS
+ {
+ match(input,EQUALS,FOLLOW_EQUALS_in_synpred16_DSLMap656); if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred16_DSLMap
+
+ // $ANTLR start synpred17_DSLMap
+ public final void synpred17_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:20: ( COMMA )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:167:20: COMMA
+ {
+ match(input,COMMA,FOLLOW_COMMA_in_synpred17_DSLMap658); if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred17_DSLMap
+
+ // $ANTLR start synpred21_DSLMap
+ public final void synpred21_DSLMap_fragment() throws RecognitionException {
+ Token q=null;
+
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:186:18: ( COLON q= LITERAL )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:186:18: COLON q= LITERAL
+ {
+ match(input,COLON,FOLLOW_COLON_in_synpred21_DSLMap726); if (state.failed) return ;
+ q=(Token)match(input,LITERAL,FOLLOW_LITERAL_in_synpred21_DSLMap730); if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred21_DSLMap
+
+ // $ANTLR start synpred24_DSLMap
+ public final void synpred24_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:214:13: ( literal )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:214:13: literal
+ {
+ pushFollow(FOLLOW_literal_in_synpred24_DSLMap1060);
+ literal();
+
+ state._fsp--;
+ if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred24_DSLMap
+
+ // $ANTLR start synpred26_DSLMap
+ public final void synpred26_DSLMap_fragment() throws RecognitionException {
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:216:13: ( LEFT_SQUARE pattern RIGHT_SQUARE )
+ // src/main/resources/org/drools/lang/dsl/DSLMap.g:216:13: LEFT_SQUARE pattern RIGHT_SQUARE
+ {
+ match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred26_DSLMap1092); if (state.failed) return ;
+ pushFollow(FOLLOW_pattern_in_synpred26_DSLMap1094);
+ pattern();
+
+ state._fsp--;
+ if (state.failed) return ;
+ match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred26_DSLMap1096); if (state.failed) return ;
+
+ }
+ }
+ // $ANTLR end synpred26_DSLMap
+
+ // Delegated rules
+
+ public final boolean synpred21_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred21_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred15_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred15_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred12_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred12_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred24_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred24_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred7_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred7_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred6_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred6_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred17_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred17_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred8_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred8_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred26_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred26_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred4_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred4_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+ public final boolean synpred16_DSLMap() {
+ state.backtracking++;
+ int start = input.mark();
+ try {
+ synpred16_DSLMap_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !state.failed;
+ input.rewind(start);
+ state.backtracking--;
+ state.failed=false;
+ return success;
+ }
+
+
+
+
+ public static final BitSet FOLLOW_statement_in_mapping_file273 = new BitSet(new long[]{0x0000000001600002L});
+ public static final BitSet FOLLOW_entry_in_statement296 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_comment_in_statement303 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_EOL_in_statement309 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LINE_COMMENT_in_comment325 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_scope_section_in_entry350 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_meta_section_in_entry352 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_key_section_in_entry355 = new BitSet(new long[]{0x0000000000800000L});
+ public static final BitSet FOLLOW_EQUALS_in_entry357 = new BitSet(new long[]{0x000000003F800000L});
+ public static final BitSet FOLLOW_value_section_in_entry359 = new BitSet(new long[]{0x0000000000200000L});
+ public static final BitSet FOLLOW_EOL_in_entry362 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_EOF_in_entry364 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_scope_section410 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_condition_key_in_scope_section418 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_consequence_key_in_scope_section427 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_keyword_key_in_scope_section435 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_any_key_in_scope_section443 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_scope_section451 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_meta_section491 = new BitSet(new long[]{0x0000000006000000L});
+ public static final BitSet FOLLOW_LITERAL_in_meta_section493 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_meta_section496 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_key_sentence_in_key_section520 = new BitSet(new long[]{0x0000000037000002L});
+ public static final BitSet FOLLOW_variable_definition_in_key_sentence551 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_key_chunk_in_key_sentence558 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_key_chunk579 = new BitSet(new long[]{0x0000000037000002L});
+ public static final BitSet FOLLOW_value_sentence_in_value_section594 = new BitSet(new long[]{0x000000003F800002L});
+ public static final BitSet FOLLOW_variable_reference_in_value_sentence625 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_value_chunk_in_value_sentence632 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_value_chunk654 = new BitSet(new long[]{0x000000003F800002L});
+ public static final BitSet FOLLOW_EQUALS_in_value_chunk656 = new BitSet(new long[]{0x000000003F800002L});
+ public static final BitSet FOLLOW_COMMA_in_value_chunk658 = new BitSet(new long[]{0x000000003F800002L});
+ public static final BitSet FOLLOW_set_in_literal674 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition710 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_definition721 = new BitSet(new long[]{0x0000000050000000L});
+ public static final BitSet FOLLOW_COLON_in_variable_definition726 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_definition730 = new BitSet(new long[]{0x0000000010000000L});
+ public static final BitSet FOLLOW_COLON_in_variable_definition734 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_pattern_in_variable_definition738 = new BitSet(new long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition747 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition2990 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_definition2994 = new BitSet(new long[]{0x0000000050000000L});
+ public static final BitSet FOLLOW_COLON_in_variable_definition2998 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_pattern_in_variable_definition21002 = new BitSet(new long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition21009 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_pattern1060 = new BitSet(new long[]{0x0000000037000002L});
+ public static final BitSet FOLLOW_LEFT_CURLY_in_pattern1074 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_literal_in_pattern1076 = new BitSet(new long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_RIGHT_CURLY_in_pattern1078 = new BitSet(new long[]{0x0000000037000002L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_pattern1092 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_pattern_in_pattern1094 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_pattern1096 = new BitSet(new long[]{0x0000000037000002L});
+ public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference1131 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_reference1142 = new BitSet(new long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference1146 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference21224 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_reference21228 = new BitSet(new long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference21230 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LITERAL_in_condition_key1259 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LITERAL_in_consequence_key1282 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LITERAL_in_keyword_key1305 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LITERAL_in_any_key1328 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_meta_section_in_synpred4_DSLMap352 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_condition_key_in_synpred6_DSLMap418 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_consequence_key_in_synpred7_DSLMap427 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_keyword_key_in_synpred8_DSLMap435 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_synpred12_DSLMap579 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_synpred15_DSLMap654 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_EQUALS_in_synpred16_DSLMap656 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_COMMA_in_synpred17_DSLMap658 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_COLON_in_synpred21_DSLMap726 = new BitSet(new long[]{0x0000000004000000L});
+ public static final BitSet FOLLOW_LITERAL_in_synpred21_DSLMap730 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_synpred24_DSLMap1060 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred26_DSLMap1092 = new BitSet(new long[]{0x0000000037000000L});
+ public static final BitSet FOLLOW_pattern_in_synpred26_DSLMap1094 = new BitSet(new long[]{0x0000000002000000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred26_DSLMap1096 = new BitSet(new long[]{0x0000000000000002L});
+
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,1050 +1,1056 @@
-// $ANTLR 3.1.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g 2008-11-21 15:39:58
-
- package org.drools.lang.dsl;
-
- import java.util.Map;
- import java.util.HashMap;
-
-
-
-import org.antlr.runtime.*;
-import org.antlr.runtime.tree.*;import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-public class DSLMapWalker extends TreeParser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_DSL_GRAMMAR", "VT_COMMENT", "VT_ENTRY", "VT_SCOPE", "VT_CONDITION", "VT_CONSEQUENCE", "VT_KEYWORD", "VT_ANY", "VT_META", "VT_ENTRY_KEY", "VT_ENTRY_VAL", "VT_VAR_DEF", "VT_VAR_REF", "VT_LITERAL", "VT_PATTERN", "VT_QUAL", "VT_SPACE", "EOL", "LINE_COMMENT", "EQUALS", "LEFT_SQUARE", "RIGHT_SQUARE", "LITERAL", "COMMA", "COLON", "LEFT_CURLY", "RIGHT_CURLY", "WS", "EscapeSequence", "DOT", "POUND", "MISC"
- };
- public static final int COMMA=27;
- public static final int RIGHT_CURLY=30;
- public static final int VT_ENTRY_VAL=14;
- public static final int WS=31;
- public static final int MISC=35;
- public static final int VT_META=12;
- public static final int VT_CONSEQUENCE=9;
- public static final int VT_SPACE=20;
- public static final int LINE_COMMENT=22;
- public static final int VT_ANY=11;
- public static final int VT_LITERAL=17;
- public static final int DOT=33;
- public static final int EQUALS=23;
- public static final int VT_DSL_GRAMMAR=4;
- public static final int VT_CONDITION=8;
- public static final int VT_VAR_DEF=15;
- public static final int VT_ENTRY=6;
- public static final int VT_PATTERN=18;
- public static final int LITERAL=26;
- public static final int EscapeSequence=32;
- public static final int VT_COMMENT=5;
- public static final int EOF=-1;
- public static final int EOL=21;
- public static final int LEFT_SQUARE=24;
- public static final int VT_ENTRY_KEY=13;
- public static final int VT_SCOPE=7;
- public static final int COLON=28;
- public static final int VT_KEYWORD=10;
- public static final int VT_QUAL=19;
- public static final int VT_VAR_REF=16;
- public static final int LEFT_CURLY=29;
- public static final int POUND=34;
- public static final int RIGHT_SQUARE=25;
-
- // delegates
- // delegators
-
-
- public DSLMapWalker(TreeNodeStream input) {
- this(input, new RecognizerSharedState());
- }
- public DSLMapWalker(TreeNodeStream input, RecognizerSharedState state) {
- super(input, state);
-
- }
-
-
- public String[] getTokenNames() { return DSLMapWalker.tokenNames; }
- public String getGrammarFileName() { return "/Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g"; }
-
-
- protected static class mapping_file_scope {
- DSLMapping retval;
- }
- protected Stack mapping_file_stack = new Stack();
-
-
- // $ANTLR start "mapping_file"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:17:1: mapping_file returns [DSLMapping mapping] : ^( VT_DSL_GRAMMAR ( valid_entry )* ) ;
- public final DSLMapping mapping_file() throws RecognitionException {
- mapping_file_stack.push(new mapping_file_scope());
- DSLMapping mapping = null;
-
-
- ((mapping_file_scope)mapping_file_stack.peek()).retval = new DefaultDSLMapping() ;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:24:2: ( ^( VT_DSL_GRAMMAR ( valid_entry )* ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:24:4: ^( VT_DSL_GRAMMAR ( valid_entry )* )
- {
- match(input,VT_DSL_GRAMMAR,FOLLOW_VT_DSL_GRAMMAR_in_mapping_file54);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:24:21: ( valid_entry )*
- loop1:
- do {
- int alt1=2;
- int LA1_0 = input.LA(1);
-
- if ( ((LA1_0>=VT_COMMENT && LA1_0<=VT_ENTRY)) ) {
- alt1=1;
- }
-
-
- switch (alt1) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:24:21: valid_entry
- {
- pushFollow(FOLLOW_valid_entry_in_mapping_file56);
- valid_entry();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop1;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
- }
-
- mapping = ((mapping_file_scope)mapping_file_stack.peek()).retval;
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- mapping_file_stack.pop();
- }
- return mapping;
- }
- // $ANTLR end "mapping_file"
-
-
- // $ANTLR start "valid_entry"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:30:1: valid_entry returns [DSLMappingEntry mappingEntry] : (ent= entry | ^( VT_COMMENT lc= LINE_COMMENT ) );
- public final DSLMappingEntry valid_entry() throws RecognitionException {
- DSLMappingEntry mappingEntry = null;
-
- CommonTree lc=null;
- DSLMappingEntry ent = null;
-
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:31:2: (ent= entry | ^( VT_COMMENT lc= LINE_COMMENT ) )
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0==VT_ENTRY) ) {
- alt2=1;
- }
- else if ( (LA2_0==VT_COMMENT) ) {
- alt2=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 2, 0, input);
-
- throw nvae;
- }
- switch (alt2) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:31:4: ent= entry
- {
- pushFollow(FOLLOW_entry_in_valid_entry78);
- ent=entry();
-
- state._fsp--;
-
- mappingEntry = ent;
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:32:4: ^( VT_COMMENT lc= LINE_COMMENT )
- {
- match(input,VT_COMMENT,FOLLOW_VT_COMMENT_in_valid_entry86);
-
- match(input, Token.DOWN, null);
- lc=(CommonTree)match(input,LINE_COMMENT,FOLLOW_LINE_COMMENT_in_valid_entry90);
-
- match(input, Token.UP, null);
- mappingEntry = null;
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return mappingEntry;
- }
- // $ANTLR end "valid_entry"
-
- protected static class entry_scope {
- Map variables;
- AntlrDSLMappingEntry retval;
- int counter;
- StringBuffer keybuffer;
- StringBuffer valuebuffer;
- StringBuffer sentencebuffer;
- }
- protected Stack entry_stack = new Stack();
-
-
- // $ANTLR start "entry"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:36:1: entry returns [DSLMappingEntry mappingEntry] : ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) ;
- public final DSLMappingEntry entry() throws RecognitionException {
- entry_stack.push(new entry_scope());
- DSLMappingEntry mappingEntry = null;
-
-
- ((entry_scope)entry_stack.peek()).retval = new AntlrDSLMappingEntry() ;
- ((entry_scope)entry_stack.peek()).variables = new HashMap();
- ((entry_scope)entry_stack.peek()).keybuffer = new StringBuffer();
- ((entry_scope)entry_stack.peek()).valuebuffer = new StringBuffer();
- ((entry_scope)entry_stack.peek()).sentencebuffer = new StringBuffer();
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:2: ( ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:4: ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
- {
- match(input,VT_ENTRY,FOLLOW_VT_ENTRY_in_entry119);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_scope_section_in_entry121);
- scope_section();
-
- state._fsp--;
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:29: ( meta_section )?
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0==VT_META) ) {
- alt3=1;
- }
- switch (alt3) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:29: meta_section
- {
- pushFollow(FOLLOW_meta_section_in_entry123);
- meta_section();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_key_section_in_entry126);
- key_section();
-
- state._fsp--;
-
- ((entry_scope)entry_stack.peek()).retval.variables = ((entry_scope)entry_stack.peek()).variables; ((entry_scope)entry_stack.peek()).retval.setMappingKey(((entry_scope)entry_stack.peek()).keybuffer.toString());((entry_scope)entry_stack.peek()).retval.setSentence(((entry_scope)entry_stack.peek()).sentencebuffer.toString());
- pushFollow(FOLLOW_value_section_in_entry132);
- value_section();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- ((entry_scope)entry_stack.peek()).retval.setMappingValue(((entry_scope)entry_stack.peek()).valuebuffer.toString());
- mappingEntry = ((entry_scope)entry_stack.peek()).retval;
- ((mapping_file_scope)mapping_file_stack.peek()).retval.addEntry(mappingEntry);
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- entry_stack.pop();
- }
- return mappingEntry;
- }
- // $ANTLR end "entry"
-
-
- // $ANTLR start "scope_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:62:1: scope_section : ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) ;
- public final void scope_section() throws RecognitionException {
- CommonTree thescope=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:2: ( ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:4: ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? )
- {
- thescope=(CommonTree)match(input,VT_SCOPE,FOLLOW_VT_SCOPE_in_scope_section152);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:24: ( condition_key )?
- int alt4=2;
- int LA4_0 = input.LA(1);
-
- if ( (LA4_0==VT_CONDITION) ) {
- alt4=1;
- }
- switch (alt4) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:24: condition_key
- {
- pushFollow(FOLLOW_condition_key_in_scope_section154);
- condition_key();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:39: ( consequence_key )?
- int alt5=2;
- int LA5_0 = input.LA(1);
-
- if ( (LA5_0==VT_CONSEQUENCE) ) {
- alt5=1;
- }
- switch (alt5) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:39: consequence_key
- {
- pushFollow(FOLLOW_consequence_key_in_scope_section157);
- consequence_key();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:56: ( keyword_key )?
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( (LA6_0==VT_KEYWORD) ) {
- alt6=1;
- }
- switch (alt6) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:56: keyword_key
- {
- pushFollow(FOLLOW_keyword_key_in_scope_section160);
- keyword_key();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:69: ( any_key )?
- int alt7=2;
- int LA7_0 = input.LA(1);
-
- if ( (LA7_0==VT_ANY) ) {
- alt7=1;
- }
- switch (alt7) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:63:69: any_key
- {
- pushFollow(FOLLOW_any_key_in_scope_section163);
- any_key();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
- }
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "scope_section"
-
-
- // $ANTLR start "meta_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:1: meta_section : ^( VT_META (metalit= LITERAL )? ) ;
- public final void meta_section() throws RecognitionException {
- CommonTree metalit=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:69:2: ( ^( VT_META (metalit= LITERAL )? ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:69:4: ^( VT_META (metalit= LITERAL )? )
- {
- match(input,VT_META,FOLLOW_VT_META_in_meta_section180);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:69:21: (metalit= LITERAL )?
- int alt8=2;
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0==LITERAL) ) {
- alt8=1;
- }
- switch (alt8) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:69:21: metalit= LITERAL
- {
- metalit=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_meta_section184);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
- }
-
- if ( metalit == null || (metalit!=null?metalit.getText():null) == null || (metalit!=null?metalit.getText():null).length() == 0 ) {
- ((entry_scope)entry_stack.peek()).retval.setMetaData(DSLMappingEntry.EMPTY_METADATA);
- } else {
- ((entry_scope)entry_stack.peek()).retval.setMetaData(new DSLMappingEntry.DefaultDSLEntryMetaData( (metalit!=null?metalit.getText():null) ));
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "meta_section"
-
-
- // $ANTLR start "key_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:79:1: key_section : ^( VT_ENTRY_KEY ( key_sentence )+ ) ;
- public final void key_section() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:80:2: ( ^( VT_ENTRY_KEY ( key_sentence )+ ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:80:4: ^( VT_ENTRY_KEY ( key_sentence )+ )
- {
- match(input,VT_ENTRY_KEY,FOLLOW_VT_ENTRY_KEY_in_key_section201);
-
- match(input, Token.DOWN, null);
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:80:19: ( key_sentence )+
- int cnt9=0;
- loop9:
- do {
- int alt9=2;
- int LA9_0 = input.LA(1);
-
- if ( (LA9_0==VT_VAR_DEF||LA9_0==VT_LITERAL||LA9_0==VT_SPACE) ) {
- alt9=1;
- }
-
-
- switch (alt9) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:80:19: key_sentence
- {
- pushFollow(FOLLOW_key_sentence_in_key_section203);
- key_sentence();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt9 >= 1 ) break loop9;
- EarlyExitException eee =
- new EarlyExitException(9, input);
- throw eee;
- }
- cnt9++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "key_section"
-
-
- // $ANTLR start "key_sentence"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:83:1: key_sentence : ( variable_definition | vtl= VT_LITERAL | VT_SPACE );
- public final void key_sentence() throws RecognitionException {
- CommonTree vtl=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:84:2: ( variable_definition | vtl= VT_LITERAL | VT_SPACE )
- int alt10=3;
- switch ( input.LA(1) ) {
- case VT_VAR_DEF:
- {
- alt10=1;
- }
- break;
- case VT_LITERAL:
- {
- alt10=2;
- }
- break;
- case VT_SPACE:
- {
- alt10=3;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 10, 0, input);
-
- throw nvae;
- }
-
- switch (alt10) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:84:4: variable_definition
- {
- pushFollow(FOLLOW_variable_definition_in_key_sentence218);
- variable_definition();
-
- state._fsp--;
-
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:85:4: vtl= VT_LITERAL
- {
- vtl=(CommonTree)match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_key_sentence225);
-
- ((entry_scope)entry_stack.peek()).keybuffer.append((vtl!=null?vtl.getText():null));
- ((entry_scope)entry_stack.peek()).sentencebuffer.append((vtl!=null?vtl.getText():null));
-
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:90:4: VT_SPACE
- {
- match(input,VT_SPACE,FOLLOW_VT_SPACE_in_key_sentence234);
-
- ((entry_scope)entry_stack.peek()).keybuffer.append("\\s+");
- ((entry_scope)entry_stack.peek()).sentencebuffer.append(" ");
-
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "key_sentence"
-
-
- // $ANTLR start "value_section"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:97:1: value_section : ^( VT_ENTRY_VAL ( value_sentence )+ ) ;
- public final void value_section() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:101:2: ( ^( VT_ENTRY_VAL ( value_sentence )+ ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:101:4: ^( VT_ENTRY_VAL ( value_sentence )+ )
- {
- match(input,VT_ENTRY_VAL,FOLLOW_VT_ENTRY_VAL_in_value_section255);
-
- match(input, Token.DOWN, null);
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:101:19: ( value_sentence )+
- int cnt11=0;
- loop11:
- do {
- int alt11=2;
- int LA11_0 = input.LA(1);
-
- if ( ((LA11_0>=VT_VAR_REF && LA11_0<=VT_LITERAL)||LA11_0==VT_SPACE) ) {
- alt11=1;
- }
-
-
- switch (alt11) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:101:19: value_sentence
- {
- pushFollow(FOLLOW_value_sentence_in_value_section257);
- value_sentence();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt11 >= 1 ) break loop11;
- EarlyExitException eee =
- new EarlyExitException(11, input);
- throw eee;
- }
- cnt11++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
-
- ((entry_scope)entry_stack.peek()).valuebuffer.append(" ");
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "value_section"
-
-
- // $ANTLR start "value_sentence"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:104:1: value_sentence : ( variable_reference | vtl= VT_LITERAL | VT_SPACE );
- public final void value_sentence() throws RecognitionException {
- CommonTree vtl=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:105:2: ( variable_reference | vtl= VT_LITERAL | VT_SPACE )
- int alt12=3;
- switch ( input.LA(1) ) {
- case VT_VAR_REF:
- {
- alt12=1;
- }
- break;
- case VT_LITERAL:
- {
- alt12=2;
- }
- break;
- case VT_SPACE:
- {
- alt12=3;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 12, 0, input);
-
- throw nvae;
- }
-
- switch (alt12) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:105:4: variable_reference
- {
- pushFollow(FOLLOW_variable_reference_in_value_sentence274);
- variable_reference();
-
- state._fsp--;
-
-
- }
- break;
- case 2 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:106:4: vtl= VT_LITERAL
- {
- vtl=(CommonTree)match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_value_sentence281);
-
- ((entry_scope)entry_stack.peek()).valuebuffer.append((vtl!=null?vtl.getText():null).replaceAll("\\$", "\\\\\\$"));
-
-
- }
- break;
- case 3 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:110:4: VT_SPACE
- {
- match(input,VT_SPACE,FOLLOW_VT_SPACE_in_value_sentence289);
-
- ((entry_scope)entry_stack.peek()).valuebuffer.append(" ");
-
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "value_sentence"
-
-
- // $ANTLR start "literal"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:116:1: literal : theliteral= VT_LITERAL ;
- public final void literal() throws RecognitionException {
- CommonTree theliteral=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:117:2: (theliteral= VT_LITERAL )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:117:4: theliteral= VT_LITERAL
- {
- theliteral=(CommonTree)match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_literal307);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "literal"
-
-
- // $ANTLR start "variable_definition"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:120:1: variable_definition : ^( VT_VAR_DEF varname= LITERAL ^( VT_QUAL (q= LITERAL )? ) (pattern= VT_PATTERN )? ) ;
- public final void variable_definition() throws RecognitionException {
- CommonTree varname=null;
- CommonTree q=null;
- CommonTree pattern=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:121:2: ( ^( VT_VAR_DEF varname= LITERAL ^( VT_QUAL (q= LITERAL )? ) (pattern= VT_PATTERN )? ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:121:6: ^( VT_VAR_DEF varname= LITERAL ^( VT_QUAL (q= LITERAL )? ) (pattern= VT_PATTERN )? )
- {
- match(input,VT_VAR_DEF,FOLLOW_VT_VAR_DEF_in_variable_definition323);
-
- match(input, Token.DOWN, null);
- varname=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition327);
- match(input,VT_QUAL,FOLLOW_VT_QUAL_in_variable_definition331);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:121:47: (q= LITERAL )?
- int alt13=2;
- int LA13_0 = input.LA(1);
-
- if ( (LA13_0==LITERAL) ) {
- alt13=1;
- }
- switch (alt13) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:121:47: q= LITERAL
- {
- q=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition335);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
- }
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:121:65: (pattern= VT_PATTERN )?
- int alt14=2;
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0==VT_PATTERN) ) {
- alt14=1;
- }
- switch (alt14) {
- case 1 :
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:121:65: pattern= VT_PATTERN
- {
- pattern=(CommonTree)match(input,VT_PATTERN,FOLLOW_VT_PATTERN_in_variable_definition341);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- ((entry_scope)entry_stack.peek()).counter++;
- ((entry_scope)entry_stack.peek()).variables.put((varname!=null?varname.getText():null), new Integer(((entry_scope)entry_stack.peek()).counter));
-
- if(q!=null && pattern!=null){
- ((entry_scope)entry_stack.peek()).sentencebuffer.append("{"+(varname!=null?varname.getText():null)+":"+(q!=null?q.getText():null)+":"+(pattern!=null?pattern.getText():null)+"}");
- }else if(q==null && pattern!=null){
- ((entry_scope)entry_stack.peek()).sentencebuffer.append("{"+(varname!=null?varname.getText():null)+":"+(pattern!=null?pattern.getText():null)+"}");
- }else{
- ((entry_scope)entry_stack.peek()).sentencebuffer.append("{"+(varname!=null?varname.getText():null)+"}");
- }
-
- if(q == null || (!q.getText().equals("ENUM") && !q.getText().equals("DATE") && !q.getText().equals("BOOLEAN"))){
- ((entry_scope)entry_stack.peek()).keybuffer.append(pattern != null? "(" + (pattern!=null?pattern.getText():null) + ")" : "(.*?)");
- }else{
- ((entry_scope)entry_stack.peek()).keybuffer.append("(.*?)");
-
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "variable_definition"
-
-
- // $ANTLR start "variable_reference"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:144:1: variable_reference : ^(varref= VT_VAR_REF lit= LITERAL ) ;
- public final void variable_reference() throws RecognitionException {
- CommonTree varref=null;
- CommonTree lit=null;
-
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:145:2: ( ^(varref= VT_VAR_REF lit= LITERAL ) )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:145:4: ^(varref= VT_VAR_REF lit= LITERAL )
- {
- varref=(CommonTree)match(input,VT_VAR_REF,FOLLOW_VT_VAR_REF_in_variable_reference363);
-
- match(input, Token.DOWN, null);
- lit=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference367);
-
- match(input, Token.UP, null);
-
- ((entry_scope)entry_stack.peek()).valuebuffer.append("$" + ((entry_scope)entry_stack.peek()).variables.get((lit!=null?lit.getText():null)));
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "variable_reference"
-
-
- // $ANTLR start "condition_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:151:1: condition_key : VT_CONDITION ;
- public final void condition_key() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:152:2: ( VT_CONDITION )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:152:4: VT_CONDITION
- {
- match(input,VT_CONDITION,FOLLOW_VT_CONDITION_in_condition_key385);
- ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.CONDITION);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "condition_key"
-
-
- // $ANTLR start "consequence_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:156:1: consequence_key : VT_CONSEQUENCE ;
- public final void consequence_key() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:157:2: ( VT_CONSEQUENCE )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:157:4: VT_CONSEQUENCE
- {
- match(input,VT_CONSEQUENCE,FOLLOW_VT_CONSEQUENCE_in_consequence_key400);
- ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.CONSEQUENCE);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "consequence_key"
-
-
- // $ANTLR start "keyword_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:161:1: keyword_key : VT_KEYWORD ;
- public final void keyword_key() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:162:2: ( VT_KEYWORD )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:162:4: VT_KEYWORD
- {
- match(input,VT_KEYWORD,FOLLOW_VT_KEYWORD_in_keyword_key415);
- ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.KEYWORD);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "keyword_key"
-
-
- // $ANTLR start "any_key"
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:166:1: any_key : VT_ANY ;
- public final void any_key() throws RecognitionException {
- try {
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:167:2: ( VT_ANY )
- // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:167:4: VT_ANY
- {
- match(input,VT_ANY,FOLLOW_VT_ANY_in_any_key430);
- ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.ANY);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "any_key"
-
- // Delegated rules
-
-
-
-
- public static final BitSet FOLLOW_VT_DSL_GRAMMAR_in_mapping_file54 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_valid_entry_in_mapping_file56 = new BitSet(new long[]{0x0000000000000068L});
- public static final BitSet FOLLOW_entry_in_valid_entry78 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_COMMENT_in_valid_entry86 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_LINE_COMMENT_in_valid_entry90 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_ENTRY_in_entry119 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_scope_section_in_entry121 = new BitSet(new long[]{0x0000000000003000L});
- public static final BitSet FOLLOW_meta_section_in_entry123 = new BitSet(new long[]{0x0000000000003000L});
- public static final BitSet FOLLOW_key_section_in_entry126 = new BitSet(new long[]{0x0000000000004000L});
- public static final BitSet FOLLOW_value_section_in_entry132 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_SCOPE_in_scope_section152 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_condition_key_in_scope_section154 = new BitSet(new long[]{0x0000000000000E08L});
- public static final BitSet FOLLOW_consequence_key_in_scope_section157 = new BitSet(new long[]{0x0000000000000C08L});
- public static final BitSet FOLLOW_keyword_key_in_scope_section160 = new BitSet(new long[]{0x0000000000000808L});
- public static final BitSet FOLLOW_any_key_in_scope_section163 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_META_in_meta_section180 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_LITERAL_in_meta_section184 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_ENTRY_KEY_in_key_section201 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_key_sentence_in_key_section203 = new BitSet(new long[]{0x0000000000128008L});
- public static final BitSet FOLLOW_variable_definition_in_key_sentence218 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_LITERAL_in_key_sentence225 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_SPACE_in_key_sentence234 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_ENTRY_VAL_in_value_section255 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_value_sentence_in_value_section257 = new BitSet(new long[]{0x0000000000130008L});
- public static final BitSet FOLLOW_variable_reference_in_value_sentence274 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_LITERAL_in_value_sentence281 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_SPACE_in_value_sentence289 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_LITERAL_in_literal307 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_VAR_DEF_in_variable_definition323 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_LITERAL_in_variable_definition327 = new BitSet(new long[]{0x0000000000080000L});
- public static final BitSet FOLLOW_VT_QUAL_in_variable_definition331 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_LITERAL_in_variable_definition335 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_PATTERN_in_variable_definition341 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_VAR_REF_in_variable_reference363 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_LITERAL_in_variable_reference367 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_CONDITION_in_condition_key385 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_CONSEQUENCE_in_consequence_key400 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_KEYWORD_in_keyword_key415 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_ANY_in_any_key430 = new BitSet(new long[]{0x0000000000000002L});
-
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/dsl/DSLMapWalker.g 2009-02-11 15:20:25
+
+ package org.drools.lang.dsl;
+
+ import java.util.Map;
+ import java.util.HashMap;
+
+
+import org.antlr.runtime.*;
+import org.antlr.runtime.tree.*;import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class DSLMapWalker extends TreeParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_DSL_GRAMMAR", "VT_COMMENT", "VT_ENTRY", "VT_SCOPE", "VT_CONDITION", "VT_CONSEQUENCE", "VT_KEYWORD", "VT_ANY", "VT_META", "VT_ENTRY_KEY", "VT_ENTRY_VAL", "VT_VAR_DEF", "VT_VAR_REF", "VT_LITERAL", "VT_PATTERN", "VT_QUAL", "VT_SPACE", "EOL", "LINE_COMMENT", "EQUALS", "LEFT_SQUARE", "RIGHT_SQUARE", "LITERAL", "COMMA", "COLON", "LEFT_CURLY", "RIGHT_CURLY", "WS", "EscapeSequence", "DOT", "POUND", "MISC"
+ };
+ public static final int COMMA=27;
+ public static final int RIGHT_CURLY=30;
+ public static final int VT_ENTRY_VAL=14;
+ public static final int WS=31;
+ public static final int MISC=35;
+ public static final int VT_META=12;
+ public static final int VT_CONSEQUENCE=9;
+ public static final int VT_SPACE=20;
+ public static final int LINE_COMMENT=22;
+ public static final int VT_ANY=11;
+ public static final int VT_LITERAL=17;
+ public static final int DOT=33;
+ public static final int EQUALS=23;
+ public static final int VT_DSL_GRAMMAR=4;
+ public static final int VT_CONDITION=8;
+ public static final int VT_VAR_DEF=15;
+ public static final int VT_ENTRY=6;
+ public static final int VT_PATTERN=18;
+ public static final int LITERAL=26;
+ public static final int EscapeSequence=32;
+ public static final int VT_COMMENT=5;
+ public static final int EOF=-1;
+ public static final int EOL=21;
+ public static final int LEFT_SQUARE=24;
+ public static final int VT_ENTRY_KEY=13;
+ public static final int VT_SCOPE=7;
+ public static final int COLON=28;
+ public static final int VT_KEYWORD=10;
+ public static final int VT_QUAL=19;
+ public static final int VT_VAR_REF=16;
+ public static final int LEFT_CURLY=29;
+ public static final int POUND=34;
+ public static final int RIGHT_SQUARE=25;
+
+ // delegates
+ // delegators
+
+
+ public DSLMapWalker(TreeNodeStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public DSLMapWalker(TreeNodeStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return DSLMapWalker.tokenNames; }
+ public String getGrammarFileName() { return "src/main/resources/org/drools/lang/dsl/DSLMapWalker.g"; }
+
+
+ protected static class mapping_file_scope {
+ DSLMapping retval;
+ }
+ protected Stack mapping_file_stack = new Stack();
+
+
+ // $ANTLR start "mapping_file"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:16:1: mapping_file returns [DSLMapping mapping] : ^( VT_DSL_GRAMMAR ( valid_entry )* ) ;
+ public final DSLMapping mapping_file() throws RecognitionException {
+ mapping_file_stack.push(new mapping_file_scope());
+ DSLMapping mapping = null;
+
+
+ ((mapping_file_scope)mapping_file_stack.peek()).retval = new DefaultDSLMapping() ;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:23:2: ( ^( VT_DSL_GRAMMAR ( valid_entry )* ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:23:4: ^( VT_DSL_GRAMMAR ( valid_entry )* )
+ {
+ match(input,VT_DSL_GRAMMAR,FOLLOW_VT_DSL_GRAMMAR_in_mapping_file54);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:23:21: ( valid_entry )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>=VT_COMMENT && LA1_0<=VT_ENTRY)) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:23:21: valid_entry
+ {
+ pushFollow(FOLLOW_valid_entry_in_mapping_file56);
+ valid_entry();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+ }
+
+ mapping = ((mapping_file_scope)mapping_file_stack.peek()).retval;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ mapping_file_stack.pop();
+ }
+ return mapping;
+ }
+ // $ANTLR end "mapping_file"
+
+
+ // $ANTLR start "valid_entry"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:29:1: valid_entry returns [DSLMappingEntry mappingEntry] : (ent= entry | ^( VT_COMMENT lc= LINE_COMMENT ) );
+ public final DSLMappingEntry valid_entry() throws RecognitionException {
+ DSLMappingEntry mappingEntry = null;
+
+ CommonTree lc=null;
+ DSLMappingEntry ent = null;
+
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:30:2: (ent= entry | ^( VT_COMMENT lc= LINE_COMMENT ) )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==VT_ENTRY) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==VT_COMMENT) ) {
+ alt2=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:30:4: ent= entry
+ {
+ pushFollow(FOLLOW_entry_in_valid_entry78);
+ ent=entry();
+
+ state._fsp--;
+
+ mappingEntry = ent;
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:31:4: ^( VT_COMMENT lc= LINE_COMMENT )
+ {
+ match(input,VT_COMMENT,FOLLOW_VT_COMMENT_in_valid_entry86);
+
+ match(input, Token.DOWN, null);
+ lc=(CommonTree)match(input,LINE_COMMENT,FOLLOW_LINE_COMMENT_in_valid_entry90);
+
+ match(input, Token.UP, null);
+ mappingEntry = null;
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return mappingEntry;
+ }
+ // $ANTLR end "valid_entry"
+
+ protected static class entry_scope {
+ Map<String,Integer> variables;
+ AntlrDSLMappingEntry retval;
+ StringBuffer keybuffer;
+ StringBuffer valuebuffer;
+ StringBuffer sentenceKeyBuffer;
+ StringBuffer sentenceValueBuffer;
+ }
+ protected Stack entry_stack = new Stack();
+
+
+ // $ANTLR start "entry"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:35:1: entry returns [DSLMappingEntry mappingEntry] : ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) ;
+ public final DSLMappingEntry entry() throws RecognitionException {
+ entry_stack.push(new entry_scope());
+ DSLMappingEntry mappingEntry = null;
+
+
+ ((entry_scope)entry_stack.peek()).retval = new AntlrDSLMappingEntry() ;
+ ((entry_scope)entry_stack.peek()).variables = new HashMap<String,Integer>();
+ ((entry_scope)entry_stack.peek()).keybuffer = new StringBuffer();
+ ((entry_scope)entry_stack.peek()).valuebuffer = new StringBuffer();
+ ((entry_scope)entry_stack.peek()).sentenceKeyBuffer = new StringBuffer();
+ ((entry_scope)entry_stack.peek()).sentenceValueBuffer = new StringBuffer();
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:2: ( ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:4: ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
+ {
+ match(input,VT_ENTRY,FOLLOW_VT_ENTRY_in_entry119);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_scope_section_in_entry121);
+ scope_section();
+
+ state._fsp--;
+
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:29: ( meta_section )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==VT_META) ) {
+ alt3=1;
+ }
+ switch (alt3) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:52:29: meta_section
+ {
+ pushFollow(FOLLOW_meta_section_in_entry123);
+ meta_section();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_key_section_in_entry126);
+ key_section();
+
+ state._fsp--;
+
+ ((entry_scope)entry_stack.peek()).retval.setVariables( ((entry_scope)entry_stack.peek()).variables );
+ ((entry_scope)entry_stack.peek()).retval.setMappingKey(((entry_scope)entry_stack.peek()).sentenceKeyBuffer.toString());
+ ((entry_scope)entry_stack.peek()).retval.setKeyPattern(((entry_scope)entry_stack.peek()).keybuffer.toString());
+
+ pushFollow(FOLLOW_value_section_in_entry142);
+ value_section();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ ((entry_scope)entry_stack.peek()).retval.setMappingValue(((entry_scope)entry_stack.peek()).sentenceValueBuffer.toString());
+ ((entry_scope)entry_stack.peek()).retval.setValuePattern(((entry_scope)entry_stack.peek()).valuebuffer.toString());
+ mappingEntry = ((entry_scope)entry_stack.peek()).retval;
+ ((mapping_file_scope)mapping_file_stack.peek()).retval.addEntry(mappingEntry);
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ entry_stack.pop();
+ }
+ return mappingEntry;
+ }
+ // $ANTLR end "entry"
+
+
+ // $ANTLR start "scope_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:67:1: scope_section : ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) ;
+ public final void scope_section() throws RecognitionException {
+ CommonTree thescope=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:2: ( ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:4: ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? )
+ {
+ thescope=(CommonTree)match(input,VT_SCOPE,FOLLOW_VT_SCOPE_in_scope_section162);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:24: ( condition_key )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==VT_CONDITION) ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:24: condition_key
+ {
+ pushFollow(FOLLOW_condition_key_in_scope_section164);
+ condition_key();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:39: ( consequence_key )?
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==VT_CONSEQUENCE) ) {
+ alt5=1;
+ }
+ switch (alt5) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:39: consequence_key
+ {
+ pushFollow(FOLLOW_consequence_key_in_scope_section167);
+ consequence_key();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:56: ( keyword_key )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==VT_KEYWORD) ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:56: keyword_key
+ {
+ pushFollow(FOLLOW_keyword_key_in_scope_section170);
+ keyword_key();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:69: ( any_key )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==VT_ANY) ) {
+ alt7=1;
+ }
+ switch (alt7) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:68:69: any_key
+ {
+ pushFollow(FOLLOW_any_key_in_scope_section173);
+ any_key();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "scope_section"
+
+
+ // $ANTLR start "meta_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:73:1: meta_section : ^( VT_META (metalit= LITERAL )? ) ;
+ public final void meta_section() throws RecognitionException {
+ CommonTree metalit=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:74:2: ( ^( VT_META (metalit= LITERAL )? ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:74:4: ^( VT_META (metalit= LITERAL )? )
+ {
+ match(input,VT_META,FOLLOW_VT_META_in_meta_section190);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:74:21: (metalit= LITERAL )?
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==LITERAL) ) {
+ alt8=1;
+ }
+ switch (alt8) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:74:21: metalit= LITERAL
+ {
+ metalit=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_meta_section194);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+ }
+
+ if ( metalit == null || (metalit!=null?metalit.getText():null) == null || (metalit!=null?metalit.getText():null).length() == 0 ) {
+ ((entry_scope)entry_stack.peek()).retval.setMetaData(DSLMappingEntry.EMPTY_METADATA);
+ } else {
+ ((entry_scope)entry_stack.peek()).retval.setMetaData(new DSLMappingEntry.DefaultDSLEntryMetaData( (metalit!=null?metalit.getText():null) ));
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "meta_section"
+
+
+ // $ANTLR start "key_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:84:1: key_section : ^( VT_ENTRY_KEY ( key_sentence )+ ) ;
+ public final void key_section() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:85:2: ( ^( VT_ENTRY_KEY ( key_sentence )+ ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:85:4: ^( VT_ENTRY_KEY ( key_sentence )+ )
+ {
+ match(input,VT_ENTRY_KEY,FOLLOW_VT_ENTRY_KEY_in_key_section211);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:85:19: ( key_sentence )+
+ int cnt9=0;
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==VT_VAR_DEF||LA9_0==VT_LITERAL||LA9_0==VT_SPACE) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:85:19: key_sentence
+ {
+ pushFollow(FOLLOW_key_sentence_in_key_section213);
+ key_sentence();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt9 >= 1 ) break loop9;
+ EarlyExitException eee =
+ new EarlyExitException(9, input);
+ throw eee;
+ }
+ cnt9++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "key_section"
+
+
+ // $ANTLR start "key_sentence"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:88:1: key_sentence : ( variable_definition | vtl= VT_LITERAL | VT_SPACE );
+ public final void key_sentence() throws RecognitionException {
+ CommonTree vtl=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:89:2: ( variable_definition | vtl= VT_LITERAL | VT_SPACE )
+ int alt10=3;
+ switch ( input.LA(1) ) {
+ case VT_VAR_DEF:
+ {
+ alt10=1;
+ }
+ break;
+ case VT_LITERAL:
+ {
+ alt10=2;
+ }
+ break;
+ case VT_SPACE:
+ {
+ alt10=3;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 10, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt10) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:89:4: variable_definition
+ {
+ pushFollow(FOLLOW_variable_definition_in_key_sentence228);
+ variable_definition();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:90:4: vtl= VT_LITERAL
+ {
+ vtl=(CommonTree)match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_key_sentence235);
+
+ ((entry_scope)entry_stack.peek()).keybuffer.append((vtl!=null?vtl.getText():null));
+ ((entry_scope)entry_stack.peek()).sentenceKeyBuffer.append((vtl!=null?vtl.getText():null));
+
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:95:4: VT_SPACE
+ {
+ match(input,VT_SPACE,FOLLOW_VT_SPACE_in_key_sentence244);
+
+ ((entry_scope)entry_stack.peek()).keybuffer.append("\\s+");
+ ((entry_scope)entry_stack.peek()).sentenceKeyBuffer.append(" ");
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "key_sentence"
+
+
+ // $ANTLR start "value_section"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:102:1: value_section : ^( VT_ENTRY_VAL ( value_sentence )+ ) ;
+ public final void value_section() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:106:2: ( ^( VT_ENTRY_VAL ( value_sentence )+ ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:106:4: ^( VT_ENTRY_VAL ( value_sentence )+ )
+ {
+ match(input,VT_ENTRY_VAL,FOLLOW_VT_ENTRY_VAL_in_value_section265);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:106:19: ( value_sentence )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>=VT_VAR_REF && LA11_0<=VT_LITERAL)||LA11_0==VT_SPACE) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:106:19: value_sentence
+ {
+ pushFollow(FOLLOW_value_sentence_in_value_section267);
+ value_sentence();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+
+ ((entry_scope)entry_stack.peek()).valuebuffer.append(" ");
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "value_section"
+
+
+ // $ANTLR start "value_sentence"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:109:1: value_sentence : ( variable_reference | vtl= VT_LITERAL | VT_SPACE );
+ public final void value_sentence() throws RecognitionException {
+ CommonTree vtl=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:110:2: ( variable_reference | vtl= VT_LITERAL | VT_SPACE )
+ int alt12=3;
+ switch ( input.LA(1) ) {
+ case VT_VAR_REF:
+ {
+ alt12=1;
+ }
+ break;
+ case VT_LITERAL:
+ {
+ alt12=2;
+ }
+ break;
+ case VT_SPACE:
+ {
+ alt12=3;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 12, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt12) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:110:4: variable_reference
+ {
+ pushFollow(FOLLOW_variable_reference_in_value_sentence284);
+ variable_reference();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:111:4: vtl= VT_LITERAL
+ {
+ vtl=(CommonTree)match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_value_sentence291);
+
+ ((entry_scope)entry_stack.peek()).valuebuffer.append((vtl!=null?vtl.getText():null).replaceAll("\\$", "\\\\\\$"));
+ ((entry_scope)entry_stack.peek()).sentenceValueBuffer.append((vtl!=null?vtl.getText():null));
+
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:116:4: VT_SPACE
+ {
+ match(input,VT_SPACE,FOLLOW_VT_SPACE_in_value_sentence299);
+
+ ((entry_scope)entry_stack.peek()).valuebuffer.append(" ");
+ ((entry_scope)entry_stack.peek()).sentenceValueBuffer.append(" ");
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "value_sentence"
+
+
+ // $ANTLR start "literal"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:123:1: literal : theliteral= VT_LITERAL ;
+ public final void literal() throws RecognitionException {
+ CommonTree theliteral=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:124:2: (theliteral= VT_LITERAL )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:124:4: theliteral= VT_LITERAL
+ {
+ theliteral=(CommonTree)match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_literal317);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "literal"
+
+
+ // $ANTLR start "variable_definition"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:127:1: variable_definition : ^( VT_VAR_DEF varname= LITERAL ^( VT_QUAL (q= LITERAL )? ) (pattern= VT_PATTERN )? ) ;
+ public final void variable_definition() throws RecognitionException {
+ CommonTree varname=null;
+ CommonTree q=null;
+ CommonTree pattern=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:128:2: ( ^( VT_VAR_DEF varname= LITERAL ^( VT_QUAL (q= LITERAL )? ) (pattern= VT_PATTERN )? ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:128:6: ^( VT_VAR_DEF varname= LITERAL ^( VT_QUAL (q= LITERAL )? ) (pattern= VT_PATTERN )? )
+ {
+ match(input,VT_VAR_DEF,FOLLOW_VT_VAR_DEF_in_variable_definition333);
+
+ match(input, Token.DOWN, null);
+ varname=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition337);
+ match(input,VT_QUAL,FOLLOW_VT_QUAL_in_variable_definition341);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:128:47: (q= LITERAL )?
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( (LA13_0==LITERAL) ) {
+ alt13=1;
+ }
+ switch (alt13) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:128:47: q= LITERAL
+ {
+ q=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition345);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+ }
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:128:65: (pattern= VT_PATTERN )?
+ int alt14=2;
+ int LA14_0 = input.LA(1);
+
+ if ( (LA14_0==VT_PATTERN) ) {
+ alt14=1;
+ }
+ switch (alt14) {
+ case 1 :
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:128:65: pattern= VT_PATTERN
+ {
+ pattern=(CommonTree)match(input,VT_PATTERN,FOLLOW_VT_PATTERN_in_variable_definition351);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ ((entry_scope)entry_stack.peek()).variables.put((varname!=null?varname.getText():null), Integer.valueOf(0));
+
+ if(q!=null && pattern!=null){
+ ((entry_scope)entry_stack.peek()).sentenceKeyBuffer.append("{"+(varname!=null?varname.getText():null)+":"+(q!=null?q.getText():null)+":"+(pattern!=null?pattern.getText():null)+"}");
+ }else if(q==null && pattern!=null){
+ ((entry_scope)entry_stack.peek()).sentenceKeyBuffer.append("{"+(varname!=null?varname.getText():null)+":"+(pattern!=null?pattern.getText():null)+"}");
+ }else{
+ ((entry_scope)entry_stack.peek()).sentenceKeyBuffer.append("{"+(varname!=null?varname.getText():null)+"}");
+ }
+
+ if(q == null || (!q.getText().equals("ENUM") && !q.getText().equals("DATE") && !q.getText().equals("BOOLEAN"))){
+ ((entry_scope)entry_stack.peek()).keybuffer.append(pattern != null? "(" + (pattern!=null?pattern.getText():null) + ")" : "(.*?)");
+ }else{
+ ((entry_scope)entry_stack.peek()).keybuffer.append("(.*?)");
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "variable_definition"
+
+
+ // $ANTLR start "variable_reference"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:150:1: variable_reference : ^(varref= VT_VAR_REF lit= LITERAL ) ;
+ public final void variable_reference() throws RecognitionException {
+ CommonTree varref=null;
+ CommonTree lit=null;
+
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:151:2: ( ^(varref= VT_VAR_REF lit= LITERAL ) )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:151:4: ^(varref= VT_VAR_REF lit= LITERAL )
+ {
+ varref=(CommonTree)match(input,VT_VAR_REF,FOLLOW_VT_VAR_REF_in_variable_reference373);
+
+ match(input, Token.DOWN, null);
+ lit=(CommonTree)match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference377);
+
+ match(input, Token.UP, null);
+
+ ((entry_scope)entry_stack.peek()).valuebuffer.append("{" + (lit!=null?lit.getText():null) + "}" );
+ ((entry_scope)entry_stack.peek()).sentenceValueBuffer.append("{"+(lit!=null?lit.getText():null)+"}");
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "variable_reference"
+
+
+ // $ANTLR start "condition_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:158:1: condition_key : VT_CONDITION ;
+ public final void condition_key() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:159:2: ( VT_CONDITION )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:159:4: VT_CONDITION
+ {
+ match(input,VT_CONDITION,FOLLOW_VT_CONDITION_in_condition_key395);
+ ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.CONDITION);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "condition_key"
+
+
+ // $ANTLR start "consequence_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:163:1: consequence_key : VT_CONSEQUENCE ;
+ public final void consequence_key() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:164:2: ( VT_CONSEQUENCE )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:164:4: VT_CONSEQUENCE
+ {
+ match(input,VT_CONSEQUENCE,FOLLOW_VT_CONSEQUENCE_in_consequence_key410);
+ ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.CONSEQUENCE);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "consequence_key"
+
+
+ // $ANTLR start "keyword_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:168:1: keyword_key : VT_KEYWORD ;
+ public final void keyword_key() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:169:2: ( VT_KEYWORD )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:169:4: VT_KEYWORD
+ {
+ match(input,VT_KEYWORD,FOLLOW_VT_KEYWORD_in_keyword_key425);
+ ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.KEYWORD);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "keyword_key"
+
+
+ // $ANTLR start "any_key"
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:173:1: any_key : VT_ANY ;
+ public final void any_key() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:174:2: ( VT_ANY )
+ // src/main/resources/org/drools/lang/dsl/DSLMapWalker.g:174:4: VT_ANY
+ {
+ match(input,VT_ANY,FOLLOW_VT_ANY_in_any_key440);
+ ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.ANY);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "any_key"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_VT_DSL_GRAMMAR_in_mapping_file54 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_valid_entry_in_mapping_file56 = new BitSet(new long[]{0x0000000000000068L});
+ public static final BitSet FOLLOW_entry_in_valid_entry78 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_COMMENT_in_valid_entry86 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_LINE_COMMENT_in_valid_entry90 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_ENTRY_in_entry119 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_scope_section_in_entry121 = new BitSet(new long[]{0x0000000000003000L});
+ public static final BitSet FOLLOW_meta_section_in_entry123 = new BitSet(new long[]{0x0000000000003000L});
+ public static final BitSet FOLLOW_key_section_in_entry126 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_value_section_in_entry142 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_SCOPE_in_scope_section162 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_condition_key_in_scope_section164 = new BitSet(new long[]{0x0000000000000E08L});
+ public static final BitSet FOLLOW_consequence_key_in_scope_section167 = new BitSet(new long[]{0x0000000000000C08L});
+ public static final BitSet FOLLOW_keyword_key_in_scope_section170 = new BitSet(new long[]{0x0000000000000808L});
+ public static final BitSet FOLLOW_any_key_in_scope_section173 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_META_in_meta_section190 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_LITERAL_in_meta_section194 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_ENTRY_KEY_in_key_section211 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_key_sentence_in_key_section213 = new BitSet(new long[]{0x0000000000128008L});
+ public static final BitSet FOLLOW_variable_definition_in_key_sentence228 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_LITERAL_in_key_sentence235 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_SPACE_in_key_sentence244 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_ENTRY_VAL_in_value_section265 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_value_sentence_in_value_section267 = new BitSet(new long[]{0x0000000000130008L});
+ public static final BitSet FOLLOW_variable_reference_in_value_sentence284 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_LITERAL_in_value_sentence291 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_SPACE_in_value_sentence299 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_LITERAL_in_literal317 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_VAR_DEF_in_variable_definition333 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_definition337 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_VT_QUAL_in_variable_definition341 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_definition345 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_PATTERN_in_variable_definition351 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_VAR_REF_in_variable_reference373 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_LITERAL_in_variable_reference377 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_CONDITION_in_condition_key395 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_CONSEQUENCE_in_consequence_key410 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_KEYWORD_in_keyword_key425 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_ANY_in_any_key440 = new BitSet(new long[]{0x0000000000000002L});
+
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -55,7 +55,7 @@
* Returns the list of entries in this mapping
* @return
*/
- public List getEntries();
+ public List<DSLMappingEntry> getEntries();
/**
* Add one entry to the list of the entries
@@ -67,7 +67,7 @@
* Adds all entries in the given list to this DSL Mapping
* @param entries
*/
- public void addEntries(List entries);
+ public void addEntries(List<DSLMappingEntry> entries);
/**
* Removes the given entry from the list of entries
@@ -80,6 +80,6 @@
* @param section
* @return
*/
- public List getEntries(Section section);
+ public List<DSLMappingEntry> getEntries(Section section);
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -27,10 +27,11 @@
*/
public interface DSLMappingEntry {
- public static final Section KEYWORD = new KeywordSection();
- public static final Section CONDITION = new ConditionSection();
- public static final Section CONSEQUENCE = new ConsequenceSection();
- public static final Section ANY = new AnySection();
+ public static final Section KEYWORD = Section.KEYWORD;
+ public static final Section CONDITION = Section.CONDITION;
+ public static final Section CONSEQUENCE = Section.CONSEQUENCE;
+ public static final Section ANY = Section.ANY;
+
public static final MetaData EMPTY_METADATA = new DefaultDSLEntryMetaData( "" );
/**
@@ -75,10 +76,12 @@
public String getValuePattern();
/**
- * Returns the list of variables found in the given pattern key
+ * Returns the list of variables found in the given pattern key
+ * in the same order they were found
+ *
* @return the variables
*/
- public Map getVariables();
+ public Map<String, Integer> getVariables();
/**
* @param key the key to set
@@ -107,14 +110,23 @@
public List getErrors();
/**
- * An inner interface for DSL mapping sections
- * @author etirelli
- *
+ * An enum for the sections
*/
- public static interface Section
- extends
- Comparable {
- public String getSymbol();
+ public enum Section {
+ KEYWORD("[keyword]"),
+ CONDITION("[condition]"),
+ CONSEQUENCE("[consequence]"),
+ ANY("[*]");
+
+ private String symbol;
+
+ private Section(String symbol) {
+ this.symbol = symbol;
+ }
+
+ public String getSymbol() {
+ return this.symbol;
+ }
}
/**
@@ -127,231 +139,12 @@
*/
public static interface MetaData
extends
- Comparable {
+ Comparable<MetaData> {
public String toString();
public String getMetaData();
}
- /**
- * The keyword section, to allow mapping of keywords
- *
- * @author etirelli
- */
- public static class KeywordSection
- implements
- Section {
- private static final String symbol = "[keyword]";
-
- private KeywordSection() {
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public String toString() {
- return symbol;
- }
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
- return result;
- }
-
- public boolean equals(final Object obj) {
- if ( this == obj ) {
- return true;
- }
- if ( obj == null ) {
- return false;
- }
- if ( getClass() != obj.getClass() ) {
- return false;
- }
- final KeywordSection other = (KeywordSection) obj;
- if ( symbol == null ) {
- if ( other.getSymbol() != null ) {
- return false;
- }
- } else if ( !symbol.equals( other.getSymbol() ) ) {
- return false;
- }
- return true;
- }
-
- public int compareTo(final Object arg0) {
- return this.toString().compareTo( arg0.toString() );
- }
- }
-
- /**
- * The condition section, to allow mapping of the conditions
- *
- * @author etirelli
- */
- public static class ConditionSection
- implements
- Section {
- private static final String symbol = "[condition]";
-
- private ConditionSection() {
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public String toString() {
- return symbol;
- }
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
- return result;
- }
-
- public boolean equals(final Object obj) {
- if ( this == obj ) {
- return true;
- }
- if ( obj == null ) {
- return false;
- }
- if ( getClass() != obj.getClass() ) {
- return false;
- }
- final KeywordSection other = (KeywordSection) obj;
- if ( symbol == null ) {
- if ( other.getSymbol() != null ) {
- return false;
- }
- } else if ( !symbol.equals( other.getSymbol() ) ) {
- return false;
- }
- return true;
- }
-
- public int compareTo(final Object arg0) {
- return this.toString().compareTo( arg0.toString() );
- }
- }
-
- /**
- * The consequence section to allow the mapping
- * of consequence elements
- *
- * @author etirelli
- */
- public static class ConsequenceSection
- implements
- Section {
- private static final String symbol = "[consequence]";
-
- private ConsequenceSection() {
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public String toString() {
- return symbol;
- }
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
- return result;
- }
-
- public boolean equals(final Object obj) {
- if ( this == obj ) {
- return true;
- }
- if ( obj == null ) {
- return false;
- }
- if ( getClass() != obj.getClass() ) {
- return false;
- }
- final KeywordSection other = (KeywordSection) obj;
- if ( symbol == null ) {
- if ( other.getSymbol() != null ) {
- return false;
- }
- } else if ( !symbol.equals( other.getSymbol() ) ) {
- return false;
- }
- return true;
- }
-
- public int compareTo(final Object arg0) {
- return this.toString().compareTo( arg0.toString() );
- }
- }
-
- /**
- * An element to indicate the mapping should be applicable
- * to any section
- *
- * @author etirelli
- */
- public static class AnySection
- implements
- Section {
-
- private static final String symbol = "[*]";
-
- private AnySection() {
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public String toString() {
- return symbol;
- }
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
- return result;
- }
-
- public boolean equals(final Object obj) {
- if ( this == obj ) {
- return true;
- }
- if ( obj == null ) {
- return false;
- }
- if ( getClass() != obj.getClass() ) {
- return false;
- }
- final KeywordSection other = (KeywordSection) obj;
- if ( symbol == null ) {
- if ( other.getSymbol() != null ) {
- return false;
- }
- } else if ( !symbol.equals( other.getSymbol() ) ) {
- return false;
- }
- return true;
- }
-
- public int compareTo(final Object arg0) {
- return this.toString().compareTo( arg0.toString() );
- }
- }
-
public static class DefaultDSLEntryMetaData
implements
DSLMappingEntry.MetaData {
@@ -370,7 +163,7 @@
return (this.metadata == null) ? "" : this.metadata;
}
- public int compareTo(final Object arg0) {
+ public int compareTo(final MetaData arg0) {
return this.toString().compareTo( arg0.toString() );
}
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -16,42 +16,25 @@
package org.drools.lang.dsl;
-import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.Collections;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.drools.lang.dsl.DSLMappingEntry.DefaultDSLEntryMetaData;
-
/**
* A helper class that handles a DSL Mapping file
* @author etirelli
*/
-public class DSLMappingFile {
+public abstract class DSLMappingFile {
- // the following pattern will be used to parse dsl mapping entries in the DSL file.
- // It is capable of parsing entries that follows the pattern:
- // [<section>][<metadata>]?<key>=<value>
- private static final Pattern pattern = Pattern.compile( "((\\[[^\\[]*\\])\\s*(\\[([^\\[]*)\\])?)?\\s*((\\\\=|[^=])*)=(.*)" );
- private static final String KEYWORD = "[keyword]";
- private static final String CONDITION = "[condition]";
- private static final String CONSEQUENCE = "[consequence]";
- //private static final String ANY = "[*]";
- private static final String WHEN = "[when]";
- private static final String THEN = "[then]";
+ private DSLMapping mapping;
+ private List errors;
- protected DSLMapping mapping;
- protected List errors;
-
public DSLMappingFile() {
this.mapping = new DefaultDSLMapping();
- this.errors = Collections.EMPTY_LIST;
+ this.errors = Collections.emptyList();
}
/**
@@ -78,6 +61,10 @@
return Collections.unmodifiableList( this.errors );
}
+ protected void setErrors(List errors) {
+ this.errors = errors;
+ }
+
/**
* Parses the file. Throws IOException in case there is any problem
* reading the file;
@@ -85,80 +72,8 @@
* @return true in case no error was found parsing the file. false
* otherwise. Use getErrors() to check for the actual errors.
*/
- public boolean parseAndLoad(final Reader dsl) throws IOException {
- String line = null;
- int linecounter = 0;
- final BufferedReader dslFileReader = new BufferedReader( dsl );
- this.mapping = new DefaultDSLMapping();
- this.errors = new LinkedList();
- //Note: Use a string builder for 1.5 targets
- StringBuffer sb = new StringBuffer();
- boolean spacesAllowed = true;
- while ( (line = dslFileReader.readLine()) != null ) {
- linecounter++;
- String trimmedline = line.trim(); //this can be more efficient, get rid of trim(), iterate-- over last chars only.
- if ( spacesAllowed ) { //prevents that the break of some line be mixed with comments or empty lines
- if ( trimmedline.length() == 0 ) {
- // empty line in DSL: [\t ]*\n
- continue;
- }
- if ( trimmedline.startsWith( "#" ) ) {
- // comment line in DSL: # bla bla \n
- continue;
- }
- }
- //else, add the chars in the buffer, we'll see about that in a sec
- sb.append( trimmedline );
- if ( sb.charAt( sb.length() - 1 ) == '\\' ) {
- sb.append( ' ' ); //put a space, don't be ridiculous
- spacesAllowed = false;
- continue;
- }
- //reinit the buffer, no matter what, but keep the accumulated chars
- String lineToParse = sb.toString();
- spacesAllowed = true;
- sb = new StringBuffer();
- final Matcher mat = pattern.matcher( lineToParse );
- // - END -
- if ( mat.matches() ) {
- final String sectionStr = mat.group( 2 );
- final String metadataStr = mat.group( 4 );
- final String key = mat.group( 5 ).replaceAll( "\\\\=",
- "=" );
- final String value = mat.group( 7 );
+ public abstract boolean parseAndLoad(final Reader dsl) throws IOException;
- DSLMappingEntry.Section section = DSLMappingEntry.ANY;
- if ( KEYWORD.equals( sectionStr ) ) {
- section = DSLMappingEntry.KEYWORD;
- } else if ( CONDITION.equals( sectionStr ) || WHEN.equals( sectionStr ) ) {
- section = DSLMappingEntry.CONDITION;
- } else if ( CONSEQUENCE.equals( sectionStr ) || THEN.equals( sectionStr ) ) {
- section = DSLMappingEntry.CONSEQUENCE;
- }
-
- DSLMappingEntry.MetaData metadata;
- if ( metadataStr == null || metadataStr.length() == 0 ) {
- metadata = DSLMappingEntry.EMPTY_METADATA;
- } else {
- metadata = new DefaultDSLEntryMetaData( metadataStr );
- }
-
- final DSLMappingEntry entry = new DefaultDSLMappingEntry( section,
- metadata,
- key,
- value );
-
- this.mapping.addEntry( entry );
- } else { // it is for sure an error !
- final String error = "Error parsing mapping entry: " + line;
- final DSLMappingParseException exception = new DSLMappingParseException( error,
- linecounter );
- this.errors.add( exception );
- }
- }
- return this.errors.isEmpty();
- }
-
/**
* Saves current mapping into a DSL mapping file
* @param out
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLTokenizedMappingFile.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLTokenizedMappingFile.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLTokenizedMappingFile.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,11 +1,10 @@
package org.drools.lang.dsl;
import java.io.IOException;
-import java.io.InputStream;
import java.io.Reader;
import java.util.LinkedList;
+import java.util.List;
-import org.antlr.runtime.ANTLRInputStream;
import org.antlr.runtime.ANTLRReaderStream;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.CommonTokenStream;
@@ -15,39 +14,41 @@
public class DSLTokenizedMappingFile extends DSLMappingFile {
-
public DSLTokenizedMappingFile() {
super();
}
+ @Override
public boolean parseAndLoad(final Reader dsl) throws IOException {
- this.errors = new LinkedList();
+ List errors = new LinkedList();
try{
- this.mapping = buildFileMapping(dsl);
+ DSLMapping mapping = buildFileMapping(errors, dsl);
+ setMapping( mapping );
}catch(Exception e){
final String error = "Error parsing mapping file: " + e.getMessage();
final DSLMappingParseException exception =
new DSLMappingParseException( error, -1 );
- this.errors.add( exception );
+ errors.add( exception );
}
- return this.errors.isEmpty();
+ setErrors( errors );
+ return errors.isEmpty();
}
- private DSLMapping buildFileMapping(Reader dsl) throws IOException, RecognitionException{
+ private DSLMapping buildFileMapping(final List errors, final Reader dsl) throws IOException, RecognitionException{
ANTLRReaderStream reader = new ANTLRReaderStream(dsl);
- DSLMapWalker walker = buildFileMappingWalker(reader);
+ DSLMapWalker walker = buildFileMappingWalker(errors, reader);
DSLMapping mapping = walker.mapping_file();
return mapping;
}
- private DSLMapWalker buildFileMappingWalker(CharStream stream) throws RecognitionException{
+ private DSLMapWalker buildFileMappingWalker(final List errors, CharStream stream) throws RecognitionException{
DSLMapLexer lexer = new DSLMapLexer(stream);
CommonTokenStream tokens = new CommonTokenStream();
tokens.setTokenSource(lexer);
DSLMapParser parser = new DSLMapParser(tokens);
DSLMapParser.mapping_file_return example = parser.mapping_file();
- this.errors.addAll(parser.getErrorList());
+ errors.addAll(parser.getErrorList());
CommonTree tree = (CommonTree) example.getTree();
// System.out.println(tree.toStringTree());
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMapping.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMapping.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMapping.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -33,9 +33,9 @@
implements
DSLMapping {
- private String identifier;
- private String description;
- private List entries;
+ private String identifier;
+ private String description;
+ private List<DSLMappingEntry> entries;
public DefaultDSLMapping() {
this( "" );
@@ -43,7 +43,7 @@
public DefaultDSLMapping(final String identifier) {
this.identifier = identifier;
- this.entries = new LinkedList();
+ this.entries = new LinkedList<DSLMappingEntry>();
}
/**
@@ -58,14 +58,14 @@
* Adds all entries in the given list to this DSL Mapping
* @param entries
*/
- public void addEntries(final List entries) {
+ public void addEntries(final List<DSLMappingEntry> entries) {
this.entries.addAll( entries );
}
/**
* Returns an unmodifiable list of entries
*/
- public List getEntries() {
+ public List<DSLMappingEntry> getEntries() {
return Collections.unmodifiableList( this.entries );
}
@@ -74,10 +74,10 @@
* @param section
* @return
*/
- public List getEntries(final Section section) {
- final List list = new LinkedList();
- for ( final Iterator it = this.entries.iterator(); it.hasNext(); ) {
- final DSLMappingEntry entry = (DSLMappingEntry) it.next();
+ public List<DSLMappingEntry> getEntries(final Section section) {
+ final List<DSLMappingEntry> list = new LinkedList<DSLMappingEntry>();
+ for ( final Iterator<DSLMappingEntry> it = this.entries.iterator(); it.hasNext(); ) {
+ final DSLMappingEntry entry = it.next();
if ( entry.getSection().equals( section ) ) {
list.add( entry );
}
Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,161 +0,0 @@
-/*
- * Copyright 2006 JBoss Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * 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.lang.dsl;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A default implementation for the DSL Mapping Entry interface
- *
- * @author etirelli
- */
-public class DefaultDSLMappingEntry extends AbstractDSLMappingEntry
- implements
- DSLMappingEntry {
-
- // following pattern is used to extract all variables names and positions from a mapping.
- // Example: for the following String:
- //
- // {This} is a {pattern} considered pretty \{{easy}\} by most \{people\}. What do you {say}
- //
- // it will return variables:
- // This, pattern, easy, say
- //
- private static final Pattern VAR_FINDER = Pattern.compile( "(^|[^\\\\])\\{([(\\\\\\{)|[^\\{]]*?)\\}",
- Pattern.MULTILINE | Pattern.DOTALL );
-
- // following pattern is used to find all the non-escaped parenthesis in the input key
- // to correctly calculate the variables offset
- private static final Pattern PAREN_FINDER = Pattern.compile( "(^\\(|[^\\\\]\\(|\\G\\()" );
-
- public DefaultDSLMappingEntry() {
- this( DSLMappingEntry.ANY,
- DSLMappingEntry.EMPTY_METADATA,
- null,
- null );
- }
-
- public DefaultDSLMappingEntry(final Section section,
- final MetaData metadata,
- final String key,
- final String value) {
- this.section = section;
- this.metadata = metadata;
- this.setMappingKey( key );
- this.setMappingValue( value );
- }
-
- /**
- * @param key the key to set
- */
- public void setMappingKey(String key) {
- if (key != null) {
- key = key.trim();
- }
- this.key = key;
-
- if ( key != null ) {
- int substr = 0;
- // escape '$' to avoid errors
- final String escapedKey = key.replaceAll( "\\$",
- "\\\\\\$" );
- final Matcher m = VAR_FINDER.matcher( escapedKey );
- // retrieving variables list and creating key pattern
- final StringBuffer buf = new StringBuffer();
-
- int counter = 1;
- if ( !key.startsWith( "^" ) ) {
- // making it start with a space char or a line start
- buf.append( "(\\W|^)" );
- substr += buf.length();
- counter++;
- }
-
- int lastMatch = 0;
- while ( m.find() ) {
- if ( this.variables == Collections.EMPTY_MAP ) {
- this.variables = new HashMap( 2 );
- }
-
- // calculating and fixing variable offset
- String before = escapedKey.substring( lastMatch, Math.max( m.start(), lastMatch) );
- lastMatch = m.end()+1;
- Matcher m2 = PAREN_FINDER.matcher( before );
- while( m2.find() ) {
- counter++;
- }
-
- // creating capture group for variable
- this.variables.put( m.group( 2 ),
- new Integer( counter++ ) );
- m.appendReplacement( buf,
- m.group( 1 ) + "(.*?)" );
- }
- m.appendTail( buf );
-
- // if pattern ends with a variable, append a line end to avoid multiple line matching
- if ( buf.toString().endsWith( "(.*?)" ) ) {
- buf.append( "$" );
- } else {
- buf.append( "(\\W|$)" );
- }
-
- // setting the key pattern and making it space insensitive
- String pat = buf.toString();
- if ( pat.substring( substr ).trim().startsWith( "-" ) && (!pat.substring( substr ).trim().startsWith( "-\\s*" )) ) {
- pat = pat.substring( 0,
- pat.indexOf( '-' ) + 1 ) + "\\s*" + pat.substring( pat.indexOf( '-' ) + 1 ).trim();
- }
- pat = pat.replaceAll( "\\s+",
- "\\\\s+" );
- this.keyPattern = Pattern.compile( pat,
- Pattern.DOTALL | Pattern.MULTILINE );
-
- } else {
- this.keyPattern = null;
- }
- // update value mapping
- this.setMappingValue( this.value );
- }
-
- /**
- * @param value the value to set
- */
- public void setMappingValue(final String value) {
- this.valuePattern = value;
- this.value = value;
- if ( value != null ) {
- this.valuePattern = this.valuePattern.replaceAll( "\\\\n",
- "\n" ).replaceAll( "\\$",
- "\\\\\\$" );
- for ( final Iterator it = this.variables.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry entry = (Map.Entry) it.next();
- final String var = (String) entry.getKey();
- final int pos = ((Integer) entry.getValue()).intValue();
-
- this.valuePattern = this.valuePattern.replaceAll( "\\{" + var + "\\}",
- "\\$" + pos );
- }
- }
- }
-
-}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -67,10 +67,12 @@
* Creates a new DefaultExpander
*/
public DefaultExpander() {
- this.cleanup.add( new DefaultDSLMappingEntry( DSLMappingEntry.KEYWORD,
- null,
+ this.cleanup.add( new AntlrDSLMappingEntry( DSLMappingEntry.KEYWORD,
+ DSLMappingEntry.EMPTY_METADATA,
"expander {name}",
- "" ) );
+ "",
+ "expander (.*?)",
+ "") );
}
/**
Modified: labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/dsl/DSLMapWalker.g 2009-02-12 01:07:20 UTC (rev 25234)
@@ -10,7 +10,6 @@
import java.util.Map;
import java.util.HashMap;
-
}
@@ -35,24 +34,30 @@
entry returns [DSLMappingEntry mappingEntry]
scope {
- Map variables;
+ Map<String,Integer> variables;
AntlrDSLMappingEntry retval;
- int counter;
StringBuffer keybuffer;
StringBuffer valuebuffer;
- StringBuffer sentencebuffer;
+ StringBuffer sentenceKeyBuffer;
+ StringBuffer sentenceValueBuffer;
}
@init {
$entry::retval = new AntlrDSLMappingEntry() ;
- $entry::variables = new HashMap();
+ $entry::variables = new HashMap<String,Integer>();
$entry::keybuffer = new StringBuffer();
$entry::valuebuffer = new StringBuffer();
- $entry::sentencebuffer = new StringBuffer();
+ $entry::sentenceKeyBuffer = new StringBuffer();
+ $entry::sentenceValueBuffer = new StringBuffer();
}
- : ^(VT_ENTRY scope_section meta_section? key_section {$entry::retval.variables = $entry::variables; $entry::retval.setMappingKey($entry::keybuffer.toString());$entry::retval.setSentence($entry::sentencebuffer.toString());}
+ : ^(VT_ENTRY scope_section meta_section? key_section
+ { $entry::retval.setVariables( $entry::variables );
+ $entry::retval.setMappingKey($entry::sentenceKeyBuffer.toString());
+ $entry::retval.setKeyPattern($entry::keybuffer.toString());
+ }
value_section)
{
- $entry::retval.setMappingValue($entry::valuebuffer.toString());
+ $entry::retval.setMappingValue($entry::sentenceValueBuffer.toString());
+ $entry::retval.setValuePattern($entry::valuebuffer.toString());
$mappingEntry = $entry::retval;
$mapping_file::retval.addEntry($mappingEntry);
}
@@ -85,12 +90,12 @@
| vtl=VT_LITERAL
{
$entry::keybuffer.append($vtl.text);
- $entry::sentencebuffer.append($vtl.text);
+ $entry::sentenceKeyBuffer.append($vtl.text);
}
| VT_SPACE
{
$entry::keybuffer.append("\\s+");
- $entry::sentencebuffer.append(" ");
+ $entry::sentenceKeyBuffer.append(" ");
}
;
@@ -106,10 +111,12 @@
| vtl=VT_LITERAL
{
$entry::valuebuffer.append($vtl.text.replaceAll("\\$", "\\\\\\$"));
+ $entry::sentenceValueBuffer.append($vtl.text);
}
| VT_SPACE
{
$entry::valuebuffer.append(" ");
+ $entry::sentenceValueBuffer.append(" ");
}
;
@@ -120,15 +127,14 @@
variable_definition
: ^(VT_VAR_DEF varname=LITERAL ^(VT_QUAL q=LITERAL?) pattern=VT_PATTERN? )
{
- $entry::counter++;
- $entry::variables.put($varname.text, new Integer($entry::counter));
+ $entry::variables.put($varname.text, Integer.valueOf(0));
if($q!=null && $pattern!=null){
- $entry::sentencebuffer.append("{"+$varname.text+":"+$q.text+":"+$pattern.text+"}");
+ $entry::sentenceKeyBuffer.append("{"+$varname.text+":"+$q.text+":"+$pattern.text+"}");
}else if($q==null && $pattern!=null){
- $entry::sentencebuffer.append("{"+$varname.text+":"+$pattern.text+"}");
+ $entry::sentenceKeyBuffer.append("{"+$varname.text+":"+$pattern.text+"}");
}else{
- $entry::sentencebuffer.append("{"+$varname.text+"}");
+ $entry::sentenceKeyBuffer.append("{"+$varname.text+"}");
}
if($q == null || (!$q.getText().equals("ENUM") && !$q.getText().equals("DATE") && !$q.getText().equals("BOOLEAN"))){
@@ -144,7 +150,8 @@
variable_reference
: ^(varref=VT_VAR_REF lit=LITERAL )
{
- $entry::valuebuffer.append("$" + $entry::variables.get($lit.text));
+ $entry::valuebuffer.append("{" + $lit.text + "}" );
+ $entry::sentenceValueBuffer.append("{"+$lit.text+"}");
}
;
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilderTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/guvnor/server/util/SuggestionCompletionEngineBuilderTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -5,10 +5,12 @@
import org.drools.guvnor.client.modeldriven.SuggestionCompletionEngine;
import org.drools.lang.dsl.AbstractDSLMappingEntry;
import org.drools.lang.dsl.DSLMappingEntry;
-import org.drools.lang.dsl.DSLMappingEntry.Section;
+import org.jmock.Expectations;
+import org.jmock.Mockery;
public class SuggestionCompletionEngineBuilderTest extends TestCase {
SuggestionCompletionEngineBuilder builder = new SuggestionCompletionEngineBuilder();
+ Mockery context = new Mockery();
protected void setUp() throws Exception {
super.setUp();
@@ -31,11 +33,35 @@
}
public void testAddSentenceMultipleTypes() {
- this.builder.addDSLMapping(new DSLMap(DSLMappingEntry.CONDITION, "cond"));
- this.builder.addDSLMapping(new DSLMap(DSLMappingEntry.CONSEQUENCE, "cons"));
- this.builder.addDSLMapping(new DSLMap(DSLMappingEntry.ANY, "any"));
- this.builder.addDSLMapping(new DSLMap(DSLMappingEntry.KEYWORD, "key"));
+ final DSLMappingEntry mapping1 = context.mock(DSLMappingEntry.class, "mapping1");
+ final DSLMappingEntry mapping2 = context.mock(DSLMappingEntry.class, "mapping2");
+ final DSLMappingEntry mapping3 = context.mock(DSLMappingEntry.class, "mapping3");
+ final DSLMappingEntry mapping4 = context.mock(DSLMappingEntry.class, "mapping4");
+
+ context.checking( new Expectations() {{
+ // setting expectations for entry1
+ allowing(mapping1).getSection(); will(returnValue(DSLMappingEntry.CONDITION ));
+ allowing(mapping1).getMappingKey(); will(returnValue("cond"));
+
+ // setting expectations for entry2
+ allowing(mapping2).getSection(); will(returnValue(DSLMappingEntry.CONSEQUENCE ));
+ allowing(mapping2).getMappingKey(); will(returnValue("cons"));
+ // setting expectations for entry3
+ allowing(mapping3).getSection(); will(returnValue(DSLMappingEntry.ANY ));
+ allowing(mapping3).getMappingKey(); will(returnValue("any"));
+
+ // setting expectations for entry4
+ allowing(mapping4).getSection(); will(returnValue(DSLMappingEntry.KEYWORD ));
+ allowing(mapping4).getMappingKey(); will(returnValue("key"));
+ }}
+ );
+
+ this.builder.addDSLMapping(mapping1);
+ this.builder.addDSLMapping(mapping2);
+ this.builder.addDSLMapping(mapping3);
+ this.builder.addDSLMapping(mapping4);
+
final SuggestionCompletionEngine engine = this.builder.getInstance();
assertEquals( 1, engine.actionDSLSentences.length );
@@ -43,17 +69,7 @@
assertEquals( 1, engine.keywordDSLItems.length );
assertEquals( 1, engine.anyScopeDSLItems.length );
-
assertEquals("cond", engine.conditionDSLSentences[0].sentence);
-
-
}
- class DSLMap extends AbstractDSLMappingEntry {
- DSLMap(Section sec, String sentence) {
- this.section = sec;
- this.sentence = sentence;
- }
- }
-
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/ErrorsParserTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/ErrorsParserTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/ErrorsParserTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -100,16 +100,14 @@
expanded );
parser.compilation_unit();
assertTrue( parser.hasErrors() );
- System.out.println( this.getName() );
- for ( String message : this.parser.getErrorMessages() ) {
- System.out.println( message );
- }
+// for ( String message : this.parser.getErrorMessages() ) {
+// System.out.println( message );
+// }
final DroolsParserException err = (DroolsParserException) parser.getErrors().get( 0 );
assertEquals( 1,
parser.getErrors().size() );
-
- assertEquals( 5,
+ assertEquals( 6,
err.getLineNumber() );
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/Tree2TestDRL.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/Tree2TestDRL.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/Tree2TestDRL.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,3902 +1,3902 @@
-// $ANTLR 3.1.1 src/main/resources/org/drools/lang/Tree2TestDRL.g 2009-02-05 11:36:23
-
- package org.drools.lang;
-
-
-import org.antlr.runtime.*;
-import org.antlr.runtime.tree.*;import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-public class Tree2TestDRL extends TreeParser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_COMPILATION_UNIT", "VT_FUNCTION_IMPORT", "VT_FACT", "VT_CONSTRAINTS", "VT_LABEL", "VT_QUERY_ID", "VT_TEMPLATE_ID", "VT_TYPE_DECLARE_ID", "VT_RULE_ID", "VT_ENTRYPOINT_ID", "VT_SLOT_ID", "VT_SLOT", "VT_RULE_ATTRIBUTES", "VT_RHS_CHUNK", "VT_CURLY_CHUNK", "VT_SQUARE_CHUNK", "VT_PAREN_CHUNK", "VT_BEHAVIOR", "VT_AND_IMPLICIT", "VT_AND_PREFIX", "VT_OR_PREFIX", "VT_AND_INFIX", "VT_OR_INFIX", "VT_ACCUMULATE_INIT_CLAUSE", "VT_ACCUMULATE_ID_CLAUSE", "VT_FROM_SOURCE", "VT_EXPRESSION_CHAIN", "VT_PATTERN", "VT_FACT_BINDING", "VT_FACT_OR", "VT_BIND_FIELD", "VT_FIELD", "VT_ACCESSOR_PATH", "VT_ACCESSOR_ELEMENT", "VT_DATA_TYPE", "VT_PATTERN_TYPE", "VT_PACKAGE_ID", "VT_IMPORT_ID", "VT_GLOBAL_ID", "VT_FUNCTION_ID", "VT_PARAM_LIST", "VK_DATE_EFFECTIVE", "VK_DATE_EXPIRES", "VK_LOCK_ON_ACTIVE", "VK_NO_LOOP", "VK_AUTO_FOCUS", "VK_ACTIVATION_GROUP", "VK_AGENDA_GROUP", "VK_RULEFLOW_GROUP", "VK_DURATION", "VK_DIALECT", "VK_SALIENCE", "VK_ENABLED", "!
VK_ATTRIBUTES", "VK_RULE", "VK_EXTEND", "VK_IMPORT", "VK_PACKAGE", "VK_TEMPLATE", "VK_QUERY", "VK_DECLARE", "VK_FUNCTION", "VK_GLOBAL", "VK_EVAL", "VK_ENTRY_POINT", "VK_NOT", "VK_IN", "VK_OR", "VK_AND", "VK_EXISTS", "VK_FORALL", "VK_ACTION", "VK_REVERSE", "VK_RESULT", "VK_OPERATOR", "VK_END", "VK_INIT", "SEMICOLON", "ID", "DOT", "DOT_STAR", "STRING", "LEFT_PAREN", "COMMA", "RIGHT_PAREN", "AT", "COLON", "EQUALS", "WHEN", "BOOL", "INT", "DOUBLE_PIPE", "DOUBLE_AMPER", "FROM", "OVER", "ACCUMULATE", "COLLECT", "ARROW", "EQUAL", "GREATER", "GREATER_EQUAL", "LESS", "LESS_EQUAL", "NOT_EQUAL", "FLOAT", "NULL", "LEFT_SQUARE", "RIGHT_SQUARE", "THEN", "LEFT_CURLY", "RIGHT_CURLY", "MISC", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "MULTI_LINE_COMMENT"
- };
- public static final int COMMA=87;
- public static final int VT_PATTERN_TYPE=39;
- public static final int VT_ACCUMULATE_ID_CLAUSE=28;
- public static final int VK_DIALECT=54;
- public static final int VK_FUNCTION=65;
- public static final int HexDigit=119;
- public static final int VK_ATTRIBUTES=57;
- public static final int VT_EXPRESSION_CHAIN=30;
- public static final int MISC=115;
- public static final int VT_AND_PREFIX=23;
- public static final int VK_QUERY=63;
- public static final int THEN=112;
- public static final int VK_AUTO_FOCUS=49;
- public static final int DOT=83;
- public static final int VK_IMPORT=60;
- public static final int VT_SLOT=15;
- public static final int VT_PACKAGE_ID=40;
- public static final int LEFT_SQUARE=110;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=122;
- public static final int VT_DATA_TYPE=38;
- public static final int VT_FACT=6;
- public static final int LEFT_CURLY=113;
- public static final int AT=89;
- public static final int LEFT_PAREN=86;
- public static final int DOUBLE_AMPER=96;
- public static final int VT_QUERY_ID=9;
- public static final int VT_ACCESSOR_PATH=36;
- public static final int VT_LABEL=8;
- public static final int WHEN=92;
- public static final int VT_ENTRYPOINT_ID=13;
- public static final int VK_SALIENCE=55;
- public static final int VT_FIELD=35;
- public static final int WS=117;
- public static final int OVER=98;
- public static final int STRING=85;
- public static final int VK_AND=72;
- public static final int VT_ACCESSOR_ELEMENT=37;
- public static final int VK_REVERSE=76;
- public static final int VK_GLOBAL=66;
- public static final int VT_ACCUMULATE_INIT_CLAUSE=27;
- public static final int VT_BEHAVIOR=21;
- public static final int VK_DURATION=53;
- public static final int VT_SQUARE_CHUNK=19;
- public static final int VK_FORALL=74;
- public static final int VT_PAREN_CHUNK=20;
- public static final int VT_COMPILATION_UNIT=4;
- public static final int COLLECT=100;
- public static final int VK_ENABLED=56;
- public static final int VK_RESULT=77;
- public static final int EQUALS=91;
- public static final int UnicodeEscape=120;
- public static final int VK_PACKAGE=61;
- public static final int VT_RULE_ID=12;
- public static final int EQUAL=102;
- public static final int VK_NO_LOOP=48;
- public static final int SEMICOLON=81;
- public static final int VK_TEMPLATE=62;
- public static final int VT_AND_IMPLICIT=22;
- public static final int NULL=109;
- public static final int COLON=90;
- public static final int MULTI_LINE_COMMENT=124;
- public static final int VT_RULE_ATTRIBUTES=16;
- public static final int RIGHT_SQUARE=111;
- public static final int VK_AGENDA_GROUP=51;
- public static final int VT_FACT_OR=33;
- public static final int VK_NOT=69;
- public static final int VK_DATE_EXPIRES=46;
- public static final int ARROW=101;
- public static final int FLOAT=108;
- public static final int VK_EXTEND=59;
- public static final int VT_SLOT_ID=14;
- public static final int VT_CURLY_CHUNK=18;
- public static final int VT_OR_PREFIX=24;
- public static final int DOUBLE_PIPE=95;
- public static final int VK_END=79;
- public static final int LESS=105;
- public static final int VT_TYPE_DECLARE_ID=11;
- public static final int VT_PATTERN=31;
- public static final int VK_DATE_EFFECTIVE=45;
- public static final int EscapeSequence=118;
- public static final int VK_EXISTS=73;
- public static final int INT=94;
- public static final int VT_BIND_FIELD=34;
- public static final int VK_RULE=58;
- public static final int VK_EVAL=67;
- public static final int GREATER=103;
- public static final int VT_FACT_BINDING=32;
- public static final int ID=82;
- public static final int FROM=97;
- public static final int NOT_EQUAL=107;
- public static final int RIGHT_CURLY=114;
- public static final int VK_OPERATOR=78;
- public static final int VK_ENTRY_POINT=68;
- public static final int VT_PARAM_LIST=44;
- public static final int VT_AND_INFIX=25;
- public static final int BOOL=93;
- public static final int VT_FROM_SOURCE=29;
- public static final int VK_LOCK_ON_ACTIVE=47;
- public static final int VT_FUNCTION_IMPORT=5;
- public static final int VK_IN=70;
- public static final int VT_RHS_CHUNK=17;
- public static final int GREATER_EQUAL=104;
- public static final int VT_OR_INFIX=26;
- public static final int DOT_STAR=84;
- public static final int VK_OR=71;
- public static final int VT_GLOBAL_ID=42;
- public static final int LESS_EQUAL=106;
- public static final int ACCUMULATE=99;
- public static final int VK_RULEFLOW_GROUP=52;
- public static final int VT_FUNCTION_ID=43;
- public static final int EOF=-1;
- public static final int VT_CONSTRAINTS=7;
- public static final int VT_IMPORT_ID=41;
- public static final int EOL=116;
- public static final int VK_INIT=80;
- public static final int VK_ACTIVATION_GROUP=50;
- public static final int OctalEscape=121;
- public static final int VK_ACTION=75;
- public static final int RIGHT_PAREN=88;
- public static final int VT_TEMPLATE_ID=10;
- public static final int VK_DECLARE=64;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=123;
-
- // delegates
- // delegators
-
-
- public Tree2TestDRL(TreeNodeStream input) {
- this(input, new RecognizerSharedState());
- }
- public Tree2TestDRL(TreeNodeStream input, RecognizerSharedState state) {
- super(input, state);
-
- }
-
-
- public String[] getTokenNames() { return Tree2TestDRL.tokenNames; }
- public String getGrammarFileName() { return "src/main/resources/org/drools/lang/Tree2TestDRL.g"; }
-
-
-
- // $ANTLR start "compilation_unit"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:13:1: compilation_unit : ^( VT_COMPILATION_UNIT ( package_statement )? ( statement )* ) ;
- public final void compilation_unit() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:2: ( ^( VT_COMPILATION_UNIT ( package_statement )? ( statement )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:4: ^( VT_COMPILATION_UNIT ( package_statement )? ( statement )* )
- {
- match(input,VT_COMPILATION_UNIT,FOLLOW_VT_COMPILATION_UNIT_in_compilation_unit43);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:26: ( package_statement )?
- int alt1=2;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0==VK_PACKAGE) ) {
- alt1=1;
- }
- switch (alt1) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:26: package_statement
- {
- pushFollow(FOLLOW_package_statement_in_compilation_unit45);
- package_statement();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:45: ( statement )*
- loop2:
- do {
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0==VT_FUNCTION_IMPORT||(LA2_0>=VK_DATE_EFFECTIVE && LA2_0<=VK_ENABLED)||LA2_0==VK_RULE||LA2_0==VK_IMPORT||(LA2_0>=VK_TEMPLATE && LA2_0<=VK_GLOBAL)) ) {
- alt2=1;
- }
-
-
- switch (alt2) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:45: statement
- {
- pushFollow(FOLLOW_statement_in_compilation_unit48);
- statement();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop2;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
- }
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "compilation_unit"
-
-
- // $ANTLR start "package_statement"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:17:1: package_statement : ^( VK_PACKAGE package_id ) ;
- public final void package_statement() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:18:2: ( ^( VK_PACKAGE package_id ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:18:4: ^( VK_PACKAGE package_id )
- {
- match(input,VK_PACKAGE,FOLLOW_VK_PACKAGE_in_package_statement63);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_package_id_in_package_statement65);
- package_id();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "package_statement"
-
-
- // $ANTLR start "package_id"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:21:1: package_id : ^( VT_PACKAGE_ID ( ID )+ ) ;
- public final void package_id() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:2: ( ^( VT_PACKAGE_ID ( ID )+ ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:4: ^( VT_PACKAGE_ID ( ID )+ )
- {
- match(input,VT_PACKAGE_ID,FOLLOW_VT_PACKAGE_ID_in_package_id78);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:20: ( ID )+
- int cnt3=0;
- loop3:
- do {
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0==ID) ) {
- alt3=1;
- }
-
-
- switch (alt3) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:20: ID
- {
- match(input,ID,FOLLOW_ID_in_package_id80);
-
- }
- break;
-
- default :
- if ( cnt3 >= 1 ) break loop3;
- EarlyExitException eee =
- new EarlyExitException(3, input);
- throw eee;
- }
- cnt3++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "package_id"
-
-
- // $ANTLR start "statement"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:25:1: statement : ( rule_attribute | function_import_statement | import_statement | global | function | template | rule | query | type_declaration );
- public final void statement() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:26:2: ( rule_attribute | function_import_statement | import_statement | global | function | template | rule | query | type_declaration )
- int alt4=9;
- switch ( input.LA(1) ) {
- case VK_DATE_EFFECTIVE:
- case VK_DATE_EXPIRES:
- case VK_LOCK_ON_ACTIVE:
- case VK_NO_LOOP:
- case VK_AUTO_FOCUS:
- case VK_ACTIVATION_GROUP:
- case VK_AGENDA_GROUP:
- case VK_RULEFLOW_GROUP:
- case VK_DURATION:
- case VK_DIALECT:
- case VK_SALIENCE:
- case VK_ENABLED:
- {
- alt4=1;
- }
- break;
- case VT_FUNCTION_IMPORT:
- {
- alt4=2;
- }
- break;
- case VK_IMPORT:
- {
- alt4=3;
- }
- break;
- case VK_GLOBAL:
- {
- alt4=4;
- }
- break;
- case VK_FUNCTION:
- {
- alt4=5;
- }
- break;
- case VK_TEMPLATE:
- {
- alt4=6;
- }
- break;
- case VK_RULE:
- {
- alt4=7;
- }
- break;
- case VK_QUERY:
- {
- alt4=8;
- }
- break;
- case VK_DECLARE:
- {
- alt4=9;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 4, 0, input);
-
- throw nvae;
- }
-
- switch (alt4) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:26:4: rule_attribute
- {
- pushFollow(FOLLOW_rule_attribute_in_statement93);
- rule_attribute();
-
- state._fsp--;
-
-
- }
- break;
- case 2 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:27:4: function_import_statement
- {
- pushFollow(FOLLOW_function_import_statement_in_statement98);
- function_import_statement();
-
- state._fsp--;
-
-
- }
- break;
- case 3 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:28:4: import_statement
- {
- pushFollow(FOLLOW_import_statement_in_statement104);
- import_statement();
-
- state._fsp--;
-
-
- }
- break;
- case 4 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:29:4: global
- {
- pushFollow(FOLLOW_global_in_statement110);
- global();
-
- state._fsp--;
-
-
- }
- break;
- case 5 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:30:4: function
- {
- pushFollow(FOLLOW_function_in_statement116);
- function();
-
- state._fsp--;
-
-
- }
- break;
- case 6 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:31:4: template
- {
- pushFollow(FOLLOW_template_in_statement121);
- template();
-
- state._fsp--;
-
-
- }
- break;
- case 7 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:32:4: rule
- {
- pushFollow(FOLLOW_rule_in_statement126);
- rule();
-
- state._fsp--;
-
-
- }
- break;
- case 8 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:33:4: query
- {
- pushFollow(FOLLOW_query_in_statement131);
- query();
-
- state._fsp--;
-
-
- }
- break;
- case 9 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:34:4: type_declaration
- {
- pushFollow(FOLLOW_type_declaration_in_statement136);
- type_declaration();
-
- state._fsp--;
-
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "statement"
-
-
- // $ANTLR start "import_statement"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:37:1: import_statement : ^( VK_IMPORT import_name ) ;
- public final void import_statement() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:38:2: ( ^( VK_IMPORT import_name ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:38:4: ^( VK_IMPORT import_name )
- {
- match(input,VK_IMPORT,FOLLOW_VK_IMPORT_in_import_statement148);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_import_name_in_import_statement150);
- import_name();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "import_statement"
-
-
- // $ANTLR start "function_import_statement"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:41:1: function_import_statement : ^( VT_FUNCTION_IMPORT VK_FUNCTION import_name ) ;
- public final void function_import_statement() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:42:2: ( ^( VT_FUNCTION_IMPORT VK_FUNCTION import_name ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:42:4: ^( VT_FUNCTION_IMPORT VK_FUNCTION import_name )
- {
- match(input,VT_FUNCTION_IMPORT,FOLLOW_VT_FUNCTION_IMPORT_in_function_import_statement163);
-
- match(input, Token.DOWN, null);
- match(input,VK_FUNCTION,FOLLOW_VK_FUNCTION_in_function_import_statement165);
- pushFollow(FOLLOW_import_name_in_function_import_statement167);
- import_name();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "function_import_statement"
-
-
- // $ANTLR start "import_name"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:45:1: import_name : ^( VT_IMPORT_ID ( ID )+ ( DOT_STAR )? ) ;
- public final void import_name() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:2: ( ^( VT_IMPORT_ID ( ID )+ ( DOT_STAR )? ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:4: ^( VT_IMPORT_ID ( ID )+ ( DOT_STAR )? )
- {
- match(input,VT_IMPORT_ID,FOLLOW_VT_IMPORT_ID_in_import_name180);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:19: ( ID )+
- int cnt5=0;
- loop5:
- do {
- int alt5=2;
- int LA5_0 = input.LA(1);
-
- if ( (LA5_0==ID) ) {
- alt5=1;
- }
-
-
- switch (alt5) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:19: ID
- {
- match(input,ID,FOLLOW_ID_in_import_name182);
-
- }
- break;
-
- default :
- if ( cnt5 >= 1 ) break loop5;
- EarlyExitException eee =
- new EarlyExitException(5, input);
- throw eee;
- }
- cnt5++;
- } while (true);
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:23: ( DOT_STAR )?
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( (LA6_0==DOT_STAR) ) {
- alt6=1;
- }
- switch (alt6) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:23: DOT_STAR
- {
- match(input,DOT_STAR,FOLLOW_DOT_STAR_in_import_name185);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "import_name"
-
-
- // $ANTLR start "global"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:49:1: global : ^( VK_GLOBAL data_type VT_GLOBAL_ID ) ;
- public final void global() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:50:2: ( ^( VK_GLOBAL data_type VT_GLOBAL_ID ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:50:4: ^( VK_GLOBAL data_type VT_GLOBAL_ID )
- {
- match(input,VK_GLOBAL,FOLLOW_VK_GLOBAL_in_global199);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_data_type_in_global201);
- data_type();
-
- state._fsp--;
-
- match(input,VT_GLOBAL_ID,FOLLOW_VT_GLOBAL_ID_in_global203);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "global"
-
-
- // $ANTLR start "function"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:53:1: function : ^( VK_FUNCTION ( data_type )? VT_FUNCTION_ID parameters curly_chunk ) ;
- public final void function() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:2: ( ^( VK_FUNCTION ( data_type )? VT_FUNCTION_ID parameters curly_chunk ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:4: ^( VK_FUNCTION ( data_type )? VT_FUNCTION_ID parameters curly_chunk )
- {
- match(input,VK_FUNCTION,FOLLOW_VK_FUNCTION_in_function216);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:18: ( data_type )?
- int alt7=2;
- int LA7_0 = input.LA(1);
-
- if ( (LA7_0==VT_DATA_TYPE) ) {
- alt7=1;
- }
- switch (alt7) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:18: data_type
- {
- pushFollow(FOLLOW_data_type_in_function218);
- data_type();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- match(input,VT_FUNCTION_ID,FOLLOW_VT_FUNCTION_ID_in_function221);
- pushFollow(FOLLOW_parameters_in_function223);
- parameters();
-
- state._fsp--;
-
- pushFollow(FOLLOW_curly_chunk_in_function225);
- curly_chunk();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "function"
-
-
- // $ANTLR start "query"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:57:1: query : ^( VK_QUERY VT_QUERY_ID ( parameters )? lhs_block VK_END ) ;
- public final void query() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:2: ( ^( VK_QUERY VT_QUERY_ID ( parameters )? lhs_block VK_END ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:4: ^( VK_QUERY VT_QUERY_ID ( parameters )? lhs_block VK_END )
- {
- match(input,VK_QUERY,FOLLOW_VK_QUERY_in_query238);
-
- match(input, Token.DOWN, null);
- match(input,VT_QUERY_ID,FOLLOW_VT_QUERY_ID_in_query240);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:27: ( parameters )?
- int alt8=2;
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0==VT_PARAM_LIST) ) {
- alt8=1;
- }
- switch (alt8) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:27: parameters
- {
- pushFollow(FOLLOW_parameters_in_query242);
- parameters();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_lhs_block_in_query245);
- lhs_block();
-
- state._fsp--;
-
- match(input,VK_END,FOLLOW_VK_END_in_query247);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "query"
-
-
- // $ANTLR start "parameters"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:61:1: parameters : ^( VT_PARAM_LIST ( param_definition )* ) ;
- public final void parameters() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:2: ( ^( VT_PARAM_LIST ( param_definition )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:4: ^( VT_PARAM_LIST ( param_definition )* )
- {
- match(input,VT_PARAM_LIST,FOLLOW_VT_PARAM_LIST_in_parameters260);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:20: ( param_definition )*
- loop9:
- do {
- int alt9=2;
- int LA9_0 = input.LA(1);
-
- if ( (LA9_0==VT_DATA_TYPE||LA9_0==ID) ) {
- alt9=1;
- }
-
-
- switch (alt9) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:20: param_definition
- {
- pushFollow(FOLLOW_param_definition_in_parameters262);
- param_definition();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop9;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
- }
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "parameters"
-
-
- // $ANTLR start "param_definition"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:65:1: param_definition : ( data_type )? argument ;
- public final void param_definition() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:2: ( ( data_type )? argument )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:4: ( data_type )? argument
- {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:4: ( data_type )?
- int alt10=2;
- int LA10_0 = input.LA(1);
-
- if ( (LA10_0==VT_DATA_TYPE) ) {
- alt10=1;
- }
- switch (alt10) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:4: data_type
- {
- pushFollow(FOLLOW_data_type_in_param_definition275);
- data_type();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_argument_in_param_definition278);
- argument();
-
- state._fsp--;
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "param_definition"
-
-
- // $ANTLR start "argument"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:69:1: argument : ID ( dimension_definition )* ;
- public final void argument() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:2: ( ID ( dimension_definition )* )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:4: ID ( dimension_definition )*
- {
- match(input,ID,FOLLOW_ID_in_argument289);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:7: ( dimension_definition )*
- loop11:
- do {
- int alt11=2;
- int LA11_0 = input.LA(1);
-
- if ( (LA11_0==LEFT_SQUARE) ) {
- alt11=1;
- }
-
-
- switch (alt11) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:7: dimension_definition
- {
- pushFollow(FOLLOW_dimension_definition_in_argument291);
- dimension_definition();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop11;
- }
- } while (true);
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "argument"
-
-
- // $ANTLR start "type_declaration"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:73:1: type_declaration : ^( VK_DECLARE VT_TYPE_DECLARE_ID ( decl_metadata )* ( decl_field )* VK_END ) ;
- public final void type_declaration() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:2: ( ^( VK_DECLARE VT_TYPE_DECLARE_ID ( decl_metadata )* ( decl_field )* VK_END ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:4: ^( VK_DECLARE VT_TYPE_DECLARE_ID ( decl_metadata )* ( decl_field )* VK_END )
- {
- match(input,VK_DECLARE,FOLLOW_VK_DECLARE_in_type_declaration304);
-
- match(input, Token.DOWN, null);
- match(input,VT_TYPE_DECLARE_ID,FOLLOW_VT_TYPE_DECLARE_ID_in_type_declaration306);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:36: ( decl_metadata )*
- loop12:
- do {
- int alt12=2;
- int LA12_0 = input.LA(1);
-
- if ( (LA12_0==AT) ) {
- alt12=1;
- }
-
-
- switch (alt12) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:36: decl_metadata
- {
- pushFollow(FOLLOW_decl_metadata_in_type_declaration308);
- decl_metadata();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop12;
- }
- } while (true);
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:51: ( decl_field )*
- loop13:
- do {
- int alt13=2;
- int LA13_0 = input.LA(1);
-
- if ( (LA13_0==ID) ) {
- alt13=1;
- }
-
-
- switch (alt13) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:51: decl_field
- {
- pushFollow(FOLLOW_decl_field_in_type_declaration311);
- decl_field();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop13;
- }
- } while (true);
-
- match(input,VK_END,FOLLOW_VK_END_in_type_declaration314);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "type_declaration"
-
-
- // $ANTLR start "decl_metadata"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:77:1: decl_metadata : ^( AT ID ( VT_PAREN_CHUNK )? ) ;
- public final void decl_metadata() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:2: ( ^( AT ID ( VT_PAREN_CHUNK )? ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:4: ^( AT ID ( VT_PAREN_CHUNK )? )
- {
- match(input,AT,FOLLOW_AT_in_decl_metadata327);
-
- match(input, Token.DOWN, null);
- match(input,ID,FOLLOW_ID_in_decl_metadata329);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:12: ( VT_PAREN_CHUNK )?
- int alt14=2;
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0==VT_PAREN_CHUNK) ) {
- alt14=1;
- }
- switch (alt14) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:12: VT_PAREN_CHUNK
- {
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_decl_metadata331);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "decl_metadata"
-
-
- // $ANTLR start "decl_field"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:81:1: decl_field : ^( ID ( decl_field_initialization )? data_type ( decl_metadata )* ) ;
- public final void decl_field() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:2: ( ^( ID ( decl_field_initialization )? data_type ( decl_metadata )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:4: ^( ID ( decl_field_initialization )? data_type ( decl_metadata )* )
- {
- match(input,ID,FOLLOW_ID_in_decl_field345);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:9: ( decl_field_initialization )?
- int alt15=2;
- int LA15_0 = input.LA(1);
-
- if ( (LA15_0==EQUALS) ) {
- alt15=1;
- }
- switch (alt15) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:9: decl_field_initialization
- {
- pushFollow(FOLLOW_decl_field_initialization_in_decl_field347);
- decl_field_initialization();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_data_type_in_decl_field350);
- data_type();
-
- state._fsp--;
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:46: ( decl_metadata )*
- loop16:
- do {
- int alt16=2;
- int LA16_0 = input.LA(1);
-
- if ( (LA16_0==AT) ) {
- alt16=1;
- }
-
-
- switch (alt16) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:46: decl_metadata
- {
- pushFollow(FOLLOW_decl_metadata_in_decl_field352);
- decl_metadata();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop16;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "decl_field"
-
-
- // $ANTLR start "decl_field_initialization"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:85:1: decl_field_initialization : ^( EQUALS VT_PAREN_CHUNK ) ;
- public final void decl_field_initialization() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:86:2: ( ^( EQUALS VT_PAREN_CHUNK ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:86:4: ^( EQUALS VT_PAREN_CHUNK )
- {
- match(input,EQUALS,FOLLOW_EQUALS_in_decl_field_initialization366);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_decl_field_initialization368);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "decl_field_initialization"
-
-
- // $ANTLR start "template"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:89:1: template : ^( VK_TEMPLATE VT_TEMPLATE_ID ( template_slot )+ VK_END ) ;
- public final void template() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:2: ( ^( VK_TEMPLATE VT_TEMPLATE_ID ( template_slot )+ VK_END ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:4: ^( VK_TEMPLATE VT_TEMPLATE_ID ( template_slot )+ VK_END )
- {
- match(input,VK_TEMPLATE,FOLLOW_VK_TEMPLATE_in_template381);
-
- match(input, Token.DOWN, null);
- match(input,VT_TEMPLATE_ID,FOLLOW_VT_TEMPLATE_ID_in_template383);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:33: ( template_slot )+
- int cnt17=0;
- loop17:
- do {
- int alt17=2;
- int LA17_0 = input.LA(1);
-
- if ( (LA17_0==VT_SLOT) ) {
- alt17=1;
- }
-
-
- switch (alt17) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:33: template_slot
- {
- pushFollow(FOLLOW_template_slot_in_template385);
- template_slot();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt17 >= 1 ) break loop17;
- EarlyExitException eee =
- new EarlyExitException(17, input);
- throw eee;
- }
- cnt17++;
- } while (true);
-
- match(input,VK_END,FOLLOW_VK_END_in_template388);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "template"
-
-
- // $ANTLR start "template_slot"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:93:1: template_slot : ^( VT_SLOT data_type VT_SLOT_ID ) ;
- public final void template_slot() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:94:2: ( ^( VT_SLOT data_type VT_SLOT_ID ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:94:4: ^( VT_SLOT data_type VT_SLOT_ID )
- {
- match(input,VT_SLOT,FOLLOW_VT_SLOT_in_template_slot401);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_data_type_in_template_slot403);
- data_type();
-
- state._fsp--;
-
- match(input,VT_SLOT_ID,FOLLOW_VT_SLOT_ID_in_template_slot405);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "template_slot"
-
-
- // $ANTLR start "rule"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:97:1: rule : ^( VK_RULE VT_RULE_ID ( rule_attributes )? ( when_part )? VT_RHS_CHUNK ) ;
- public final void rule() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:2: ( ^( VK_RULE VT_RULE_ID ( rule_attributes )? ( when_part )? VT_RHS_CHUNK ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:4: ^( VK_RULE VT_RULE_ID ( rule_attributes )? ( when_part )? VT_RHS_CHUNK )
- {
- match(input,VK_RULE,FOLLOW_VK_RULE_in_rule418);
-
- match(input, Token.DOWN, null);
- match(input,VT_RULE_ID,FOLLOW_VT_RULE_ID_in_rule420);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:25: ( rule_attributes )?
- int alt18=2;
- int LA18_0 = input.LA(1);
-
- if ( (LA18_0==VT_RULE_ATTRIBUTES) ) {
- alt18=1;
- }
- switch (alt18) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:25: rule_attributes
- {
- pushFollow(FOLLOW_rule_attributes_in_rule422);
- rule_attributes();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:42: ( when_part )?
- int alt19=2;
- int LA19_0 = input.LA(1);
-
- if ( (LA19_0==WHEN) ) {
- alt19=1;
- }
- switch (alt19) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:42: when_part
- {
- pushFollow(FOLLOW_when_part_in_rule425);
- when_part();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- match(input,VT_RHS_CHUNK,FOLLOW_VT_RHS_CHUNK_in_rule428);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "rule"
-
-
- // $ANTLR start "when_part"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:101:1: when_part : WHEN lhs_block ;
- public final void when_part() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:102:2: ( WHEN lhs_block )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:102:4: WHEN lhs_block
- {
- match(input,WHEN,FOLLOW_WHEN_in_when_part440);
- pushFollow(FOLLOW_lhs_block_in_when_part442);
- lhs_block();
-
- state._fsp--;
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "when_part"
-
-
- // $ANTLR start "rule_attributes"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:105:1: rule_attributes : ^( VT_RULE_ATTRIBUTES ( VK_ATTRIBUTES )? ( rule_attribute )+ ) ;
- public final void rule_attributes() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:2: ( ^( VT_RULE_ATTRIBUTES ( VK_ATTRIBUTES )? ( rule_attribute )+ ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:4: ^( VT_RULE_ATTRIBUTES ( VK_ATTRIBUTES )? ( rule_attribute )+ )
- {
- match(input,VT_RULE_ATTRIBUTES,FOLLOW_VT_RULE_ATTRIBUTES_in_rule_attributes454);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:25: ( VK_ATTRIBUTES )?
- int alt20=2;
- int LA20_0 = input.LA(1);
-
- if ( (LA20_0==VK_ATTRIBUTES) ) {
- alt20=1;
- }
- switch (alt20) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:25: VK_ATTRIBUTES
- {
- match(input,VK_ATTRIBUTES,FOLLOW_VK_ATTRIBUTES_in_rule_attributes456);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:40: ( rule_attribute )+
- int cnt21=0;
- loop21:
- do {
- int alt21=2;
- int LA21_0 = input.LA(1);
-
- if ( ((LA21_0>=VK_DATE_EFFECTIVE && LA21_0<=VK_ENABLED)) ) {
- alt21=1;
- }
-
-
- switch (alt21) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:40: rule_attribute
- {
- pushFollow(FOLLOW_rule_attribute_in_rule_attributes459);
- rule_attribute();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt21 >= 1 ) break loop21;
- EarlyExitException eee =
- new EarlyExitException(21, input);
- throw eee;
- }
- cnt21++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "rule_attributes"
-
-
- // $ANTLR start "rule_attribute"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:109:1: rule_attribute : ( ^( VK_SALIENCE ( INT | VT_PAREN_CHUNK ) ) | ^( VK_NO_LOOP ( BOOL )? ) | ^( VK_AGENDA_GROUP STRING ) | ^( VK_DURATION INT ) | ^( VK_ACTIVATION_GROUP STRING ) | ^( VK_AUTO_FOCUS ( BOOL )? ) | ^( VK_DATE_EFFECTIVE STRING ) | ^( VK_DATE_EXPIRES STRING ) | ^( VK_ENABLED BOOL ) | ^( VK_RULEFLOW_GROUP STRING ) | ^( VK_LOCK_ON_ACTIVE ( BOOL )? ) | ^( VK_DIALECT STRING ) );
- public final void rule_attribute() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:110:2: ( ^( VK_SALIENCE ( INT | VT_PAREN_CHUNK ) ) | ^( VK_NO_LOOP ( BOOL )? ) | ^( VK_AGENDA_GROUP STRING ) | ^( VK_DURATION INT ) | ^( VK_ACTIVATION_GROUP STRING ) | ^( VK_AUTO_FOCUS ( BOOL )? ) | ^( VK_DATE_EFFECTIVE STRING ) | ^( VK_DATE_EXPIRES STRING ) | ^( VK_ENABLED BOOL ) | ^( VK_RULEFLOW_GROUP STRING ) | ^( VK_LOCK_ON_ACTIVE ( BOOL )? ) | ^( VK_DIALECT STRING ) )
- int alt25=12;
- switch ( input.LA(1) ) {
- case VK_SALIENCE:
- {
- alt25=1;
- }
- break;
- case VK_NO_LOOP:
- {
- alt25=2;
- }
- break;
- case VK_AGENDA_GROUP:
- {
- alt25=3;
- }
- break;
- case VK_DURATION:
- {
- alt25=4;
- }
- break;
- case VK_ACTIVATION_GROUP:
- {
- alt25=5;
- }
- break;
- case VK_AUTO_FOCUS:
- {
- alt25=6;
- }
- break;
- case VK_DATE_EFFECTIVE:
- {
- alt25=7;
- }
- break;
- case VK_DATE_EXPIRES:
- {
- alt25=8;
- }
- break;
- case VK_ENABLED:
- {
- alt25=9;
- }
- break;
- case VK_RULEFLOW_GROUP:
- {
- alt25=10;
- }
- break;
- case VK_LOCK_ON_ACTIVE:
- {
- alt25=11;
- }
- break;
- case VK_DIALECT:
- {
- alt25=12;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 25, 0, input);
-
- throw nvae;
- }
-
- switch (alt25) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:110:4: ^( VK_SALIENCE ( INT | VT_PAREN_CHUNK ) )
- {
- match(input,VK_SALIENCE,FOLLOW_VK_SALIENCE_in_rule_attribute473);
-
- match(input, Token.DOWN, null);
- if ( input.LA(1)==VT_PAREN_CHUNK||input.LA(1)==INT ) {
- input.consume();
- state.errorRecovery=false;
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- throw mse;
- }
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 2 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:111:4: ^( VK_NO_LOOP ( BOOL )? )
- {
- match(input,VK_NO_LOOP,FOLLOW_VK_NO_LOOP_in_rule_attribute487);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:111:17: ( BOOL )?
- int alt22=2;
- int LA22_0 = input.LA(1);
-
- if ( (LA22_0==BOOL) ) {
- alt22=1;
- }
- switch (alt22) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:111:17: BOOL
- {
- match(input,BOOL,FOLLOW_BOOL_in_rule_attribute489);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
- }
-
- }
- break;
- case 3 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:112:4: ^( VK_AGENDA_GROUP STRING )
- {
- match(input,VK_AGENDA_GROUP,FOLLOW_VK_AGENDA_GROUP_in_rule_attribute499);
-
- match(input, Token.DOWN, null);
- match(input,STRING,FOLLOW_STRING_in_rule_attribute501);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 4 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:113:4: ^( VK_DURATION INT )
- {
- match(input,VK_DURATION,FOLLOW_VK_DURATION_in_rule_attribute510);
-
- match(input, Token.DOWN, null);
- match(input,INT,FOLLOW_INT_in_rule_attribute512);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 5 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:114:4: ^( VK_ACTIVATION_GROUP STRING )
- {
- match(input,VK_ACTIVATION_GROUP,FOLLOW_VK_ACTIVATION_GROUP_in_rule_attribute522);
-
- match(input, Token.DOWN, null);
- match(input,STRING,FOLLOW_STRING_in_rule_attribute524);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 6 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:115:4: ^( VK_AUTO_FOCUS ( BOOL )? )
- {
- match(input,VK_AUTO_FOCUS,FOLLOW_VK_AUTO_FOCUS_in_rule_attribute532);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:115:20: ( BOOL )?
- int alt23=2;
- int LA23_0 = input.LA(1);
-
- if ( (LA23_0==BOOL) ) {
- alt23=1;
- }
- switch (alt23) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:115:20: BOOL
- {
- match(input,BOOL,FOLLOW_BOOL_in_rule_attribute534);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
- }
-
- }
- break;
- case 7 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:116:4: ^( VK_DATE_EFFECTIVE STRING )
- {
- match(input,VK_DATE_EFFECTIVE,FOLLOW_VK_DATE_EFFECTIVE_in_rule_attribute543);
-
- match(input, Token.DOWN, null);
- match(input,STRING,FOLLOW_STRING_in_rule_attribute545);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 8 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:117:4: ^( VK_DATE_EXPIRES STRING )
- {
- match(input,VK_DATE_EXPIRES,FOLLOW_VK_DATE_EXPIRES_in_rule_attribute553);
-
- match(input, Token.DOWN, null);
- match(input,STRING,FOLLOW_STRING_in_rule_attribute555);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 9 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:118:4: ^( VK_ENABLED BOOL )
- {
- match(input,VK_ENABLED,FOLLOW_VK_ENABLED_in_rule_attribute563);
-
- match(input, Token.DOWN, null);
- match(input,BOOL,FOLLOW_BOOL_in_rule_attribute565);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 10 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:119:4: ^( VK_RULEFLOW_GROUP STRING )
- {
- match(input,VK_RULEFLOW_GROUP,FOLLOW_VK_RULEFLOW_GROUP_in_rule_attribute573);
-
- match(input, Token.DOWN, null);
- match(input,STRING,FOLLOW_STRING_in_rule_attribute575);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 11 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:120:4: ^( VK_LOCK_ON_ACTIVE ( BOOL )? )
- {
- match(input,VK_LOCK_ON_ACTIVE,FOLLOW_VK_LOCK_ON_ACTIVE_in_rule_attribute583);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:120:24: ( BOOL )?
- int alt24=2;
- int LA24_0 = input.LA(1);
-
- if ( (LA24_0==BOOL) ) {
- alt24=1;
- }
- switch (alt24) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:120:24: BOOL
- {
- match(input,BOOL,FOLLOW_BOOL_in_rule_attribute585);
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
- }
-
- }
- break;
- case 12 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:121:4: ^( VK_DIALECT STRING )
- {
- match(input,VK_DIALECT,FOLLOW_VK_DIALECT_in_rule_attribute593);
-
- match(input, Token.DOWN, null);
- match(input,STRING,FOLLOW_STRING_in_rule_attribute595);
-
- match(input, Token.UP, null);
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "rule_attribute"
-
-
- // $ANTLR start "lhs_block"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:124:1: lhs_block : ^( VT_AND_IMPLICIT ( lhs )* ) ;
- public final void lhs_block() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:2: ( ^( VT_AND_IMPLICIT ( lhs )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:4: ^( VT_AND_IMPLICIT ( lhs )* )
- {
- match(input,VT_AND_IMPLICIT,FOLLOW_VT_AND_IMPLICIT_in_lhs_block609);
-
- if ( input.LA(1)==Token.DOWN ) {
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:22: ( lhs )*
- loop26:
- do {
- int alt26=2;
- int LA26_0 = input.LA(1);
-
- if ( ((LA26_0>=VT_AND_PREFIX && LA26_0<=VT_OR_INFIX)||LA26_0==VT_PATTERN||LA26_0==VK_EVAL||LA26_0==VK_NOT||(LA26_0>=VK_EXISTS && LA26_0<=VK_FORALL)||LA26_0==FROM) ) {
- alt26=1;
- }
-
-
- switch (alt26) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:22: lhs
- {
- pushFollow(FOLLOW_lhs_in_lhs_block611);
- lhs();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop26;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
- }
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "lhs_block"
-
-
- // $ANTLR start "lhs"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:1: lhs : ( ^( VT_OR_PREFIX ( lhs )+ ) | ^( VT_OR_INFIX lhs lhs ) | ^( VT_AND_PREFIX ( lhs )+ ) | ^( VT_AND_INFIX lhs lhs ) | ^( VK_EXISTS lhs ) | ^( VK_NOT lhs ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_FORALL ( lhs )+ ) | ^( FROM lhs_pattern from_elements ) | lhs_pattern );
- public final void lhs() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:5: ( ^( VT_OR_PREFIX ( lhs )+ ) | ^( VT_OR_INFIX lhs lhs ) | ^( VT_AND_PREFIX ( lhs )+ ) | ^( VT_AND_INFIX lhs lhs ) | ^( VK_EXISTS lhs ) | ^( VK_NOT lhs ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_FORALL ( lhs )+ ) | ^( FROM lhs_pattern from_elements ) | lhs_pattern )
- int alt30=10;
- switch ( input.LA(1) ) {
- case VT_OR_PREFIX:
- {
- alt30=1;
- }
- break;
- case VT_OR_INFIX:
- {
- alt30=2;
- }
- break;
- case VT_AND_PREFIX:
- {
- alt30=3;
- }
- break;
- case VT_AND_INFIX:
- {
- alt30=4;
- }
- break;
- case VK_EXISTS:
- {
- alt30=5;
- }
- break;
- case VK_NOT:
- {
- alt30=6;
- }
- break;
- case VK_EVAL:
- {
- alt30=7;
- }
- break;
- case VK_FORALL:
- {
- alt30=8;
- }
- break;
- case FROM:
- {
- alt30=9;
- }
- break;
- case VT_PATTERN:
- {
- alt30=10;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 30, 0, input);
-
- throw nvae;
- }
-
- switch (alt30) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:7: ^( VT_OR_PREFIX ( lhs )+ )
- {
- match(input,VT_OR_PREFIX,FOLLOW_VT_OR_PREFIX_in_lhs624);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:22: ( lhs )+
- int cnt27=0;
- loop27:
- do {
- int alt27=2;
- int LA27_0 = input.LA(1);
-
- if ( ((LA27_0>=VT_AND_PREFIX && LA27_0<=VT_OR_INFIX)||LA27_0==VT_PATTERN||LA27_0==VK_EVAL||LA27_0==VK_NOT||(LA27_0>=VK_EXISTS && LA27_0<=VK_FORALL)||LA27_0==FROM) ) {
- alt27=1;
- }
-
-
- switch (alt27) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:22: lhs
- {
- pushFollow(FOLLOW_lhs_in_lhs626);
- lhs();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt27 >= 1 ) break loop27;
- EarlyExitException eee =
- new EarlyExitException(27, input);
- throw eee;
- }
- cnt27++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 2 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:129:4: ^( VT_OR_INFIX lhs lhs )
- {
- match(input,VT_OR_INFIX,FOLLOW_VT_OR_INFIX_in_lhs634);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_in_lhs636);
- lhs();
-
- state._fsp--;
-
- pushFollow(FOLLOW_lhs_in_lhs638);
- lhs();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 3 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:130:4: ^( VT_AND_PREFIX ( lhs )+ )
- {
- match(input,VT_AND_PREFIX,FOLLOW_VT_AND_PREFIX_in_lhs645);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:130:20: ( lhs )+
- int cnt28=0;
- loop28:
- do {
- int alt28=2;
- int LA28_0 = input.LA(1);
-
- if ( ((LA28_0>=VT_AND_PREFIX && LA28_0<=VT_OR_INFIX)||LA28_0==VT_PATTERN||LA28_0==VK_EVAL||LA28_0==VK_NOT||(LA28_0>=VK_EXISTS && LA28_0<=VK_FORALL)||LA28_0==FROM) ) {
- alt28=1;
- }
-
-
- switch (alt28) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:130:20: lhs
- {
- pushFollow(FOLLOW_lhs_in_lhs647);
- lhs();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt28 >= 1 ) break loop28;
- EarlyExitException eee =
- new EarlyExitException(28, input);
- throw eee;
- }
- cnt28++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 4 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:131:4: ^( VT_AND_INFIX lhs lhs )
- {
- match(input,VT_AND_INFIX,FOLLOW_VT_AND_INFIX_in_lhs655);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_in_lhs657);
- lhs();
-
- state._fsp--;
-
- pushFollow(FOLLOW_lhs_in_lhs659);
- lhs();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 5 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:132:4: ^( VK_EXISTS lhs )
- {
- match(input,VK_EXISTS,FOLLOW_VK_EXISTS_in_lhs666);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_in_lhs668);
- lhs();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 6 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:133:4: ^( VK_NOT lhs )
- {
- match(input,VK_NOT,FOLLOW_VK_NOT_in_lhs675);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_in_lhs677);
- lhs();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 7 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:134:4: ^( VK_EVAL VT_PAREN_CHUNK )
- {
- match(input,VK_EVAL,FOLLOW_VK_EVAL_in_lhs684);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_lhs686);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 8 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:135:4: ^( VK_FORALL ( lhs )+ )
- {
- match(input,VK_FORALL,FOLLOW_VK_FORALL_in_lhs693);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:135:16: ( lhs )+
- int cnt29=0;
- loop29:
- do {
- int alt29=2;
- int LA29_0 = input.LA(1);
-
- if ( ((LA29_0>=VT_AND_PREFIX && LA29_0<=VT_OR_INFIX)||LA29_0==VT_PATTERN||LA29_0==VK_EVAL||LA29_0==VK_NOT||(LA29_0>=VK_EXISTS && LA29_0<=VK_FORALL)||LA29_0==FROM) ) {
- alt29=1;
- }
-
-
- switch (alt29) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:135:16: lhs
- {
- pushFollow(FOLLOW_lhs_in_lhs695);
- lhs();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt29 >= 1 ) break loop29;
- EarlyExitException eee =
- new EarlyExitException(29, input);
- throw eee;
- }
- cnt29++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 9 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:136:4: ^( FROM lhs_pattern from_elements )
- {
- match(input,FROM,FOLLOW_FROM_in_lhs703);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_pattern_in_lhs705);
- lhs_pattern();
-
- state._fsp--;
-
- pushFollow(FOLLOW_from_elements_in_lhs707);
- from_elements();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 10 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:137:4: lhs_pattern
- {
- pushFollow(FOLLOW_lhs_pattern_in_lhs713);
- lhs_pattern();
-
- state._fsp--;
-
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "lhs"
-
-
- // $ANTLR start "from_elements"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:140:1: from_elements : ( ^( ACCUMULATE lhs ( accumulate_init_clause | accumulate_id_clause ) ) | ^( COLLECT lhs ) | ^( VK_ENTRY_POINT VT_ENTRYPOINT_ID ) | ^( VT_FROM_SOURCE ID ( VT_PAREN_CHUNK )? ( expression_chain )? ) );
- public final void from_elements() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:2: ( ^( ACCUMULATE lhs ( accumulate_init_clause | accumulate_id_clause ) ) | ^( COLLECT lhs ) | ^( VK_ENTRY_POINT VT_ENTRYPOINT_ID ) | ^( VT_FROM_SOURCE ID ( VT_PAREN_CHUNK )? ( expression_chain )? ) )
- int alt34=4;
- switch ( input.LA(1) ) {
- case ACCUMULATE:
- {
- alt34=1;
- }
- break;
- case COLLECT:
- {
- alt34=2;
- }
- break;
- case VK_ENTRY_POINT:
- {
- alt34=3;
- }
- break;
- case VT_FROM_SOURCE:
- {
- alt34=4;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 34, 0, input);
-
- throw nvae;
- }
-
- switch (alt34) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:4: ^( ACCUMULATE lhs ( accumulate_init_clause | accumulate_id_clause ) )
- {
- match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_from_elements725);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_in_from_elements727);
- lhs();
-
- state._fsp--;
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:21: ( accumulate_init_clause | accumulate_id_clause )
- int alt31=2;
- int LA31_0 = input.LA(1);
-
- if ( (LA31_0==VT_ACCUMULATE_INIT_CLAUSE) ) {
- alt31=1;
- }
- else if ( (LA31_0==VT_ACCUMULATE_ID_CLAUSE) ) {
- alt31=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 31, 0, input);
-
- throw nvae;
- }
- switch (alt31) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:22: accumulate_init_clause
- {
- pushFollow(FOLLOW_accumulate_init_clause_in_from_elements730);
- accumulate_init_clause();
-
- state._fsp--;
-
-
- }
- break;
- case 2 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:45: accumulate_id_clause
- {
- pushFollow(FOLLOW_accumulate_id_clause_in_from_elements732);
- accumulate_id_clause();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 2 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:142:4: ^( COLLECT lhs )
- {
- match(input,COLLECT,FOLLOW_COLLECT_in_from_elements740);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_lhs_in_from_elements742);
- lhs();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 3 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:143:4: ^( VK_ENTRY_POINT VT_ENTRYPOINT_ID )
- {
- match(input,VK_ENTRY_POINT,FOLLOW_VK_ENTRY_POINT_in_from_elements749);
-
- match(input, Token.DOWN, null);
- match(input,VT_ENTRYPOINT_ID,FOLLOW_VT_ENTRYPOINT_ID_in_from_elements751);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 4 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:4: ^( VT_FROM_SOURCE ID ( VT_PAREN_CHUNK )? ( expression_chain )? )
- {
- match(input,VT_FROM_SOURCE,FOLLOW_VT_FROM_SOURCE_in_from_elements758);
-
- match(input, Token.DOWN, null);
- match(input,ID,FOLLOW_ID_in_from_elements760);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:24: ( VT_PAREN_CHUNK )?
- int alt32=2;
- int LA32_0 = input.LA(1);
-
- if ( (LA32_0==VT_PAREN_CHUNK) ) {
- alt32=1;
- }
- switch (alt32) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:24: VT_PAREN_CHUNK
- {
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_from_elements762);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:40: ( expression_chain )?
- int alt33=2;
- int LA33_0 = input.LA(1);
-
- if ( (LA33_0==VT_EXPRESSION_CHAIN) ) {
- alt33=1;
- }
- switch (alt33) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:40: expression_chain
- {
- pushFollow(FOLLOW_expression_chain_in_from_elements765);
- expression_chain();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "from_elements"
-
-
- // $ANTLR start "accumulate_init_clause"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:147:1: accumulate_init_clause : ^( VT_ACCUMULATE_INIT_CLAUSE ^( VK_INIT VT_PAREN_CHUNK ) ^( VK_ACTION VT_PAREN_CHUNK ) ( accumulate_init_reverse_clause )? ^( VK_RESULT VT_PAREN_CHUNK ) ) ;
- public final void accumulate_init_clause() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:148:2: ( ^( VT_ACCUMULATE_INIT_CLAUSE ^( VK_INIT VT_PAREN_CHUNK ) ^( VK_ACTION VT_PAREN_CHUNK ) ( accumulate_init_reverse_clause )? ^( VK_RESULT VT_PAREN_CHUNK ) ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:148:4: ^( VT_ACCUMULATE_INIT_CLAUSE ^( VK_INIT VT_PAREN_CHUNK ) ^( VK_ACTION VT_PAREN_CHUNK ) ( accumulate_init_reverse_clause )? ^( VK_RESULT VT_PAREN_CHUNK ) )
- {
- match(input,VT_ACCUMULATE_INIT_CLAUSE,FOLLOW_VT_ACCUMULATE_INIT_CLAUSE_in_accumulate_init_clause779);
-
- match(input, Token.DOWN, null);
- match(input,VK_INIT,FOLLOW_VK_INIT_in_accumulate_init_clause786);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause788);
-
- match(input, Token.UP, null);
- match(input,VK_ACTION,FOLLOW_VK_ACTION_in_accumulate_init_clause796);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause798);
-
- match(input, Token.UP, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:151:4: ( accumulate_init_reverse_clause )?
- int alt35=2;
- int LA35_0 = input.LA(1);
-
- if ( (LA35_0==VK_REVERSE) ) {
- alt35=1;
- }
- switch (alt35) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:151:4: accumulate_init_reverse_clause
- {
- pushFollow(FOLLOW_accumulate_init_reverse_clause_in_accumulate_init_clause805);
- accumulate_init_reverse_clause();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
- match(input,VK_RESULT,FOLLOW_VK_RESULT_in_accumulate_init_clause812);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause814);
-
- match(input, Token.UP, null);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "accumulate_init_clause"
-
-
- // $ANTLR start "accumulate_init_reverse_clause"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:155:1: accumulate_init_reverse_clause : ^( VK_REVERSE VT_PAREN_CHUNK ) ;
- public final void accumulate_init_reverse_clause() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:156:2: ( ^( VK_REVERSE VT_PAREN_CHUNK ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:156:4: ^( VK_REVERSE VT_PAREN_CHUNK )
- {
- match(input,VK_REVERSE,FOLLOW_VK_REVERSE_in_accumulate_init_reverse_clause828);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_reverse_clause830);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "accumulate_init_reverse_clause"
-
-
- // $ANTLR start "accumulate_id_clause"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:160:1: accumulate_id_clause : ^( VT_ACCUMULATE_ID_CLAUSE ID VT_PAREN_CHUNK ) ;
- public final void accumulate_id_clause() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:161:2: ( ^( VT_ACCUMULATE_ID_CLAUSE ID VT_PAREN_CHUNK ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:161:4: ^( VT_ACCUMULATE_ID_CLAUSE ID VT_PAREN_CHUNK )
- {
- match(input,VT_ACCUMULATE_ID_CLAUSE,FOLLOW_VT_ACCUMULATE_ID_CLAUSE_in_accumulate_id_clause844);
-
- match(input, Token.DOWN, null);
- match(input,ID,FOLLOW_ID_in_accumulate_id_clause846);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_id_clause848);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "accumulate_id_clause"
-
-
- // $ANTLR start "lhs_pattern"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:164:1: lhs_pattern : ^( VT_PATTERN fact_expression ) ( over_clause )? ;
- public final void lhs_pattern() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:2: ( ^( VT_PATTERN fact_expression ) ( over_clause )? )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:4: ^( VT_PATTERN fact_expression ) ( over_clause )?
- {
- match(input,VT_PATTERN,FOLLOW_VT_PATTERN_in_lhs_pattern861);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_lhs_pattern863);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:34: ( over_clause )?
- int alt36=2;
- int LA36_0 = input.LA(1);
-
- if ( (LA36_0==OVER) ) {
- alt36=1;
- }
- switch (alt36) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:34: over_clause
- {
- pushFollow(FOLLOW_over_clause_in_lhs_pattern866);
- over_clause();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "lhs_pattern"
-
-
- // $ANTLR start "over_clause"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:168:1: over_clause : ^( OVER ( over_element )+ ) ;
- public final void over_clause() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:2: ( ^( OVER ( over_element )+ ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:4: ^( OVER ( over_element )+ )
- {
- match(input,OVER,FOLLOW_OVER_in_over_clause879);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:11: ( over_element )+
- int cnt37=0;
- loop37:
- do {
- int alt37=2;
- int LA37_0 = input.LA(1);
-
- if ( (LA37_0==VT_BEHAVIOR) ) {
- alt37=1;
- }
-
-
- switch (alt37) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:11: over_element
- {
- pushFollow(FOLLOW_over_element_in_over_clause881);
- over_element();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt37 >= 1 ) break loop37;
- EarlyExitException eee =
- new EarlyExitException(37, input);
- throw eee;
- }
- cnt37++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "over_clause"
-
-
- // $ANTLR start "over_element"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:172:1: over_element : ^( VT_BEHAVIOR ID ID VT_PAREN_CHUNK ) ;
- public final void over_element() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:173:2: ( ^( VT_BEHAVIOR ID ID VT_PAREN_CHUNK ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:173:4: ^( VT_BEHAVIOR ID ID VT_PAREN_CHUNK )
- {
- match(input,VT_BEHAVIOR,FOLLOW_VT_BEHAVIOR_in_over_element895);
-
- match(input, Token.DOWN, null);
- match(input,ID,FOLLOW_ID_in_over_element897);
- match(input,ID,FOLLOW_ID_in_over_element899);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_over_element901);
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "over_element"
-
-
- // $ANTLR start "fact_expression"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:176:1: fact_expression : ( ^( DOUBLE_PIPE fact_expression fact_expression ) | ^( DOUBLE_AMPER fact_expression fact_expression ) | ^( VT_FACT_BINDING VT_LABEL fact_expression ) | ^( VT_FACT pattern_type ( fact_expression )* ) | ^( VT_FACT_OR fact_expression fact_expression ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_IN ( VK_NOT )? ( fact_expression )+ ) | ^( EQUAL fact_expression ) | ^( GREATER fact_expression ) | ^( GREATER_EQUAL fact_expression ) | ^( LESS fact_expression ) | ^( LESS_EQUAL fact_expression ) | ^( NOT_EQUAL fact_expression ) | ^( VK_OPERATOR ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( ID ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( VT_BIND_FIELD VT_LABEL fact_expression ) | ^( VT_FIELD fact_expression ( fact_expression )? ) | ^( VT_ACCESSOR_PATH ( accessor_element )+ ) | STRING | INT | FLOAT | BOOL | NULL | VT_PAREN_CHUNK );
- public final void fact_expression() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:177:2: ( ^( DOUBLE_PIPE fact_expression fact_expression ) | ^( DOUBLE_AMPER fact_expression fact_expression ) | ^( VT_FACT_BINDING VT_LABEL fact_expression ) | ^( VT_FACT pattern_type ( fact_expression )* ) | ^( VT_FACT_OR fact_expression fact_expression ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_IN ( VK_NOT )? ( fact_expression )+ ) | ^( EQUAL fact_expression ) | ^( GREATER fact_expression ) | ^( GREATER_EQUAL fact_expression ) | ^( LESS fact_expression ) | ^( LESS_EQUAL fact_expression ) | ^( NOT_EQUAL fact_expression ) | ^( VK_OPERATOR ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( ID ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( VT_BIND_FIELD VT_LABEL fact_expression ) | ^( VT_FIELD fact_expression ( fact_expression )? ) | ^( VT_ACCESSOR_PATH ( accessor_element )+ ) | STRING | INT | FLOAT | BOOL | NULL | VT_PAREN_CHUNK )
- int alt47=24;
- switch ( input.LA(1) ) {
- case DOUBLE_PIPE:
- {
- alt47=1;
- }
- break;
- case DOUBLE_AMPER:
- {
- alt47=2;
- }
- break;
- case VT_FACT_BINDING:
- {
- alt47=3;
- }
- break;
- case VT_FACT:
- {
- alt47=4;
- }
- break;
- case VT_FACT_OR:
- {
- alt47=5;
- }
- break;
- case VK_EVAL:
- {
- alt47=6;
- }
- break;
- case VK_IN:
- {
- alt47=7;
- }
- break;
- case EQUAL:
- {
- alt47=8;
- }
- break;
- case GREATER:
- {
- alt47=9;
- }
- break;
- case GREATER_EQUAL:
- {
- alt47=10;
- }
- break;
- case LESS:
- {
- alt47=11;
- }
- break;
- case LESS_EQUAL:
- {
- alt47=12;
- }
- break;
- case NOT_EQUAL:
- {
- alt47=13;
- }
- break;
- case VK_OPERATOR:
- {
- alt47=14;
- }
- break;
- case ID:
- {
- alt47=15;
- }
- break;
- case VT_BIND_FIELD:
- {
- alt47=16;
- }
- break;
- case VT_FIELD:
- {
- alt47=17;
- }
- break;
- case VT_ACCESSOR_PATH:
- {
- alt47=18;
- }
- break;
- case STRING:
- {
- alt47=19;
- }
- break;
- case INT:
- {
- alt47=20;
- }
- break;
- case FLOAT:
- {
- alt47=21;
- }
- break;
- case BOOL:
- {
- alt47=22;
- }
- break;
- case NULL:
- {
- alt47=23;
- }
- break;
- case VT_PAREN_CHUNK:
- {
- alt47=24;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 47, 0, input);
-
- throw nvae;
- }
-
- switch (alt47) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:177:4: ^( DOUBLE_PIPE fact_expression fact_expression )
- {
- match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_fact_expression914);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression916);
- fact_expression();
-
- state._fsp--;
-
- pushFollow(FOLLOW_fact_expression_in_fact_expression918);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 2 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:178:4: ^( DOUBLE_AMPER fact_expression fact_expression )
- {
- match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_fact_expression925);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression927);
- fact_expression();
-
- state._fsp--;
-
- pushFollow(FOLLOW_fact_expression_in_fact_expression929);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 3 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:179:4: ^( VT_FACT_BINDING VT_LABEL fact_expression )
- {
- match(input,VT_FACT_BINDING,FOLLOW_VT_FACT_BINDING_in_fact_expression936);
-
- match(input, Token.DOWN, null);
- match(input,VT_LABEL,FOLLOW_VT_LABEL_in_fact_expression938);
- pushFollow(FOLLOW_fact_expression_in_fact_expression940);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 4 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:180:4: ^( VT_FACT pattern_type ( fact_expression )* )
- {
- match(input,VT_FACT,FOLLOW_VT_FACT_in_fact_expression947);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_pattern_type_in_fact_expression949);
- pattern_type();
-
- state._fsp--;
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:180:27: ( fact_expression )*
- loop38:
- do {
- int alt38=2;
- int LA38_0 = input.LA(1);
-
- if ( (LA38_0==VT_FACT||LA38_0==VT_PAREN_CHUNK||(LA38_0>=VT_FACT_BINDING && LA38_0<=VT_ACCESSOR_PATH)||LA38_0==VK_EVAL||LA38_0==VK_IN||LA38_0==VK_OPERATOR||LA38_0==ID||LA38_0==STRING||(LA38_0>=BOOL && LA38_0<=DOUBLE_AMPER)||(LA38_0>=EQUAL && LA38_0<=NULL)) ) {
- alt38=1;
- }
-
-
- switch (alt38) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:180:27: fact_expression
- {
- pushFollow(FOLLOW_fact_expression_in_fact_expression951);
- fact_expression();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop38;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 5 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:181:4: ^( VT_FACT_OR fact_expression fact_expression )
- {
- match(input,VT_FACT_OR,FOLLOW_VT_FACT_OR_in_fact_expression959);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression961);
- fact_expression();
-
- state._fsp--;
-
- pushFollow(FOLLOW_fact_expression_in_fact_expression963);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 6 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:182:4: ^( VK_EVAL VT_PAREN_CHUNK )
- {
- match(input,VK_EVAL,FOLLOW_VK_EVAL_in_fact_expression970);
-
- match(input, Token.DOWN, null);
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_fact_expression972);
-
- match(input, Token.UP, null);
-
- }
- break;
- case 7 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:4: ^( VK_IN ( VK_NOT )? ( fact_expression )+ )
- {
- match(input,VK_IN,FOLLOW_VK_IN_in_fact_expression979);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:12: ( VK_NOT )?
- int alt39=2;
- int LA39_0 = input.LA(1);
-
- if ( (LA39_0==VK_NOT) ) {
- alt39=1;
- }
- switch (alt39) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:12: VK_NOT
- {
- match(input,VK_NOT,FOLLOW_VK_NOT_in_fact_expression981);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:20: ( fact_expression )+
- int cnt40=0;
- loop40:
- do {
- int alt40=2;
- int LA40_0 = input.LA(1);
-
- if ( (LA40_0==VT_FACT||LA40_0==VT_PAREN_CHUNK||(LA40_0>=VT_FACT_BINDING && LA40_0<=VT_ACCESSOR_PATH)||LA40_0==VK_EVAL||LA40_0==VK_IN||LA40_0==VK_OPERATOR||LA40_0==ID||LA40_0==STRING||(LA40_0>=BOOL && LA40_0<=DOUBLE_AMPER)||(LA40_0>=EQUAL && LA40_0<=NULL)) ) {
- alt40=1;
- }
-
-
- switch (alt40) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:20: fact_expression
- {
- pushFollow(FOLLOW_fact_expression_in_fact_expression984);
- fact_expression();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt40 >= 1 ) break loop40;
- EarlyExitException eee =
- new EarlyExitException(40, input);
- throw eee;
- }
- cnt40++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 8 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:184:4: ^( EQUAL fact_expression )
- {
- match(input,EQUAL,FOLLOW_EQUAL_in_fact_expression992);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression994);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 9 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:185:4: ^( GREATER fact_expression )
- {
- match(input,GREATER,FOLLOW_GREATER_in_fact_expression1001);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1003);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 10 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:186:4: ^( GREATER_EQUAL fact_expression )
- {
- match(input,GREATER_EQUAL,FOLLOW_GREATER_EQUAL_in_fact_expression1010);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1012);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 11 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:187:4: ^( LESS fact_expression )
- {
- match(input,LESS,FOLLOW_LESS_in_fact_expression1019);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1021);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 12 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:188:4: ^( LESS_EQUAL fact_expression )
- {
- match(input,LESS_EQUAL,FOLLOW_LESS_EQUAL_in_fact_expression1028);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1030);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 13 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:189:4: ^( NOT_EQUAL fact_expression )
- {
- match(input,NOT_EQUAL,FOLLOW_NOT_EQUAL_in_fact_expression1037);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1039);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 14 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:4: ^( VK_OPERATOR ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression )
- {
- match(input,VK_OPERATOR,FOLLOW_VK_OPERATOR_in_fact_expression1046);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:18: ( VK_NOT )?
- int alt41=2;
- int LA41_0 = input.LA(1);
-
- if ( (LA41_0==VK_NOT) ) {
- alt41=1;
- }
- switch (alt41) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:18: VK_NOT
- {
- match(input,VK_NOT,FOLLOW_VK_NOT_in_fact_expression1048);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:26: ( VT_SQUARE_CHUNK )?
- int alt42=2;
- int LA42_0 = input.LA(1);
-
- if ( (LA42_0==VT_SQUARE_CHUNK) ) {
- alt42=1;
- }
- switch (alt42) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:26: VT_SQUARE_CHUNK
- {
- match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1051);
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_fact_expression_in_fact_expression1054);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 15 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:4: ^( ID ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression )
- {
- match(input,ID,FOLLOW_ID_in_fact_expression1061);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:9: ( VK_NOT )?
- int alt43=2;
- int LA43_0 = input.LA(1);
-
- if ( (LA43_0==VK_NOT) ) {
- alt43=1;
- }
- switch (alt43) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:9: VK_NOT
- {
- match(input,VK_NOT,FOLLOW_VK_NOT_in_fact_expression1063);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:17: ( VT_SQUARE_CHUNK )?
- int alt44=2;
- int LA44_0 = input.LA(1);
-
- if ( (LA44_0==VT_SQUARE_CHUNK) ) {
- alt44=1;
- }
- switch (alt44) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:17: VT_SQUARE_CHUNK
- {
- match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1066);
-
- }
- break;
-
- }
-
- pushFollow(FOLLOW_fact_expression_in_fact_expression1069);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 16 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:192:4: ^( VT_BIND_FIELD VT_LABEL fact_expression )
- {
- match(input,VT_BIND_FIELD,FOLLOW_VT_BIND_FIELD_in_fact_expression1076);
-
- match(input, Token.DOWN, null);
- match(input,VT_LABEL,FOLLOW_VT_LABEL_in_fact_expression1078);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1080);
- fact_expression();
-
- state._fsp--;
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 17 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:193:4: ^( VT_FIELD fact_expression ( fact_expression )? )
- {
- match(input,VT_FIELD,FOLLOW_VT_FIELD_in_fact_expression1087);
-
- match(input, Token.DOWN, null);
- pushFollow(FOLLOW_fact_expression_in_fact_expression1089);
- fact_expression();
-
- state._fsp--;
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:193:31: ( fact_expression )?
- int alt45=2;
- int LA45_0 = input.LA(1);
-
- if ( (LA45_0==VT_FACT||LA45_0==VT_PAREN_CHUNK||(LA45_0>=VT_FACT_BINDING && LA45_0<=VT_ACCESSOR_PATH)||LA45_0==VK_EVAL||LA45_0==VK_IN||LA45_0==VK_OPERATOR||LA45_0==ID||LA45_0==STRING||(LA45_0>=BOOL && LA45_0<=DOUBLE_AMPER)||(LA45_0>=EQUAL && LA45_0<=NULL)) ) {
- alt45=1;
- }
- switch (alt45) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:193:31: fact_expression
- {
- pushFollow(FOLLOW_fact_expression_in_fact_expression1091);
- fact_expression();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 18 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:194:4: ^( VT_ACCESSOR_PATH ( accessor_element )+ )
- {
- match(input,VT_ACCESSOR_PATH,FOLLOW_VT_ACCESSOR_PATH_in_fact_expression1099);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:194:23: ( accessor_element )+
- int cnt46=0;
- loop46:
- do {
- int alt46=2;
- int LA46_0 = input.LA(1);
-
- if ( (LA46_0==VT_ACCESSOR_ELEMENT) ) {
- alt46=1;
- }
-
-
- switch (alt46) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:194:23: accessor_element
- {
- pushFollow(FOLLOW_accessor_element_in_fact_expression1101);
- accessor_element();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- if ( cnt46 >= 1 ) break loop46;
- EarlyExitException eee =
- new EarlyExitException(46, input);
- throw eee;
- }
- cnt46++;
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
- break;
- case 19 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:195:4: STRING
- {
- match(input,STRING,FOLLOW_STRING_in_fact_expression1108);
-
- }
- break;
- case 20 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:196:4: INT
- {
- match(input,INT,FOLLOW_INT_in_fact_expression1113);
-
- }
- break;
- case 21 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:197:4: FLOAT
- {
- match(input,FLOAT,FOLLOW_FLOAT_in_fact_expression1118);
-
- }
- break;
- case 22 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:198:4: BOOL
- {
- match(input,BOOL,FOLLOW_BOOL_in_fact_expression1123);
-
- }
- break;
- case 23 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:199:4: NULL
- {
- match(input,NULL,FOLLOW_NULL_in_fact_expression1128);
-
- }
- break;
- case 24 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:200:4: VT_PAREN_CHUNK
- {
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_fact_expression1133);
-
- }
- break;
-
- }
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "fact_expression"
-
-
- // $ANTLR start "pattern_type"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:203:1: pattern_type : ^( VT_PATTERN_TYPE ( ID )+ ( dimension_definition )* ) ;
- public final void pattern_type() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:2: ( ^( VT_PATTERN_TYPE ( ID )+ ( dimension_definition )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:4: ^( VT_PATTERN_TYPE ( ID )+ ( dimension_definition )* )
- {
- match(input,VT_PATTERN_TYPE,FOLLOW_VT_PATTERN_TYPE_in_pattern_type1145);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:22: ( ID )+
- int cnt48=0;
- loop48:
- do {
- int alt48=2;
- int LA48_0 = input.LA(1);
-
- if ( (LA48_0==ID) ) {
- alt48=1;
- }
-
-
- switch (alt48) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:22: ID
- {
- match(input,ID,FOLLOW_ID_in_pattern_type1147);
-
- }
- break;
-
- default :
- if ( cnt48 >= 1 ) break loop48;
- EarlyExitException eee =
- new EarlyExitException(48, input);
- throw eee;
- }
- cnt48++;
- } while (true);
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:26: ( dimension_definition )*
- loop49:
- do {
- int alt49=2;
- int LA49_0 = input.LA(1);
-
- if ( (LA49_0==LEFT_SQUARE) ) {
- alt49=1;
- }
-
-
- switch (alt49) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:26: dimension_definition
- {
- pushFollow(FOLLOW_dimension_definition_in_pattern_type1150);
- dimension_definition();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop49;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "pattern_type"
-
-
- // $ANTLR start "data_type"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:207:1: data_type : ^( VT_DATA_TYPE ( ID )+ ( dimension_definition )* ) ;
- public final void data_type() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:2: ( ^( VT_DATA_TYPE ( ID )+ ( dimension_definition )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:4: ^( VT_DATA_TYPE ( ID )+ ( dimension_definition )* )
- {
- match(input,VT_DATA_TYPE,FOLLOW_VT_DATA_TYPE_in_data_type1164);
-
- match(input, Token.DOWN, null);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:19: ( ID )+
- int cnt50=0;
- loop50:
- do {
- int alt50=2;
- int LA50_0 = input.LA(1);
-
- if ( (LA50_0==ID) ) {
- alt50=1;
- }
-
-
- switch (alt50) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:19: ID
- {
- match(input,ID,FOLLOW_ID_in_data_type1166);
-
- }
- break;
-
- default :
- if ( cnt50 >= 1 ) break loop50;
- EarlyExitException eee =
- new EarlyExitException(50, input);
- throw eee;
- }
- cnt50++;
- } while (true);
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:23: ( dimension_definition )*
- loop51:
- do {
- int alt51=2;
- int LA51_0 = input.LA(1);
-
- if ( (LA51_0==LEFT_SQUARE) ) {
- alt51=1;
- }
-
-
- switch (alt51) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:23: dimension_definition
- {
- pushFollow(FOLLOW_dimension_definition_in_data_type1169);
- dimension_definition();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop51;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "data_type"
-
-
- // $ANTLR start "dimension_definition"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:211:1: dimension_definition : LEFT_SQUARE RIGHT_SQUARE ;
- public final void dimension_definition() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:212:2: ( LEFT_SQUARE RIGHT_SQUARE )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:212:4: LEFT_SQUARE RIGHT_SQUARE
- {
- match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dimension_definition1182);
- match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dimension_definition1184);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "dimension_definition"
-
-
- // $ANTLR start "accessor_element"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:215:1: accessor_element : ^( VT_ACCESSOR_ELEMENT ID ( VT_SQUARE_CHUNK )* ) ;
- public final void accessor_element() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:2: ( ^( VT_ACCESSOR_ELEMENT ID ( VT_SQUARE_CHUNK )* ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:4: ^( VT_ACCESSOR_ELEMENT ID ( VT_SQUARE_CHUNK )* )
- {
- match(input,VT_ACCESSOR_ELEMENT,FOLLOW_VT_ACCESSOR_ELEMENT_in_accessor_element1196);
-
- match(input, Token.DOWN, null);
- match(input,ID,FOLLOW_ID_in_accessor_element1198);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:29: ( VT_SQUARE_CHUNK )*
- loop52:
- do {
- int alt52=2;
- int LA52_0 = input.LA(1);
-
- if ( (LA52_0==VT_SQUARE_CHUNK) ) {
- alt52=1;
- }
-
-
- switch (alt52) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:29: VT_SQUARE_CHUNK
- {
- match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_accessor_element1200);
-
- }
- break;
-
- default :
- break loop52;
- }
- } while (true);
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "accessor_element"
-
-
- // $ANTLR start "expression_chain"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:219:1: expression_chain : ^( VT_EXPRESSION_CHAIN ID ( VT_SQUARE_CHUNK )? ( VT_PAREN_CHUNK )? ( expression_chain )? ) ;
- public final void expression_chain() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:2: ( ^( VT_EXPRESSION_CHAIN ID ( VT_SQUARE_CHUNK )? ( VT_PAREN_CHUNK )? ( expression_chain )? ) )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:4: ^( VT_EXPRESSION_CHAIN ID ( VT_SQUARE_CHUNK )? ( VT_PAREN_CHUNK )? ( expression_chain )? )
- {
- match(input,VT_EXPRESSION_CHAIN,FOLLOW_VT_EXPRESSION_CHAIN_in_expression_chain1214);
-
- match(input, Token.DOWN, null);
- match(input,ID,FOLLOW_ID_in_expression_chain1216);
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:29: ( VT_SQUARE_CHUNK )?
- int alt53=2;
- int LA53_0 = input.LA(1);
-
- if ( (LA53_0==VT_SQUARE_CHUNK) ) {
- alt53=1;
- }
- switch (alt53) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:29: VT_SQUARE_CHUNK
- {
- match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_expression_chain1218);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:46: ( VT_PAREN_CHUNK )?
- int alt54=2;
- int LA54_0 = input.LA(1);
-
- if ( (LA54_0==VT_PAREN_CHUNK) ) {
- alt54=1;
- }
- switch (alt54) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:46: VT_PAREN_CHUNK
- {
- match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_expression_chain1221);
-
- }
- break;
-
- }
-
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:62: ( expression_chain )?
- int alt55=2;
- int LA55_0 = input.LA(1);
-
- if ( (LA55_0==VT_EXPRESSION_CHAIN) ) {
- alt55=1;
- }
- switch (alt55) {
- case 1 :
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:62: expression_chain
- {
- pushFollow(FOLLOW_expression_chain_in_expression_chain1224);
- expression_chain();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- match(input, Token.UP, null);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "expression_chain"
-
-
- // $ANTLR start "curly_chunk"
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:223:1: curly_chunk : VT_CURLY_CHUNK ;
- public final void curly_chunk() throws RecognitionException {
- try {
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:224:2: ( VT_CURLY_CHUNK )
- // src/main/resources/org/drools/lang/Tree2TestDRL.g:224:4: VT_CURLY_CHUNK
- {
- match(input,VT_CURLY_CHUNK,FOLLOW_VT_CURLY_CHUNK_in_curly_chunk1238);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "curly_chunk"
-
- // Delegated rules
-
-
-
-
- public static final BitSet FOLLOW_VT_COMPILATION_UNIT_in_compilation_unit43 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_package_statement_in_compilation_unit45 = new BitSet(new long[]{0xD5FFE00000000028L,0x0000000000000007L});
- public static final BitSet FOLLOW_statement_in_compilation_unit48 = new BitSet(new long[]{0xD5FFE00000000028L,0x0000000000000007L});
- public static final BitSet FOLLOW_VK_PACKAGE_in_package_statement63 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_package_id_in_package_statement65 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_PACKAGE_ID_in_package_id78 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_package_id80 = new BitSet(new long[]{0x0000000000000008L,0x0000000000040000L});
- public static final BitSet FOLLOW_rule_attribute_in_statement93 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_function_import_statement_in_statement98 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_import_statement_in_statement104 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_global_in_statement110 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_function_in_statement116 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_template_in_statement121 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule_in_statement126 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_query_in_statement131 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_type_declaration_in_statement136 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VK_IMPORT_in_import_statement148 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_import_name_in_import_statement150 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_FUNCTION_IMPORT_in_function_import_statement163 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VK_FUNCTION_in_function_import_statement165 = new BitSet(new long[]{0x0000020000000000L});
- public static final BitSet FOLLOW_import_name_in_function_import_statement167 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_IMPORT_ID_in_import_name180 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_import_name182 = new BitSet(new long[]{0x0000000000000008L,0x0000000000140000L});
- public static final BitSet FOLLOW_DOT_STAR_in_import_name185 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_GLOBAL_in_global199 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_data_type_in_global201 = new BitSet(new long[]{0x0000040000000000L});
- public static final BitSet FOLLOW_VT_GLOBAL_ID_in_global203 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_FUNCTION_in_function216 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_data_type_in_function218 = new BitSet(new long[]{0x0000080000000000L});
- public static final BitSet FOLLOW_VT_FUNCTION_ID_in_function221 = new BitSet(new long[]{0x0000100000000000L});
- public static final BitSet FOLLOW_parameters_in_function223 = new BitSet(new long[]{0x0000000000040000L});
- public static final BitSet FOLLOW_curly_chunk_in_function225 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_QUERY_in_query238 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_QUERY_ID_in_query240 = new BitSet(new long[]{0x0000100000400000L});
- public static final BitSet FOLLOW_parameters_in_query242 = new BitSet(new long[]{0x0000100000400000L});
- public static final BitSet FOLLOW_lhs_block_in_query245 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
- public static final BitSet FOLLOW_VK_END_in_query247 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_PARAM_LIST_in_parameters260 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_param_definition_in_parameters262 = new BitSet(new long[]{0x0000004000000008L,0x0000000000040000L});
- public static final BitSet FOLLOW_data_type_in_param_definition275 = new BitSet(new long[]{0x0000004000000008L,0x0000000000040000L});
- public static final BitSet FOLLOW_argument_in_param_definition278 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_argument289 = new BitSet(new long[]{0x0000000000000002L,0x0000400000000000L});
- public static final BitSet FOLLOW_dimension_definition_in_argument291 = new BitSet(new long[]{0x0000000000000002L,0x0000400000000000L});
- public static final BitSet FOLLOW_VK_DECLARE_in_type_declaration304 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_TYPE_DECLARE_ID_in_type_declaration306 = new BitSet(new long[]{0x0000000000000000L,0x0000000002048000L});
- public static final BitSet FOLLOW_decl_metadata_in_type_declaration308 = new BitSet(new long[]{0x0000000000000000L,0x0000000002048000L});
- public static final BitSet FOLLOW_decl_field_in_type_declaration311 = new BitSet(new long[]{0x0000000000000000L,0x0000000000048000L});
- public static final BitSet FOLLOW_VK_END_in_type_declaration314 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_AT_in_decl_metadata327 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_decl_metadata329 = new BitSet(new long[]{0x0000000000100008L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_decl_metadata331 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_ID_in_decl_field345 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_decl_field_initialization_in_decl_field347 = new BitSet(new long[]{0x0000004000000000L});
- public static final BitSet FOLLOW_data_type_in_decl_field350 = new BitSet(new long[]{0x0000000000000008L,0x0000000002000000L});
- public static final BitSet FOLLOW_decl_metadata_in_decl_field352 = new BitSet(new long[]{0x0000000000000008L,0x0000000002000000L});
- public static final BitSet FOLLOW_EQUALS_in_decl_field_initialization366 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_decl_field_initialization368 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_TEMPLATE_in_template381 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_TEMPLATE_ID_in_template383 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_template_slot_in_template385 = new BitSet(new long[]{0x0000000000008000L,0x0000000000008000L});
- public static final BitSet FOLLOW_VK_END_in_template388 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_SLOT_in_template_slot401 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_data_type_in_template_slot403 = new BitSet(new long[]{0x0000000000004000L});
- public static final BitSet FOLLOW_VT_SLOT_ID_in_template_slot405 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_RULE_in_rule418 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_RULE_ID_in_rule420 = new BitSet(new long[]{0x0000000000030000L,0x0000000010000000L});
- public static final BitSet FOLLOW_rule_attributes_in_rule422 = new BitSet(new long[]{0x0000000000020000L,0x0000000010000000L});
- public static final BitSet FOLLOW_when_part_in_rule425 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_VT_RHS_CHUNK_in_rule428 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_WHEN_in_when_part440 = new BitSet(new long[]{0x0000100000400000L});
- public static final BitSet FOLLOW_lhs_block_in_when_part442 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_RULE_ATTRIBUTES_in_rule_attributes454 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VK_ATTRIBUTES_in_rule_attributes456 = new BitSet(new long[]{0x01FFE00000000000L});
- public static final BitSet FOLLOW_rule_attribute_in_rule_attributes459 = new BitSet(new long[]{0x01FFE00000000008L});
- public static final BitSet FOLLOW_VK_SALIENCE_in_rule_attribute473 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_set_in_rule_attribute475 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_NO_LOOP_in_rule_attribute487 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_BOOL_in_rule_attribute489 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_AGENDA_GROUP_in_rule_attribute499 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_STRING_in_rule_attribute501 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_DURATION_in_rule_attribute510 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_INT_in_rule_attribute512 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_ACTIVATION_GROUP_in_rule_attribute522 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_STRING_in_rule_attribute524 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_AUTO_FOCUS_in_rule_attribute532 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_BOOL_in_rule_attribute534 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_DATE_EFFECTIVE_in_rule_attribute543 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_STRING_in_rule_attribute545 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_DATE_EXPIRES_in_rule_attribute553 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_STRING_in_rule_attribute555 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_ENABLED_in_rule_attribute563 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_BOOL_in_rule_attribute565 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_RULEFLOW_GROUP_in_rule_attribute573 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_STRING_in_rule_attribute575 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_LOCK_ON_ACTIVE_in_rule_attribute583 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_BOOL_in_rule_attribute585 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_DIALECT_in_rule_attribute593 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_STRING_in_rule_attribute595 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_AND_IMPLICIT_in_lhs_block609 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs_block611 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
- public static final BitSet FOLLOW_VT_OR_PREFIX_in_lhs624 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs626 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
- public static final BitSet FOLLOW_VT_OR_INFIX_in_lhs634 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs636 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
- public static final BitSet FOLLOW_lhs_in_lhs638 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_AND_PREFIX_in_lhs645 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs647 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
- public static final BitSet FOLLOW_VT_AND_INFIX_in_lhs655 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs657 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
- public static final BitSet FOLLOW_lhs_in_lhs659 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_EXISTS_in_lhs666 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs668 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_NOT_in_lhs675 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs677 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_EVAL_in_lhs684 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_lhs686 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_FORALL_in_lhs693 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_lhs695 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
- public static final BitSet FOLLOW_FROM_in_lhs703 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_pattern_in_lhs705 = new BitSet(new long[]{0x0000000020000000L,0x0000001800000010L});
- public static final BitSet FOLLOW_from_elements_in_lhs707 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_lhs_pattern_in_lhs713 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ACCUMULATE_in_from_elements725 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_from_elements727 = new BitSet(new long[]{0x0000000018000000L});
- public static final BitSet FOLLOW_accumulate_init_clause_in_from_elements730 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_accumulate_id_clause_in_from_elements732 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_COLLECT_in_from_elements740 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_lhs_in_from_elements742 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_ENTRY_POINT_in_from_elements749 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_ENTRYPOINT_ID_in_from_elements751 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_FROM_SOURCE_in_from_elements758 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_from_elements760 = new BitSet(new long[]{0x0000000040100008L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_from_elements762 = new BitSet(new long[]{0x0000000040000008L});
- public static final BitSet FOLLOW_expression_chain_in_from_elements765 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_ACCUMULATE_INIT_CLAUSE_in_accumulate_init_clause779 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VK_INIT_in_accumulate_init_clause786 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause788 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_ACTION_in_accumulate_init_clause796 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause798 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_accumulate_init_reverse_clause_in_accumulate_init_clause805 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
- public static final BitSet FOLLOW_VK_RESULT_in_accumulate_init_clause812 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause814 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_REVERSE_in_accumulate_init_reverse_clause828 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_reverse_clause830 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_ACCUMULATE_ID_CLAUSE_in_accumulate_id_clause844 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_accumulate_id_clause846 = new BitSet(new long[]{0x0000000000100000L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_id_clause848 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_PATTERN_in_lhs_pattern861 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_lhs_pattern863 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_over_clause_in_lhs_pattern866 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_OVER_in_over_clause879 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_over_element_in_over_clause881 = new BitSet(new long[]{0x0000000000200008L});
- public static final BitSet FOLLOW_VT_BEHAVIOR_in_over_element895 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_over_element897 = new BitSet(new long[]{0x0000000000000000L,0x0000000000040000L});
- public static final BitSet FOLLOW_ID_in_over_element899 = new BitSet(new long[]{0x0000000000100000L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_over_element901 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_DOUBLE_PIPE_in_fact_expression914 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression916 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression918 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_DOUBLE_AMPER_in_fact_expression925 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression927 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression929 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_FACT_BINDING_in_fact_expression936 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_LABEL_in_fact_expression938 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression940 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_FACT_in_fact_expression947 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_pattern_type_in_fact_expression949 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression951 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_VT_FACT_OR_in_fact_expression959 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression961 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression963 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_EVAL_in_fact_expression970 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_fact_expression972 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_IN_in_fact_expression979 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VK_NOT_in_fact_expression981 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression984 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_EQUAL_in_fact_expression992 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression994 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_GREATER_in_fact_expression1001 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1003 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_GREATER_EQUAL_in_fact_expression1010 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1012 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_LESS_in_fact_expression1019 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1021 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_LESS_EQUAL_in_fact_expression1028 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1030 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_NOT_EQUAL_in_fact_expression1037 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1039 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VK_OPERATOR_in_fact_expression1046 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VK_NOT_in_fact_expression1048 = new BitSet(new long[]{0x0000001F00180040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1051 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1054 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_ID_in_fact_expression1061 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VK_NOT_in_fact_expression1063 = new BitSet(new long[]{0x0000001F00180040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1066 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1069 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_BIND_FIELD_in_fact_expression1076 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_VT_LABEL_in_fact_expression1078 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1080 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_FIELD_in_fact_expression1087 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1089 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
- public static final BitSet FOLLOW_fact_expression_in_fact_expression1091 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_ACCESSOR_PATH_in_fact_expression1099 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_accessor_element_in_fact_expression1101 = new BitSet(new long[]{0x0000002000000008L});
- public static final BitSet FOLLOW_STRING_in_fact_expression1108 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_fact_expression1113 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_fact_expression1118 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_fact_expression1123 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_fact_expression1128 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_fact_expression1133 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_PATTERN_TYPE_in_pattern_type1145 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_pattern_type1147 = new BitSet(new long[]{0x0000000000000008L,0x0000400000040000L});
- public static final BitSet FOLLOW_dimension_definition_in_pattern_type1150 = new BitSet(new long[]{0x0000000000000008L,0x0000400000000000L});
- public static final BitSet FOLLOW_VT_DATA_TYPE_in_data_type1164 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_data_type1166 = new BitSet(new long[]{0x0000000000000008L,0x0000400000040000L});
- public static final BitSet FOLLOW_dimension_definition_in_data_type1169 = new BitSet(new long[]{0x0000000000000008L,0x0000400000000000L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_dimension_definition1182 = new BitSet(new long[]{0x0000000000000000L,0x0000800000000000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_dimension_definition1184 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VT_ACCESSOR_ELEMENT_in_accessor_element1196 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_accessor_element1198 = new BitSet(new long[]{0x0000000000080008L});
- public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_accessor_element1200 = new BitSet(new long[]{0x0000000000080008L});
- public static final BitSet FOLLOW_VT_EXPRESSION_CHAIN_in_expression_chain1214 = new BitSet(new long[]{0x0000000000000004L});
- public static final BitSet FOLLOW_ID_in_expression_chain1216 = new BitSet(new long[]{0x0000000040180008L});
- public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_expression_chain1218 = new BitSet(new long[]{0x0000000040100008L});
- public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_expression_chain1221 = new BitSet(new long[]{0x0000000040000008L});
- public static final BitSet FOLLOW_expression_chain_in_expression_chain1224 = new BitSet(new long[]{0x0000000000000008L});
- public static final BitSet FOLLOW_VT_CURLY_CHUNK_in_curly_chunk1238 = new BitSet(new long[]{0x0000000000000002L});
-
+// $ANTLR 3.1.1 src/main/resources/org/drools/lang/Tree2TestDRL.g 2009-02-11 15:20:23
+
+ package org.drools.lang;
+
+
+import org.antlr.runtime.*;
+import org.antlr.runtime.tree.*;import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class Tree2TestDRL extends TreeParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_COMPILATION_UNIT", "VT_FUNCTION_IMPORT", "VT_FACT", "VT_CONSTRAINTS", "VT_LABEL", "VT_QUERY_ID", "VT_TEMPLATE_ID", "VT_TYPE_DECLARE_ID", "VT_RULE_ID", "VT_ENTRYPOINT_ID", "VT_SLOT_ID", "VT_SLOT", "VT_RULE_ATTRIBUTES", "VT_RHS_CHUNK", "VT_CURLY_CHUNK", "VT_SQUARE_CHUNK", "VT_PAREN_CHUNK", "VT_BEHAVIOR", "VT_AND_IMPLICIT", "VT_AND_PREFIX", "VT_OR_PREFIX", "VT_AND_INFIX", "VT_OR_INFIX", "VT_ACCUMULATE_INIT_CLAUSE", "VT_ACCUMULATE_ID_CLAUSE", "VT_FROM_SOURCE", "VT_EXPRESSION_CHAIN", "VT_PATTERN", "VT_FACT_BINDING", "VT_FACT_OR", "VT_BIND_FIELD", "VT_FIELD", "VT_ACCESSOR_PATH", "VT_ACCESSOR_ELEMENT", "VT_DATA_TYPE", "VT_PATTERN_TYPE", "VT_PACKAGE_ID", "VT_IMPORT_ID", "VT_GLOBAL_ID", "VT_FUNCTION_ID", "VT_PARAM_LIST", "VK_DATE_EFFECTIVE", "VK_DATE_EXPIRES", "VK_LOCK_ON_ACTIVE", "VK_NO_LOOP", "VK_AUTO_FOCUS", "VK_ACTIVATION_GROUP", "VK_AGENDA_GROUP", "VK_RULEFLOW_GROUP", "VK_DURATION", "VK_DIALECT", "VK_SALIENCE", "VK_ENABLED", "!
VK_ATTRIBUTES", "VK_RULE", "VK_EXTEND", "VK_IMPORT", "VK_PACKAGE", "VK_TEMPLATE", "VK_QUERY", "VK_DECLARE", "VK_FUNCTION", "VK_GLOBAL", "VK_EVAL", "VK_ENTRY_POINT", "VK_NOT", "VK_IN", "VK_OR", "VK_AND", "VK_EXISTS", "VK_FORALL", "VK_ACTION", "VK_REVERSE", "VK_RESULT", "VK_OPERATOR", "VK_END", "VK_INIT", "SEMICOLON", "ID", "DOT", "DOT_STAR", "STRING", "LEFT_PAREN", "COMMA", "RIGHT_PAREN", "AT", "COLON", "EQUALS", "WHEN", "BOOL", "INT", "DOUBLE_PIPE", "DOUBLE_AMPER", "FROM", "OVER", "ACCUMULATE", "COLLECT", "ARROW", "EQUAL", "GREATER", "GREATER_EQUAL", "LESS", "LESS_EQUAL", "NOT_EQUAL", "FLOAT", "NULL", "LEFT_SQUARE", "RIGHT_SQUARE", "THEN", "LEFT_CURLY", "RIGHT_CURLY", "MISC", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "MULTI_LINE_COMMENT"
+ };
+ public static final int COMMA=87;
+ public static final int VT_PATTERN_TYPE=39;
+ public static final int VT_ACCUMULATE_ID_CLAUSE=28;
+ public static final int VK_DIALECT=54;
+ public static final int VK_FUNCTION=65;
+ public static final int HexDigit=119;
+ public static final int VK_ATTRIBUTES=57;
+ public static final int VT_EXPRESSION_CHAIN=30;
+ public static final int MISC=115;
+ public static final int VT_AND_PREFIX=23;
+ public static final int VK_QUERY=63;
+ public static final int THEN=112;
+ public static final int VK_AUTO_FOCUS=49;
+ public static final int DOT=83;
+ public static final int VK_IMPORT=60;
+ public static final int VT_SLOT=15;
+ public static final int VT_PACKAGE_ID=40;
+ public static final int LEFT_SQUARE=110;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=122;
+ public static final int VT_DATA_TYPE=38;
+ public static final int VT_FACT=6;
+ public static final int LEFT_CURLY=113;
+ public static final int AT=89;
+ public static final int LEFT_PAREN=86;
+ public static final int DOUBLE_AMPER=96;
+ public static final int VT_QUERY_ID=9;
+ public static final int VT_ACCESSOR_PATH=36;
+ public static final int VT_LABEL=8;
+ public static final int WHEN=92;
+ public static final int VT_ENTRYPOINT_ID=13;
+ public static final int VK_SALIENCE=55;
+ public static final int VT_FIELD=35;
+ public static final int WS=117;
+ public static final int OVER=98;
+ public static final int STRING=85;
+ public static final int VK_AND=72;
+ public static final int VT_ACCESSOR_ELEMENT=37;
+ public static final int VK_REVERSE=76;
+ public static final int VK_GLOBAL=66;
+ public static final int VT_ACCUMULATE_INIT_CLAUSE=27;
+ public static final int VT_BEHAVIOR=21;
+ public static final int VK_DURATION=53;
+ public static final int VT_SQUARE_CHUNK=19;
+ public static final int VK_FORALL=74;
+ public static final int VT_PAREN_CHUNK=20;
+ public static final int VT_COMPILATION_UNIT=4;
+ public static final int COLLECT=100;
+ public static final int VK_ENABLED=56;
+ public static final int VK_RESULT=77;
+ public static final int EQUALS=91;
+ public static final int UnicodeEscape=120;
+ public static final int VK_PACKAGE=61;
+ public static final int VT_RULE_ID=12;
+ public static final int EQUAL=102;
+ public static final int VK_NO_LOOP=48;
+ public static final int SEMICOLON=81;
+ public static final int VK_TEMPLATE=62;
+ public static final int VT_AND_IMPLICIT=22;
+ public static final int NULL=109;
+ public static final int COLON=90;
+ public static final int MULTI_LINE_COMMENT=124;
+ public static final int VT_RULE_ATTRIBUTES=16;
+ public static final int RIGHT_SQUARE=111;
+ public static final int VK_AGENDA_GROUP=51;
+ public static final int VT_FACT_OR=33;
+ public static final int VK_NOT=69;
+ public static final int VK_DATE_EXPIRES=46;
+ public static final int ARROW=101;
+ public static final int FLOAT=108;
+ public static final int VK_EXTEND=59;
+ public static final int VT_SLOT_ID=14;
+ public static final int VT_CURLY_CHUNK=18;
+ public static final int VT_OR_PREFIX=24;
+ public static final int DOUBLE_PIPE=95;
+ public static final int VK_END=79;
+ public static final int LESS=105;
+ public static final int VT_TYPE_DECLARE_ID=11;
+ public static final int VT_PATTERN=31;
+ public static final int VK_DATE_EFFECTIVE=45;
+ public static final int EscapeSequence=118;
+ public static final int VK_EXISTS=73;
+ public static final int INT=94;
+ public static final int VT_BIND_FIELD=34;
+ public static final int VK_RULE=58;
+ public static final int VK_EVAL=67;
+ public static final int GREATER=103;
+ public static final int VT_FACT_BINDING=32;
+ public static final int ID=82;
+ public static final int FROM=97;
+ public static final int NOT_EQUAL=107;
+ public static final int RIGHT_CURLY=114;
+ public static final int VK_OPERATOR=78;
+ public static final int VK_ENTRY_POINT=68;
+ public static final int VT_PARAM_LIST=44;
+ public static final int VT_AND_INFIX=25;
+ public static final int BOOL=93;
+ public static final int VT_FROM_SOURCE=29;
+ public static final int VK_LOCK_ON_ACTIVE=47;
+ public static final int VT_FUNCTION_IMPORT=5;
+ public static final int VK_IN=70;
+ public static final int VT_RHS_CHUNK=17;
+ public static final int GREATER_EQUAL=104;
+ public static final int VT_OR_INFIX=26;
+ public static final int DOT_STAR=84;
+ public static final int VK_OR=71;
+ public static final int VT_GLOBAL_ID=42;
+ public static final int LESS_EQUAL=106;
+ public static final int ACCUMULATE=99;
+ public static final int VK_RULEFLOW_GROUP=52;
+ public static final int VT_FUNCTION_ID=43;
+ public static final int EOF=-1;
+ public static final int VT_CONSTRAINTS=7;
+ public static final int VT_IMPORT_ID=41;
+ public static final int EOL=116;
+ public static final int VK_INIT=80;
+ public static final int VK_ACTIVATION_GROUP=50;
+ public static final int OctalEscape=121;
+ public static final int VK_ACTION=75;
+ public static final int RIGHT_PAREN=88;
+ public static final int VT_TEMPLATE_ID=10;
+ public static final int VK_DECLARE=64;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=123;
+
+ // delegates
+ // delegators
+
+
+ public Tree2TestDRL(TreeNodeStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public Tree2TestDRL(TreeNodeStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return Tree2TestDRL.tokenNames; }
+ public String getGrammarFileName() { return "src/main/resources/org/drools/lang/Tree2TestDRL.g"; }
+
+
+
+ // $ANTLR start "compilation_unit"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:13:1: compilation_unit : ^( VT_COMPILATION_UNIT ( package_statement )? ( statement )* ) ;
+ public final void compilation_unit() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:2: ( ^( VT_COMPILATION_UNIT ( package_statement )? ( statement )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:4: ^( VT_COMPILATION_UNIT ( package_statement )? ( statement )* )
+ {
+ match(input,VT_COMPILATION_UNIT,FOLLOW_VT_COMPILATION_UNIT_in_compilation_unit43);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:26: ( package_statement )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==VK_PACKAGE) ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:26: package_statement
+ {
+ pushFollow(FOLLOW_package_statement_in_compilation_unit45);
+ package_statement();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:45: ( statement )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==VT_FUNCTION_IMPORT||(LA2_0>=VK_DATE_EFFECTIVE && LA2_0<=VK_ENABLED)||LA2_0==VK_RULE||LA2_0==VK_IMPORT||(LA2_0>=VK_TEMPLATE && LA2_0<=VK_GLOBAL)) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:14:45: statement
+ {
+ pushFollow(FOLLOW_statement_in_compilation_unit48);
+ statement();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "compilation_unit"
+
+
+ // $ANTLR start "package_statement"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:17:1: package_statement : ^( VK_PACKAGE package_id ) ;
+ public final void package_statement() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:18:2: ( ^( VK_PACKAGE package_id ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:18:4: ^( VK_PACKAGE package_id )
+ {
+ match(input,VK_PACKAGE,FOLLOW_VK_PACKAGE_in_package_statement63);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_package_id_in_package_statement65);
+ package_id();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "package_statement"
+
+
+ // $ANTLR start "package_id"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:21:1: package_id : ^( VT_PACKAGE_ID ( ID )+ ) ;
+ public final void package_id() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:2: ( ^( VT_PACKAGE_ID ( ID )+ ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:4: ^( VT_PACKAGE_ID ( ID )+ )
+ {
+ match(input,VT_PACKAGE_ID,FOLLOW_VT_PACKAGE_ID_in_package_id78);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:20: ( ID )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==ID) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:22:20: ID
+ {
+ match(input,ID,FOLLOW_ID_in_package_id80);
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "package_id"
+
+
+ // $ANTLR start "statement"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:25:1: statement : ( rule_attribute | function_import_statement | import_statement | global | function | template | rule | query | type_declaration );
+ public final void statement() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:26:2: ( rule_attribute | function_import_statement | import_statement | global | function | template | rule | query | type_declaration )
+ int alt4=9;
+ switch ( input.LA(1) ) {
+ case VK_DATE_EFFECTIVE:
+ case VK_DATE_EXPIRES:
+ case VK_LOCK_ON_ACTIVE:
+ case VK_NO_LOOP:
+ case VK_AUTO_FOCUS:
+ case VK_ACTIVATION_GROUP:
+ case VK_AGENDA_GROUP:
+ case VK_RULEFLOW_GROUP:
+ case VK_DURATION:
+ case VK_DIALECT:
+ case VK_SALIENCE:
+ case VK_ENABLED:
+ {
+ alt4=1;
+ }
+ break;
+ case VT_FUNCTION_IMPORT:
+ {
+ alt4=2;
+ }
+ break;
+ case VK_IMPORT:
+ {
+ alt4=3;
+ }
+ break;
+ case VK_GLOBAL:
+ {
+ alt4=4;
+ }
+ break;
+ case VK_FUNCTION:
+ {
+ alt4=5;
+ }
+ break;
+ case VK_TEMPLATE:
+ {
+ alt4=6;
+ }
+ break;
+ case VK_RULE:
+ {
+ alt4=7;
+ }
+ break;
+ case VK_QUERY:
+ {
+ alt4=8;
+ }
+ break;
+ case VK_DECLARE:
+ {
+ alt4=9;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 4, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt4) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:26:4: rule_attribute
+ {
+ pushFollow(FOLLOW_rule_attribute_in_statement93);
+ rule_attribute();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:27:4: function_import_statement
+ {
+ pushFollow(FOLLOW_function_import_statement_in_statement98);
+ function_import_statement();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:28:4: import_statement
+ {
+ pushFollow(FOLLOW_import_statement_in_statement104);
+ import_statement();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:29:4: global
+ {
+ pushFollow(FOLLOW_global_in_statement110);
+ global();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 5 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:30:4: function
+ {
+ pushFollow(FOLLOW_function_in_statement116);
+ function();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 6 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:31:4: template
+ {
+ pushFollow(FOLLOW_template_in_statement121);
+ template();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 7 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:32:4: rule
+ {
+ pushFollow(FOLLOW_rule_in_statement126);
+ rule();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 8 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:33:4: query
+ {
+ pushFollow(FOLLOW_query_in_statement131);
+ query();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 9 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:34:4: type_declaration
+ {
+ pushFollow(FOLLOW_type_declaration_in_statement136);
+ type_declaration();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "statement"
+
+
+ // $ANTLR start "import_statement"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:37:1: import_statement : ^( VK_IMPORT import_name ) ;
+ public final void import_statement() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:38:2: ( ^( VK_IMPORT import_name ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:38:4: ^( VK_IMPORT import_name )
+ {
+ match(input,VK_IMPORT,FOLLOW_VK_IMPORT_in_import_statement148);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_import_name_in_import_statement150);
+ import_name();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "import_statement"
+
+
+ // $ANTLR start "function_import_statement"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:41:1: function_import_statement : ^( VT_FUNCTION_IMPORT VK_FUNCTION import_name ) ;
+ public final void function_import_statement() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:42:2: ( ^( VT_FUNCTION_IMPORT VK_FUNCTION import_name ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:42:4: ^( VT_FUNCTION_IMPORT VK_FUNCTION import_name )
+ {
+ match(input,VT_FUNCTION_IMPORT,FOLLOW_VT_FUNCTION_IMPORT_in_function_import_statement163);
+
+ match(input, Token.DOWN, null);
+ match(input,VK_FUNCTION,FOLLOW_VK_FUNCTION_in_function_import_statement165);
+ pushFollow(FOLLOW_import_name_in_function_import_statement167);
+ import_name();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "function_import_statement"
+
+
+ // $ANTLR start "import_name"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:45:1: import_name : ^( VT_IMPORT_ID ( ID )+ ( DOT_STAR )? ) ;
+ public final void import_name() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:2: ( ^( VT_IMPORT_ID ( ID )+ ( DOT_STAR )? ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:4: ^( VT_IMPORT_ID ( ID )+ ( DOT_STAR )? )
+ {
+ match(input,VT_IMPORT_ID,FOLLOW_VT_IMPORT_ID_in_import_name180);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:19: ( ID )+
+ int cnt5=0;
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==ID) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:19: ID
+ {
+ match(input,ID,FOLLOW_ID_in_import_name182);
+
+ }
+ break;
+
+ default :
+ if ( cnt5 >= 1 ) break loop5;
+ EarlyExitException eee =
+ new EarlyExitException(5, input);
+ throw eee;
+ }
+ cnt5++;
+ } while (true);
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:23: ( DOT_STAR )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==DOT_STAR) ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:46:23: DOT_STAR
+ {
+ match(input,DOT_STAR,FOLLOW_DOT_STAR_in_import_name185);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "import_name"
+
+
+ // $ANTLR start "global"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:49:1: global : ^( VK_GLOBAL data_type VT_GLOBAL_ID ) ;
+ public final void global() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:50:2: ( ^( VK_GLOBAL data_type VT_GLOBAL_ID ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:50:4: ^( VK_GLOBAL data_type VT_GLOBAL_ID )
+ {
+ match(input,VK_GLOBAL,FOLLOW_VK_GLOBAL_in_global199);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_data_type_in_global201);
+ data_type();
+
+ state._fsp--;
+
+ match(input,VT_GLOBAL_ID,FOLLOW_VT_GLOBAL_ID_in_global203);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "global"
+
+
+ // $ANTLR start "function"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:53:1: function : ^( VK_FUNCTION ( data_type )? VT_FUNCTION_ID parameters curly_chunk ) ;
+ public final void function() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:2: ( ^( VK_FUNCTION ( data_type )? VT_FUNCTION_ID parameters curly_chunk ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:4: ^( VK_FUNCTION ( data_type )? VT_FUNCTION_ID parameters curly_chunk )
+ {
+ match(input,VK_FUNCTION,FOLLOW_VK_FUNCTION_in_function216);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:18: ( data_type )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==VT_DATA_TYPE) ) {
+ alt7=1;
+ }
+ switch (alt7) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:54:18: data_type
+ {
+ pushFollow(FOLLOW_data_type_in_function218);
+ data_type();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ match(input,VT_FUNCTION_ID,FOLLOW_VT_FUNCTION_ID_in_function221);
+ pushFollow(FOLLOW_parameters_in_function223);
+ parameters();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_curly_chunk_in_function225);
+ curly_chunk();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "function"
+
+
+ // $ANTLR start "query"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:57:1: query : ^( VK_QUERY VT_QUERY_ID ( parameters )? lhs_block VK_END ) ;
+ public final void query() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:2: ( ^( VK_QUERY VT_QUERY_ID ( parameters )? lhs_block VK_END ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:4: ^( VK_QUERY VT_QUERY_ID ( parameters )? lhs_block VK_END )
+ {
+ match(input,VK_QUERY,FOLLOW_VK_QUERY_in_query238);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_QUERY_ID,FOLLOW_VT_QUERY_ID_in_query240);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:27: ( parameters )?
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==VT_PARAM_LIST) ) {
+ alt8=1;
+ }
+ switch (alt8) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:58:27: parameters
+ {
+ pushFollow(FOLLOW_parameters_in_query242);
+ parameters();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_lhs_block_in_query245);
+ lhs_block();
+
+ state._fsp--;
+
+ match(input,VK_END,FOLLOW_VK_END_in_query247);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "query"
+
+
+ // $ANTLR start "parameters"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:61:1: parameters : ^( VT_PARAM_LIST ( param_definition )* ) ;
+ public final void parameters() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:2: ( ^( VT_PARAM_LIST ( param_definition )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:4: ^( VT_PARAM_LIST ( param_definition )* )
+ {
+ match(input,VT_PARAM_LIST,FOLLOW_VT_PARAM_LIST_in_parameters260);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:20: ( param_definition )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==VT_DATA_TYPE||LA9_0==ID) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:62:20: param_definition
+ {
+ pushFollow(FOLLOW_param_definition_in_parameters262);
+ param_definition();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "parameters"
+
+
+ // $ANTLR start "param_definition"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:65:1: param_definition : ( data_type )? argument ;
+ public final void param_definition() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:2: ( ( data_type )? argument )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:4: ( data_type )? argument
+ {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:4: ( data_type )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==VT_DATA_TYPE) ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:66:4: data_type
+ {
+ pushFollow(FOLLOW_data_type_in_param_definition275);
+ data_type();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_argument_in_param_definition278);
+ argument();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "param_definition"
+
+
+ // $ANTLR start "argument"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:69:1: argument : ID ( dimension_definition )* ;
+ public final void argument() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:2: ( ID ( dimension_definition )* )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:4: ID ( dimension_definition )*
+ {
+ match(input,ID,FOLLOW_ID_in_argument289);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:7: ( dimension_definition )*
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==LEFT_SQUARE) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:70:7: dimension_definition
+ {
+ pushFollow(FOLLOW_dimension_definition_in_argument291);
+ dimension_definition();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop11;
+ }
+ } while (true);
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "argument"
+
+
+ // $ANTLR start "type_declaration"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:73:1: type_declaration : ^( VK_DECLARE VT_TYPE_DECLARE_ID ( decl_metadata )* ( decl_field )* VK_END ) ;
+ public final void type_declaration() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:2: ( ^( VK_DECLARE VT_TYPE_DECLARE_ID ( decl_metadata )* ( decl_field )* VK_END ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:4: ^( VK_DECLARE VT_TYPE_DECLARE_ID ( decl_metadata )* ( decl_field )* VK_END )
+ {
+ match(input,VK_DECLARE,FOLLOW_VK_DECLARE_in_type_declaration304);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_TYPE_DECLARE_ID,FOLLOW_VT_TYPE_DECLARE_ID_in_type_declaration306);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:36: ( decl_metadata )*
+ loop12:
+ do {
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0==AT) ) {
+ alt12=1;
+ }
+
+
+ switch (alt12) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:36: decl_metadata
+ {
+ pushFollow(FOLLOW_decl_metadata_in_type_declaration308);
+ decl_metadata();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop12;
+ }
+ } while (true);
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:51: ( decl_field )*
+ loop13:
+ do {
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( (LA13_0==ID) ) {
+ alt13=1;
+ }
+
+
+ switch (alt13) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:74:51: decl_field
+ {
+ pushFollow(FOLLOW_decl_field_in_type_declaration311);
+ decl_field();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop13;
+ }
+ } while (true);
+
+ match(input,VK_END,FOLLOW_VK_END_in_type_declaration314);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "type_declaration"
+
+
+ // $ANTLR start "decl_metadata"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:77:1: decl_metadata : ^( AT ID ( VT_PAREN_CHUNK )? ) ;
+ public final void decl_metadata() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:2: ( ^( AT ID ( VT_PAREN_CHUNK )? ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:4: ^( AT ID ( VT_PAREN_CHUNK )? )
+ {
+ match(input,AT,FOLLOW_AT_in_decl_metadata327);
+
+ match(input, Token.DOWN, null);
+ match(input,ID,FOLLOW_ID_in_decl_metadata329);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:12: ( VT_PAREN_CHUNK )?
+ int alt14=2;
+ int LA14_0 = input.LA(1);
+
+ if ( (LA14_0==VT_PAREN_CHUNK) ) {
+ alt14=1;
+ }
+ switch (alt14) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:78:12: VT_PAREN_CHUNK
+ {
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_decl_metadata331);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "decl_metadata"
+
+
+ // $ANTLR start "decl_field"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:81:1: decl_field : ^( ID ( decl_field_initialization )? data_type ( decl_metadata )* ) ;
+ public final void decl_field() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:2: ( ^( ID ( decl_field_initialization )? data_type ( decl_metadata )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:4: ^( ID ( decl_field_initialization )? data_type ( decl_metadata )* )
+ {
+ match(input,ID,FOLLOW_ID_in_decl_field345);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:9: ( decl_field_initialization )?
+ int alt15=2;
+ int LA15_0 = input.LA(1);
+
+ if ( (LA15_0==EQUALS) ) {
+ alt15=1;
+ }
+ switch (alt15) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:9: decl_field_initialization
+ {
+ pushFollow(FOLLOW_decl_field_initialization_in_decl_field347);
+ decl_field_initialization();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_data_type_in_decl_field350);
+ data_type();
+
+ state._fsp--;
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:46: ( decl_metadata )*
+ loop16:
+ do {
+ int alt16=2;
+ int LA16_0 = input.LA(1);
+
+ if ( (LA16_0==AT) ) {
+ alt16=1;
+ }
+
+
+ switch (alt16) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:82:46: decl_metadata
+ {
+ pushFollow(FOLLOW_decl_metadata_in_decl_field352);
+ decl_metadata();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop16;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "decl_field"
+
+
+ // $ANTLR start "decl_field_initialization"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:85:1: decl_field_initialization : ^( EQUALS VT_PAREN_CHUNK ) ;
+ public final void decl_field_initialization() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:86:2: ( ^( EQUALS VT_PAREN_CHUNK ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:86:4: ^( EQUALS VT_PAREN_CHUNK )
+ {
+ match(input,EQUALS,FOLLOW_EQUALS_in_decl_field_initialization366);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_decl_field_initialization368);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "decl_field_initialization"
+
+
+ // $ANTLR start "template"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:89:1: template : ^( VK_TEMPLATE VT_TEMPLATE_ID ( template_slot )+ VK_END ) ;
+ public final void template() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:2: ( ^( VK_TEMPLATE VT_TEMPLATE_ID ( template_slot )+ VK_END ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:4: ^( VK_TEMPLATE VT_TEMPLATE_ID ( template_slot )+ VK_END )
+ {
+ match(input,VK_TEMPLATE,FOLLOW_VK_TEMPLATE_in_template381);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_TEMPLATE_ID,FOLLOW_VT_TEMPLATE_ID_in_template383);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:33: ( template_slot )+
+ int cnt17=0;
+ loop17:
+ do {
+ int alt17=2;
+ int LA17_0 = input.LA(1);
+
+ if ( (LA17_0==VT_SLOT) ) {
+ alt17=1;
+ }
+
+
+ switch (alt17) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:90:33: template_slot
+ {
+ pushFollow(FOLLOW_template_slot_in_template385);
+ template_slot();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt17 >= 1 ) break loop17;
+ EarlyExitException eee =
+ new EarlyExitException(17, input);
+ throw eee;
+ }
+ cnt17++;
+ } while (true);
+
+ match(input,VK_END,FOLLOW_VK_END_in_template388);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "template"
+
+
+ // $ANTLR start "template_slot"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:93:1: template_slot : ^( VT_SLOT data_type VT_SLOT_ID ) ;
+ public final void template_slot() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:94:2: ( ^( VT_SLOT data_type VT_SLOT_ID ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:94:4: ^( VT_SLOT data_type VT_SLOT_ID )
+ {
+ match(input,VT_SLOT,FOLLOW_VT_SLOT_in_template_slot401);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_data_type_in_template_slot403);
+ data_type();
+
+ state._fsp--;
+
+ match(input,VT_SLOT_ID,FOLLOW_VT_SLOT_ID_in_template_slot405);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "template_slot"
+
+
+ // $ANTLR start "rule"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:97:1: rule : ^( VK_RULE VT_RULE_ID ( rule_attributes )? ( when_part )? VT_RHS_CHUNK ) ;
+ public final void rule() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:2: ( ^( VK_RULE VT_RULE_ID ( rule_attributes )? ( when_part )? VT_RHS_CHUNK ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:4: ^( VK_RULE VT_RULE_ID ( rule_attributes )? ( when_part )? VT_RHS_CHUNK )
+ {
+ match(input,VK_RULE,FOLLOW_VK_RULE_in_rule418);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_RULE_ID,FOLLOW_VT_RULE_ID_in_rule420);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:25: ( rule_attributes )?
+ int alt18=2;
+ int LA18_0 = input.LA(1);
+
+ if ( (LA18_0==VT_RULE_ATTRIBUTES) ) {
+ alt18=1;
+ }
+ switch (alt18) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:25: rule_attributes
+ {
+ pushFollow(FOLLOW_rule_attributes_in_rule422);
+ rule_attributes();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:42: ( when_part )?
+ int alt19=2;
+ int LA19_0 = input.LA(1);
+
+ if ( (LA19_0==WHEN) ) {
+ alt19=1;
+ }
+ switch (alt19) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:98:42: when_part
+ {
+ pushFollow(FOLLOW_when_part_in_rule425);
+ when_part();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ match(input,VT_RHS_CHUNK,FOLLOW_VT_RHS_CHUNK_in_rule428);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "rule"
+
+
+ // $ANTLR start "when_part"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:101:1: when_part : WHEN lhs_block ;
+ public final void when_part() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:102:2: ( WHEN lhs_block )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:102:4: WHEN lhs_block
+ {
+ match(input,WHEN,FOLLOW_WHEN_in_when_part440);
+ pushFollow(FOLLOW_lhs_block_in_when_part442);
+ lhs_block();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "when_part"
+
+
+ // $ANTLR start "rule_attributes"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:105:1: rule_attributes : ^( VT_RULE_ATTRIBUTES ( VK_ATTRIBUTES )? ( rule_attribute )+ ) ;
+ public final void rule_attributes() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:2: ( ^( VT_RULE_ATTRIBUTES ( VK_ATTRIBUTES )? ( rule_attribute )+ ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:4: ^( VT_RULE_ATTRIBUTES ( VK_ATTRIBUTES )? ( rule_attribute )+ )
+ {
+ match(input,VT_RULE_ATTRIBUTES,FOLLOW_VT_RULE_ATTRIBUTES_in_rule_attributes454);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:25: ( VK_ATTRIBUTES )?
+ int alt20=2;
+ int LA20_0 = input.LA(1);
+
+ if ( (LA20_0==VK_ATTRIBUTES) ) {
+ alt20=1;
+ }
+ switch (alt20) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:25: VK_ATTRIBUTES
+ {
+ match(input,VK_ATTRIBUTES,FOLLOW_VK_ATTRIBUTES_in_rule_attributes456);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:40: ( rule_attribute )+
+ int cnt21=0;
+ loop21:
+ do {
+ int alt21=2;
+ int LA21_0 = input.LA(1);
+
+ if ( ((LA21_0>=VK_DATE_EFFECTIVE && LA21_0<=VK_ENABLED)) ) {
+ alt21=1;
+ }
+
+
+ switch (alt21) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:106:40: rule_attribute
+ {
+ pushFollow(FOLLOW_rule_attribute_in_rule_attributes459);
+ rule_attribute();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt21 >= 1 ) break loop21;
+ EarlyExitException eee =
+ new EarlyExitException(21, input);
+ throw eee;
+ }
+ cnt21++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "rule_attributes"
+
+
+ // $ANTLR start "rule_attribute"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:109:1: rule_attribute : ( ^( VK_SALIENCE ( INT | VT_PAREN_CHUNK ) ) | ^( VK_NO_LOOP ( BOOL )? ) | ^( VK_AGENDA_GROUP STRING ) | ^( VK_DURATION INT ) | ^( VK_ACTIVATION_GROUP STRING ) | ^( VK_AUTO_FOCUS ( BOOL )? ) | ^( VK_DATE_EFFECTIVE STRING ) | ^( VK_DATE_EXPIRES STRING ) | ^( VK_ENABLED BOOL ) | ^( VK_RULEFLOW_GROUP STRING ) | ^( VK_LOCK_ON_ACTIVE ( BOOL )? ) | ^( VK_DIALECT STRING ) );
+ public final void rule_attribute() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:110:2: ( ^( VK_SALIENCE ( INT | VT_PAREN_CHUNK ) ) | ^( VK_NO_LOOP ( BOOL )? ) | ^( VK_AGENDA_GROUP STRING ) | ^( VK_DURATION INT ) | ^( VK_ACTIVATION_GROUP STRING ) | ^( VK_AUTO_FOCUS ( BOOL )? ) | ^( VK_DATE_EFFECTIVE STRING ) | ^( VK_DATE_EXPIRES STRING ) | ^( VK_ENABLED BOOL ) | ^( VK_RULEFLOW_GROUP STRING ) | ^( VK_LOCK_ON_ACTIVE ( BOOL )? ) | ^( VK_DIALECT STRING ) )
+ int alt25=12;
+ switch ( input.LA(1) ) {
+ case VK_SALIENCE:
+ {
+ alt25=1;
+ }
+ break;
+ case VK_NO_LOOP:
+ {
+ alt25=2;
+ }
+ break;
+ case VK_AGENDA_GROUP:
+ {
+ alt25=3;
+ }
+ break;
+ case VK_DURATION:
+ {
+ alt25=4;
+ }
+ break;
+ case VK_ACTIVATION_GROUP:
+ {
+ alt25=5;
+ }
+ break;
+ case VK_AUTO_FOCUS:
+ {
+ alt25=6;
+ }
+ break;
+ case VK_DATE_EFFECTIVE:
+ {
+ alt25=7;
+ }
+ break;
+ case VK_DATE_EXPIRES:
+ {
+ alt25=8;
+ }
+ break;
+ case VK_ENABLED:
+ {
+ alt25=9;
+ }
+ break;
+ case VK_RULEFLOW_GROUP:
+ {
+ alt25=10;
+ }
+ break;
+ case VK_LOCK_ON_ACTIVE:
+ {
+ alt25=11;
+ }
+ break;
+ case VK_DIALECT:
+ {
+ alt25=12;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 25, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt25) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:110:4: ^( VK_SALIENCE ( INT | VT_PAREN_CHUNK ) )
+ {
+ match(input,VK_SALIENCE,FOLLOW_VK_SALIENCE_in_rule_attribute473);
+
+ match(input, Token.DOWN, null);
+ if ( input.LA(1)==VT_PAREN_CHUNK||input.LA(1)==INT ) {
+ input.consume();
+ state.errorRecovery=false;
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ throw mse;
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:111:4: ^( VK_NO_LOOP ( BOOL )? )
+ {
+ match(input,VK_NO_LOOP,FOLLOW_VK_NO_LOOP_in_rule_attribute487);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:111:17: ( BOOL )?
+ int alt22=2;
+ int LA22_0 = input.LA(1);
+
+ if ( (LA22_0==BOOL) ) {
+ alt22=1;
+ }
+ switch (alt22) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:111:17: BOOL
+ {
+ match(input,BOOL,FOLLOW_BOOL_in_rule_attribute489);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:112:4: ^( VK_AGENDA_GROUP STRING )
+ {
+ match(input,VK_AGENDA_GROUP,FOLLOW_VK_AGENDA_GROUP_in_rule_attribute499);
+
+ match(input, Token.DOWN, null);
+ match(input,STRING,FOLLOW_STRING_in_rule_attribute501);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:113:4: ^( VK_DURATION INT )
+ {
+ match(input,VK_DURATION,FOLLOW_VK_DURATION_in_rule_attribute510);
+
+ match(input, Token.DOWN, null);
+ match(input,INT,FOLLOW_INT_in_rule_attribute512);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 5 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:114:4: ^( VK_ACTIVATION_GROUP STRING )
+ {
+ match(input,VK_ACTIVATION_GROUP,FOLLOW_VK_ACTIVATION_GROUP_in_rule_attribute522);
+
+ match(input, Token.DOWN, null);
+ match(input,STRING,FOLLOW_STRING_in_rule_attribute524);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 6 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:115:4: ^( VK_AUTO_FOCUS ( BOOL )? )
+ {
+ match(input,VK_AUTO_FOCUS,FOLLOW_VK_AUTO_FOCUS_in_rule_attribute532);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:115:20: ( BOOL )?
+ int alt23=2;
+ int LA23_0 = input.LA(1);
+
+ if ( (LA23_0==BOOL) ) {
+ alt23=1;
+ }
+ switch (alt23) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:115:20: BOOL
+ {
+ match(input,BOOL,FOLLOW_BOOL_in_rule_attribute534);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+ break;
+ case 7 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:116:4: ^( VK_DATE_EFFECTIVE STRING )
+ {
+ match(input,VK_DATE_EFFECTIVE,FOLLOW_VK_DATE_EFFECTIVE_in_rule_attribute543);
+
+ match(input, Token.DOWN, null);
+ match(input,STRING,FOLLOW_STRING_in_rule_attribute545);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 8 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:117:4: ^( VK_DATE_EXPIRES STRING )
+ {
+ match(input,VK_DATE_EXPIRES,FOLLOW_VK_DATE_EXPIRES_in_rule_attribute553);
+
+ match(input, Token.DOWN, null);
+ match(input,STRING,FOLLOW_STRING_in_rule_attribute555);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 9 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:118:4: ^( VK_ENABLED BOOL )
+ {
+ match(input,VK_ENABLED,FOLLOW_VK_ENABLED_in_rule_attribute563);
+
+ match(input, Token.DOWN, null);
+ match(input,BOOL,FOLLOW_BOOL_in_rule_attribute565);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 10 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:119:4: ^( VK_RULEFLOW_GROUP STRING )
+ {
+ match(input,VK_RULEFLOW_GROUP,FOLLOW_VK_RULEFLOW_GROUP_in_rule_attribute573);
+
+ match(input, Token.DOWN, null);
+ match(input,STRING,FOLLOW_STRING_in_rule_attribute575);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 11 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:120:4: ^( VK_LOCK_ON_ACTIVE ( BOOL )? )
+ {
+ match(input,VK_LOCK_ON_ACTIVE,FOLLOW_VK_LOCK_ON_ACTIVE_in_rule_attribute583);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:120:24: ( BOOL )?
+ int alt24=2;
+ int LA24_0 = input.LA(1);
+
+ if ( (LA24_0==BOOL) ) {
+ alt24=1;
+ }
+ switch (alt24) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:120:24: BOOL
+ {
+ match(input,BOOL,FOLLOW_BOOL_in_rule_attribute585);
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+ break;
+ case 12 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:121:4: ^( VK_DIALECT STRING )
+ {
+ match(input,VK_DIALECT,FOLLOW_VK_DIALECT_in_rule_attribute593);
+
+ match(input, Token.DOWN, null);
+ match(input,STRING,FOLLOW_STRING_in_rule_attribute595);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "rule_attribute"
+
+
+ // $ANTLR start "lhs_block"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:124:1: lhs_block : ^( VT_AND_IMPLICIT ( lhs )* ) ;
+ public final void lhs_block() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:2: ( ^( VT_AND_IMPLICIT ( lhs )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:4: ^( VT_AND_IMPLICIT ( lhs )* )
+ {
+ match(input,VT_AND_IMPLICIT,FOLLOW_VT_AND_IMPLICIT_in_lhs_block609);
+
+ if ( input.LA(1)==Token.DOWN ) {
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:22: ( lhs )*
+ loop26:
+ do {
+ int alt26=2;
+ int LA26_0 = input.LA(1);
+
+ if ( ((LA26_0>=VT_AND_PREFIX && LA26_0<=VT_OR_INFIX)||LA26_0==VT_PATTERN||LA26_0==VK_EVAL||LA26_0==VK_NOT||(LA26_0>=VK_EXISTS && LA26_0<=VK_FORALL)||LA26_0==FROM) ) {
+ alt26=1;
+ }
+
+
+ switch (alt26) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:125:22: lhs
+ {
+ pushFollow(FOLLOW_lhs_in_lhs_block611);
+ lhs();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop26;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+ }
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "lhs_block"
+
+
+ // $ANTLR start "lhs"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:1: lhs : ( ^( VT_OR_PREFIX ( lhs )+ ) | ^( VT_OR_INFIX lhs lhs ) | ^( VT_AND_PREFIX ( lhs )+ ) | ^( VT_AND_INFIX lhs lhs ) | ^( VK_EXISTS lhs ) | ^( VK_NOT lhs ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_FORALL ( lhs )+ ) | ^( FROM lhs_pattern from_elements ) | lhs_pattern );
+ public final void lhs() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:5: ( ^( VT_OR_PREFIX ( lhs )+ ) | ^( VT_OR_INFIX lhs lhs ) | ^( VT_AND_PREFIX ( lhs )+ ) | ^( VT_AND_INFIX lhs lhs ) | ^( VK_EXISTS lhs ) | ^( VK_NOT lhs ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_FORALL ( lhs )+ ) | ^( FROM lhs_pattern from_elements ) | lhs_pattern )
+ int alt30=10;
+ switch ( input.LA(1) ) {
+ case VT_OR_PREFIX:
+ {
+ alt30=1;
+ }
+ break;
+ case VT_OR_INFIX:
+ {
+ alt30=2;
+ }
+ break;
+ case VT_AND_PREFIX:
+ {
+ alt30=3;
+ }
+ break;
+ case VT_AND_INFIX:
+ {
+ alt30=4;
+ }
+ break;
+ case VK_EXISTS:
+ {
+ alt30=5;
+ }
+ break;
+ case VK_NOT:
+ {
+ alt30=6;
+ }
+ break;
+ case VK_EVAL:
+ {
+ alt30=7;
+ }
+ break;
+ case VK_FORALL:
+ {
+ alt30=8;
+ }
+ break;
+ case FROM:
+ {
+ alt30=9;
+ }
+ break;
+ case VT_PATTERN:
+ {
+ alt30=10;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 30, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt30) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:7: ^( VT_OR_PREFIX ( lhs )+ )
+ {
+ match(input,VT_OR_PREFIX,FOLLOW_VT_OR_PREFIX_in_lhs624);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:22: ( lhs )+
+ int cnt27=0;
+ loop27:
+ do {
+ int alt27=2;
+ int LA27_0 = input.LA(1);
+
+ if ( ((LA27_0>=VT_AND_PREFIX && LA27_0<=VT_OR_INFIX)||LA27_0==VT_PATTERN||LA27_0==VK_EVAL||LA27_0==VK_NOT||(LA27_0>=VK_EXISTS && LA27_0<=VK_FORALL)||LA27_0==FROM) ) {
+ alt27=1;
+ }
+
+
+ switch (alt27) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:128:22: lhs
+ {
+ pushFollow(FOLLOW_lhs_in_lhs626);
+ lhs();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt27 >= 1 ) break loop27;
+ EarlyExitException eee =
+ new EarlyExitException(27, input);
+ throw eee;
+ }
+ cnt27++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:129:4: ^( VT_OR_INFIX lhs lhs )
+ {
+ match(input,VT_OR_INFIX,FOLLOW_VT_OR_INFIX_in_lhs634);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_in_lhs636);
+ lhs();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_lhs_in_lhs638);
+ lhs();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:130:4: ^( VT_AND_PREFIX ( lhs )+ )
+ {
+ match(input,VT_AND_PREFIX,FOLLOW_VT_AND_PREFIX_in_lhs645);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:130:20: ( lhs )+
+ int cnt28=0;
+ loop28:
+ do {
+ int alt28=2;
+ int LA28_0 = input.LA(1);
+
+ if ( ((LA28_0>=VT_AND_PREFIX && LA28_0<=VT_OR_INFIX)||LA28_0==VT_PATTERN||LA28_0==VK_EVAL||LA28_0==VK_NOT||(LA28_0>=VK_EXISTS && LA28_0<=VK_FORALL)||LA28_0==FROM) ) {
+ alt28=1;
+ }
+
+
+ switch (alt28) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:130:20: lhs
+ {
+ pushFollow(FOLLOW_lhs_in_lhs647);
+ lhs();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt28 >= 1 ) break loop28;
+ EarlyExitException eee =
+ new EarlyExitException(28, input);
+ throw eee;
+ }
+ cnt28++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:131:4: ^( VT_AND_INFIX lhs lhs )
+ {
+ match(input,VT_AND_INFIX,FOLLOW_VT_AND_INFIX_in_lhs655);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_in_lhs657);
+ lhs();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_lhs_in_lhs659);
+ lhs();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 5 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:132:4: ^( VK_EXISTS lhs )
+ {
+ match(input,VK_EXISTS,FOLLOW_VK_EXISTS_in_lhs666);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_in_lhs668);
+ lhs();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 6 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:133:4: ^( VK_NOT lhs )
+ {
+ match(input,VK_NOT,FOLLOW_VK_NOT_in_lhs675);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_in_lhs677);
+ lhs();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 7 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:134:4: ^( VK_EVAL VT_PAREN_CHUNK )
+ {
+ match(input,VK_EVAL,FOLLOW_VK_EVAL_in_lhs684);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_lhs686);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 8 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:135:4: ^( VK_FORALL ( lhs )+ )
+ {
+ match(input,VK_FORALL,FOLLOW_VK_FORALL_in_lhs693);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:135:16: ( lhs )+
+ int cnt29=0;
+ loop29:
+ do {
+ int alt29=2;
+ int LA29_0 = input.LA(1);
+
+ if ( ((LA29_0>=VT_AND_PREFIX && LA29_0<=VT_OR_INFIX)||LA29_0==VT_PATTERN||LA29_0==VK_EVAL||LA29_0==VK_NOT||(LA29_0>=VK_EXISTS && LA29_0<=VK_FORALL)||LA29_0==FROM) ) {
+ alt29=1;
+ }
+
+
+ switch (alt29) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:135:16: lhs
+ {
+ pushFollow(FOLLOW_lhs_in_lhs695);
+ lhs();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt29 >= 1 ) break loop29;
+ EarlyExitException eee =
+ new EarlyExitException(29, input);
+ throw eee;
+ }
+ cnt29++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 9 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:136:4: ^( FROM lhs_pattern from_elements )
+ {
+ match(input,FROM,FOLLOW_FROM_in_lhs703);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_pattern_in_lhs705);
+ lhs_pattern();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_from_elements_in_lhs707);
+ from_elements();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 10 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:137:4: lhs_pattern
+ {
+ pushFollow(FOLLOW_lhs_pattern_in_lhs713);
+ lhs_pattern();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "lhs"
+
+
+ // $ANTLR start "from_elements"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:140:1: from_elements : ( ^( ACCUMULATE lhs ( accumulate_init_clause | accumulate_id_clause ) ) | ^( COLLECT lhs ) | ^( VK_ENTRY_POINT VT_ENTRYPOINT_ID ) | ^( VT_FROM_SOURCE ID ( VT_PAREN_CHUNK )? ( expression_chain )? ) );
+ public final void from_elements() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:2: ( ^( ACCUMULATE lhs ( accumulate_init_clause | accumulate_id_clause ) ) | ^( COLLECT lhs ) | ^( VK_ENTRY_POINT VT_ENTRYPOINT_ID ) | ^( VT_FROM_SOURCE ID ( VT_PAREN_CHUNK )? ( expression_chain )? ) )
+ int alt34=4;
+ switch ( input.LA(1) ) {
+ case ACCUMULATE:
+ {
+ alt34=1;
+ }
+ break;
+ case COLLECT:
+ {
+ alt34=2;
+ }
+ break;
+ case VK_ENTRY_POINT:
+ {
+ alt34=3;
+ }
+ break;
+ case VT_FROM_SOURCE:
+ {
+ alt34=4;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 34, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt34) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:4: ^( ACCUMULATE lhs ( accumulate_init_clause | accumulate_id_clause ) )
+ {
+ match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_from_elements725);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_in_from_elements727);
+ lhs();
+
+ state._fsp--;
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:21: ( accumulate_init_clause | accumulate_id_clause )
+ int alt31=2;
+ int LA31_0 = input.LA(1);
+
+ if ( (LA31_0==VT_ACCUMULATE_INIT_CLAUSE) ) {
+ alt31=1;
+ }
+ else if ( (LA31_0==VT_ACCUMULATE_ID_CLAUSE) ) {
+ alt31=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 31, 0, input);
+
+ throw nvae;
+ }
+ switch (alt31) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:22: accumulate_init_clause
+ {
+ pushFollow(FOLLOW_accumulate_init_clause_in_from_elements730);
+ accumulate_init_clause();
+
+ state._fsp--;
+
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:141:45: accumulate_id_clause
+ {
+ pushFollow(FOLLOW_accumulate_id_clause_in_from_elements732);
+ accumulate_id_clause();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:142:4: ^( COLLECT lhs )
+ {
+ match(input,COLLECT,FOLLOW_COLLECT_in_from_elements740);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_lhs_in_from_elements742);
+ lhs();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:143:4: ^( VK_ENTRY_POINT VT_ENTRYPOINT_ID )
+ {
+ match(input,VK_ENTRY_POINT,FOLLOW_VK_ENTRY_POINT_in_from_elements749);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_ENTRYPOINT_ID,FOLLOW_VT_ENTRYPOINT_ID_in_from_elements751);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:4: ^( VT_FROM_SOURCE ID ( VT_PAREN_CHUNK )? ( expression_chain )? )
+ {
+ match(input,VT_FROM_SOURCE,FOLLOW_VT_FROM_SOURCE_in_from_elements758);
+
+ match(input, Token.DOWN, null);
+ match(input,ID,FOLLOW_ID_in_from_elements760);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:24: ( VT_PAREN_CHUNK )?
+ int alt32=2;
+ int LA32_0 = input.LA(1);
+
+ if ( (LA32_0==VT_PAREN_CHUNK) ) {
+ alt32=1;
+ }
+ switch (alt32) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:24: VT_PAREN_CHUNK
+ {
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_from_elements762);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:40: ( expression_chain )?
+ int alt33=2;
+ int LA33_0 = input.LA(1);
+
+ if ( (LA33_0==VT_EXPRESSION_CHAIN) ) {
+ alt33=1;
+ }
+ switch (alt33) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:144:40: expression_chain
+ {
+ pushFollow(FOLLOW_expression_chain_in_from_elements765);
+ expression_chain();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "from_elements"
+
+
+ // $ANTLR start "accumulate_init_clause"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:147:1: accumulate_init_clause : ^( VT_ACCUMULATE_INIT_CLAUSE ^( VK_INIT VT_PAREN_CHUNK ) ^( VK_ACTION VT_PAREN_CHUNK ) ( accumulate_init_reverse_clause )? ^( VK_RESULT VT_PAREN_CHUNK ) ) ;
+ public final void accumulate_init_clause() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:148:2: ( ^( VT_ACCUMULATE_INIT_CLAUSE ^( VK_INIT VT_PAREN_CHUNK ) ^( VK_ACTION VT_PAREN_CHUNK ) ( accumulate_init_reverse_clause )? ^( VK_RESULT VT_PAREN_CHUNK ) ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:148:4: ^( VT_ACCUMULATE_INIT_CLAUSE ^( VK_INIT VT_PAREN_CHUNK ) ^( VK_ACTION VT_PAREN_CHUNK ) ( accumulate_init_reverse_clause )? ^( VK_RESULT VT_PAREN_CHUNK ) )
+ {
+ match(input,VT_ACCUMULATE_INIT_CLAUSE,FOLLOW_VT_ACCUMULATE_INIT_CLAUSE_in_accumulate_init_clause779);
+
+ match(input, Token.DOWN, null);
+ match(input,VK_INIT,FOLLOW_VK_INIT_in_accumulate_init_clause786);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause788);
+
+ match(input, Token.UP, null);
+ match(input,VK_ACTION,FOLLOW_VK_ACTION_in_accumulate_init_clause796);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause798);
+
+ match(input, Token.UP, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:151:4: ( accumulate_init_reverse_clause )?
+ int alt35=2;
+ int LA35_0 = input.LA(1);
+
+ if ( (LA35_0==VK_REVERSE) ) {
+ alt35=1;
+ }
+ switch (alt35) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:151:4: accumulate_init_reverse_clause
+ {
+ pushFollow(FOLLOW_accumulate_init_reverse_clause_in_accumulate_init_clause805);
+ accumulate_init_reverse_clause();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ match(input,VK_RESULT,FOLLOW_VK_RESULT_in_accumulate_init_clause812);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause814);
+
+ match(input, Token.UP, null);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "accumulate_init_clause"
+
+
+ // $ANTLR start "accumulate_init_reverse_clause"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:155:1: accumulate_init_reverse_clause : ^( VK_REVERSE VT_PAREN_CHUNK ) ;
+ public final void accumulate_init_reverse_clause() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:156:2: ( ^( VK_REVERSE VT_PAREN_CHUNK ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:156:4: ^( VK_REVERSE VT_PAREN_CHUNK )
+ {
+ match(input,VK_REVERSE,FOLLOW_VK_REVERSE_in_accumulate_init_reverse_clause828);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_reverse_clause830);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "accumulate_init_reverse_clause"
+
+
+ // $ANTLR start "accumulate_id_clause"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:160:1: accumulate_id_clause : ^( VT_ACCUMULATE_ID_CLAUSE ID VT_PAREN_CHUNK ) ;
+ public final void accumulate_id_clause() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:161:2: ( ^( VT_ACCUMULATE_ID_CLAUSE ID VT_PAREN_CHUNK ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:161:4: ^( VT_ACCUMULATE_ID_CLAUSE ID VT_PAREN_CHUNK )
+ {
+ match(input,VT_ACCUMULATE_ID_CLAUSE,FOLLOW_VT_ACCUMULATE_ID_CLAUSE_in_accumulate_id_clause844);
+
+ match(input, Token.DOWN, null);
+ match(input,ID,FOLLOW_ID_in_accumulate_id_clause846);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_accumulate_id_clause848);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "accumulate_id_clause"
+
+
+ // $ANTLR start "lhs_pattern"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:164:1: lhs_pattern : ^( VT_PATTERN fact_expression ) ( over_clause )? ;
+ public final void lhs_pattern() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:2: ( ^( VT_PATTERN fact_expression ) ( over_clause )? )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:4: ^( VT_PATTERN fact_expression ) ( over_clause )?
+ {
+ match(input,VT_PATTERN,FOLLOW_VT_PATTERN_in_lhs_pattern861);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_lhs_pattern863);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:34: ( over_clause )?
+ int alt36=2;
+ int LA36_0 = input.LA(1);
+
+ if ( (LA36_0==OVER) ) {
+ alt36=1;
+ }
+ switch (alt36) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:165:34: over_clause
+ {
+ pushFollow(FOLLOW_over_clause_in_lhs_pattern866);
+ over_clause();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "lhs_pattern"
+
+
+ // $ANTLR start "over_clause"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:168:1: over_clause : ^( OVER ( over_element )+ ) ;
+ public final void over_clause() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:2: ( ^( OVER ( over_element )+ ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:4: ^( OVER ( over_element )+ )
+ {
+ match(input,OVER,FOLLOW_OVER_in_over_clause879);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:11: ( over_element )+
+ int cnt37=0;
+ loop37:
+ do {
+ int alt37=2;
+ int LA37_0 = input.LA(1);
+
+ if ( (LA37_0==VT_BEHAVIOR) ) {
+ alt37=1;
+ }
+
+
+ switch (alt37) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:169:11: over_element
+ {
+ pushFollow(FOLLOW_over_element_in_over_clause881);
+ over_element();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt37 >= 1 ) break loop37;
+ EarlyExitException eee =
+ new EarlyExitException(37, input);
+ throw eee;
+ }
+ cnt37++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "over_clause"
+
+
+ // $ANTLR start "over_element"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:172:1: over_element : ^( VT_BEHAVIOR ID ID VT_PAREN_CHUNK ) ;
+ public final void over_element() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:173:2: ( ^( VT_BEHAVIOR ID ID VT_PAREN_CHUNK ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:173:4: ^( VT_BEHAVIOR ID ID VT_PAREN_CHUNK )
+ {
+ match(input,VT_BEHAVIOR,FOLLOW_VT_BEHAVIOR_in_over_element895);
+
+ match(input, Token.DOWN, null);
+ match(input,ID,FOLLOW_ID_in_over_element897);
+ match(input,ID,FOLLOW_ID_in_over_element899);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_over_element901);
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "over_element"
+
+
+ // $ANTLR start "fact_expression"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:176:1: fact_expression : ( ^( DOUBLE_PIPE fact_expression fact_expression ) | ^( DOUBLE_AMPER fact_expression fact_expression ) | ^( VT_FACT_BINDING VT_LABEL fact_expression ) | ^( VT_FACT pattern_type ( fact_expression )* ) | ^( VT_FACT_OR fact_expression fact_expression ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_IN ( VK_NOT )? ( fact_expression )+ ) | ^( EQUAL fact_expression ) | ^( GREATER fact_expression ) | ^( GREATER_EQUAL fact_expression ) | ^( LESS fact_expression ) | ^( LESS_EQUAL fact_expression ) | ^( NOT_EQUAL fact_expression ) | ^( VK_OPERATOR ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( ID ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( VT_BIND_FIELD VT_LABEL fact_expression ) | ^( VT_FIELD fact_expression ( fact_expression )? ) | ^( VT_ACCESSOR_PATH ( accessor_element )+ ) | STRING | INT | FLOAT | BOOL | NULL | VT_PAREN_CHUNK );
+ public final void fact_expression() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:177:2: ( ^( DOUBLE_PIPE fact_expression fact_expression ) | ^( DOUBLE_AMPER fact_expression fact_expression ) | ^( VT_FACT_BINDING VT_LABEL fact_expression ) | ^( VT_FACT pattern_type ( fact_expression )* ) | ^( VT_FACT_OR fact_expression fact_expression ) | ^( VK_EVAL VT_PAREN_CHUNK ) | ^( VK_IN ( VK_NOT )? ( fact_expression )+ ) | ^( EQUAL fact_expression ) | ^( GREATER fact_expression ) | ^( GREATER_EQUAL fact_expression ) | ^( LESS fact_expression ) | ^( LESS_EQUAL fact_expression ) | ^( NOT_EQUAL fact_expression ) | ^( VK_OPERATOR ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( ID ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression ) | ^( VT_BIND_FIELD VT_LABEL fact_expression ) | ^( VT_FIELD fact_expression ( fact_expression )? ) | ^( VT_ACCESSOR_PATH ( accessor_element )+ ) | STRING | INT | FLOAT | BOOL | NULL | VT_PAREN_CHUNK )
+ int alt47=24;
+ switch ( input.LA(1) ) {
+ case DOUBLE_PIPE:
+ {
+ alt47=1;
+ }
+ break;
+ case DOUBLE_AMPER:
+ {
+ alt47=2;
+ }
+ break;
+ case VT_FACT_BINDING:
+ {
+ alt47=3;
+ }
+ break;
+ case VT_FACT:
+ {
+ alt47=4;
+ }
+ break;
+ case VT_FACT_OR:
+ {
+ alt47=5;
+ }
+ break;
+ case VK_EVAL:
+ {
+ alt47=6;
+ }
+ break;
+ case VK_IN:
+ {
+ alt47=7;
+ }
+ break;
+ case EQUAL:
+ {
+ alt47=8;
+ }
+ break;
+ case GREATER:
+ {
+ alt47=9;
+ }
+ break;
+ case GREATER_EQUAL:
+ {
+ alt47=10;
+ }
+ break;
+ case LESS:
+ {
+ alt47=11;
+ }
+ break;
+ case LESS_EQUAL:
+ {
+ alt47=12;
+ }
+ break;
+ case NOT_EQUAL:
+ {
+ alt47=13;
+ }
+ break;
+ case VK_OPERATOR:
+ {
+ alt47=14;
+ }
+ break;
+ case ID:
+ {
+ alt47=15;
+ }
+ break;
+ case VT_BIND_FIELD:
+ {
+ alt47=16;
+ }
+ break;
+ case VT_FIELD:
+ {
+ alt47=17;
+ }
+ break;
+ case VT_ACCESSOR_PATH:
+ {
+ alt47=18;
+ }
+ break;
+ case STRING:
+ {
+ alt47=19;
+ }
+ break;
+ case INT:
+ {
+ alt47=20;
+ }
+ break;
+ case FLOAT:
+ {
+ alt47=21;
+ }
+ break;
+ case BOOL:
+ {
+ alt47=22;
+ }
+ break;
+ case NULL:
+ {
+ alt47=23;
+ }
+ break;
+ case VT_PAREN_CHUNK:
+ {
+ alt47=24;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 47, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt47) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:177:4: ^( DOUBLE_PIPE fact_expression fact_expression )
+ {
+ match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_fact_expression914);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression916);
+ fact_expression();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_fact_expression_in_fact_expression918);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 2 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:178:4: ^( DOUBLE_AMPER fact_expression fact_expression )
+ {
+ match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_fact_expression925);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression927);
+ fact_expression();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_fact_expression_in_fact_expression929);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 3 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:179:4: ^( VT_FACT_BINDING VT_LABEL fact_expression )
+ {
+ match(input,VT_FACT_BINDING,FOLLOW_VT_FACT_BINDING_in_fact_expression936);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_LABEL,FOLLOW_VT_LABEL_in_fact_expression938);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression940);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 4 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:180:4: ^( VT_FACT pattern_type ( fact_expression )* )
+ {
+ match(input,VT_FACT,FOLLOW_VT_FACT_in_fact_expression947);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_pattern_type_in_fact_expression949);
+ pattern_type();
+
+ state._fsp--;
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:180:27: ( fact_expression )*
+ loop38:
+ do {
+ int alt38=2;
+ int LA38_0 = input.LA(1);
+
+ if ( (LA38_0==VT_FACT||LA38_0==VT_PAREN_CHUNK||(LA38_0>=VT_FACT_BINDING && LA38_0<=VT_ACCESSOR_PATH)||LA38_0==VK_EVAL||LA38_0==VK_IN||LA38_0==VK_OPERATOR||LA38_0==ID||LA38_0==STRING||(LA38_0>=BOOL && LA38_0<=DOUBLE_AMPER)||(LA38_0>=EQUAL && LA38_0<=NULL)) ) {
+ alt38=1;
+ }
+
+
+ switch (alt38) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:180:27: fact_expression
+ {
+ pushFollow(FOLLOW_fact_expression_in_fact_expression951);
+ fact_expression();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop38;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 5 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:181:4: ^( VT_FACT_OR fact_expression fact_expression )
+ {
+ match(input,VT_FACT_OR,FOLLOW_VT_FACT_OR_in_fact_expression959);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression961);
+ fact_expression();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_fact_expression_in_fact_expression963);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 6 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:182:4: ^( VK_EVAL VT_PAREN_CHUNK )
+ {
+ match(input,VK_EVAL,FOLLOW_VK_EVAL_in_fact_expression970);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_fact_expression972);
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 7 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:4: ^( VK_IN ( VK_NOT )? ( fact_expression )+ )
+ {
+ match(input,VK_IN,FOLLOW_VK_IN_in_fact_expression979);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:12: ( VK_NOT )?
+ int alt39=2;
+ int LA39_0 = input.LA(1);
+
+ if ( (LA39_0==VK_NOT) ) {
+ alt39=1;
+ }
+ switch (alt39) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:12: VK_NOT
+ {
+ match(input,VK_NOT,FOLLOW_VK_NOT_in_fact_expression981);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:20: ( fact_expression )+
+ int cnt40=0;
+ loop40:
+ do {
+ int alt40=2;
+ int LA40_0 = input.LA(1);
+
+ if ( (LA40_0==VT_FACT||LA40_0==VT_PAREN_CHUNK||(LA40_0>=VT_FACT_BINDING && LA40_0<=VT_ACCESSOR_PATH)||LA40_0==VK_EVAL||LA40_0==VK_IN||LA40_0==VK_OPERATOR||LA40_0==ID||LA40_0==STRING||(LA40_0>=BOOL && LA40_0<=DOUBLE_AMPER)||(LA40_0>=EQUAL && LA40_0<=NULL)) ) {
+ alt40=1;
+ }
+
+
+ switch (alt40) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:183:20: fact_expression
+ {
+ pushFollow(FOLLOW_fact_expression_in_fact_expression984);
+ fact_expression();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt40 >= 1 ) break loop40;
+ EarlyExitException eee =
+ new EarlyExitException(40, input);
+ throw eee;
+ }
+ cnt40++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 8 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:184:4: ^( EQUAL fact_expression )
+ {
+ match(input,EQUAL,FOLLOW_EQUAL_in_fact_expression992);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression994);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 9 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:185:4: ^( GREATER fact_expression )
+ {
+ match(input,GREATER,FOLLOW_GREATER_in_fact_expression1001);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1003);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 10 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:186:4: ^( GREATER_EQUAL fact_expression )
+ {
+ match(input,GREATER_EQUAL,FOLLOW_GREATER_EQUAL_in_fact_expression1010);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1012);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 11 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:187:4: ^( LESS fact_expression )
+ {
+ match(input,LESS,FOLLOW_LESS_in_fact_expression1019);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1021);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 12 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:188:4: ^( LESS_EQUAL fact_expression )
+ {
+ match(input,LESS_EQUAL,FOLLOW_LESS_EQUAL_in_fact_expression1028);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1030);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 13 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:189:4: ^( NOT_EQUAL fact_expression )
+ {
+ match(input,NOT_EQUAL,FOLLOW_NOT_EQUAL_in_fact_expression1037);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1039);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 14 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:4: ^( VK_OPERATOR ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression )
+ {
+ match(input,VK_OPERATOR,FOLLOW_VK_OPERATOR_in_fact_expression1046);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:18: ( VK_NOT )?
+ int alt41=2;
+ int LA41_0 = input.LA(1);
+
+ if ( (LA41_0==VK_NOT) ) {
+ alt41=1;
+ }
+ switch (alt41) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:18: VK_NOT
+ {
+ match(input,VK_NOT,FOLLOW_VK_NOT_in_fact_expression1048);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:26: ( VT_SQUARE_CHUNK )?
+ int alt42=2;
+ int LA42_0 = input.LA(1);
+
+ if ( (LA42_0==VT_SQUARE_CHUNK) ) {
+ alt42=1;
+ }
+ switch (alt42) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:190:26: VT_SQUARE_CHUNK
+ {
+ match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1051);
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1054);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 15 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:4: ^( ID ( VK_NOT )? ( VT_SQUARE_CHUNK )? fact_expression )
+ {
+ match(input,ID,FOLLOW_ID_in_fact_expression1061);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:9: ( VK_NOT )?
+ int alt43=2;
+ int LA43_0 = input.LA(1);
+
+ if ( (LA43_0==VK_NOT) ) {
+ alt43=1;
+ }
+ switch (alt43) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:9: VK_NOT
+ {
+ match(input,VK_NOT,FOLLOW_VK_NOT_in_fact_expression1063);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:17: ( VT_SQUARE_CHUNK )?
+ int alt44=2;
+ int LA44_0 = input.LA(1);
+
+ if ( (LA44_0==VT_SQUARE_CHUNK) ) {
+ alt44=1;
+ }
+ switch (alt44) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:191:17: VT_SQUARE_CHUNK
+ {
+ match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1066);
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1069);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 16 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:192:4: ^( VT_BIND_FIELD VT_LABEL fact_expression )
+ {
+ match(input,VT_BIND_FIELD,FOLLOW_VT_BIND_FIELD_in_fact_expression1076);
+
+ match(input, Token.DOWN, null);
+ match(input,VT_LABEL,FOLLOW_VT_LABEL_in_fact_expression1078);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1080);
+ fact_expression();
+
+ state._fsp--;
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 17 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:193:4: ^( VT_FIELD fact_expression ( fact_expression )? )
+ {
+ match(input,VT_FIELD,FOLLOW_VT_FIELD_in_fact_expression1087);
+
+ match(input, Token.DOWN, null);
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1089);
+ fact_expression();
+
+ state._fsp--;
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:193:31: ( fact_expression )?
+ int alt45=2;
+ int LA45_0 = input.LA(1);
+
+ if ( (LA45_0==VT_FACT||LA45_0==VT_PAREN_CHUNK||(LA45_0>=VT_FACT_BINDING && LA45_0<=VT_ACCESSOR_PATH)||LA45_0==VK_EVAL||LA45_0==VK_IN||LA45_0==VK_OPERATOR||LA45_0==ID||LA45_0==STRING||(LA45_0>=BOOL && LA45_0<=DOUBLE_AMPER)||(LA45_0>=EQUAL && LA45_0<=NULL)) ) {
+ alt45=1;
+ }
+ switch (alt45) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:193:31: fact_expression
+ {
+ pushFollow(FOLLOW_fact_expression_in_fact_expression1091);
+ fact_expression();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 18 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:194:4: ^( VT_ACCESSOR_PATH ( accessor_element )+ )
+ {
+ match(input,VT_ACCESSOR_PATH,FOLLOW_VT_ACCESSOR_PATH_in_fact_expression1099);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:194:23: ( accessor_element )+
+ int cnt46=0;
+ loop46:
+ do {
+ int alt46=2;
+ int LA46_0 = input.LA(1);
+
+ if ( (LA46_0==VT_ACCESSOR_ELEMENT) ) {
+ alt46=1;
+ }
+
+
+ switch (alt46) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:194:23: accessor_element
+ {
+ pushFollow(FOLLOW_accessor_element_in_fact_expression1101);
+ accessor_element();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ if ( cnt46 >= 1 ) break loop46;
+ EarlyExitException eee =
+ new EarlyExitException(46, input);
+ throw eee;
+ }
+ cnt46++;
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+ break;
+ case 19 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:195:4: STRING
+ {
+ match(input,STRING,FOLLOW_STRING_in_fact_expression1108);
+
+ }
+ break;
+ case 20 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:196:4: INT
+ {
+ match(input,INT,FOLLOW_INT_in_fact_expression1113);
+
+ }
+ break;
+ case 21 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:197:4: FLOAT
+ {
+ match(input,FLOAT,FOLLOW_FLOAT_in_fact_expression1118);
+
+ }
+ break;
+ case 22 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:198:4: BOOL
+ {
+ match(input,BOOL,FOLLOW_BOOL_in_fact_expression1123);
+
+ }
+ break;
+ case 23 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:199:4: NULL
+ {
+ match(input,NULL,FOLLOW_NULL_in_fact_expression1128);
+
+ }
+ break;
+ case 24 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:200:4: VT_PAREN_CHUNK
+ {
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_fact_expression1133);
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "fact_expression"
+
+
+ // $ANTLR start "pattern_type"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:203:1: pattern_type : ^( VT_PATTERN_TYPE ( ID )+ ( dimension_definition )* ) ;
+ public final void pattern_type() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:2: ( ^( VT_PATTERN_TYPE ( ID )+ ( dimension_definition )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:4: ^( VT_PATTERN_TYPE ( ID )+ ( dimension_definition )* )
+ {
+ match(input,VT_PATTERN_TYPE,FOLLOW_VT_PATTERN_TYPE_in_pattern_type1145);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:22: ( ID )+
+ int cnt48=0;
+ loop48:
+ do {
+ int alt48=2;
+ int LA48_0 = input.LA(1);
+
+ if ( (LA48_0==ID) ) {
+ alt48=1;
+ }
+
+
+ switch (alt48) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:22: ID
+ {
+ match(input,ID,FOLLOW_ID_in_pattern_type1147);
+
+ }
+ break;
+
+ default :
+ if ( cnt48 >= 1 ) break loop48;
+ EarlyExitException eee =
+ new EarlyExitException(48, input);
+ throw eee;
+ }
+ cnt48++;
+ } while (true);
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:26: ( dimension_definition )*
+ loop49:
+ do {
+ int alt49=2;
+ int LA49_0 = input.LA(1);
+
+ if ( (LA49_0==LEFT_SQUARE) ) {
+ alt49=1;
+ }
+
+
+ switch (alt49) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:204:26: dimension_definition
+ {
+ pushFollow(FOLLOW_dimension_definition_in_pattern_type1150);
+ dimension_definition();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop49;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "pattern_type"
+
+
+ // $ANTLR start "data_type"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:207:1: data_type : ^( VT_DATA_TYPE ( ID )+ ( dimension_definition )* ) ;
+ public final void data_type() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:2: ( ^( VT_DATA_TYPE ( ID )+ ( dimension_definition )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:4: ^( VT_DATA_TYPE ( ID )+ ( dimension_definition )* )
+ {
+ match(input,VT_DATA_TYPE,FOLLOW_VT_DATA_TYPE_in_data_type1164);
+
+ match(input, Token.DOWN, null);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:19: ( ID )+
+ int cnt50=0;
+ loop50:
+ do {
+ int alt50=2;
+ int LA50_0 = input.LA(1);
+
+ if ( (LA50_0==ID) ) {
+ alt50=1;
+ }
+
+
+ switch (alt50) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:19: ID
+ {
+ match(input,ID,FOLLOW_ID_in_data_type1166);
+
+ }
+ break;
+
+ default :
+ if ( cnt50 >= 1 ) break loop50;
+ EarlyExitException eee =
+ new EarlyExitException(50, input);
+ throw eee;
+ }
+ cnt50++;
+ } while (true);
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:23: ( dimension_definition )*
+ loop51:
+ do {
+ int alt51=2;
+ int LA51_0 = input.LA(1);
+
+ if ( (LA51_0==LEFT_SQUARE) ) {
+ alt51=1;
+ }
+
+
+ switch (alt51) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:208:23: dimension_definition
+ {
+ pushFollow(FOLLOW_dimension_definition_in_data_type1169);
+ dimension_definition();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop51;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "data_type"
+
+
+ // $ANTLR start "dimension_definition"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:211:1: dimension_definition : LEFT_SQUARE RIGHT_SQUARE ;
+ public final void dimension_definition() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:212:2: ( LEFT_SQUARE RIGHT_SQUARE )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:212:4: LEFT_SQUARE RIGHT_SQUARE
+ {
+ match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dimension_definition1182);
+ match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dimension_definition1184);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "dimension_definition"
+
+
+ // $ANTLR start "accessor_element"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:215:1: accessor_element : ^( VT_ACCESSOR_ELEMENT ID ( VT_SQUARE_CHUNK )* ) ;
+ public final void accessor_element() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:2: ( ^( VT_ACCESSOR_ELEMENT ID ( VT_SQUARE_CHUNK )* ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:4: ^( VT_ACCESSOR_ELEMENT ID ( VT_SQUARE_CHUNK )* )
+ {
+ match(input,VT_ACCESSOR_ELEMENT,FOLLOW_VT_ACCESSOR_ELEMENT_in_accessor_element1196);
+
+ match(input, Token.DOWN, null);
+ match(input,ID,FOLLOW_ID_in_accessor_element1198);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:29: ( VT_SQUARE_CHUNK )*
+ loop52:
+ do {
+ int alt52=2;
+ int LA52_0 = input.LA(1);
+
+ if ( (LA52_0==VT_SQUARE_CHUNK) ) {
+ alt52=1;
+ }
+
+
+ switch (alt52) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:216:29: VT_SQUARE_CHUNK
+ {
+ match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_accessor_element1200);
+
+ }
+ break;
+
+ default :
+ break loop52;
+ }
+ } while (true);
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "accessor_element"
+
+
+ // $ANTLR start "expression_chain"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:219:1: expression_chain : ^( VT_EXPRESSION_CHAIN ID ( VT_SQUARE_CHUNK )? ( VT_PAREN_CHUNK )? ( expression_chain )? ) ;
+ public final void expression_chain() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:2: ( ^( VT_EXPRESSION_CHAIN ID ( VT_SQUARE_CHUNK )? ( VT_PAREN_CHUNK )? ( expression_chain )? ) )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:4: ^( VT_EXPRESSION_CHAIN ID ( VT_SQUARE_CHUNK )? ( VT_PAREN_CHUNK )? ( expression_chain )? )
+ {
+ match(input,VT_EXPRESSION_CHAIN,FOLLOW_VT_EXPRESSION_CHAIN_in_expression_chain1214);
+
+ match(input, Token.DOWN, null);
+ match(input,ID,FOLLOW_ID_in_expression_chain1216);
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:29: ( VT_SQUARE_CHUNK )?
+ int alt53=2;
+ int LA53_0 = input.LA(1);
+
+ if ( (LA53_0==VT_SQUARE_CHUNK) ) {
+ alt53=1;
+ }
+ switch (alt53) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:29: VT_SQUARE_CHUNK
+ {
+ match(input,VT_SQUARE_CHUNK,FOLLOW_VT_SQUARE_CHUNK_in_expression_chain1218);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:46: ( VT_PAREN_CHUNK )?
+ int alt54=2;
+ int LA54_0 = input.LA(1);
+
+ if ( (LA54_0==VT_PAREN_CHUNK) ) {
+ alt54=1;
+ }
+ switch (alt54) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:46: VT_PAREN_CHUNK
+ {
+ match(input,VT_PAREN_CHUNK,FOLLOW_VT_PAREN_CHUNK_in_expression_chain1221);
+
+ }
+ break;
+
+ }
+
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:62: ( expression_chain )?
+ int alt55=2;
+ int LA55_0 = input.LA(1);
+
+ if ( (LA55_0==VT_EXPRESSION_CHAIN) ) {
+ alt55=1;
+ }
+ switch (alt55) {
+ case 1 :
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:220:62: expression_chain
+ {
+ pushFollow(FOLLOW_expression_chain_in_expression_chain1224);
+ expression_chain();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+
+ match(input, Token.UP, null);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "expression_chain"
+
+
+ // $ANTLR start "curly_chunk"
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:223:1: curly_chunk : VT_CURLY_CHUNK ;
+ public final void curly_chunk() throws RecognitionException {
+ try {
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:224:2: ( VT_CURLY_CHUNK )
+ // src/main/resources/org/drools/lang/Tree2TestDRL.g:224:4: VT_CURLY_CHUNK
+ {
+ match(input,VT_CURLY_CHUNK,FOLLOW_VT_CURLY_CHUNK_in_curly_chunk1238);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "curly_chunk"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_VT_COMPILATION_UNIT_in_compilation_unit43 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_package_statement_in_compilation_unit45 = new BitSet(new long[]{0xD5FFE00000000028L,0x0000000000000007L});
+ public static final BitSet FOLLOW_statement_in_compilation_unit48 = new BitSet(new long[]{0xD5FFE00000000028L,0x0000000000000007L});
+ public static final BitSet FOLLOW_VK_PACKAGE_in_package_statement63 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_package_id_in_package_statement65 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_PACKAGE_ID_in_package_id78 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_package_id80 = new BitSet(new long[]{0x0000000000000008L,0x0000000000040000L});
+ public static final BitSet FOLLOW_rule_attribute_in_statement93 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_function_import_statement_in_statement98 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_import_statement_in_statement104 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_global_in_statement110 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_function_in_statement116 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_template_in_statement121 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule_in_statement126 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_query_in_statement131 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_type_declaration_in_statement136 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VK_IMPORT_in_import_statement148 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_import_name_in_import_statement150 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_FUNCTION_IMPORT_in_function_import_statement163 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VK_FUNCTION_in_function_import_statement165 = new BitSet(new long[]{0x0000020000000000L});
+ public static final BitSet FOLLOW_import_name_in_function_import_statement167 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_IMPORT_ID_in_import_name180 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_import_name182 = new BitSet(new long[]{0x0000000000000008L,0x0000000000140000L});
+ public static final BitSet FOLLOW_DOT_STAR_in_import_name185 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_GLOBAL_in_global199 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_data_type_in_global201 = new BitSet(new long[]{0x0000040000000000L});
+ public static final BitSet FOLLOW_VT_GLOBAL_ID_in_global203 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_FUNCTION_in_function216 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_data_type_in_function218 = new BitSet(new long[]{0x0000080000000000L});
+ public static final BitSet FOLLOW_VT_FUNCTION_ID_in_function221 = new BitSet(new long[]{0x0000100000000000L});
+ public static final BitSet FOLLOW_parameters_in_function223 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_curly_chunk_in_function225 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_QUERY_in_query238 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_QUERY_ID_in_query240 = new BitSet(new long[]{0x0000100000400000L});
+ public static final BitSet FOLLOW_parameters_in_query242 = new BitSet(new long[]{0x0000100000400000L});
+ public static final BitSet FOLLOW_lhs_block_in_query245 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
+ public static final BitSet FOLLOW_VK_END_in_query247 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_PARAM_LIST_in_parameters260 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_param_definition_in_parameters262 = new BitSet(new long[]{0x0000004000000008L,0x0000000000040000L});
+ public static final BitSet FOLLOW_data_type_in_param_definition275 = new BitSet(new long[]{0x0000004000000008L,0x0000000000040000L});
+ public static final BitSet FOLLOW_argument_in_param_definition278 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ID_in_argument289 = new BitSet(new long[]{0x0000000000000002L,0x0000400000000000L});
+ public static final BitSet FOLLOW_dimension_definition_in_argument291 = new BitSet(new long[]{0x0000000000000002L,0x0000400000000000L});
+ public static final BitSet FOLLOW_VK_DECLARE_in_type_declaration304 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_TYPE_DECLARE_ID_in_type_declaration306 = new BitSet(new long[]{0x0000000000000000L,0x0000000002048000L});
+ public static final BitSet FOLLOW_decl_metadata_in_type_declaration308 = new BitSet(new long[]{0x0000000000000000L,0x0000000002048000L});
+ public static final BitSet FOLLOW_decl_field_in_type_declaration311 = new BitSet(new long[]{0x0000000000000000L,0x0000000000048000L});
+ public static final BitSet FOLLOW_VK_END_in_type_declaration314 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_AT_in_decl_metadata327 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_decl_metadata329 = new BitSet(new long[]{0x0000000000100008L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_decl_metadata331 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_ID_in_decl_field345 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_decl_field_initialization_in_decl_field347 = new BitSet(new long[]{0x0000004000000000L});
+ public static final BitSet FOLLOW_data_type_in_decl_field350 = new BitSet(new long[]{0x0000000000000008L,0x0000000002000000L});
+ public static final BitSet FOLLOW_decl_metadata_in_decl_field352 = new BitSet(new long[]{0x0000000000000008L,0x0000000002000000L});
+ public static final BitSet FOLLOW_EQUALS_in_decl_field_initialization366 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_decl_field_initialization368 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_TEMPLATE_in_template381 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_TEMPLATE_ID_in_template383 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_template_slot_in_template385 = new BitSet(new long[]{0x0000000000008000L,0x0000000000008000L});
+ public static final BitSet FOLLOW_VK_END_in_template388 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_SLOT_in_template_slot401 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_data_type_in_template_slot403 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_VT_SLOT_ID_in_template_slot405 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_RULE_in_rule418 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_RULE_ID_in_rule420 = new BitSet(new long[]{0x0000000000030000L,0x0000000010000000L});
+ public static final BitSet FOLLOW_rule_attributes_in_rule422 = new BitSet(new long[]{0x0000000000020000L,0x0000000010000000L});
+ public static final BitSet FOLLOW_when_part_in_rule425 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_VT_RHS_CHUNK_in_rule428 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_WHEN_in_when_part440 = new BitSet(new long[]{0x0000100000400000L});
+ public static final BitSet FOLLOW_lhs_block_in_when_part442 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_RULE_ATTRIBUTES_in_rule_attributes454 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VK_ATTRIBUTES_in_rule_attributes456 = new BitSet(new long[]{0x01FFE00000000000L});
+ public static final BitSet FOLLOW_rule_attribute_in_rule_attributes459 = new BitSet(new long[]{0x01FFE00000000008L});
+ public static final BitSet FOLLOW_VK_SALIENCE_in_rule_attribute473 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_set_in_rule_attribute475 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_NO_LOOP_in_rule_attribute487 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_BOOL_in_rule_attribute489 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_AGENDA_GROUP_in_rule_attribute499 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_STRING_in_rule_attribute501 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_DURATION_in_rule_attribute510 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_INT_in_rule_attribute512 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_ACTIVATION_GROUP_in_rule_attribute522 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_STRING_in_rule_attribute524 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_AUTO_FOCUS_in_rule_attribute532 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_BOOL_in_rule_attribute534 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_DATE_EFFECTIVE_in_rule_attribute543 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_STRING_in_rule_attribute545 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_DATE_EXPIRES_in_rule_attribute553 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_STRING_in_rule_attribute555 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_ENABLED_in_rule_attribute563 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_BOOL_in_rule_attribute565 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_RULEFLOW_GROUP_in_rule_attribute573 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_STRING_in_rule_attribute575 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_LOCK_ON_ACTIVE_in_rule_attribute583 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_BOOL_in_rule_attribute585 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_DIALECT_in_rule_attribute593 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_STRING_in_rule_attribute595 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_AND_IMPLICIT_in_lhs_block609 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs_block611 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
+ public static final BitSet FOLLOW_VT_OR_PREFIX_in_lhs624 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs626 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
+ public static final BitSet FOLLOW_VT_OR_INFIX_in_lhs634 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs636 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
+ public static final BitSet FOLLOW_lhs_in_lhs638 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_AND_PREFIX_in_lhs645 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs647 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
+ public static final BitSet FOLLOW_VT_AND_INFIX_in_lhs655 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs657 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
+ public static final BitSet FOLLOW_lhs_in_lhs659 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_EXISTS_in_lhs666 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs668 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_NOT_in_lhs675 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs677 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_EVAL_in_lhs684 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_lhs686 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_FORALL_in_lhs693 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_lhs695 = new BitSet(new long[]{0x0000000087800008L,0x0000000200000628L});
+ public static final BitSet FOLLOW_FROM_in_lhs703 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_pattern_in_lhs705 = new BitSet(new long[]{0x0000000020000000L,0x0000001800000010L});
+ public static final BitSet FOLLOW_from_elements_in_lhs707 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_lhs_pattern_in_lhs713 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ACCUMULATE_in_from_elements725 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_from_elements727 = new BitSet(new long[]{0x0000000018000000L});
+ public static final BitSet FOLLOW_accumulate_init_clause_in_from_elements730 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_accumulate_id_clause_in_from_elements732 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_COLLECT_in_from_elements740 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_lhs_in_from_elements742 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_ENTRY_POINT_in_from_elements749 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_ENTRYPOINT_ID_in_from_elements751 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_FROM_SOURCE_in_from_elements758 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_from_elements760 = new BitSet(new long[]{0x0000000040100008L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_from_elements762 = new BitSet(new long[]{0x0000000040000008L});
+ public static final BitSet FOLLOW_expression_chain_in_from_elements765 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_ACCUMULATE_INIT_CLAUSE_in_accumulate_init_clause779 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VK_INIT_in_accumulate_init_clause786 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause788 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_ACTION_in_accumulate_init_clause796 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause798 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_accumulate_init_reverse_clause_in_accumulate_init_clause805 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
+ public static final BitSet FOLLOW_VK_RESULT_in_accumulate_init_clause812 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_clause814 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_REVERSE_in_accumulate_init_reverse_clause828 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_init_reverse_clause830 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_ACCUMULATE_ID_CLAUSE_in_accumulate_id_clause844 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_accumulate_id_clause846 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_accumulate_id_clause848 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_PATTERN_in_lhs_pattern861 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_lhs_pattern863 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_over_clause_in_lhs_pattern866 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_OVER_in_over_clause879 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_over_element_in_over_clause881 = new BitSet(new long[]{0x0000000000200008L});
+ public static final BitSet FOLLOW_VT_BEHAVIOR_in_over_element895 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_over_element897 = new BitSet(new long[]{0x0000000000000000L,0x0000000000040000L});
+ public static final BitSet FOLLOW_ID_in_over_element899 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_over_element901 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_DOUBLE_PIPE_in_fact_expression914 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression916 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression918 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_DOUBLE_AMPER_in_fact_expression925 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression927 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression929 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_FACT_BINDING_in_fact_expression936 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_LABEL_in_fact_expression938 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression940 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_FACT_in_fact_expression947 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_pattern_type_in_fact_expression949 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression951 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_VT_FACT_OR_in_fact_expression959 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression961 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression963 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_EVAL_in_fact_expression970 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_fact_expression972 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_IN_in_fact_expression979 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VK_NOT_in_fact_expression981 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression984 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_EQUAL_in_fact_expression992 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression994 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_GREATER_in_fact_expression1001 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1003 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_GREATER_EQUAL_in_fact_expression1010 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1012 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_LESS_in_fact_expression1019 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1021 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_LESS_EQUAL_in_fact_expression1028 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1030 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_NOT_EQUAL_in_fact_expression1037 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1039 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VK_OPERATOR_in_fact_expression1046 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VK_NOT_in_fact_expression1048 = new BitSet(new long[]{0x0000001F00180040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1051 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1054 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_ID_in_fact_expression1061 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VK_NOT_in_fact_expression1063 = new BitSet(new long[]{0x0000001F00180040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_fact_expression1066 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1069 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_BIND_FIELD_in_fact_expression1076 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_VT_LABEL_in_fact_expression1078 = new BitSet(new long[]{0x0000001F00100040L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1080 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_FIELD_in_fact_expression1087 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1089 = new BitSet(new long[]{0x0000001F00100048L,0x00003FC1E0244048L});
+ public static final BitSet FOLLOW_fact_expression_in_fact_expression1091 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_ACCESSOR_PATH_in_fact_expression1099 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_accessor_element_in_fact_expression1101 = new BitSet(new long[]{0x0000002000000008L});
+ public static final BitSet FOLLOW_STRING_in_fact_expression1108 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_fact_expression1113 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_fact_expression1118 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_fact_expression1123 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_fact_expression1128 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_fact_expression1133 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_PATTERN_TYPE_in_pattern_type1145 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_pattern_type1147 = new BitSet(new long[]{0x0000000000000008L,0x0000400000040000L});
+ public static final BitSet FOLLOW_dimension_definition_in_pattern_type1150 = new BitSet(new long[]{0x0000000000000008L,0x0000400000000000L});
+ public static final BitSet FOLLOW_VT_DATA_TYPE_in_data_type1164 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_data_type1166 = new BitSet(new long[]{0x0000000000000008L,0x0000400000040000L});
+ public static final BitSet FOLLOW_dimension_definition_in_data_type1169 = new BitSet(new long[]{0x0000000000000008L,0x0000400000000000L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_dimension_definition1182 = new BitSet(new long[]{0x0000000000000000L,0x0000800000000000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_dimension_definition1184 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VT_ACCESSOR_ELEMENT_in_accessor_element1196 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_accessor_element1198 = new BitSet(new long[]{0x0000000000080008L});
+ public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_accessor_element1200 = new BitSet(new long[]{0x0000000000080008L});
+ public static final BitSet FOLLOW_VT_EXPRESSION_CHAIN_in_expression_chain1214 = new BitSet(new long[]{0x0000000000000004L});
+ public static final BitSet FOLLOW_ID_in_expression_chain1216 = new BitSet(new long[]{0x0000000040180008L});
+ public static final BitSet FOLLOW_VT_SQUARE_CHUNK_in_expression_chain1218 = new BitSet(new long[]{0x0000000040100008L});
+ public static final BitSet FOLLOW_VT_PAREN_CHUNK_in_expression_chain1221 = new BitSet(new long[]{0x0000000040000008L});
+ public static final BitSet FOLLOW_expression_chain_in_expression_chain1224 = new BitSet(new long[]{0x0000000000000008L});
+ public static final BitSet FOLLOW_VT_CURLY_CHUNK_in_curly_chunk1238 = new BitSet(new long[]{0x0000000000000002L});
+
}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingEntryTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingEntryTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingEntryTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -0,0 +1,286 @@
+package org.drools.lang.dsl;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import junit.framework.TestCase;
+
+public class DSLMappingEntryTest extends TestCase {
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ private DSLMappingEntry createEntry(final String inputKey,
+ final String inputValue) throws IOException {
+ String mapping = "[condition][]" + inputKey + "=" + inputValue;
+ StringReader dsl = new StringReader( mapping );
+ DSLMappingEntry entry = null;
+ try {
+ DSLTokenizedMappingFile parser = new DSLTokenizedMappingFile();
+ if ( parser.parseAndLoad( dsl ) ) {
+ entry = parser.getMapping().getEntries().get( 0 );
+ } else {
+ throw new RuntimeException( "Error parsing entry: " + mapping + ": " + parser.getErrors().toString() );
+ }
+ } finally {
+ dsl.close();
+ }
+
+ return entry;
+ }
+
+ public void testPatternCalculation() throws IOException {
+ final String inputKey = "The Customer name is {name} and surname is {surname} and it has US$ 50,00 on his {pocket}";
+ final String inputValue = "Customer( name == \"{name}\", surname == \"{surname}\", money > $money )";
+
+ final String expectedKeyP = "(\\W|^)The\\s+Customer\\s+name\\s+is\\s+(.*?)\\s+and\\s+surname\\s+is\\s+(.*?)\\s+and\\s+it\\s+has\\s+US\\$\\s+50,00\\s+on\\s+his\\s+(.*?)$";
+ final String expectedValP = "$1Customer( name == \"$2\", surname == \"$3\", money > \\$money )";
+
+ final DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ assertEquals( inputKey,
+ entry.getMappingKey() );
+ assertEquals( expectedKeyP,
+ entry.getKeyPattern().pattern() );
+ assertEquals( inputValue,
+ entry.getMappingValue() );
+ assertEquals( expectedValP,
+ entry.getValuePattern() );
+ }
+
+ public void testPatternCalculation2() throws IOException {
+ final String inputKey = "-name is {name}";
+ final String inputValue = "name == \"{name}\"";
+
+ final String expectedKeyP = "(\\W|^)-\\s*name\\s+is\\s+(.*?)$";
+ final String expectedValP = "$1name == \"$2\"";
+
+ final DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ assertEquals( inputKey,
+ entry.getMappingKey() );
+ assertEquals( expectedKeyP,
+ entry.getKeyPattern().pattern() );
+ assertEquals( inputValue,
+ entry.getMappingValue() );
+ assertEquals( expectedValP,
+ entry.getValuePattern() );
+
+ }
+
+ public void testPatternCalculation3() throws IOException {
+ final String inputKey = "- name is {name}";
+ final String inputValue = "name == \"{name}\"";
+
+ final String expectedKeyP = "(\\W|^)-\\s*name\\s+is\\s+(.*?)$";
+ final String expectedValP = "$1name == \"$2\"";
+
+ final DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ assertEquals( inputKey,
+ entry.getMappingKey() );
+ assertEquals( entry.getKeyPattern().pattern(),
+ expectedKeyP,
+ entry.getKeyPattern().pattern() );
+ assertEquals( inputValue,
+ entry.getMappingValue() );
+ assertEquals( expectedValP,
+ entry.getValuePattern() );
+ }
+
+ private DSLMappingEntry setupEntry() throws IOException {
+ final String inputKey = "String is \"{value}\"";
+ final String inputValue = "SomeFact(value==\"{value}\")";
+
+ return createEntry( inputKey,
+ inputValue );
+ }
+
+ public void testExpandNoSpaces() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \"blah\"" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( "SomeFact(value==\"blah\")",
+ result );
+ }
+
+ public void testExpandWithLeadingSpace() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \" blah\"" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( "SomeFact(value==\" blah\")",
+ result );
+ }
+
+ public void testExpandWithMultipleLeadingSpaces() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \" blah\"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\" blah\")",
+ result );
+ }
+
+ public void testExpandWithTrailingSpace() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \"blah \"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\"blah \")",
+ result );
+ }
+
+ public void testExpandWithMultipleTrailingSpaces() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \"blah \"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\"blah \")",
+ result );
+ }
+
+ public void testExpandWithInternalSpace() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \"bl ah\"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\"bl ah\")",
+ result );
+ }
+
+ public void testExpandWithMultipleSpaces() throws IOException {
+ DSLMappingEntry entry = this.setupEntry();
+ final String result = entry.getKeyPattern().matcher( "String is \" bl ah \"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\" bl ah \")",
+ result );
+ }
+
+ public void testExpandWithDots() throws IOException {
+ final String inputKey = "- {prop} is {val} ";
+ final String inputValue = "{prop} == {val}";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "- type is ClientServiceType.TypeGOLD" ).replaceAll( entry.getValuePattern() );
+ assertEquals( result,
+ "type == ClientServiceType.TypeGOLD",
+ result );
+ }
+
+ public void testExpandPartialWords() throws IOException {
+ final String inputKey = "- {prop} is {val} ";
+ final String inputValue = "{prop} == {val}";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+ // not supposed to expand
+ String result = entry.getKeyPattern().matcher( "- type is_not ClientServiceType.TypeGOLD" ).replaceAll( entry.getValuePattern() );
+ assertEquals( result,
+ "- type is_not ClientServiceType.TypeGOLD",
+ result );
+ }
+
+ public void testExpandPartialWords2() throws IOException {
+ final String inputKey = "- {prop} is_not {val} ";
+ final String inputValue = "{prop} != {val}";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "- type is_not ClientServiceType.TypeGOLD" ).replaceAll( entry.getValuePattern() );
+ assertEquals( result,
+ "type != ClientServiceType.TypeGOLD",
+ result );
+ }
+
+ public void testExpandPartialWords3() throws IOException {
+ final String inputKey = "- {prop} is not {val} ";
+ final String inputValue = "{prop} != {val}";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "- type is not ClientServiceType.TypeGOLD" ).replaceAll( entry.getValuePattern() );
+ assertEquals( result,
+ "type != ClientServiceType.TypeGOLD",
+ result );
+ }
+
+ public void testExpandWithBrackets() throws IOException {
+ final String inputKey = "attr {attr_name} is in \\[ {values} \\]";
+ final String inputValue = "{attr_name} in ( {values} )";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "attr name is in [ 'Edson', 'Bob' ]" ).replaceAll( entry.getValuePattern() );
+ assertEquals( result,
+ "name in ( 'Edson', 'Bob' )",
+ result );
+ }
+
+ public void testExpandWithParethesis() throws IOException {
+ final String inputKey = "((H|h)e|(S|s)he) \\(is\\) (a|an) $xx {attribute} (man|woman)";
+ final String inputValue = "Person( attribute == \"{attribute}\" )";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "he (is) a $xx handsome man" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( result,
+ "Person( attribute == \"handsome\" )",
+ result );
+ }
+
+ public void testSingleCharacterBetweenVars() throws IOException {
+ final String inputKey = "DSL sentence with {key1} {key2}";
+ final String inputValue = "Sentence( {key1} == {key2} )";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "DSL sentence with mykey myvalue" ).replaceAll( entry.getValuePattern() );
+ assertEquals( result,
+ "Sentence( mykey == myvalue )",
+ result );
+ }
+
+ public void testExpandWithQualifiedVars() throws IOException {
+ final String inputKey = "When the credit rating is {rating:ENUM:Applicant.creditRating}";
+ final String inputValue = "applicant:Applicant(credit=={rating})";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ String result = entry.getKeyPattern().matcher( "When the credit rating is AA" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( result,
+ "applicant:Applicant(credit==AA)",
+ result );
+ }
+
+
+ public void testExpandWithRegexp() throws IOException {
+ final String inputKey = "When the credit rating is {rating:regexp:\\d{3}}";
+ final String inputValue = "applicant:Applicant(credit=={rating})";
+
+ DSLMappingEntry entry = createEntry( inputKey,
+ inputValue );
+
+ assertEquals( "(\\W|^)When\\s+the\\s+credit\\s+rating\\s+is\\s+(\\d{3})(\\W|$)",
+ entry.getKeyPattern().toString() );
+ assertEquals( "$1applicant:Applicant(credit==$2)$3",
+ entry.getValuePattern());
+
+
+ String result = entry.getKeyPattern().matcher( "When the credit rating is 555" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( result,
+ "applicant:Applicant(credit==555)",
+ result );
+ }
+
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingEntryTest.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -22,7 +22,7 @@
public void testParseFile() {
try {
final Reader reader = new InputStreamReader( this.getClass().getResourceAsStream( this.filename ) );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
@@ -40,11 +40,11 @@
}
- public void testParseFileWithBrackets() {
+ public void FIXME_testParseFileWithBrackets() {
String file = "[when][]ATTRIBUTE \"{attr}\" IS IN [{list}]=Attribute( {attr} in ({list}) )";
try {
final Reader reader = new StringReader( file );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
@@ -73,11 +73,11 @@
}
}
- public void testParseFileWithEscaptedBrackets() {
+ public void FIXME_testParseFileWithEscaptedBrackets() {
String file = "[when][]ATTRIBUTE \"{attr}\" IS IN \\[{list}\\]=Attribute( {attr} in ({list}) )";
try {
final Reader reader = new StringReader( file );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
@@ -110,12 +110,12 @@
/**
* Right now this test fails because there is no RHS for the rule. It connects the "then" and "end" to "thenend".
*/
- public void testNoRHS() {
+ public void FIXME_testNoRHS() {
String file = "[then]TEST=System.out.println(\"DO_SOMETHING\");\n" + "[when]code {code1} occurs and sum of all digit not equal \\( {code2} \\+ {code3} \\)=AAAA( cd1 == {code1}, cd2 != ( {code2} + {code3} ))\n"
+ "[when]code {code1} occurs=BBBB\n";
try {
final Reader reader = new StringReader( file );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
@@ -144,12 +144,12 @@
}
- public void testParseFileWithEscapes() {
+ public void FIXME_testParseFileWithEscapes() {
String file = "[then]TEST=System.out.println(\"DO_SOMETHING\");\n" + "[when]code {code1} occurs and sum of all digit not equal \\( {code2} \\+ {code3} \\)=AAAA( cd1 == {code1}, cd2 != ( {code2} + {code3} ))\n"
+ "[when]code {code1} occurs=BBBB\n";
try {
final Reader reader = new StringReader( file );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
@@ -178,11 +178,11 @@
}
- public void testParseFileWithEscaptedEquals() {
+ public void FIXME_testParseFileWithEscaptedEquals() {
String file = "[when][]something:\\={value}=Attribute( something == \"{value}\" )";
try {
final Reader reader = new StringReader( file );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
@@ -212,11 +212,11 @@
}
- public void testEnum() {
+ public void FIXME_testEnum() {
String file = "[when][]ATTRIBUTE {attr:ENUM:Attribute.value} in {list}=Attribute( {attr} in ({list}) )";
try {
final Reader reader = new StringReader( file );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
final boolean parsingResult = this.file.parseAndLoad( reader );
reader.close();
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLTokenizedMappingFileTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLTokenizedMappingFileTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLTokenizedMappingFileTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -62,10 +62,10 @@
entry.getSection() );
assertEquals( DSLMappingEntry.EMPTY_METADATA,
entry.getMetaData() );
- assertEquals( "(\\W|^)ATTRIBUTE \"(.*?)\" IS IN [(.*?)](\\W|$)",
+ assertEquals( "(\\W|^)ATTRIBUTE\\s+\"(.*?)\"\\s+IS\\s+IN\\s+[(.*?)](\\W|$)",
entry.getKeyPattern().toString() );
//Attribute( {attr} in ({list}) )
- assertEquals( "$1Attribute( $2 in ($3) ) $4",
+ assertEquals( "$1Attribute( $2 in ($3) )$4",
entry.getValuePattern() );
} catch ( final IOException e ) {
@@ -97,10 +97,10 @@
assertEquals( DSLMappingEntry.EMPTY_METADATA,
entry.getMetaData() );
- assertEquals( "(\\W|^)ATTRIBUTE \"(.*?)\" IS IN \\[(.*?)\\](\\W|$)",
+ assertEquals( "(\\W|^)ATTRIBUTE\\s+\"(.*?)\"\\s+IS\\s+IN\\s+\\[(.*?)\\](\\W|$)",
entry.getKeyPattern().toString() );
//Attribute( {attr} in ({list}) )
- assertEquals( "$1Attribute( $2 in ($3) ) $4",
+ assertEquals( "$1Attribute( $2 in ($3) )$4",
entry.getValuePattern() );
} catch ( final IOException e ) {
@@ -133,7 +133,7 @@
final String ruleAfterExpansion = de.expand(rule);
- final String expected = "rule \"x\"\nwhen\nAAAA( cd1 == 1041, cd2 != ( 1034 + 1035 )) \nthen\nSystem.out.println(\"DO_SOMETHING\"); \nend\n";
+ final String expected = "rule \"x\"\nwhen\nAAAA( cd1 == 1041, cd2 != ( 1034 + 1035 ))\nthen\nSystem.out.println(\"DO_SOMETHING\");\nend\n";
assertEquals( expected, ruleAfterExpansion );
@@ -168,8 +168,8 @@
entry.getMetaData() );
assertEquals( "(\\W|^)something:\\=(.*?)$",
entry.getKeyPattern().toString() );
- assertEquals( "$1Attribute( something == \"$2\" ) ",
- entry.getMappingValue() );
+ assertEquals( "$1Attribute( something == \"$2\" )",
+ entry.getValuePattern() );
} catch ( final IOException e ) {
e.printStackTrace();
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -1,253 +0,0 @@
-package org.drools.lang.dsl;
-
-import junit.framework.TestCase;
-
-public class DefaultDSLMappingEntryTest extends TestCase {
-
- private DSLMappingEntry entry;
-
- protected void setUp() throws Exception {
- super.setUp();
- setupEntry();
- }
-
- private void setupEntry() {
- final String inputKey = "String is \"{value}\"";
- final String inputValue = "SomeFact(value==\"{value}\")";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testPatternCalculation() {
- final String inputKey = "The Customer name is {name} and surname is {surname} and it has US$ 50,00 on his {pocket}";
- final String inputValue = "Customer( name == \"{name}\", surname == \"{surname}\", money > $money )";
-
- final String expectedKeyP = "(\\W|^)The\\s+Customer\\s+name\\s+is\\s+(.*?)\\s+and\\s+surname\\s+is\\s+(.*?)\\s+and\\s+it\\s+has\\s+US\\$\\s+50,00\\s+on\\s+his\\s+(.*?)$";
- final String expectedValP = "Customer( name == \"$2\", surname == \"$3\", money > \\$money )";
-
- final DSLMappingEntry entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- assertEquals( inputKey,
- entry.getMappingKey() );
- assertEquals( expectedKeyP,
- entry.getKeyPattern().pattern() );
- assertEquals( inputValue,
- entry.getMappingValue() );
- assertEquals( expectedValP,
- entry.getValuePattern() );
-
- }
-
- public void testPatternCalculation2() {
- final String inputKey = "-name is {name}";
- final String inputValue = "name == \"{name}\"";
-
- final String expectedKeyP = "(\\W|^)-\\s*name\\s+is\\s+(.*?)$";
- final String expectedValP = "name == \"$2\"";
-
- final DSLMappingEntry entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- assertEquals( inputKey,
- entry.getMappingKey() );
- assertEquals( expectedKeyP,
- entry.getKeyPattern().pattern() );
- assertEquals( inputValue,
- entry.getMappingValue() );
- assertEquals( expectedValP,
- entry.getValuePattern() );
-
- }
-
- public void testPatternCalculation3() {
- final String inputKey = "- name is {name}";
- final String inputValue = "name == \"{name}\"";
-
- final String expectedKeyP = "(\\W|^)-\\s*name\\s+is\\s+(.*?)$";
- final String expectedValP = "name == \"$2\"";
-
- final DSLMappingEntry entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- assertEquals( inputKey,
- entry.getMappingKey() );
- assertEquals( entry.getKeyPattern().pattern(),
- expectedKeyP,
- entry.getKeyPattern().pattern() );
- assertEquals( inputValue,
- entry.getMappingValue() );
- assertEquals( expectedValP,
- entry.getValuePattern() );
- }
-
- public void testExpandNoSpaces() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \"blah\"" ).replaceAll( this.entry.getValuePattern() );
-
- assertEquals( "SomeFact(value==\"blah\")",
- result );
- }
-
- public void testExpandWithLeadingSpace() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \" blah\"" ).replaceAll( this.entry.getValuePattern() );
-
- assertEquals( "SomeFact(value==\" blah\")",
- result );
- }
-
- public void testExpandWithMultipleLeadingSpaces() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \" blah\"" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( "SomeFact(value==\" blah\")",
- result );
- }
-
- public void testExpandWithTrailingSpace() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \"blah \"" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( "SomeFact(value==\"blah \")",
- result );
- }
-
- public void testExpandWithMultipleTrailingSpaces() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \"blah \"" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( "SomeFact(value==\"blah \")",
- result );
- }
-
- public void testExpandWithInternalSpace() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \"bl ah\"" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( "SomeFact(value==\"bl ah\")",
- result );
- }
-
- public void testExpandWithMultipleSpaces() {
- this.setupEntry();
- final String result = this.entry.getKeyPattern().matcher( "String is \" bl ah \"" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( "SomeFact(value==\" bl ah \")",
- result );
- }
-
- public void testExpandWithDots() {
- final String inputKey = "- {prop} is {val} ";
- final String inputValue = "{prop} == {val}";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- String result = this.entry.getKeyPattern().matcher( "- type is ClientServiceType.TypeGOLD" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "type == ClientServiceType.TypeGOLD",
- result );
- }
-
- public void testExpandPartialWords() {
- final String inputKey = "- {prop} is {val} ";
- final String inputValue = "{prop} == {val}";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
- // not supposed to expand
- String result = this.entry.getKeyPattern().matcher( "- type is_not ClientServiceType.TypeGOLD" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "- type is_not ClientServiceType.TypeGOLD",
- result );
- }
-
- public void testExpandPartialWords2() {
- final String inputKey = "- {prop} is_not {val} ";
- final String inputValue = "{prop} != {val}";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- String result = this.entry.getKeyPattern().matcher( "- type is_not ClientServiceType.TypeGOLD" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "type != ClientServiceType.TypeGOLD",
- result );
- }
-
- public void testExpandPartialWords3() {
- final String inputKey = "- {prop} is not {val} ";
- final String inputValue = "{prop} != {val}";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- String result = this.entry.getKeyPattern().matcher( "- type is not ClientServiceType.TypeGOLD" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "type != ClientServiceType.TypeGOLD",
- result );
- }
-
- public void testExpandWithBrackets() {
- final String inputKey = "attr {attr_name} is in \\[ {values} \\]";
- final String inputValue = "{attr_name} in ( {values} )";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- String result = this.entry.getKeyPattern().matcher( "attr name is in [ 'Edson', 'Bob' ]" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "name in ( 'Edson', 'Bob' )",
- result );
- }
-
- public void testExpandWithParethesis() {
- final String inputKey = "((H|h)e|(S|s)he) \\(is\\) (a|an) $xx {attribute} (man|woman)";
- final String inputValue = "Person( attribute == \"{attribute}\" )";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- String result = this.entry.getKeyPattern().matcher( "he (is) a $xx handsome man" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "Person( attribute == \"handsome\" )",
- result );
- }
-
- public void testSingleCharacterBetweenVars() {
- final String inputKey = "DSL sentence with {key1} {key2}";
- final String inputValue = "Sentence( {key1} == {key2} )";
-
- this.entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
- null,
- inputKey,
- inputValue );
-
- String result = this.entry.getKeyPattern().matcher( "DSL sentence with mykey myvalue" ).replaceAll( this.entry.getValuePattern() );
- assertEquals( result,
- "Sentence( mykey == myvalue )",
- result );
- }
-
-}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -18,7 +18,7 @@
protected void setUp() throws Exception {
final String filename = "test_metainfo.dsl";
final Reader reader = new InputStreamReader( this.getClass().getResourceAsStream( filename ) );
- this.file = new DSLMappingFile();
+ this.file = new DSLTokenizedMappingFile();
this.tokenizedFile = new DSLTokenizedMappingFile();
this.file.parseAndLoad( reader );
reader.close();
@@ -60,7 +60,7 @@
public void testExpandParts() throws Exception {
- DSLMappingFile file = new DSLMappingFile();
+ DSLMappingFile file = new DSLTokenizedMappingFile();
String dsl = "[when]foo=Foo()\n[then]bar {num}=baz({num});";
file.parseAndLoad( new StringReader( dsl ) );
assertEquals( 0,
@@ -85,7 +85,7 @@
public void testExpandFailure() throws Exception {
- DSLMappingFile file = new DSLMappingFile();
+ DSLMappingFile file = new DSLTokenizedMappingFile();
String dsl = "[when]foo=Foo()\n[then]bar {num}=baz({num});";
file.parseAndLoad( new StringReader( dsl ) );
assertEquals( 0,
@@ -137,7 +137,7 @@
public void testExpandWithKeywordClashes() throws Exception {
- DSLMappingFile file = new DSLMappingFile();
+ DSLMappingFile file = new DSLTokenizedMappingFile();
String dsl = "[when]Invoke rule executor=ruleExec: RuleExecutor()\n" + "[then]Execute rule \"{id}\"=ruleExec.ExecuteSubRule( new Long({id}));";
file.parseAndLoad( new StringReader( dsl ) );
assertEquals( 0,
@@ -151,7 +151,7 @@
// System.out.println("["+drl+"]" );
// System.out.println("["+expected+"]" );
assertFalse( ex.hasErrors() );
- assertEquals( expected, drl );
+ equalsIgnoreWhiteSpace( expected, drl );
}
@@ -166,7 +166,7 @@
DefaultExpander ex = new DefaultExpander();
ex.addDSLMapping( file.getMapping() );
String source = "package something;\n\nrule \"1\"\nwhen\n Invoke rule executor\nthen\n Execute rule \"5\"\nend";
- String expected = "package something;\n\nrule \"1\"\nwhen\n ruleExec: RuleExecutor() \nthen\n ruleExec.ExecuteSubRule( new Long(5)); \nend\n";
+ String expected = "package something;\n\nrule \"1\"\nwhen\n ruleExec: RuleExecutor()\nthen\n ruleExec.ExecuteSubRule( new Long(5));\nend\n";
String drl = ex.expand( source );
// System.out.println("["+drl+"]" );
// System.out.println("["+expected+"]" );
@@ -176,7 +176,7 @@
public void testLineNumberError() throws Exception {
- DSLMappingFile file = new DSLMappingFile();
+ DSLMappingFile file = new DSLTokenizedMappingFile();
String dsl = "[when]foo=Foo()\n[then]bar {num}=baz({num});";
file.parseAndLoad( new StringReader( dsl ) );
@@ -238,7 +238,7 @@
String expected = "rule \"TestNewDslSetup\"\n"+
"dialect \"mvel\"\n"+
"when\n"+
- "applicant:Applicant(credit==AA) \n"+
+ "applicant:Applicant(credit==AA)\n"+
"then \nend\n";
assertFalse(ex.getErrors().toString(),ex.hasErrors());
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/ClassTypeResolver.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/ClassTypeResolver.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/ClassTypeResolver.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -217,15 +217,12 @@
String qualifiedClass = null;
Class clazz = null;
- String simpleClassName = ( className.indexOf( '.' ) > 0 ) ? className.split( "\\." )[0] : className;
-
if ( importText.endsWith( "*" ) ) {
qualifiedClass = importText.substring( 0,
importText.indexOf( '*' ) ) + className;
} else if ( importText.endsWith( "." + className ) ) {
qualifiedClass = importText;
- } else if ( importText.endsWith( simpleClassName ) ) {
- // resolves inner classes
+ } else if ( ( className.indexOf( '.' ) > 0 ) && (importText.endsWith( className.split( "\\." )[0] )) ) {
qualifiedClass = importText + className.substring( className.indexOf( '.' ) );
} else if ( importText.equals( className ) ) {
qualifiedClass = importText;
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/ClassTypeResolverTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/ClassTypeResolverTest.java 2009-02-11 23:23:10 UTC (rev 25233)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/base/ClassTypeResolverTest.java 2009-02-12 01:07:20 UTC (rev 25234)
@@ -111,6 +111,14 @@
resolver.resolveType( "org.drools.SecondClass.AlternativeKey" ) );
}
+ public void testResolveObjectFromImportNested() throws Exception {
+ final ClassTypeResolver resolver = new ClassTypeResolver( new HashSet(), Thread.currentThread().getContextClassLoader() );
+ resolver.addImport( "org.drools.FirstClass" );
+
+ assertEquals( FirstClass.AlternativeKey.class,
+ resolver.resolveType( "FirstClass.AlternativeKey" ) );
+ }
+
public void testResolveFullTypeName() throws Exception {
final TypeResolver resolver = new ClassTypeResolver( new HashSet(), Thread.currentThread().getContextClassLoader() );
More information about the jboss-svn-commits
mailing list