[jboss-svn-commits] JBL Code SVN: r11726 - in labs/jbossrules/trunk/drools-clips: src/main/java/org/drools/clp and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon May 7 19:18:42 EDT 2007
Author: mark.proctor at jboss.com
Date: 2007-05-07 19:18:42 -0400 (Mon, 07 May 2007)
New Revision: 11726
Added:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BuildContext.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/IndexedLocalVariableValue.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/NamedShellVariableValue.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
Removed:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/LocalVariableValue.java
Modified:
labs/jbossrules/trunk/drools-clips/.classpath
labs/jbossrules/trunk/drools-clips/.project
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BlockExecutionEngine.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPEval.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPPredicate.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPReturnValue.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionBuildContext.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContext.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionEngine.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Function.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/FunctionDelegator.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispList.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Shell.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BindFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/ForeachFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java
labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/AddFunctionTest.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/BlockExecutionTest.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/CompiledFunctionsTest.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/DeffunctionTest.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ModifyFunctionTest.java
Log:
JBRULES-720 Clips Parser
-Trying to get the deffunction parser to work.
Modified: labs/jbossrules/trunk/drools-clips/.classpath
===================================================================
--- labs/jbossrules/trunk/drools-clips/.classpath 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/.classpath 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,21 +1,20 @@
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
- <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/drools/drools-compiler/3.1.0-M1/drools-compiler-3.1.0-M1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/drools/drools-core/3.1.0-M1/drools-core-3.1.0-M1.jar"/>
- <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/3.2.1.v_677_R32x/core-3.2.1.v_677_R32x.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mvel/mvel14/1.2beta15/mvel14-1.2beta15.jar"/>
- <classpathentry kind="var" path="M2_REPO/antlr/stringtemplate/3.0/stringtemplate-3.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/janino/janino/2.5.5/janino-2.5.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/antlr/antlr/3.0b7/antlr-3.0b7.jar"/>
- <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
-</classpath>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/org/antlr/antlr/3.0b7/antlr-3.0b7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mvel/mvel14/1.2beta16/mvel14-1.2beta16.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/3.2.1.v_677_R32x/core-3.2.1.v_677_R32x.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/janino/janino/2.5.6/janino-2.5.6.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/drools-compiler"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/drools-core"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Modified: labs/jbossrules/trunk/drools-clips/.project
===================================================================
--- labs/jbossrules/trunk/drools-clips/.project 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/.project 2007-05-07 23:18:42 UTC (rev 11726)
@@ -5,7 +5,6 @@
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
- <arguments/>
</buildCommand>
</buildSpec>
<natures>
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BlockExecutionEngine.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BlockExecutionEngine.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BlockExecutionEngine.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,9 +1,12 @@
package org.drools.clp;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
import org.drools.WorkingMemory;
import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.common.InternalWorkingMemory;
import org.drools.reteoo.ReteTuple;
import org.drools.spi.Consequence;
@@ -36,10 +39,6 @@
return this.functions;
}
- public int getNextIndex() {
- return this.index++;
- }
-
public void execute(InternalWorkingMemory workingMemory,
ReteTuple tuple,
Object object) {
@@ -80,4 +79,9 @@
}
}
+ public VariableValueHandler createLocalVariable(String identifier) {
+ return new IndexedLocalVariableValue( identifier,
+ this.index++ );
+ }
+
}
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BuildContext.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BuildContext.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BuildContext.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -0,0 +1,20 @@
+package org.drools.clp;
+
+import org.drools.clp.valuehandlers.FunctionCaller;
+
+public interface BuildContext {
+
+ public abstract FunctionRegistry getFunctionRegistry();
+
+ public abstract void addFunction(FunctionCaller function);
+
+ public abstract Object setProperty(Object key,
+ Object value);
+
+ public abstract Object getProperty(Object key);
+
+ public abstract ValueHandler createLocalVariable(String identifier);
+
+ public abstract ValueHandler getVariableValueHandler(String identifier);
+
+}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPEval.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPEval.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPEval.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -7,6 +7,7 @@
import org.drools.WorkingMemory;
import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.common.InternalWorkingMemory;
import org.drools.reteoo.ReteTuple;
import org.drools.rule.Declaration;
@@ -40,8 +41,9 @@
return new FunctionCaller[]{this.function};
}
- public int getNextIndex() {
- return this.index++;
+ public VariableValueHandler createLocalVariable(String identifier) {
+ return new IndexedLocalVariableValue( identifier,
+ this.index++ );
}
public boolean evaluate(Tuple tuple,
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-04-26 01:37:19
+// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-05-08 00:12:51
package org.drools.clp;
@@ -10,59 +10,60 @@
import java.util.Map;
import java.util.HashMap;
public class CLPLexer extends Lexer {
- public static final int RIGHT_SQUARE=37;
- public static final int RIGHT_CURLY=39;
- public static final int SYMBOL=33;
- public static final int NULL=25;
- public static final int BOOL=24;
- public static final int SALIENCE=9;
- public static final int AMPERSAND=18;
- public static final int FLOAT=23;
- public static final int EQUALS=22;
- public static final int INT=10;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=34;
- public static final int NOT=13;
- public static final int AND=11;
- public static final int Tokens=42;
+ public static final int RIGHT_SQUARE=38;
+ public static final int RIGHT_CURLY=40;
+ public static final int EQUALS=23;
+ public static final int FLOAT=24;
+ public static final int NOT=15;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int AND=13;
public static final int EOF=-1;
- public static final int T41=41;
- public static final int HexDigit=30;
- public static final int MULTI_LINE_COMMENT=40;
- public static final int ASSIGN_OP=17;
- public static final int COLON=21;
- public static final int RIGHT_PAREN=8;
+ public static final int HexDigit=31;
+ public static final int DEFFUNCTION=5;
+ public static final int ASSIGN_OP=18;
+ public static final int RIGHT_PAREN=7;
public static final int NAME=6;
- public static final int EOL=26;
- public static final int WS=27;
- public static final int UnicodeEscape=31;
- public static final int DEFRULE=5;
- public static final int LEFT_CURLY=38;
- public static final int OR=12;
- public static final int TILDE=20;
- public static final int TEST=15;
+ public static final int EOL=27;
+ public static final int DEFRULE=9;
+ public static final int TILDE=21;
+ public static final int PIPE=20;
+ public static final int VAR=8;
+ public static final int EXISTS=16;
+ public static final int SYMBOL=34;
+ public static final int NULL=26;
+ public static final int BOOL=25;
+ public static final int AMPERSAND=19;
+ public static final int SALIENCE=11;
+ public static final int INT=12;
+ public static final int T42=42;
+ public static final int Tokens=43;
+ public static final int MULTI_LINE_COMMENT=41;
+ public static final int COLON=22;
+ public static final int WS=28;
+ public static final int UnicodeEscape=32;
+ public static final int LEFT_CURLY=39;
+ public static final int OR=14;
+ public static final int TEST=17;
public static final int LEFT_PAREN=4;
- public static final int DECLARE=28;
- public static final int PIPE=19;
- public static final int VAR=16;
- public static final int EXISTS=14;
- public static final int LEFT_SQUARE=36;
- public static final int EscapeSequence=29;
- public static final int OctalEscape=32;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=35;
- public static final int STRING=7;
+ public static final int DECLARE=29;
+ public static final int LEFT_SQUARE=37;
+ public static final int OctalEscape=33;
+ public static final int EscapeSequence=30;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
+ public static final int STRING=10;
public CLPLexer() {;}
public CLPLexer(CharStream input) {
super(input);
- ruleMemo = new HashMap[40+1];
+ ruleMemo = new HashMap[41+1];
}
- public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
+ public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
- // $ANTLR start T41
- public final void mT41() throws RecognitionException {
+ // $ANTLR start T42
+ public final void mT42() throws RecognitionException {
try {
- int _type = T41;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: ( '=>' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: '=>'
+ int _type = T42;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: ( '=>' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: '=>'
{
match("=>"); if (failed) return ;
@@ -74,16 +75,16 @@
finally {
}
}
- // $ANTLR end T41
+ // $ANTLR end T42
// $ANTLR start WS
public final void mWS() throws RecognitionException {
try {
int _type = WS;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:591:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:591:17: ( ' ' | '\\t' | '\\f' | EOL )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:591:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -110,35 +111,35 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("554:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+ new NoViableAltException("591:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:19: ' '
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:591:19: ' '
{
match(' '); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:555:19: '\\t'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:19: '\\t'
{
match('\t'); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:19: '\\f'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:19: '\\f'
{
match('\f'); if (failed) return ;
}
break;
case 4 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:557:19: EOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:19: EOL
{
mEOL(); if (failed) return ;
@@ -164,8 +165,8 @@
public final void mDEFRULE() throws RecognitionException {
try {
int _type = DEFRULE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:11: ( 'defrule' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:11: 'defrule'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:12: ( 'defrule' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:12: 'defrule'
{
match("defrule"); if (failed) return ;
@@ -179,12 +180,31 @@
}
// $ANTLR end DEFRULE
+ // $ANTLR start DEFFUNCTION
+ public final void mDEFFUNCTION() throws RecognitionException {
+ try {
+ int _type = DEFFUNCTION;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:600:15: ( 'defunction' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:600:15: 'defunction'
+ {
+ match("defunction"); if (failed) return ;
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DEFFUNCTION
+
// $ANTLR start OR
public final void mOR() throws RecognitionException {
try {
int _type = OR;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:7: ( 'or' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:7: 'or'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:601:9: ( 'or' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:601:9: 'or'
{
match("or"); if (failed) return ;
@@ -202,8 +222,8 @@
public final void mAND() throws RecognitionException {
try {
int _type = AND;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:8: ( 'and' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:8: 'and'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:602:9: ( 'and' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:602:9: 'and'
{
match("and"); if (failed) return ;
@@ -221,8 +241,8 @@
public final void mNOT() throws RecognitionException {
try {
int _type = NOT;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:565:8: ( 'not' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:565:8: 'not'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: ( 'not' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: 'not'
{
match("not"); if (failed) return ;
@@ -240,8 +260,8 @@
public final void mEXISTS() throws RecognitionException {
try {
int _type = EXISTS;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:566:11: ( 'exists' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:566:11: 'exists'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:604:12: ( 'exists' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:604:12: 'exists'
{
match("exists"); if (failed) return ;
@@ -259,8 +279,8 @@
public final void mTEST() throws RecognitionException {
try {
int _type = TEST;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:9: ( 'test' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:9: 'test'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:605:10: ( 'test' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:605:10: 'test'
{
match("test"); if (failed) return ;
@@ -278,8 +298,8 @@
public final void mNULL() throws RecognitionException {
try {
int _type = NULL;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:8: ( 'null' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:8: 'null'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:607:9: ( 'null' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:607:9: 'null'
{
match("null"); if (failed) return ;
@@ -297,8 +317,8 @@
public final void mDECLARE() throws RecognitionException {
try {
int _type = DECLARE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:11: ( 'declare' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:11: 'declare'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:12: ( 'declare' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:12: 'declare'
{
match("declare"); if (failed) return ;
@@ -316,8 +336,8 @@
public final void mSALIENCE() throws RecognitionException {
try {
int _type = SALIENCE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:573:11: ( 'salience' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:573:11: 'salience'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:12: ( 'salience' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:12: 'salience'
{
match("salience"); if (failed) return ;
@@ -334,10 +354,10 @@
// $ANTLR start EOL
public final void mEOL() throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
@@ -356,13 +376,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("579:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+ new NoViableAltException("617:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
throw nvae;
}
switch (alt2) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:14: ( '\\r\\n' )=> '\\r\\n'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -370,14 +390,14 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:25: '\\r'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:618:25: '\\r'
{
match('\r'); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:581:25: '\\n'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -399,10 +419,10 @@
public final void mINT() throws RecognitionException {
try {
int _type = INT;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:4: ( ( '-' )? ( '0' .. '9' )+ )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:4: ( '-' )? ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:4: ( ( '-' )? ( '0' .. '9' )+ )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:4: ( '-' )? ( '0' .. '9' )+
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:4: ( '-' )?
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
@@ -411,7 +431,7 @@
}
switch (alt3) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:5: '-'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:5: '-'
{
match('-'); if (failed) return ;
@@ -420,7 +440,7 @@
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:10: ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -434,7 +454,7 @@
switch (alt4) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:11: '0' .. '9'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -465,10 +485,10 @@
public final void mFLOAT() throws RecognitionException {
try {
int _type = FLOAT;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:4: ( '-' )?
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -477,7 +497,7 @@
}
switch (alt5) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:5: '-'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:5: '-'
{
match('-'); if (failed) return ;
@@ -486,7 +506,7 @@
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:10: ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -500,7 +520,7 @@
switch (alt6) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:11: '0' .. '9'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -518,7 +538,7 @@
} while (true);
match('.'); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:26: ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -532,7 +552,7 @@
switch (alt7) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:27: '0' .. '9'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -563,7 +583,7 @@
public final void mSTRING() throws RecognitionException {
try {
int _type = STRING;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:8: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
@@ -576,19 +596,19 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("593:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+ new NoViableAltException("631:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
throw nvae;
}
switch (alt10) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"'); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
loop8:
do {
int alt8=3;
@@ -604,14 +624,14 @@
switch (alt8) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:15: EscapeSequence
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:15: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:32: ~ ( '\\\\' | '\"' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:32: ~ ( '\\\\' | '\"' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -641,13 +661,13 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\''); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
loop9:
do {
int alt9=3;
@@ -663,14 +683,14 @@
switch (alt9) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:16: EscapeSequence
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:16: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:33: ~ ( '\\\\' | '\\'' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:33: ~ ( '\\\\' | '\\'' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -711,8 +731,8 @@
// $ANTLR start HexDigit
public final void mHexDigit() throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:637:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:637:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
{
if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {
input.consume();
@@ -737,17 +757,12 @@
// $ANTLR start EscapeSequence
public final void mEscapeSequence() throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:641:9: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
int alt11=3;
int LA11_0 = input.LA(1);
if ( (LA11_0=='\\') ) {
switch ( input.LA(2) ) {
- case 'u':
- {
- alt11=2;
- }
- break;
case '\"':
case '\'':
case '\\':
@@ -760,6 +775,11 @@
alt11=1;
}
break;
+ case 'u':
+ {
+ alt11=2;
+ }
+ break;
case '0':
case '1':
case '2':
@@ -775,7 +795,7 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("601:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+ new NoViableAltException("639:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
throw nvae;
}
@@ -784,13 +804,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("601:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+ new NoViableAltException("639:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:641:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
{
match('\\'); if (failed) return ;
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@@ -808,14 +828,14 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:604:9: UnicodeEscape
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:642:9: UnicodeEscape
{
mUnicodeEscape(); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:605:9: OctalEscape
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:643:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -832,7 +852,7 @@
// $ANTLR start OctalEscape
public final void mOctalEscape() throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
int alt12=3;
int LA12_0 = input.LA(1);
@@ -866,7 +886,7 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("608:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+ new NoViableAltException("646:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
throw nvae;
}
@@ -874,31 +894,31 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("608:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+ new NoViableAltException("646:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:14: ( '0' .. '3' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:15: '0' .. '3'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:14: ( '0' .. '3' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:15: '0' .. '3'
{
matchRange('0','3'); if (failed) return ;
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:25: ( '0' .. '7' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:26: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:25: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:36: ( '0' .. '7' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:37: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:36: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:37: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -908,18 +928,18 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:14: ( '0' .. '7' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:15: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:14: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:25: ( '0' .. '7' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:26: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:25: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -929,11 +949,11 @@
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:9: '\\\\' ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:650:9: '\\\\' ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:14: ( '0' .. '7' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:15: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:650:14: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:650:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -953,8 +973,8 @@
// $ANTLR start UnicodeEscape
public final void mUnicodeEscape() throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -975,10 +995,10 @@
public final void mBOOL() throws RecognitionException {
try {
int _type = BOOL;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:4: ( ( 'true' | 'false' ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:4: ( 'true' | 'false' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:659:4: ( ( 'true' | 'false' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:659:4: ( 'true' | 'false' )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:4: ( 'true' | 'false' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:659:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
@@ -991,13 +1011,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("621:4: ( 'true' | 'false' )", 13, 0, input);
+ new NoViableAltException("659:4: ( 'true' | 'false' )", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:5: 'true'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:659:5: 'true'
{
match("true"); if (failed) return ;
@@ -1005,7 +1025,7 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:12: 'false'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:659:12: 'false'
{
match("false"); if (failed) return ;
@@ -1029,8 +1049,8 @@
public final void mVAR() throws RecognitionException {
try {
int _type = VAR;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:8: ( '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )* )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:8: '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:8: ( '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )* )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:8: '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )*
{
match('?'); if (failed) return ;
if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
@@ -1044,7 +1064,7 @@
recover(mse); throw mse;
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:38: ( SYMBOL )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:38: ( SYMBOL )*
loop14:
do {
int alt14=2;
@@ -1057,7 +1077,7 @@
switch (alt14) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:38: SYMBOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:38: SYMBOL
{
mSYMBOL(); if (failed) return ;
@@ -1083,11 +1103,11 @@
public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = SH_STYLE_SINGLE_LINE_COMMENT;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: ( '#' ( options {greedy=false; } : . )* EOL )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: '#' ( options {greedy=false; } : . )* EOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: ( '#' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: '#' ( options {greedy=false; } : . )* EOL
{
match('#'); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:8: ( options {greedy=false; } : . )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1106,7 +1126,7 @@
switch (alt15) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:35: .
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:35: .
{
matchAny(); if (failed) return ;
@@ -1136,12 +1156,12 @@
public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = C_STYLE_SINGLE_LINE_COMMENT;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:4: ( '//' ( options {greedy=false; } : . )* EOL )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:4: '//' ( options {greedy=false; } : . )* EOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:672:4: ( '//' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:672:4: '//' ( options {greedy=false; } : . )* EOL
{
match("//"); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:672:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -1160,7 +1180,7 @@
switch (alt16) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:36: .
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:672:36: .
{
matchAny(); if (failed) return ;
@@ -1190,8 +1210,8 @@
public final void mLEFT_PAREN() throws RecognitionException {
try {
int _type = LEFT_PAREN;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:4: ( '(' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:4: '('
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:4: ( '(' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:4: '('
{
match('('); if (failed) return ;
@@ -1208,8 +1228,8 @@
public final void mRIGHT_PAREN() throws RecognitionException {
try {
int _type = RIGHT_PAREN;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:4: ( ')' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:4: ')'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:682:4: ( ')' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:682:4: ')'
{
match(')'); if (failed) return ;
@@ -1226,8 +1246,8 @@
public final void mLEFT_SQUARE() throws RecognitionException {
try {
int _type = LEFT_SQUARE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:4: ( '[' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:4: '['
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:686:4: ( '[' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:686:4: '['
{
match('['); if (failed) return ;
@@ -1244,8 +1264,8 @@
public final void mRIGHT_SQUARE() throws RecognitionException {
try {
int _type = RIGHT_SQUARE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:4: ( ']' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:4: ']'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:690:4: ( ']' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:690:4: ']'
{
match(']'); if (failed) return ;
@@ -1262,8 +1282,8 @@
public final void mLEFT_CURLY() throws RecognitionException {
try {
int _type = LEFT_CURLY;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:4: ( '{' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:4: '{'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:694:4: ( '{' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:694:4: '{'
{
match('{'); if (failed) return ;
@@ -1280,8 +1300,8 @@
public final void mRIGHT_CURLY() throws RecognitionException {
try {
int _type = RIGHT_CURLY;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:4: ( '}' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:4: '}'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:698:4: ( '}' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:698:4: '}'
{
match('}'); if (failed) return ;
@@ -1298,8 +1318,8 @@
public final void mTILDE() throws RecognitionException {
try {
int _type = TILDE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:663:9: ( '~' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:663:9: '~'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:9: ( '~' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:9: '~'
{
match('~'); if (failed) return ;
@@ -1316,8 +1336,8 @@
public final void mAMPERSAND() throws RecognitionException {
try {
int _type = AMPERSAND;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:4: ( '&' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:4: '&'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:705:4: ( '&' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:705:4: '&'
{
match('&'); if (failed) return ;
@@ -1334,8 +1354,8 @@
public final void mPIPE() throws RecognitionException {
try {
int _type = PIPE;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:4: ( '|' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:4: '|'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:709:4: ( '|' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:709:4: '|'
{
match('|'); if (failed) return ;
@@ -1352,8 +1372,8 @@
public final void mASSIGN_OP() throws RecognitionException {
try {
int _type = ASSIGN_OP;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:4: ( '<-' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:4: '<-'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:713:4: ( '<-' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:713:4: '<-'
{
match("<-"); if (failed) return ;
@@ -1371,8 +1391,8 @@
public final void mCOLON() throws RecognitionException {
try {
int _type = COLON;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:9: ( ':' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:9: ':'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:9: ( ':' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:9: ':'
{
match(':'); if (failed) return ;
@@ -1389,8 +1409,8 @@
public final void mEQUALS() throws RecognitionException {
try {
int _type = EQUALS;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:680:10: ( '=' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:680:10: '='
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:718:10: ( '=' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:718:10: '='
{
match('='); if (failed) return ;
@@ -1407,12 +1427,12 @@
public final void mMULTI_LINE_COMMENT() throws RecognitionException {
try {
int _type = MULTI_LINE_COMMENT;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:4: '/*' ( options {greedy=false; } : . )* '*/'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:4: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*"); if (failed) return ;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -1437,7 +1457,7 @@
switch (alt17) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:35: .
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:35: .
{
matchAny(); if (failed) return ;
@@ -1468,8 +1488,8 @@
public final void mNAME() throws RecognitionException {
try {
int _type = NAME;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:687:8: ( SYMBOL )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:687:8: SYMBOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:8: ( SYMBOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:8: SYMBOL
{
mSYMBOL(); if (failed) return ;
@@ -1485,10 +1505,10 @@
// $ANTLR start SYMBOL
public final void mSYMBOL() throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:4: ( ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )* )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:4: ( ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )* )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )
int alt18=2;
int LA18_0 = input.LA(1);
@@ -1501,16 +1521,16 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("691:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )", 18, 0, input);
+ new NoViableAltException("729:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )", 18, 0, input);
throw nvae;
}
switch (alt18) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:6: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:6: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||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.LA(1)>='\u007F' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -1530,10 +1550,10 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:66: '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:729:66: '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
{
match('$'); if (failed) return ;
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||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.LA(1)>='\u007F' && input.LA(1)<='\uFFFE') ) {
@@ -1556,7 +1576,7 @@
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:692:11: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:730:11: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
loop19:
do {
int alt19=2;
@@ -1569,7 +1589,7 @@
switch (alt19) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:692:12: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:730:12: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||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.LA(1)>='\u007F' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -1601,230 +1621,237 @@
// $ANTLR end SYMBOL
public void mTokens() throws RecognitionException {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: ( T41 | WS | DEFRULE | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
- int alt20=32;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: ( T42 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
+ int alt20=33;
alt20 = dfa20.predict(input);
switch (alt20) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: T41
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: T42
{
- mT41(); if (failed) return ;
+ mT42(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:14: WS
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:14: WS
{
mWS(); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:17: DEFRULE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:17: DEFRULE
{
mDEFRULE(); if (failed) return ;
}
break;
case 4 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:25: OR
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:25: DEFFUNCTION
{
- mOR(); if (failed) return ;
+ mDEFFUNCTION(); if (failed) return ;
}
break;
case 5 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:28: AND
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:37: OR
{
- mAND(); if (failed) return ;
+ mOR(); if (failed) return ;
}
break;
case 6 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:32: NOT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:40: AND
{
- mNOT(); if (failed) return ;
+ mAND(); if (failed) return ;
}
break;
case 7 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:36: EXISTS
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:44: NOT
{
- mEXISTS(); if (failed) return ;
+ mNOT(); if (failed) return ;
}
break;
case 8 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:43: TEST
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:48: EXISTS
{
- mTEST(); if (failed) return ;
+ mEXISTS(); if (failed) return ;
}
break;
case 9 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:48: NULL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:55: TEST
{
- mNULL(); if (failed) return ;
+ mTEST(); if (failed) return ;
}
break;
case 10 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:53: DECLARE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:60: NULL
{
- mDECLARE(); if (failed) return ;
+ mNULL(); if (failed) return ;
}
break;
case 11 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:61: SALIENCE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:65: DECLARE
{
- mSALIENCE(); if (failed) return ;
+ mDECLARE(); if (failed) return ;
}
break;
case 12 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:70: INT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:73: SALIENCE
{
- mINT(); if (failed) return ;
+ mSALIENCE(); if (failed) return ;
}
break;
case 13 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:74: FLOAT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:82: INT
{
- mFLOAT(); if (failed) return ;
+ mINT(); if (failed) return ;
}
break;
case 14 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:80: STRING
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:86: FLOAT
{
- mSTRING(); if (failed) return ;
+ mFLOAT(); if (failed) return ;
}
break;
case 15 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:87: BOOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:92: STRING
{
- mBOOL(); if (failed) return ;
+ mSTRING(); if (failed) return ;
}
break;
case 16 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:92: VAR
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:99: BOOL
{
- mVAR(); if (failed) return ;
+ mBOOL(); if (failed) return ;
}
break;
case 17 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:96: SH_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:104: VAR
{
- mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mVAR(); if (failed) return ;
}
break;
case 18 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:125: C_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:108: SH_STYLE_SINGLE_LINE_COMMENT
{
- mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 19 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:153: LEFT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:137: C_STYLE_SINGLE_LINE_COMMENT
{
- mLEFT_PAREN(); if (failed) return ;
+ mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 20 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:164: RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:165: LEFT_PAREN
{
- mRIGHT_PAREN(); if (failed) return ;
+ mLEFT_PAREN(); if (failed) return ;
}
break;
case 21 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:176: LEFT_SQUARE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:176: RIGHT_PAREN
{
- mLEFT_SQUARE(); if (failed) return ;
+ mRIGHT_PAREN(); if (failed) return ;
}
break;
case 22 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:188: RIGHT_SQUARE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:188: LEFT_SQUARE
{
- mRIGHT_SQUARE(); if (failed) return ;
+ mLEFT_SQUARE(); if (failed) return ;
}
break;
case 23 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:201: LEFT_CURLY
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:200: RIGHT_SQUARE
{
- mLEFT_CURLY(); if (failed) return ;
+ mRIGHT_SQUARE(); if (failed) return ;
}
break;
case 24 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:212: RIGHT_CURLY
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:213: LEFT_CURLY
{
- mRIGHT_CURLY(); if (failed) return ;
+ mLEFT_CURLY(); if (failed) return ;
}
break;
case 25 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:224: TILDE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:224: RIGHT_CURLY
{
- mTILDE(); if (failed) return ;
+ mRIGHT_CURLY(); if (failed) return ;
}
break;
case 26 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:230: AMPERSAND
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:236: TILDE
{
- mAMPERSAND(); if (failed) return ;
+ mTILDE(); if (failed) return ;
}
break;
case 27 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:240: PIPE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:242: AMPERSAND
{
- mPIPE(); if (failed) return ;
+ mAMPERSAND(); if (failed) return ;
}
break;
case 28 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:245: ASSIGN_OP
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:252: PIPE
{
- mASSIGN_OP(); if (failed) return ;
+ mPIPE(); if (failed) return ;
}
break;
case 29 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:255: COLON
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:257: ASSIGN_OP
{
- mCOLON(); if (failed) return ;
+ mASSIGN_OP(); if (failed) return ;
}
break;
case 30 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:261: EQUALS
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:267: COLON
{
- mEQUALS(); if (failed) return ;
+ mCOLON(); if (failed) return ;
}
break;
case 31 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:268: MULTI_LINE_COMMENT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:273: EQUALS
{
- mMULTI_LINE_COMMENT(); if (failed) return ;
+ mEQUALS(); if (failed) return ;
}
break;
case 32 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:287: NAME
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:280: MULTI_LINE_COMMENT
{
+ mMULTI_LINE_COMMENT(); if (failed) return ;
+
+ }
+ break;
+ case 33 :
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:299: NAME
+ {
mNAME(); if (failed) return ;
}
@@ -1836,8 +1863,8 @@
// $ANTLR start synpred1
public final void synpred1_fragment() throws RecognitionException {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:14: ( '\\r\\n' )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:16: '\\r\\n'
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:14: ( '\\r\\n' )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:16: '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -1867,43 +1894,46 @@
"\1\uffff\1\40\1\uffff\1\2\10\36\1\54\1\uffff\2\36\1\uffff\2\36\2"+
"\uffff\1\65\1\66\1\67\1\70\3\uffff\1\36\1\72\1\uffff\1\73\1\uffff"+
"\1\36\1\76\7\36\1\54\1\36\1\uffff\2\36\1\15\2\36\1\uffff\2\36\4"+
- "\uffff\1\121\2\uffff\2\36\1\uffff\1\124\1\125\5\36\1\133\6\36\1"+
- "\uffff\1\36\1\uffff\1\36\1\uffff\2\36\2\uffff\1\143\1\36\1\145\1"+
- "\146\1\36\1\uffff\4\36\1\117\2\36\1\uffff\1\36\2\uffff\3\36\1\146"+
- "\2\36\1\162\2\36\1\165\1\166\1\uffff\2\36\2\uffff\1\170\1\uffff";
+ "\uffff\1\121\2\uffff\2\36\1\uffff\1\125\1\36\1\127\4\36\1\134\6"+
+ "\36\1\uffff\1\36\1\uffff\1\36\1\uffff\3\36\1\uffff\1\145\1\uffff"+
+ "\1\36\1\147\1\150\1\36\1\uffff\4\36\1\117\3\36\1\uffff\1\36\2\uffff"+
+ "\3\36\1\147\3\36\1\166\2\36\1\171\1\36\1\173\1\uffff\2\36\1\uffff"+
+ "\1\36\1\uffff\1\176\1\36\1\uffff\1\u0080\1\uffff";
static final String DFA20_eofS =
- "\171\uffff";
+ "\u0081\uffff";
static final String DFA20_minS =
"\2\0\1\uffff\1\0\1\145\1\162\1\156\1\157\1\170\1\145\1\141\1\60"+
"\1\0\1\uffff\1\0\1\141\1\uffff\1\0\1\52\2\uffff\4\0\3\uffff\1\55"+
- "\1\0\1\uffff\1\0\1\uffff\1\143\1\0\1\144\1\164\1\154\1\151\1\163"+
- "\1\165\1\154\1\0\1\60\1\uffff\1\42\2\0\1\154\1\0\1\uffff\2\0\4\uffff"+
- "\1\0\2\uffff\1\154\1\162\1\uffff\2\0\1\154\1\163\1\164\1\145\1\151"+
- "\2\0\1\60\2\0\1\163\1\0\1\uffff\1\0\1\uffff\1\0\1\uffff\1\141\1"+
- "\165\2\uffff\1\0\1\164\2\0\1\145\1\uffff\1\60\2\0\1\145\1\0\1\162"+
- "\1\154\1\uffff\1\163\2\uffff\1\156\1\60\2\0\2\145\1\0\1\143\1\60"+
- "\2\0\1\uffff\1\145\1\0\2\uffff\1\0\1\uffff";
+ "\1\0\1\uffff\1\0\1\uffff\1\143\1\0\1\144\1\154\1\164\1\151\1\165"+
+ "\1\163\1\154\1\0\1\60\1\uffff\1\42\2\0\1\154\1\0\1\uffff\2\0\4\uffff"+
+ "\1\0\2\uffff\1\162\1\154\1\uffff\1\0\1\154\1\0\1\163\1\145\1\164"+
+ "\1\151\2\0\1\60\2\0\1\163\1\0\1\uffff\1\0\1\uffff\1\0\1\uffff\1"+
+ "\165\1\156\1\141\1\uffff\1\0\1\uffff\1\164\2\0\1\145\1\uffff\1\60"+
+ "\2\0\1\145\1\0\1\154\1\143\1\162\1\uffff\1\163\2\uffff\1\156\1\60"+
+ "\2\0\1\145\1\164\1\145\1\0\1\143\1\60\1\0\1\151\1\0\1\uffff\1\145"+
+ "\1\0\1\uffff\1\157\1\uffff\1\0\1\156\1\uffff\1\0\1\uffff";
static final String DFA20_maxS =
"\2\ufffe\1\uffff\1\ufffe\1\145\1\162\1\156\1\165\1\170\1\162\1\141"+
"\1\71\1\ufffe\1\uffff\1\ufffe\1\141\1\uffff\1\ufffe\1\57\2\uffff"+
"\4\ufffe\3\uffff\1\55\1\ufffe\1\uffff\1\ufffe\1\uffff\1\146\1\ufffe"+
- "\1\144\1\164\1\154\1\151\1\163\1\165\1\154\1\ufffe\1\71\1\uffff"+
+ "\1\144\1\154\1\164\1\151\1\165\1\163\1\154\1\ufffe\1\71\1\uffff"+
"\1\165\2\ufffe\1\154\1\ufffe\1\uffff\2\ufffe\4\uffff\1\ufffe\2\uffff"+
- "\1\154\1\162\1\uffff\2\ufffe\1\154\1\163\1\164\1\145\1\151\2\ufffe"+
- "\1\146\2\ufffe\1\163\1\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe\1\uffff"+
- "\1\141\1\165\2\uffff\1\ufffe\1\164\2\ufffe\1\145\1\uffff\1\146\2"+
- "\ufffe\1\145\1\ufffe\1\162\1\154\1\uffff\1\163\2\uffff\1\156\1\146"+
- "\2\ufffe\2\145\1\ufffe\1\143\1\146\2\ufffe\1\uffff\1\145\1\ufffe"+
- "\2\uffff\1\ufffe\1\uffff";
+ "\1\165\1\154\1\uffff\1\ufffe\1\154\1\ufffe\1\163\1\145\1\164\1\151"+
+ "\2\ufffe\1\146\2\ufffe\1\163\1\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe"+
+ "\1\uffff\1\165\1\156\1\141\1\uffff\1\ufffe\1\uffff\1\164\2\ufffe"+
+ "\1\145\1\uffff\1\146\2\ufffe\1\145\1\ufffe\1\154\1\143\1\162\1\uffff"+
+ "\1\163\2\uffff\1\156\1\146\2\ufffe\1\145\1\164\1\145\1\ufffe\1\143"+
+ "\1\146\1\ufffe\1\151\1\ufffe\1\uffff\1\145\1\ufffe\1\uffff\1\157"+
+ "\1\uffff\1\ufffe\1\156\1\uffff\1\ufffe\1\uffff";
static final String DFA20_acceptS =
- "\2\uffff\1\2\12\uffff\1\16\2\uffff\1\20\2\uffff\1\23\1\24\4\uffff"+
- "\1\31\1\32\1\33\2\uffff\1\40\1\uffff\1\36\13\uffff\1\14\5\uffff"+
- "\1\21\2\uffff\1\25\1\26\1\27\1\30\1\uffff\1\35\1\1\2\uffff\1\4\16"+
- "\uffff\1\22\1\uffff\1\37\1\uffff\1\34\2\uffff\1\5\1\6\5\uffff\1"+
- "\15\7\uffff\1\11\1\uffff\1\10\1\17\13\uffff\1\7\2\uffff\1\12\1\3"+
- "\1\uffff\1\13";
+ "\2\uffff\1\2\12\uffff\1\17\2\uffff\1\21\2\uffff\1\24\1\25\4\uffff"+
+ "\1\32\1\33\1\34\2\uffff\1\41\1\uffff\1\37\13\uffff\1\15\5\uffff"+
+ "\1\22\2\uffff\1\26\1\27\1\30\1\31\1\uffff\1\36\1\1\2\uffff\1\5\16"+
+ "\uffff\1\23\1\uffff\1\40\1\uffff\1\35\3\uffff\1\6\1\uffff\1\7\4"+
+ "\uffff\1\16\10\uffff\1\12\1\uffff\1\20\1\11\15\uffff\1\10\2\uffff"+
+ "\1\3\1\uffff\1\13\2\uffff\1\14\1\uffff\1\4";
static final String DFA20_specialS =
- "\171\uffff}>";
+ "\u0081\uffff}>";
static final String[] DFA20_transitionS = {
"\11\36\2\2\1\36\1\3\1\2\22\36\1\2\1\36\1\15\1\21\2\36\1\32\1"+
"\16\1\23\1\24\3\36\1\13\1\36\1\22\12\14\1\35\1\uffff\1\34\1"+
@@ -1920,9 +1950,9 @@
"\1\41",
"\1\42",
"\1\43",
- "\1\44\5\uffff\1\45",
+ "\1\45\5\uffff\1\44",
"\1\46",
- "\1\47\14\uffff\1\50",
+ "\1\50\14\uffff\1\47",
"\1\51",
"\12\52",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
@@ -1963,7 +1993,7 @@
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
"",
- "\1\74\2\uffff\1\75",
+ "\1\75\2\uffff\1\74",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
@@ -2007,110 +2037,120 @@
"\1\36\1\uffff\uff80\36",
"",
"",
- "\1\122",
- "\1\123",
+ "\1\122\2\uffff\1\123",
+ "\1\124",
"",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
+ "\1\126",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
- "\1\126",
- "\1\127",
"\1\130",
"\1\131",
"\1\132",
+ "\1\133",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\6\36\12\106\1\36\2\uffff\2\36\1\uffff"+
"\74\36\1\uffff\1\36\1\uffff\uff80\36",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
"\15\21\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1\56\1\15\uff80"+
"\56",
- "\12\134\7\uffff\6\134\32\uffff\6\134",
+ "\12\135\7\uffff\6\135\32\uffff\6\135",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
- "\15\6\56\10\135\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
+ "\15\6\56\10\136\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
"\56\1\15\uff80\56",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
- "\15\6\56\10\136\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
+ "\15\6\56\10\137\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
"\56\1\15\uff80\56",
- "\1\137",
+ "\1\140",
"\11\114\2\115\2\114\1\115\22\114\1\115\1\114\1\115\3\114\1\115"+
"\1\114\2\115\21\114\2\115\2\114\1\115\74\114\1\115\1\114\1\115"+
"\uff80\114",
"",
"\11\120\2\117\2\120\1\117\22\120\1\117\1\120\1\117\3\120\1\117"+
- "\1\120\2\117\1\116\4\120\1\140\13\120\2\117\2\120\1\117\74\120"+
+ "\1\120\2\117\1\116\4\120\1\141\13\120\2\117\2\120\1\117\74\120"+
"\1\117\1\120\1\117\uff80\120",
"",
"\11\120\2\117\2\120\1\117\22\120\1\117\1\120\1\117\3\120\1\117"+
"\1\120\2\117\1\116\20\120\2\117\2\120\1\117\74\120\1\117\1\120"+
"\1\117\uff80\120",
"",
- "\1\141",
"\1\142",
+ "\1\143",
+ "\1\144",
"",
- "",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
- "\1\144",
+ "",
+ "\1\146",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
- "\1\147",
+ "\1\151",
"",
- "\12\150\7\uffff\6\150\32\uffff\6\150",
+ "\12\152\7\uffff\6\152\32\uffff\6\152",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
- "\15\6\56\10\151\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
+ "\15\6\56\10\153\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
"\56\1\15\uff80\56",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
"\15\21\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1\56\1\15\uff80"+
"\56",
- "\1\152",
+ "\1\154",
"\11\120\2\uffff\2\120\1\uffff\22\120\1\uffff\1\120\1\uffff\3"+
"\120\1\uffff\1\120\2\uffff\1\116\20\120\2\uffff\2\120\1\uffff"+
"\74\120\1\uffff\1\120\1\uffff\uff80\120",
- "\1\153",
- "\1\154",
- "",
"\1\155",
+ "\1\156",
+ "\1\157",
"",
+ "\1\160",
"",
- "\1\156",
- "\12\157\7\uffff\6\157\32\uffff\6\157",
+ "",
+ "\1\161",
+ "\12\162\7\uffff\6\162\32\uffff\6\162",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
"\15\21\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1\56\1\15\uff80"+
"\56",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
- "\1\160",
- "\1\161",
+ "\1\163",
+ "\1\164",
+ "\1\165",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
- "\1\163",
- "\12\164\7\uffff\6\164\32\uffff\6\164",
+ "\1\167",
+ "\12\170\7\uffff\6\170\32\uffff\6\170",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
+ "\1\172",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
"",
- "\1\167",
+ "\1\174",
"\11\56\2\15\2\56\1\15\22\56\1\15\1\56\1\15\3\56\1\15\1\57\2"+
"\15\21\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1\56\1\15\uff80"+
"\56",
"",
+ "\1\175",
"",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
"\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
"\1\36\1\uffff\uff80\36",
+ "\1\177",
+ "",
+ "\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
+ "\1\uffff\1\36\2\uffff\21\36\2\uffff\2\36\1\uffff\74\36\1\uffff"+
+ "\1\36\1\uffff\uff80\36",
""
};
@@ -2144,7 +2184,7 @@
this.transition = DFA20_transition;
}
public String getDescription() {
- return "1:1: Tokens : ( T41 | WS | DEFRULE | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
+ return "1:1: Tokens : ( T42 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
}
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-04-26 01:37:19
+// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-05-08 00:12:51
package org.drools.clp;
@@ -19,46 +19,47 @@
public class CLPParser extends Parser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "DEFRULE", "NAME", "STRING", "RIGHT_PAREN", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "VAR", "ASSIGN_OP", "AMPERSAND", "PIPE", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "'=>'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "DEFFUNCTION", "NAME", "RIGHT_PAREN", "VAR", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "ASSIGN_OP", "AMPERSAND", "PIPE", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "'=>'"
};
- public static final int RIGHT_SQUARE=37;
- public static final int RIGHT_CURLY=39;
- public static final int SYMBOL=33;
- public static final int NULL=25;
- public static final int BOOL=24;
- public static final int SALIENCE=9;
- public static final int AMPERSAND=18;
- public static final int FLOAT=23;
- public static final int EQUALS=22;
- public static final int INT=10;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=34;
- public static final int NOT=13;
- public static final int AND=11;
+ public static final int RIGHT_SQUARE=38;
+ public static final int RIGHT_CURLY=40;
+ public static final int SYMBOL=34;
+ public static final int NULL=26;
+ public static final int BOOL=25;
+ public static final int SALIENCE=11;
+ public static final int AMPERSAND=19;
+ public static final int FLOAT=24;
+ public static final int EQUALS=23;
+ public static final int INT=12;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int NOT=15;
+ public static final int AND=13;
public static final int EOF=-1;
- public static final int HexDigit=30;
- public static final int MULTI_LINE_COMMENT=40;
- public static final int COLON=21;
- public static final int ASSIGN_OP=17;
- public static final int RIGHT_PAREN=8;
+ public static final int HexDigit=31;
+ public static final int MULTI_LINE_COMMENT=41;
+ public static final int DEFFUNCTION=5;
+ public static final int COLON=22;
+ public static final int ASSIGN_OP=18;
+ public static final int RIGHT_PAREN=7;
public static final int NAME=6;
- public static final int WS=27;
- public static final int EOL=26;
- public static final int UnicodeEscape=31;
- public static final int LEFT_CURLY=38;
- public static final int DEFRULE=5;
- public static final int OR=12;
- public static final int TILDE=20;
- public static final int TEST=15;
+ public static final int WS=28;
+ public static final int EOL=27;
+ public static final int UnicodeEscape=32;
+ public static final int LEFT_CURLY=39;
+ public static final int DEFRULE=9;
+ public static final int OR=14;
+ public static final int TILDE=21;
+ public static final int TEST=17;
public static final int LEFT_PAREN=4;
- public static final int DECLARE=28;
- public static final int PIPE=19;
- public static final int VAR=16;
- public static final int EXISTS=14;
- public static final int LEFT_SQUARE=36;
- public static final int OctalEscape=32;
- public static final int EscapeSequence=29;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=35;
- public static final int STRING=7;
+ public static final int DECLARE=29;
+ public static final int PIPE=20;
+ public static final int VAR=8;
+ public static final int EXISTS=16;
+ public static final int LEFT_SQUARE=37;
+ public static final int OctalEscape=33;
+ public static final int EscapeSequence=30;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
+ public static final int STRING=10;
public CLPParser(TokenStream input) {
super(input);
@@ -66,7 +67,7 @@
public String[] getTokenNames() { return tokenNames; }
- public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
+ public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
private PackageDescr packageDescr;
@@ -75,10 +76,8 @@
private int lineOffset = 0;
private DescrFactory factory = new DescrFactory();
private boolean parserDebug = false;
- private FunctionRegistry functionRegistry;
+ private FunctionRegistry functionRegistry;
- FunctionRegistry factoryRegistry;
-
public void setFunctionRegistry(FunctionRegistry functionRegistry) {
this.functionRegistry = functionRegistry;
}
@@ -222,25 +221,197 @@
+ // $ANTLR start execution_list
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:230:1: execution_list returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] ) ;
+ public final ExecutionEngine execution_list() throws RecognitionException {
+ ExecutionEngine engine = null;
+
+ ValueHandler fc = null;
+
+
+
+ engine = new BlockExecutionEngine();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:237:3: ( (fc= lisp_list[context, new LispForm(context) ] ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:237:3: (fc= lisp_list[context, new LispForm(context) ] )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:237:3: (fc= lisp_list[context, new LispForm(context) ] )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:237:4: fc= lisp_list[context, new LispForm(context) ]
+ {
+ pushFollow(FOLLOW_lisp_list_in_execution_list66);
+ fc=lisp_list(context, new LispForm(context) );
+ _fsp--;
+
+ context.addFunction( (FunctionCaller) fc );
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return engine;
+ }
+ // $ANTLR end execution_list
+
+
// $ANTLR start deffunction
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:225:1: deffunction : ;
- public final void deffunction() throws RecognitionException {
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:241:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME ( deffunction_params[context] )? (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
+ public final Deffunction deffunction() throws RecognitionException {
+ Deffunction function = null;
+
+ Token loc=null;
+ Token ruleName=null;
+ ValueHandler fc = null;
+
+
+
+ BuildContext context;
+
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:227:2: ()
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:227:2:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:245:4: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME ( deffunction_params[context] )? (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:245:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME ( deffunction_params[context] )? (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN
{
+ loc=(Token)input.LT(1);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction95);
+ match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction103);
+ ruleName=(Token)input.LT(1);
+ match(input,NAME,FOLLOW_NAME_in_deffunction112);
+
+ function = new Deffunction( ruleName.getText() );
+ functionRegistry.addFunction( function );
+ context = new ExecutionBuildContext( function, functionRegistry );
+
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:252:5: ( deffunction_params[context] )?
+ int alt1=2;
+ alt1 = dfa1.predict(input);
+ switch (alt1) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:252:5: deffunction_params[context]
+ {
+ pushFollow(FOLLOW_deffunction_params_in_deffunction120);
+ deffunction_params(context);
+ _fsp--;
+
+
+ }
+ break;
+
}
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:253:5: (fc= lisp_list[context, new LispForm(context) ] )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==LEFT_PAREN) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:253:6: fc= lisp_list[context, new LispForm(context) ]
+ {
+ pushFollow(FOLLOW_lisp_list_in_deffunction131);
+ fc=lisp_list(context, new LispForm(context) );
+ _fsp--;
+
+ context.addFunction( (FunctionCaller) fc );
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction142);
+
+ }
+
}
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
finally {
}
- return ;
+ return function;
}
// $ANTLR end deffunction
+ // $ANTLR start deffunction_params
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:257:1: deffunction_params[BuildContext context] : loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN ;
+ public final void deffunction_params(BuildContext context) throws RecognitionException {
+ Token loc=null;
+ Token v=null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:258:4: (loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:258:4: loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN
+ {
+ loc=(Token)input.LT(1);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction_params157);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:259:4: (v= VAR )*
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==VAR) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:259:5: v= VAR
+ {
+ v=(Token)input.LT(1);
+ match(input,VAR,FOLLOW_VAR_in_deffunction_params167);
+
+ // this creates a parameter on the underlying function
+ context.createLocalVariable( v.getText() );
+
+
+ }
+ break;
+
+ default :
+ break loop3;
+ }
+ } while (true);
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction_params180);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end deffunction_params
+
+
// $ANTLR start defrule
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:229:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:266:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN ;
public final RuleDescr defrule() throws RecognitionException {
RuleDescr rule = null;
@@ -257,14 +428,14 @@
AttributeDescr module = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:236:4: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:236:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:273:4: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:273:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN
{
loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule68);
- match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule76);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule205);
+ match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule213);
ruleName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_defrule80);
+ match(input,NAME,FOLLOW_NAME_in_defrule217);
debug( "start rule: " + ruleName.getText() );
String ruleStr = ruleName.getText();
@@ -293,30 +464,30 @@
lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
documentation=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_defrule92);
+ match(input,STRING,FOLLOW_STRING_in_defrule229);
// do nothing here for now
- pushFollow(FOLLOW_ruleAttribute_in_defrule98);
+ pushFollow(FOLLOW_ruleAttribute_in_defrule235);
ruleAttribute(rule);
_fsp--;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:271:3: ( ce[lhs] )*
- loop1:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:308:3: ( ce[lhs] )*
+ loop4:
do {
- int alt1=2;
- int LA1_0 = input.LA(1);
+ int alt4=2;
+ int LA4_0 = input.LA(1);
- if ( (LA1_0==LEFT_PAREN||LA1_0==VAR) ) {
- alt1=1;
+ if ( (LA4_0==LEFT_PAREN||LA4_0==VAR) ) {
+ alt4=1;
}
- switch (alt1) {
+ switch (alt4) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:271:3: ce[lhs]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:308:3: ce[lhs]
{
- pushFollow(FOLLOW_ce_in_defrule106);
+ pushFollow(FOLLOW_ce_in_defrule243);
ce(lhs);
_fsp--;
@@ -325,17 +496,17 @@
break;
default :
- break loop1;
+ break loop4;
}
} while (true);
- match(input,41,FOLLOW_41_in_defrule115);
- pushFollow(FOLLOW_rhs_in_defrule124);
- engine=rhs();
+ match(input,42,FOLLOW_42_in_defrule252);
+ pushFollow(FOLLOW_execution_block_in_defrule261);
+ engine=execution_block();
_fsp--;
rule.setConsequence( engine );
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule133);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule270);
}
@@ -352,57 +523,57 @@
// $ANTLR start ruleAttribute
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:318:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
public final void ruleAttribute(RuleDescr rule) throws RecognitionException {
AttributeDescr d = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:3: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:320:3: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:320:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
- int alt3=2;
- int LA3_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:320:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
- if ( (LA3_0==LEFT_PAREN) ) {
- int LA3_1 = input.LA(2);
+ if ( (LA6_0==LEFT_PAREN) ) {
+ int LA6_1 = input.LA(2);
- if ( (LA3_1==DECLARE) ) {
- alt3=1;
+ if ( (LA6_1==DECLARE) ) {
+ alt6=1;
}
}
- switch (alt3) {
+ switch (alt6) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:320:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute150);
- match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute152);
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:284:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
- int alt2=2;
- int LA2_0 = input.LA(1);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute287);
+ match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute289);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+ int alt5=2;
+ int LA5_0 = input.LA(1);
- if ( (LA2_0==LEFT_PAREN) ) {
- alt2=1;
+ if ( (LA5_0==LEFT_PAREN) ) {
+ alt5=1;
}
- switch (alt2) {
+ switch (alt5) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:284:6: LEFT_PAREN d= salience RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:6: LEFT_PAREN d= salience RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute159);
- pushFollow(FOLLOW_salience_in_ruleAttribute163);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute296);
+ pushFollow(FOLLOW_salience_in_ruleAttribute300);
d=salience();
_fsp--;
rule.addAttribute( d );
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute167);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute304);
}
break;
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute174);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute311);
}
break;
@@ -425,7 +596,7 @@
// $ANTLR start salience
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:288:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:325:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
public final AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
@@ -436,13 +607,13 @@
d = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:293:3: (loc= SALIENCE i= INT )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:293:3: loc= SALIENCE i= INT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:330:3: (loc= SALIENCE i= INT )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:330:3: loc= SALIENCE i= INT
{
loc=(Token)input.LT(1);
- match(input,SALIENCE,FOLLOW_SALIENCE_in_salience204);
+ match(input,SALIENCE,FOLLOW_SALIENCE_in_salience341);
i=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_salience208);
+ match(input,INT,FOLLOW_INT_in_salience345);
d = new AttributeDescr( "salience", i.getText() );
d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
@@ -465,70 +636,70 @@
// $ANTLR start ce
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:303:1: ce[ConditionalElementDescr in_ce] : ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:340:1: ce[ConditionalElementDescr in_ce] : ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) ;
public final void ce(ConditionalElementDescr in_ce) throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:4: ( ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: ( ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
- int alt4=7;
- int LA4_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
+ int alt7=7;
+ int LA7_0 = input.LA(1);
- if ( (LA4_0==LEFT_PAREN) ) {
+ if ( (LA7_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
- case TEST:
+ case EXISTS:
{
- alt4=5;
+ alt7=4;
}
break;
- case AND:
+ case NOT:
{
- alt4=1;
+ alt7=3;
}
break;
- case EXISTS:
+ case NAME:
{
- alt4=4;
+ alt7=6;
}
break;
case OR:
{
- alt4=2;
+ alt7=2;
}
break;
- case NOT:
+ case TEST:
{
- alt4=3;
+ alt7=5;
}
break;
- case NAME:
+ case AND:
{
- alt4=6;
+ alt7=1;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 4, 1, input);
+ new NoViableAltException("341:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 7, 1, input);
throw nvae;
}
}
- else if ( (LA4_0==VAR) ) {
- alt4=7;
+ else if ( (LA7_0==VAR) ) {
+ alt7=7;
}
else {
NoViableAltException nvae =
- new NoViableAltException("304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 4, 0, input);
+ new NoViableAltException("341:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 7, 0, input);
throw nvae;
}
- switch (alt4) {
+ switch (alt7) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:8: and_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:8: and_ce[in_ce]
{
- pushFollow(FOLLOW_and_ce_in_ce234);
+ pushFollow(FOLLOW_and_ce_in_ce371);
and_ce(in_ce);
_fsp--;
@@ -536,9 +707,9 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:305:7: or_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:342:7: or_ce[in_ce]
{
- pushFollow(FOLLOW_or_ce_in_ce244);
+ pushFollow(FOLLOW_or_ce_in_ce381);
or_ce(in_ce);
_fsp--;
@@ -546,9 +717,9 @@
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:306:7: not_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:343:7: not_ce[in_ce]
{
- pushFollow(FOLLOW_not_ce_in_ce253);
+ pushFollow(FOLLOW_not_ce_in_ce390);
not_ce(in_ce);
_fsp--;
@@ -556,9 +727,9 @@
}
break;
case 4 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:307:7: exists_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:344:7: exists_ce[in_ce]
{
- pushFollow(FOLLOW_exists_ce_in_ce262);
+ pushFollow(FOLLOW_exists_ce_in_ce399);
exists_ce(in_ce);
_fsp--;
@@ -566,9 +737,9 @@
}
break;
case 5 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:308:8: eval_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:345:8: eval_ce[in_ce]
{
- pushFollow(FOLLOW_eval_ce_in_ce276);
+ pushFollow(FOLLOW_eval_ce_in_ce413);
eval_ce(in_ce);
_fsp--;
@@ -576,9 +747,9 @@
}
break;
case 6 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:309:7: normal_pattern[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:346:7: normal_pattern[in_ce]
{
- pushFollow(FOLLOW_normal_pattern_in_ce290);
+ pushFollow(FOLLOW_normal_pattern_in_ce427);
normal_pattern(in_ce);
_fsp--;
@@ -586,9 +757,9 @@
}
break;
case 7 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:310:7: bound_pattern[in_ce]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:347:7: bound_pattern[in_ce]
{
- pushFollow(FOLLOW_bound_pattern_in_ce299);
+ pushFollow(FOLLOW_bound_pattern_in_ce436);
bound_pattern(in_ce);
_fsp--;
@@ -613,9 +784,9 @@
// $ANTLR end ce
- // $ANTLR start rhs
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:314:1: rhs returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
- public final ExecutionEngine rhs() throws RecognitionException {
+ // $ANTLR start execution_block
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:351:1: execution_block returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
+ public final ExecutionEngine execution_block() throws RecognitionException {
ExecutionEngine engine = null;
ValueHandler fc = null;
@@ -623,28 +794,28 @@
engine = new BlockExecutionEngine();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:3: ( (fc= lisp_list[context, new LispForm(context) ] )* )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:3: (fc= lisp_list[context, new LispForm(context) ] )*
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:3: ( (fc= lisp_list[context, new LispForm(context) ] )* )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:3: (fc= lisp_list[context, new LispForm(context) ] )*
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:3: (fc= lisp_list[context, new LispForm(context) ] )*
- loop5:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:3: (fc= lisp_list[context, new LispForm(context) ] )*
+ loop8:
do {
- int alt5=2;
- int LA5_0 = input.LA(1);
+ int alt8=2;
+ int LA8_0 = input.LA(1);
- if ( (LA5_0==LEFT_PAREN) ) {
- alt5=1;
+ if ( (LA8_0==LEFT_PAREN) ) {
+ alt8=1;
}
- switch (alt5) {
+ switch (alt8) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:4: fc= lisp_list[context, new LispForm(context) ]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:4: fc= lisp_list[context, new LispForm(context) ]
{
- pushFollow(FOLLOW_lisp_list_in_rhs331);
+ pushFollow(FOLLOW_lisp_list_in_execution_block468);
fc=lisp_list(context, new LispForm(context) );
_fsp--;
@@ -654,7 +825,7 @@
break;
default :
- break loop5;
+ break loop8;
}
} while (true);
@@ -670,42 +841,42 @@
}
return engine;
}
- // $ANTLR end rhs
+ // $ANTLR end execution_block
// $ANTLR start and_ce
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:324:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:361:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
public final void and_ce(ConditionalElementDescr in_ce) throws RecognitionException {
AndDescr andDescr= null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:328:4: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:328:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:4: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce359);
- match(input,AND,FOLLOW_AND_in_and_ce364);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce496);
+ match(input,AND,FOLLOW_AND_in_and_ce501);
andDescr = new AndDescr();
in_ce.addDescr( andDescr );
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:3: ( ce[andDescr] )+
- int cnt6=0;
- loop6:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:370:3: ( ce[andDescr] )+
+ int cnt9=0;
+ loop9:
do {
- int alt6=2;
- int LA6_0 = input.LA(1);
+ int alt9=2;
+ int LA9_0 = input.LA(1);
- if ( (LA6_0==LEFT_PAREN||LA6_0==VAR) ) {
- alt6=1;
+ if ( (LA9_0==LEFT_PAREN||LA9_0==VAR) ) {
+ alt9=1;
}
- switch (alt6) {
+ switch (alt9) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:3: ce[andDescr]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:370:3: ce[andDescr]
{
- pushFollow(FOLLOW_ce_in_and_ce370);
+ pushFollow(FOLLOW_ce_in_and_ce507);
ce(andDescr);
_fsp--;
@@ -714,15 +885,15 @@
break;
default :
- if ( cnt6 >= 1 ) break loop6;
+ if ( cnt9 >= 1 ) break loop9;
EarlyExitException eee =
- new EarlyExitException(6, input);
+ new EarlyExitException(9, input);
throw eee;
}
- cnt6++;
+ cnt9++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce379);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce516);
}
@@ -739,38 +910,38 @@
// $ANTLR start or_ce
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:374:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
public final void or_ce(ConditionalElementDescr in_ce) throws RecognitionException {
OrDescr orDescr= null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:378:4: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:378:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce407);
- match(input,OR,FOLLOW_OR_in_or_ce412);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce544);
+ match(input,OR,FOLLOW_OR_in_or_ce549);
orDescr = new OrDescr();
in_ce.addDescr( orDescr );
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:346:3: ( ce[orDescr] )+
- int cnt7=0;
- loop7:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:383:3: ( ce[orDescr] )+
+ int cnt10=0;
+ loop10:
do {
- int alt7=2;
- int LA7_0 = input.LA(1);
+ int alt10=2;
+ int LA10_0 = input.LA(1);
- if ( (LA7_0==LEFT_PAREN||LA7_0==VAR) ) {
- alt7=1;
+ if ( (LA10_0==LEFT_PAREN||LA10_0==VAR) ) {
+ alt10=1;
}
- switch (alt7) {
+ switch (alt10) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:346:3: ce[orDescr]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:383:3: ce[orDescr]
{
- pushFollow(FOLLOW_ce_in_or_ce418);
+ pushFollow(FOLLOW_ce_in_or_ce555);
ce(orDescr);
_fsp--;
@@ -779,15 +950,15 @@
break;
default :
- if ( cnt7 >= 1 ) break loop7;
+ if ( cnt10 >= 1 ) break loop10;
EarlyExitException eee =
- new EarlyExitException(7, input);
+ new EarlyExitException(10, input);
throw eee;
}
- cnt7++;
+ cnt10++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce427);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce564);
}
@@ -804,26 +975,26 @@
// $ANTLR start not_ce
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:350:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
public final void not_ce(ConditionalElementDescr in_ce) throws RecognitionException {
NotDescr notDescr= null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:391:4: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:391:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce455);
- match(input,NOT,FOLLOW_NOT_in_not_ce460);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce592);
+ match(input,NOT,FOLLOW_NOT_in_not_ce597);
notDescr = new NotDescr();
in_ce.addDescr( notDescr );
- pushFollow(FOLLOW_ce_in_not_ce466);
+ pushFollow(FOLLOW_ce_in_not_ce603);
ce(notDescr);
_fsp--;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce474);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce611);
}
@@ -840,26 +1011,26 @@
// $ANTLR start exists_ce
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:363:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:400:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
public final void exists_ce(ConditionalElementDescr in_ce) throws RecognitionException {
ExistsDescr existsDescr= null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:367:4: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:367:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:404:4: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:404:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce503);
- match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce508);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce640);
+ match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce645);
existsDescr = new ExistsDescr();
in_ce.addDescr( existsDescr );
- pushFollow(FOLLOW_ce_in_exists_ce514);
+ pushFollow(FOLLOW_ce_in_exists_ce651);
ce(existsDescr);
_fsp--;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce522);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce659);
}
@@ -876,7 +1047,7 @@
// $ANTLR start eval_ce
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:376:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:413:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
public final void eval_ce(ConditionalElementDescr in_ce) throws RecognitionException {
ValueHandler fc = null;
@@ -884,19 +1055,19 @@
EvalDescr evalDescr= null;
ExecutionEngine engine = new CLPEval();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:4: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:4: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce550);
- match(input,TEST,FOLLOW_TEST_in_eval_ce555);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce687);
+ match(input,TEST,FOLLOW_TEST_in_eval_ce692);
evalDescr = new EvalDescr();
in_ce.addDescr( evalDescr );
- pushFollow(FOLLOW_lisp_list_in_eval_ce563);
+ pushFollow(FOLLOW_lisp_list_in_eval_ce700);
fc=lisp_list(context, new LispForm(context));
_fsp--;
@@ -904,7 +1075,7 @@
engine.addFunction( (FunctionCaller) fc );
evalDescr.setContent( engine );
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce574);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce711);
}
@@ -921,7 +1092,7 @@
// $ANTLR start normal_pattern
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:431:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
public final void normal_pattern(ConditionalElementDescr in_ce) throws RecognitionException {
Token name=null;
@@ -929,32 +1100,32 @@
PatternDescr pattern = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: ( LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:435:4: ( LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:435:4: LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern602);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern739);
name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_normal_pattern609);
+ match(input,NAME,FOLLOW_NAME_in_normal_pattern746);
pattern = new PatternDescr(name.getText());
in_ce.addDescr( pattern );
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:3: ( field_constriant[pattern] )*
- loop8:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:440:3: ( field_constriant[pattern] )*
+ loop11:
do {
- int alt8=2;
- int LA8_0 = input.LA(1);
+ int alt11=2;
+ int LA11_0 = input.LA(1);
- if ( (LA8_0==LEFT_PAREN) ) {
- alt8=1;
+ if ( (LA11_0==LEFT_PAREN) ) {
+ alt11=1;
}
- switch (alt8) {
+ switch (alt11) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:3: field_constriant[pattern]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:440:3: field_constriant[pattern]
{
- pushFollow(FOLLOW_field_constriant_in_normal_pattern615);
+ pushFollow(FOLLOW_field_constriant_in_normal_pattern752);
field_constriant(pattern);
_fsp--;
@@ -963,11 +1134,11 @@
break;
default :
- break loop8;
+ break loop11;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern625);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern762);
}
@@ -984,7 +1155,7 @@
// $ANTLR start bound_pattern
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:409:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:446:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
public final void bound_pattern(ConditionalElementDescr in_ce) throws RecognitionException {
Token var=null;
Token name=null;
@@ -994,39 +1165,39 @@
String identifier = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:414:4: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:414:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:451:4: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:451:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
{
var=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_bound_pattern653);
+ match(input,VAR,FOLLOW_VAR_in_bound_pattern790);
identifier = var.getText();
- match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern659);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern661);
+ match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern796);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern798);
name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_bound_pattern665);
+ match(input,NAME,FOLLOW_NAME_in_bound_pattern802);
pattern = new PatternDescr(name.getText());
pattern.setIdentifier( identifier );
in_ce.addDescr( pattern );
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:423:3: ( field_constriant[pattern] )*
- loop9:
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:460:3: ( field_constriant[pattern] )*
+ loop12:
do {
- int alt9=2;
- int LA9_0 = input.LA(1);
+ int alt12=2;
+ int LA12_0 = input.LA(1);
- if ( (LA9_0==LEFT_PAREN) ) {
- alt9=1;
+ if ( (LA12_0==LEFT_PAREN) ) {
+ alt12=1;
}
- switch (alt9) {
+ switch (alt12) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:423:3: field_constriant[pattern]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:460:3: field_constriant[pattern]
{
- pushFollow(FOLLOW_field_constriant_in_bound_pattern674);
+ pushFollow(FOLLOW_field_constriant_in_bound_pattern811);
field_constriant(pattern);
_fsp--;
@@ -1035,11 +1206,11 @@
break;
default :
- break loop9;
+ break loop12;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern681);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern818);
}
@@ -1056,7 +1227,7 @@
// $ANTLR start field_constriant
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:427:1: field_constriant[PatternDescr pattern] : LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:464:1: field_constriant[PatternDescr pattern] : LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN ;
public final void field_constriant(PatternDescr pattern) throws RecognitionException {
Token f=null;
@@ -1067,23 +1238,23 @@
String op = "==";
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:435:3: ( LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:435:3: LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:3: ( LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:3: LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant712);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant849);
f=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_field_constriant716);
+ match(input,NAME,FOLLOW_NAME_in_field_constriant853);
fc = new FieldConstraintDescr(f.getText());
fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
pattern.addDescr( fc );
- pushFollow(FOLLOW_connected_constraint_in_field_constriant731);
+ pushFollow(FOLLOW_connected_constraint_in_field_constriant868);
connected_constraint(fc, pattern);
_fsp--;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant737);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant874);
}
@@ -1100,33 +1271,33 @@
// $ANTLR start connected_constraint
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:1: connected_constraint[FieldConstraintDescr fc, PatternDescr pattern] : restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:484:1: connected_constraint[FieldConstraintDescr fc, PatternDescr pattern] : restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? ;
public final void connected_constraint(FieldConstraintDescr fc, PatternDescr pattern) throws RecognitionException {
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:2: ( restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:2: restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:486:2: ( restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:486:2: restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
{
- pushFollow(FOLLOW_restriction_in_connected_constraint753);
+ pushFollow(FOLLOW_restriction_in_connected_constraint890);
restriction(fc, pattern);
_fsp--;
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:450:2: ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
- int alt10=3;
- int LA10_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:487:2: ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
+ int alt13=3;
+ int LA13_0 = input.LA(1);
- if ( (LA10_0==AMPERSAND) ) {
- alt10=1;
+ if ( (LA13_0==AMPERSAND) ) {
+ alt13=1;
}
- else if ( (LA10_0==PIPE) ) {
- alt10=2;
+ else if ( (LA13_0==PIPE) ) {
+ alt13=2;
}
- switch (alt10) {
+ switch (alt13) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:451:6: AMPERSAND connected_constraint[fc, pattern]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:488:6: AMPERSAND connected_constraint[fc, pattern]
{
- match(input,AMPERSAND,FOLLOW_AMPERSAND_in_connected_constraint765);
+ match(input,AMPERSAND,FOLLOW_AMPERSAND_in_connected_constraint902);
fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
- pushFollow(FOLLOW_connected_constraint_in_connected_constraint774);
+ pushFollow(FOLLOW_connected_constraint_in_connected_constraint911);
connected_constraint(fc, pattern);
_fsp--;
@@ -1134,11 +1305,11 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:454:6: PIPE connected_constraint[fc, pattern]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:491:6: PIPE connected_constraint[fc, pattern]
{
- match(input,PIPE,FOLLOW_PIPE_in_connected_constraint786);
+ match(input,PIPE,FOLLOW_PIPE_in_connected_constraint923);
fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
- pushFollow(FOLLOW_connected_constraint_in_connected_constraint795);
+ pushFollow(FOLLOW_connected_constraint_in_connected_constraint932);
connected_constraint(fc, pattern);
_fsp--;
@@ -1164,7 +1335,7 @@
// $ANTLR start restriction
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:459:1: restriction[FieldConstraintDescr fc, PatternDescr pattern] : ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:496:1: restriction[FieldConstraintDescr fc, PatternDescr pattern] : ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) ;
public final void restriction(FieldConstraintDescr fc, PatternDescr pattern) throws RecognitionException {
String lc = null;
@@ -1173,21 +1344,21 @@
String op = "==";
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: ( ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:4: ( ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:4: ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: ( TILDE )?
- int alt11=2;
- int LA11_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:4: ( TILDE )?
+ int alt14=2;
+ int LA14_0 = input.LA(1);
- if ( (LA11_0==TILDE) ) {
- alt11=1;
+ if ( (LA14_0==TILDE) ) {
+ alt14=1;
}
- switch (alt11) {
+ switch (alt14) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:5: TILDE
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:5: TILDE
{
- match(input,TILDE,FOLLOW_TILDE_in_restriction821);
+ match(input,TILDE,FOLLOW_TILDE_in_restriction958);
op = "!=";
}
@@ -1195,22 +1366,22 @@
}
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:464:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
- int alt12=4;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:501:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
+ int alt15=4;
switch ( input.LA(1) ) {
case COLON:
{
- alt12=1;
+ alt15=1;
}
break;
case EQUALS:
{
- alt12=2;
+ alt15=2;
}
break;
case VAR:
{
- alt12=3;
+ alt15=3;
}
break;
case NAME:
@@ -1220,21 +1391,21 @@
case BOOL:
case NULL:
{
- alt12=4;
+ alt15=4;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("464:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 12, 0, input);
+ new NoViableAltException("501:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 15, 0, input);
throw nvae;
}
- switch (alt12) {
+ switch (alt15) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:464:5: predicate_constraint[op, pattern]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:501:5: predicate_constraint[op, pattern]
{
- pushFollow(FOLLOW_predicate_constraint_in_restriction837);
+ pushFollow(FOLLOW_predicate_constraint_in_restriction974);
predicate_constraint(op, pattern);
_fsp--;
@@ -1242,9 +1413,9 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:465:7: return_value_restriction[op, fc]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:502:7: return_value_restriction[op, fc]
{
- pushFollow(FOLLOW_return_value_restriction_in_restriction853);
+ pushFollow(FOLLOW_return_value_restriction_in_restriction990);
return_value_restriction(op, fc);
_fsp--;
@@ -1252,9 +1423,9 @@
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:466:7: variable_restriction[op, fc]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:503:7: variable_restriction[op, fc]
{
- pushFollow(FOLLOW_variable_restriction_in_restriction862);
+ pushFollow(FOLLOW_variable_restriction_in_restriction999);
variable_restriction(op, fc);
_fsp--;
@@ -1262,9 +1433,9 @@
}
break;
case 4 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:467:8: lc= literal_restriction
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:504:8: lc= literal_restriction
{
- pushFollow(FOLLOW_literal_restriction_in_restriction874);
+ pushFollow(FOLLOW_literal_restriction_in_restriction1011);
lc=literal_restriction();
_fsp--;
@@ -1294,21 +1465,21 @@
// $ANTLR start predicate_constraint
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:474:1: predicate_constraint[String op, PatternDescr pattern] : COLON fc= lisp_list[context, new LispForm(context)] ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:511:1: predicate_constraint[String op, PatternDescr pattern] : COLON fc= lisp_list[context, new LispForm(context)] ;
public final void predicate_constraint(String op, PatternDescr pattern) throws RecognitionException {
ValueHandler fc = null;
ExecutionEngine engine = new CLPPredicate();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:479:4: ( COLON fc= lisp_list[context, new LispForm(context)] )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:479:4: COLON fc= lisp_list[context, new LispForm(context)]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:516:4: ( COLON fc= lisp_list[context, new LispForm(context)] )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:516:4: COLON fc= lisp_list[context, new LispForm(context)]
{
- match(input,COLON,FOLLOW_COLON_in_predicate_constraint916);
- pushFollow(FOLLOW_lisp_list_in_predicate_constraint922);
+ match(input,COLON,FOLLOW_COLON_in_predicate_constraint1053);
+ pushFollow(FOLLOW_lisp_list_in_predicate_constraint1059);
fc=lisp_list(context, new LispForm(context));
_fsp--;
@@ -1332,21 +1503,21 @@
// $ANTLR start return_value_restriction
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:488:1: return_value_restriction[String op, FieldConstraintDescr fc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:525:1: return_value_restriction[String op, FieldConstraintDescr fc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
public final void return_value_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
ValueHandler func = null;
ExecutionEngine engine = new CLPReturnValue();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:493:4: ( EQUALS func= lisp_list[context, new LispForm(context)] )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:493:4: EQUALS func= lisp_list[context, new LispForm(context)]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:530:4: ( EQUALS func= lisp_list[context, new LispForm(context)] )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:530:4: EQUALS func= lisp_list[context, new LispForm(context)]
{
- match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction948);
- pushFollow(FOLLOW_lisp_list_in_return_value_restriction955);
+ match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1085);
+ pushFollow(FOLLOW_lisp_list_in_return_value_restriction1092);
func=lisp_list(context, new LispForm(context));
_fsp--;
@@ -1370,16 +1541,16 @@
// $ANTLR start variable_restriction
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:537:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
public final void variable_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
Token var=null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:501:4: (var= VAR )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:501:4: var= VAR
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:538:4: (var= VAR )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:538:4: var= VAR
{
var=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_variable_restriction976);
+ match(input,VAR,FOLLOW_VAR_in_variable_restriction1113);
fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
@@ -1399,7 +1570,7 @@
// $ANTLR start literal_restriction
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:507:1: literal_restriction returns [String text] : t= literal ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:544:1: literal_restriction returns [String text] : t= literal ;
public final String literal_restriction() throws RecognitionException {
String text = null;
@@ -1410,10 +1581,10 @@
text = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:6: (t= literal )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:6: t= literal
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:549:6: (t= literal )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:549:6: t= literal
{
- pushFollow(FOLLOW_literal_in_literal_restriction1009);
+ pushFollow(FOLLOW_literal_in_literal_restriction1146);
t=literal();
_fsp--;
@@ -1436,37 +1607,37 @@
// $ANTLR start lisp_list
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:517:1: lisp_list[ExecutionBuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
- public final ValueHandler lisp_list(ExecutionBuildContext context, LispList list) throws RecognitionException {
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:1: lisp_list[BuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
+ public final ValueHandler lisp_list(BuildContext context, LispList list) throws RecognitionException {
ValueHandler valueHandler = null;
ValueHandler a = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:518:4: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:518:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:555:4: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:555:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1028);
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:519:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
- loop13:
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1165);
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
+ loop16:
do {
- int alt13=3;
- int LA13_0 = input.LA(1);
+ int alt16=3;
+ int LA16_0 = input.LA(1);
- if ( ((LA13_0>=NAME && LA13_0<=STRING)||LA13_0==INT||LA13_0==VAR||(LA13_0>=FLOAT && LA13_0<=NULL)) ) {
- alt13=1;
+ if ( (LA16_0==NAME||LA16_0==VAR||LA16_0==STRING||LA16_0==INT||(LA16_0>=FLOAT && LA16_0<=NULL)) ) {
+ alt16=1;
}
- else if ( (LA13_0==LEFT_PAREN) ) {
- alt13=2;
+ else if ( (LA16_0==LEFT_PAREN) ) {
+ alt16=2;
}
- switch (alt13) {
+ switch (alt16) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:519:6: a= lisp_atom[context]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:6: a= lisp_atom[context]
{
- pushFollow(FOLLOW_lisp_atom_in_lisp_list1038);
+ pushFollow(FOLLOW_lisp_atom_in_lisp_list1175);
a=lisp_atom(context);
_fsp--;
@@ -1475,9 +1646,9 @@
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:520:6: a= lisp_list[context, list.createList()]
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:557:6: a= lisp_list[context, list.createList()]
{
- pushFollow(FOLLOW_lisp_list_in_lisp_list1054);
+ pushFollow(FOLLOW_lisp_list_in_lisp_list1191);
a=lisp_list(context, list.createList());
_fsp--;
@@ -1487,11 +1658,11 @@
break;
default :
- break loop13;
+ break loop16;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1084);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1221);
valueHandler = list.getValueHandler();
}
@@ -1509,8 +1680,8 @@
// $ANTLR start lisp_atom
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:526:1: lisp_atom[ExecutionBuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
- public final ValueHandler lisp_atom(ExecutionBuildContext context) throws RecognitionException {
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:1: lisp_atom[BuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
+ public final ValueHandler lisp_atom(BuildContext context) throws RecognitionException {
ValueHandler value = null;
Token t=null;
@@ -1519,114 +1690,114 @@
value = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:568:3: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:568:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
- int alt14=7;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:568:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+ int alt17=7;
switch ( input.LA(1) ) {
case VAR:
{
- alt14=1;
+ alt17=1;
}
break;
case STRING:
{
- alt14=2;
+ alt17=2;
}
break;
case NAME:
{
- alt14=3;
+ alt17=3;
}
break;
case FLOAT:
{
- alt14=4;
+ alt17=4;
}
break;
case INT:
{
- alt14=5;
+ alt17=5;
}
break;
case BOOL:
{
- alt14=6;
+ alt17=6;
}
break;
case NULL:
{
- alt14=7;
+ alt17=7;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("531:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 14, 0, input);
+ new NoViableAltException("568:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 17, 0, input);
throw nvae;
}
- switch (alt14) {
+ switch (alt17) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:6: t= VAR
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:568:6: t= VAR
{
t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom1121);
+ match(input,VAR,FOLLOW_VAR_in_lisp_atom1258);
value = context.getVariableValueHandler(t.getText() );
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:532:6: t= STRING
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:6: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom1133);
+ match(input,STRING,FOLLOW_STRING_in_lisp_atom1270);
value = new ObjectValueHandler( getString( t ) );
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:533:7: t= NAME
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:570:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom1145);
+ match(input,NAME,FOLLOW_NAME_in_lisp_atom1282);
value = new ObjectValueHandler( t.getText() );
}
break;
case 4 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:534:6: t= FLOAT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:6: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1160);
+ match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1297);
value = new DoubleValueHandler( t.getText() );
}
break;
case 5 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:535:6: t= INT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:572:6: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom1172);
+ match(input,INT,FOLLOW_INT_in_lisp_atom1309);
value = new LongValueHandler( t.getText() );
}
break;
case 6 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:536:6: t= BOOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:573:6: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1188);
+ match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1325);
value = new BooleanValueHandler( t.getText() );
}
break;
case 7 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:537:6: t= NULL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:574:6: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom1206);
+ match(input,NULL,FOLLOW_NULL_in_lisp_atom1343);
value = ObjectValueHandler.NULL;
}
@@ -1650,7 +1821,7 @@
// $ANTLR start literal
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:541:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:578:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
public final String literal() throws RecognitionException {
String text = null;
@@ -1660,100 +1831,100 @@
text = null;
try {
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:582:4: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:582:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
{
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
- int alt15=6;
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:582:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ int alt18=6;
switch ( input.LA(1) ) {
case STRING:
{
- alt15=1;
+ alt18=1;
}
break;
case NAME:
{
- alt15=2;
+ alt18=2;
}
break;
case INT:
{
- alt15=3;
+ alt18=3;
}
break;
case FLOAT:
{
- alt15=4;
+ alt18=4;
}
break;
case BOOL:
{
- alt15=5;
+ alt18=5;
}
break;
case NULL:
{
- alt15=6;
+ alt18=6;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("545:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 15, 0, input);
+ new NoViableAltException("582:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 18, 0, input);
throw nvae;
}
- switch (alt15) {
+ switch (alt18) {
case 1 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:8: t= STRING
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:582:8: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_literal1242);
+ match(input,STRING,FOLLOW_STRING_in_literal1379);
text = getString( t );
}
break;
case 2 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:546:7: t= NAME
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:583:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_literal1255);
+ match(input,NAME,FOLLOW_NAME_in_literal1392);
text = t.getText();
}
break;
case 3 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:547:7: t= INT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:7: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_literal1271);
+ match(input,INT,FOLLOW_INT_in_literal1408);
text = t.getText();
}
break;
case 4 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:548:7: t= FLOAT
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:585:7: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_literal1286);
+ match(input,FLOAT,FOLLOW_FLOAT_in_literal1423);
text = t.getText();
}
break;
case 5 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:549:7: t= BOOL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:7: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_literal1299);
+ match(input,BOOL,FOLLOW_BOOL_in_literal1436);
text = t.getText();
}
break;
case 6 :
- // C:\\dev\\jbossrules\\trunk4\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:550:7: t= NULL
+ // C:\\dev\\jbossrules\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:587:7: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_literal1313);
+ match(input,NULL,FOLLOW_NULL_in_literal1450);
text = null;
}
@@ -1776,99 +1947,165 @@
// $ANTLR end literal
+ protected DFA1 dfa1 = new DFA1(this);
+ static final String DFA1_eotS =
+ "\5\uffff";
+ static final String DFA1_eofS =
+ "\5\uffff";
+ static final String DFA1_minS =
+ "\2\4\1\uffff\1\4\1\uffff";
+ static final String DFA1_maxS =
+ "\1\7\1\32\1\uffff\1\32\1\uffff";
+ static final String DFA1_acceptS =
+ "\2\uffff\1\2\1\uffff\1\1";
+ static final String DFA1_specialS =
+ "\5\uffff}>";
+ static final String[] DFA1_transitionS = {
+ "\1\1\2\uffff\1\2",
+ "\1\2\1\uffff\1\2\1\4\1\3\1\uffff\1\2\1\uffff\1\2\13\uffff\3"+
+ "\2",
+ "",
+ "\1\2\1\uffff\1\2\1\4\1\3\1\uffff\1\2\1\uffff\1\2\13\uffff\3"+
+ "\2",
+ ""
+ };
+
+ static final short[] DFA1_eot = DFA.unpackEncodedString(DFA1_eotS);
+ static final short[] DFA1_eof = DFA.unpackEncodedString(DFA1_eofS);
+ static final char[] DFA1_min = DFA.unpackEncodedStringToUnsignedChars(DFA1_minS);
+ static final char[] DFA1_max = DFA.unpackEncodedStringToUnsignedChars(DFA1_maxS);
+ static final short[] DFA1_accept = DFA.unpackEncodedString(DFA1_acceptS);
+ static final short[] DFA1_special = DFA.unpackEncodedString(DFA1_specialS);
+ static final short[][] DFA1_transition;
+
+ static {
+ int numStates = DFA1_transitionS.length;
+ DFA1_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA1_transition[i] = DFA.unpackEncodedString(DFA1_transitionS[i]);
+ }
+ }
+
+ class DFA1 extends DFA {
+
+ public DFA1(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 1;
+ this.eot = DFA1_eot;
+ this.eof = DFA1_eof;
+ this.min = DFA1_min;
+ this.max = DFA1_max;
+ this.accept = DFA1_accept;
+ this.special = DFA1_special;
+ this.transition = DFA1_transition;
+ }
+ public String getDescription() {
+ return "252:5: ( deffunction_params[context] )?";
+ }
+ }
- public static final BitSet FOLLOW_LEFT_PAREN_in_defrule68 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_DEFRULE_in_defrule76 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_defrule80 = new BitSet(new long[]{0x0000000000000080L});
- public static final BitSet FOLLOW_STRING_in_defrule92 = new BitSet(new long[]{0x0000020000010010L});
- public static final BitSet FOLLOW_ruleAttribute_in_defrule98 = new BitSet(new long[]{0x0000020000010010L});
- public static final BitSet FOLLOW_ce_in_defrule106 = new BitSet(new long[]{0x0000020000010010L});
- public static final BitSet FOLLOW_41_in_defrule115 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_rhs_in_defrule124 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule133 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute150 = new BitSet(new long[]{0x0000000010000000L});
- public static final BitSet FOLLOW_DECLARE_in_ruleAttribute152 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute159 = new BitSet(new long[]{0x0000000000000200L});
- public static final BitSet FOLLOW_salience_in_ruleAttribute163 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute167 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute174 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SALIENCE_in_salience204 = new BitSet(new long[]{0x0000000000000400L});
- public static final BitSet FOLLOW_INT_in_salience208 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_and_ce_in_ce234 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_or_ce_in_ce244 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_not_ce_in_ce253 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_exists_ce_in_ce262 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_eval_ce_in_ce276 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_normal_pattern_in_ce290 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_bound_pattern_in_ce299 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lisp_list_in_rhs331 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce359 = new BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_AND_in_and_ce364 = new BitSet(new long[]{0x0000000000010010L});
- public static final BitSet FOLLOW_ce_in_and_ce370 = new BitSet(new long[]{0x0000000000010110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce379 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce407 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_OR_in_or_ce412 = new BitSet(new long[]{0x0000000000010010L});
- public static final BitSet FOLLOW_ce_in_or_ce418 = new BitSet(new long[]{0x0000000000010110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce427 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce455 = new BitSet(new long[]{0x0000000000002000L});
- public static final BitSet FOLLOW_NOT_in_not_ce460 = new BitSet(new long[]{0x0000000000010010L});
- public static final BitSet FOLLOW_ce_in_not_ce466 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce474 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce503 = new BitSet(new long[]{0x0000000000004000L});
- public static final BitSet FOLLOW_EXISTS_in_exists_ce508 = new BitSet(new long[]{0x0000000000010010L});
- public static final BitSet FOLLOW_ce_in_exists_ce514 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce522 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce550 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_TEST_in_eval_ce555 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_eval_ce563 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce574 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern602 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_normal_pattern609 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_field_constriant_in_normal_pattern615 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern625 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_bound_pattern653 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern659 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern661 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_bound_pattern665 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_field_constriant_in_bound_pattern674 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern681 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant712 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_field_constriant716 = new BitSet(new long[]{0x0000000003F104C0L});
- public static final BitSet FOLLOW_connected_constraint_in_field_constriant731 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant737 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_restriction_in_connected_constraint753 = new BitSet(new long[]{0x00000000000C0002L});
- public static final BitSet FOLLOW_AMPERSAND_in_connected_constraint765 = new BitSet(new long[]{0x0000000003F104C0L});
- public static final BitSet FOLLOW_connected_constraint_in_connected_constraint774 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_PIPE_in_connected_constraint786 = new BitSet(new long[]{0x0000000003F104C0L});
- public static final BitSet FOLLOW_connected_constraint_in_connected_constraint795 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_TILDE_in_restriction821 = new BitSet(new long[]{0x0000000003E104C0L});
- public static final BitSet FOLLOW_predicate_constraint_in_restriction837 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_return_value_restriction_in_restriction853 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_variable_restriction_in_restriction862 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_restriction_in_restriction874 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_COLON_in_predicate_constraint916 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_predicate_constraint922 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EQUALS_in_return_value_restriction948 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_return_value_restriction955 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_variable_restriction976 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_literal_restriction1009 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1028 = new BitSet(new long[]{0x00000000038105D0L});
- public static final BitSet FOLLOW_lisp_atom_in_lisp_list1038 = new BitSet(new long[]{0x00000000038105D0L});
- public static final BitSet FOLLOW_lisp_list_in_lisp_list1054 = new BitSet(new long[]{0x00000000038105D0L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1084 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_lisp_atom1121 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_lisp_atom1133 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_lisp_atom1145 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_lisp_atom1160 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_lisp_atom1172 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_lisp_atom1188 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_lisp_atom1206 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_literal1242 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_literal1255 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_literal1271 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_literal1286 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_literal1299 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_literal1313 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lisp_list_in_execution_list66 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction95 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_DEFFUNCTION_in_deffunction103 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_deffunction112 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_deffunction_params_in_deffunction120 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_lisp_list_in_deffunction131 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction142 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction_params157 = new BitSet(new long[]{0x0000000000000180L});
+ public static final BitSet FOLLOW_VAR_in_deffunction_params167 = new BitSet(new long[]{0x0000000000000180L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction_params180 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_defrule205 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_DEFRULE_in_defrule213 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_defrule217 = new BitSet(new long[]{0x0000000000000400L});
+ public static final BitSet FOLLOW_STRING_in_defrule229 = new BitSet(new long[]{0x0000040000000110L});
+ public static final BitSet FOLLOW_ruleAttribute_in_defrule235 = new BitSet(new long[]{0x0000040000000110L});
+ public static final BitSet FOLLOW_ce_in_defrule243 = new BitSet(new long[]{0x0000040000000110L});
+ public static final BitSet FOLLOW_42_in_defrule252 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_execution_block_in_defrule261 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule270 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute287 = new BitSet(new long[]{0x0000000020000000L});
+ public static final BitSet FOLLOW_DECLARE_in_ruleAttribute289 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute296 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_salience_in_ruleAttribute300 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute304 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute311 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_SALIENCE_in_salience341 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_INT_in_salience345 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_and_ce_in_ce371 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_or_ce_in_ce381 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_not_ce_in_ce390 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_exists_ce_in_ce399 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_eval_ce_in_ce413 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_normal_pattern_in_ce427 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_bound_pattern_in_ce436 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lisp_list_in_execution_block468 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce496 = new BitSet(new long[]{0x0000000000002000L});
+ public static final BitSet FOLLOW_AND_in_and_ce501 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_ce_in_and_ce507 = new BitSet(new long[]{0x0000000000000190L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce516 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce544 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_OR_in_or_ce549 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_ce_in_or_ce555 = new BitSet(new long[]{0x0000000000000190L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce564 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce592 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_NOT_in_not_ce597 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_ce_in_not_ce603 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce611 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce640 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_EXISTS_in_exists_ce645 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_ce_in_exists_ce651 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce659 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce687 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_TEST_in_eval_ce692 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_eval_ce700 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce711 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern739 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_normal_pattern746 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_field_constriant_in_normal_pattern752 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern762 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_bound_pattern790 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern796 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern798 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_bound_pattern802 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_field_constriant_in_bound_pattern811 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern818 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant849 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_field_constriant853 = new BitSet(new long[]{0x0000000007E01540L});
+ public static final BitSet FOLLOW_connected_constraint_in_field_constriant868 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant874 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_restriction_in_connected_constraint890 = new BitSet(new long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_AMPERSAND_in_connected_constraint902 = new BitSet(new long[]{0x0000000007E01540L});
+ public static final BitSet FOLLOW_connected_constraint_in_connected_constraint911 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_PIPE_in_connected_constraint923 = new BitSet(new long[]{0x0000000007E01540L});
+ public static final BitSet FOLLOW_connected_constraint_in_connected_constraint932 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_TILDE_in_restriction958 = new BitSet(new long[]{0x0000000007C01540L});
+ public static final BitSet FOLLOW_predicate_constraint_in_restriction974 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_return_value_restriction_in_restriction990 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_variable_restriction_in_restriction999 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_restriction_in_restriction1011 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_COLON_in_predicate_constraint1053 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_predicate_constraint1059 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1085 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_return_value_restriction1092 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_variable_restriction1113 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_literal_restriction1146 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1165 = new BitSet(new long[]{0x00000000070015D0L});
+ public static final BitSet FOLLOW_lisp_atom_in_lisp_list1175 = new BitSet(new long[]{0x00000000070015D0L});
+ public static final BitSet FOLLOW_lisp_list_in_lisp_list1191 = new BitSet(new long[]{0x00000000070015D0L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1221 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_lisp_atom1258 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_lisp_atom1270 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_lisp_atom1282 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_lisp_atom1297 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_lisp_atom1309 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_lisp_atom1325 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_lisp_atom1343 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_literal1379 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_literal1392 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_literal1408 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_literal1423 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_literal1436 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_literal1450 = new BitSet(new long[]{0x0000000000000002L});
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPPredicate.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPPredicate.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPPredicate.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -7,6 +7,7 @@
import org.drools.WorkingMemory;
import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.common.InternalWorkingMemory;
import org.drools.reteoo.ReteTuple;
import org.drools.rule.Declaration;
@@ -39,8 +40,9 @@
return new FunctionCaller[]{this.function};
}
- public int getNextIndex() {
- return this.index++;
+ public VariableValueHandler createLocalVariable(String identifier) {
+ return new IndexedLocalVariableValue( identifier,
+ this.index++ );
}
public boolean evaluate(Object object,
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPReturnValue.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPReturnValue.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPReturnValue.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -8,6 +8,7 @@
import org.drools.WorkingMemory;
import org.drools.base.FieldFactory;
import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.common.InternalWorkingMemory;
import org.drools.reteoo.ReteTuple;
import org.drools.rule.Declaration;
@@ -42,8 +43,9 @@
return new FunctionCaller[]{this.function};
}
- public int getNextIndex() {
- return this.index++;
+ public VariableValueHandler createLocalVariable(String identifier) {
+ return new IndexedLocalVariableValue( identifier,
+ this.index++ );
}
public FieldValue evaluate(Object object,
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,24 +1,29 @@
package org.drools.clp;
import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.ObjectValueHandler;
public class Deffunction
implements
- Function {
+ Function,
+ ExecutionEngine {
private final String name;
private FunctionCaller[] functions;
private ValueHandler[] parameters;
+ private int index;
+
public Deffunction(String name) {
this.name = name;
}
- public void addParameter(ValueHandler parameter) {
+ public VariableValueHandler addParameter(String name) {
+ VariableValueHandler param = new IndexedLocalVariableValue( name,
+ index++ );
if ( parameters == null ) {
- this.parameters = new ValueHandler[]{parameter};
+ this.parameters = new ValueHandler[]{param};
} else {
ValueHandler[] temp = new ValueHandler[parameters.length + 1];
System.arraycopy( this.parameters,
@@ -26,9 +31,10 @@
temp,
0,
this.parameters.length );
- temp[temp.length - 1] = parameter;
+ temp[temp.length - 1] = param;
this.parameters = temp;
}
+ return param;
}
public void addFunction(FunctionCaller function) {
@@ -53,12 +59,12 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
caller.addParameter( valueHandler );
return valueHandler;
}
- public void initCallback(ExecutionBuildContext context) {
+ public void initCallback(BuildContext context) {
}
public ValueHandler execute(ValueHandler[] args,
@@ -84,7 +90,7 @@
// We know that each argument is a local variable, so we can cast and access the underlying value handler,
// as we don't want the variable fully resolved at this stage, just mapped.
newContext.setLocalVariable( i,
- ((LocalVariableValue) args[i]).getValue( context ) );
+ ((ValueHandler) args[i]).getValue( context ) );
}
return newContext;
}
@@ -96,4 +102,12 @@
public LispList createList(int index) {
return new LispForm();
}
+
+ public VariableValueHandler createLocalVariable(String identifier) {
+ return addParameter( identifier );
+ }
+
+ public FunctionCaller[] getFunctions() {
+ return this.functions;
+ }
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionBuildContext.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionBuildContext.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionBuildContext.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -5,10 +5,12 @@
import java.util.Map;
import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.TempTokenVariable;
-public class ExecutionBuildContext {
+public class ExecutionBuildContext
+ implements
+ BuildContext {
private Map vars = new HashMap();
private Map properties = Collections.EMPTY_MAP;
private ExecutionEngine engine;
@@ -20,14 +22,23 @@
this.registry = registry;
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.BuildContext#getFunctionRegistry()
+ */
public FunctionRegistry getFunctionRegistry() {
return this.registry;
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.BuildContext#addFunction(org.drools.clp.valuehandlers.FunctionCaller)
+ */
public void addFunction(FunctionCaller function) {
this.engine.addFunction( function );
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.BuildContext#setProperty(java.lang.Object, java.lang.Object)
+ */
public Object setProperty(Object key,
Object value) {
if ( this.properties == Collections.EMPTY_MAP ) {
@@ -37,21 +48,29 @@
value );
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.BuildContext#getProperty(java.lang.Object)
+ */
public Object getProperty(Object key) {
return this.properties.get( key );
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.BuildContext#createLocalVariable(java.lang.String)
+ */
public ValueHandler createLocalVariable(String identifier) {
ValueHandler var = (ValueHandler) this.vars.get( identifier );
if ( var == null ) {
- var = new LocalVariableValue( identifier,
- this.engine.getNextIndex() );
+ var = this.engine.createLocalVariable( identifier );
this.vars.put( identifier,
var );
}
return var;
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.BuildContext#getVariableValueHandler(java.lang.String)
+ */
public ValueHandler getVariableValueHandler(String identifier) {
ValueHandler var = (ValueHandler) this.vars.get( identifier );
if ( var == null ) {
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContext.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContext.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContext.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -13,12 +13,22 @@
private ReteTuple tuple;
private Object object;
private ValueHandler[] localVariables;
- private Map printoutRouters;
+ private Map printoutRouters;
+ private Shell shell;
+
public ExecutionContext(InternalWorkingMemory workingMemory,
ReteTuple tuple,
int localVariableSize) {
- this( workingMemory,
+ this( null, workingMemory, tuple, localVariableSize);
+ }
+
+ public ExecutionContext(Shell shell,
+ InternalWorkingMemory workingMemory,
+ ReteTuple tuple,
+ int localVariableSize) {
+ this( shell,
+ workingMemory,
tuple,
null,
localVariableSize );
@@ -28,6 +38,15 @@
ReteTuple tuple,
Object object,
int localVariableSize) {
+ this(null, workingMemory, tuple, object, localVariableSize );
+ }
+
+ public ExecutionContext(Shell shell,
+ InternalWorkingMemory workingMemory,
+ ReteTuple tuple,
+ Object object,
+ int localVariableSize) {
+ this.shell = shell;
this.workingMemory = workingMemory;
this.tuple = tuple;
this.object = object;
@@ -69,4 +88,12 @@
this.localVariables[index] = valueHandler;
}
+ public ValueHandler getShellVariable(String identifier) {
+ return null;
+ }
+
+ public void setShellVariable(String identifier,
+ ValueHandler valueHandler) {
+ //this.localVariables[index] = valueHandler;
+ }
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionEngine.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionEngine.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionEngine.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -5,7 +5,7 @@
public interface ExecutionEngine {
public void addFunction(FunctionCaller function);
- public int getNextIndex();
+ public VariableValueHandler createLocalVariable(String identifier);
public FunctionCaller[] getFunctions();
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Function.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Function.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Function.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -8,12 +8,12 @@
public String getName();
- public void initCallback(ExecutionBuildContext context);
+ public void initCallback(BuildContext context);
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context);
+ BuildContext context);
public LispList createList(int index);
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/FunctionDelegator.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/FunctionDelegator.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/FunctionDelegator.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -27,7 +27,7 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
if ( this.function == null ) {
caller.addParameter( valueHandler );
} else {
@@ -39,7 +39,7 @@
return valueHandler;
}
- public void initCallback(ExecutionBuildContext context) {
+ public void initCallback(BuildContext context) {
this.function.initCallback( context );
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -7,7 +7,7 @@
LispList {
private ListValueHandler list;
- private ExecutionBuildContext context;
+ private BuildContext context;
public LispData() {
this.list = new ListValueHandler();
@@ -29,7 +29,7 @@
return this.list;
}
- public void setContext(ExecutionBuildContext context) {
+ public void setContext(BuildContext context) {
this.context = context;
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -5,10 +5,10 @@
public class LispForm
implements
LispList {
- private ExecutionBuildContext context;
+ private BuildContext context;
private FunctionCaller caller;
- public LispForm(ExecutionBuildContext context) {
+ public LispForm(BuildContext context) {
this.context = context;
}
@@ -65,7 +65,7 @@
return list;
}
- public void setContext(ExecutionBuildContext context) {
+ public void setContext(BuildContext context) {
this.context = context;
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispList.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispList.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispList.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -7,6 +7,6 @@
public ValueHandler getValueHandler();
- public void setContext(ExecutionBuildContext context);
+ public void setContext(BuildContext context);
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Shell.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Shell.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Shell.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,8 +1,10 @@
package org.drools.clp;
import java.io.Reader;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import org.antlr.runtime.ANTLRReaderStream;
import org.antlr.runtime.ANTLRStringStream;
@@ -11,24 +13,30 @@
import org.antlr.runtime.TokenStream;
import org.drools.RuleBase;
import org.drools.RuleBaseFactory;
+import org.drools.StatefulSession;
import org.drools.WorkingMemory;
+import org.drools.clp.valuehandlers.FunctionCaller;
import org.drools.compiler.PackageBuilder;
import org.drools.compiler.SwitchingCommonTokenStream;
import org.drools.lang.DRLLexer;
import org.drools.lang.descr.AttributeDescr;
import org.drools.lang.descr.PackageDescr;
import org.drools.lang.descr.RuleDescr;
+import org.drools.spi.GlobalResolver;
-public class Shell implements ParserHandler{
+public class Shell implements ParserHandler, GlobalResolver, BuildContext {
private FunctionRegistry registry;
+ private Map variables;
//private Map packageBulders;
private RuleBase ruleBase;
- private WorkingMemory workingMemory;
+ private StatefulSession session;
public Shell() {
this.ruleBase = RuleBaseFactory.newRuleBase();
- this.workingMemory = ruleBase.newWorkingMemory();
+ this.session = ruleBase.newStatefulSession();
+ this.session.setGlobalResolver( this );
+ this.variables = new HashMap();
}
public void evalReader(Reader reader) {
@@ -53,9 +61,14 @@
// public void functionHandler(FunctionDescr ruleDescr) {
// throw new RuntimeException( "Drools Clips does not support FunctionDescr" );
// }
+
- public void lispFormHandler(LispForm lispForm) {
- // TODO Auto-generated method stub
+// public void functionHandler(FunctionCaller functionCaller) {
+//
+// }
+
+ public void lispFormHandler(ExecutionEngine engine) {
+ //engine.
}
@@ -100,4 +113,39 @@
return new SwitchingCommonTokenStream( lexer );
}
+ public Object resolve(String name) {
+ return this.variables.get( name );
+ }
+
+ public void addFunction(FunctionCaller function) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ValueHandler createLocalVariable(String identifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FunctionRegistry getFunctionRegistry() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getProperty(Object key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ValueHandler getVariableValueHandler(String identifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object setProperty(Object key,
+ Object value) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,6 +1,6 @@
package org.drools.clp.functions;
-import org.drools.clp.ExecutionBuildContext;
+import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.LispForm;
@@ -12,14 +12,14 @@
implements
Function {
- public void initCallback(ExecutionBuildContext context) {
+ public void initCallback(BuildContext context) {
}
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
caller.addParameter( valueHandler );
return valueHandler;
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BindFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BindFunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BindFunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,6 +1,6 @@
package org.drools.clp.functions;
-import org.drools.clp.ExecutionBuildContext;
+import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.ValueHandler;
@@ -19,7 +19,7 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
// The first index in the 'bind' function is the variable
// register the variable, if it doesn't already exist, will be a TempTokenVariable if it does not already exist
if ( index == 0 && (valueHandler instanceof TempTokenVariable) ) {
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/ForeachFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/ForeachFunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/ForeachFunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,6 +1,6 @@
package org.drools.clp.functions;
-import org.drools.clp.ExecutionBuildContext;
+import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.ValueHandler;
@@ -21,7 +21,7 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
// The first index in the 'foreach' function is the variable
// register the variable, if it doesn't already exist, will be a TempTokenVariable if it does not already exist
if ( index == 0 && (valueHandler instanceof TempTokenVariable) ) {
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,6 +1,6 @@
package org.drools.clp.functions;
-import org.drools.clp.ExecutionBuildContext;
+import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.LispForm;
@@ -25,7 +25,7 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
// We need to determine and store the 'else' location so that we don't have to "seach" for it at runtime
// we rewrite the conditional function into a list, the first element stores the original
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,6 +1,6 @@
package org.drools.clp.functions;
-import org.drools.clp.ExecutionBuildContext;
+import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.LispForm;
@@ -23,7 +23,7 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
if ( index == 0 ) {
// swap the element for an equality check
FunctionCaller switchCaller = new FunctionCaller( context.getFunctionRegistry().getFunction( "eq" ) );
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,6 +1,6 @@
package org.drools.clp.functions;
-import org.drools.clp.ExecutionBuildContext;
+import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.LispForm;
@@ -9,7 +9,7 @@
import org.drools.clp.valuehandlers.BaseValueHandler;
import org.drools.clp.valuehandlers.BooleanValueHandler;
import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.TempTokenVariable;
public class SwitchFunction extends BaseFunction
@@ -24,9 +24,9 @@
public ValueHandler addParameterCallback(int index,
FunctionCaller caller,
ValueHandler valueHandler,
- ExecutionBuildContext context) {
+ BuildContext context) {
if ( index == 0 ) {
- if ( !(valueHandler instanceof LocalVariableValue ) ) {
+ if ( !(valueHandler instanceof IndexedLocalVariableValue ) ) {
// this should already be bound as a local variable
throw new RuntimeException( "The variable must already have been declared to use it in a switch statement" );
} else {
Copied: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/IndexedLocalVariableValue.java (from rev 11697, labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/LocalVariableValue.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/IndexedLocalVariableValue.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/IndexedLocalVariableValue.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -0,0 +1,64 @@
+package org.drools.clp.valuehandlers;
+
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+import org.drools.clp.VariableValueHandler;
+
+
+public class IndexedLocalVariableValue extends BaseValueHandler implements VariableValueHandler {
+ private static final long serialVersionUID = 320L;
+
+ /** The identifier for the variable. */
+ private final String identifier;
+ private final int index;
+
+ /**
+ * Construct.
+ *
+ * @param identifier
+ * The name of the variable.
+ */
+ public IndexedLocalVariableValue(final String identifier, final int index) {
+ this.identifier = identifier;
+ this.index = index;
+ }
+
+ /**
+ * Retrieve the variable's identifier.
+ *
+ * @return The variable's identifier.
+ */
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public int getValueType(ExecutionContext context) {
+ return context.getLocalVariable( this.index ).getValueType( context );
+ }
+
+ public Object getObject(ExecutionContext context) {
+ return getValue(context).getObject( context );
+ }
+
+ public ValueHandler getValue(ExecutionContext context) {
+ ValueHandler valueHandler = context.getLocalVariable( this.index );
+ ValueHandler nested;
+ while ( (nested = valueHandler.getValue( context ) ) != null ) {
+ valueHandler = nested;
+ }
+ return valueHandler;
+ }
+
+ public void setValue(ExecutionContext context,
+ Object object) {
+ context.setLocalVariable( this.index, (ValueHandler) object );
+ }
+
+ public String toString() {
+ String name = getClass().getName();
+ name = name.substring( name.lastIndexOf( "." ) + 1 );
+ return "[" + name + " identifier = '" + getIdentifier() + "']";
+ }
+
+}
+
Deleted: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/LocalVariableValue.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/LocalVariableValue.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/LocalVariableValue.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -1,64 +0,0 @@
-package org.drools.clp.valuehandlers;
-
-import org.drools.clp.ExecutionContext;
-import org.drools.clp.ValueHandler;
-import org.drools.clp.VariableValueHandler;
-
-
-public class LocalVariableValue extends BaseValueHandler implements VariableValueHandler {
- private static final long serialVersionUID = 320L;
-
- /** The identifier for the variable. */
- private final String identifier;
- private final int index;
-
- /**
- * Construct.
- *
- * @param identifier
- * The name of the variable.
- */
- public LocalVariableValue(final String identifier, final int index) {
- this.identifier = identifier;
- this.index = index;
- }
-
- /**
- * Retrieve the variable's identifier.
- *
- * @return The variable's identifier.
- */
- public String getIdentifier() {
- return this.identifier;
- }
-
- public int getValueType(ExecutionContext context) {
- return context.getLocalVariable( this.index ).getValueType( context );
- }
-
- public Object getObject(ExecutionContext context) {
- return getValue(context).getObject( context );
- }
-
- public ValueHandler getValue(ExecutionContext context) {
- ValueHandler valueHandler = context.getLocalVariable( this.index );
- ValueHandler nested;
- while ( (nested = valueHandler.getValue( context ) ) != null ) {
- valueHandler = nested;
- }
- return valueHandler;
- }
-
- public void setValue(ExecutionContext context,
- Object object) {
- context.setLocalVariable( this.index, (ValueHandler) object );
- }
-
- public String toString() {
- String name = getClass().getName();
- name = name.substring( name.lastIndexOf( "." ) + 1 );
- return "[" + name + " identifier = '" + getIdentifier() + "']";
- }
-
-}
-
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/NamedShellVariableValue.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/NamedShellVariableValue.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/NamedShellVariableValue.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -0,0 +1,62 @@
+package org.drools.clp.valuehandlers;
+
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+import org.drools.clp.VariableValueHandler;
+
+
+public class NamedShellVariableValue extends BaseValueHandler implements VariableValueHandler {
+ private static final long serialVersionUID = 320L;
+
+ /** The identifier for the variable. */
+ private final String identifier;
+
+ /**
+ * Construct.
+ *
+ * @param identifier
+ * The name of the variable.
+ */
+ public NamedShellVariableValue(final String identifier) {
+ this.identifier = identifier;
+ }
+
+ /**
+ * Retrieve the variable's identifier.
+ *
+ * @return The variable's identifier.
+ */
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public int getValueType(ExecutionContext context) {
+ return context.getShellVariable( this.identifier ).getValueType( context );
+ }
+
+ public Object getObject(ExecutionContext context) {
+ return getValue(context).getObject( context );
+ }
+
+ public ValueHandler getValue(ExecutionContext context) {
+ ValueHandler valueHandler = context.getShellVariable( this.identifier );
+ ValueHandler nested;
+ while ( (nested = valueHandler.getValue( context ) ) != null ) {
+ valueHandler = nested;
+ }
+ return valueHandler;
+ }
+
+ public void setValue(ExecutionContext context,
+ Object object) {
+ context.setShellVariable( this.identifier, (ValueHandler) object );
+ }
+
+ public String toString() {
+ String name = getClass().getName();
+ name = name.substring( name.lastIndexOf( "." ) + 1 );
+ return "[" + name + " identifier = '" + getIdentifier() + "']";
+ }
+
+}
+
Modified: labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g 2007-05-07 23:18:42 UTC (rev 11726)
@@ -219,17 +219,49 @@
}
;
*/
-
+/*
eval_script[ParserHandler parserHandler]
: ( r=defrule { parserHandler.ruleDescrHandler( r ); }
| e=execution_block { parserHandler.lispFormHandler( e ); }
- )
+ )*
;
+*/
+
+execution_list returns[ExecutionEngine engine]
+ @init {
+ engine = new BlockExecutionEngine();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ }
+ :
+ (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })
+ ;
+
-deffunction
- :
+deffunction returns[Deffunction function]
+ @init {
+ BuildContext context;
+ }
+ : loc=LEFT_PAREN
+ DEFFUNCTION
+ ruleName=NAME {
+ function = new Deffunction( ruleName.getText() );
+ functionRegistry.addFunction( function );
+ context = new ExecutionBuildContext( function, functionRegistry );
+ }
+ deffunction_params[context]?
+ (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
+ RIGHT_PAREN
;
+
+deffunction_params[BuildContext context]
+ : loc=LEFT_PAREN
+ (v=VAR {
+ // this creates a parameter on the underlying function
+ context.createLocalVariable( v.getText() );
+ })*
+ RIGHT_PAREN
+ ;
defrule returns [RuleDescr rule]
@init {
@@ -319,7 +351,7 @@
execution_block returns[ExecutionEngine engine]
@init {
engine = new BlockExecutionEngine();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
}
:
@@ -382,7 +414,7 @@
@init {
EvalDescr evalDescr= null;
ExecutionEngine engine = new CLPEval();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
}
: LEFT_PAREN
TEST {
@@ -479,7 +511,7 @@
predicate_constraint[String op, PatternDescr pattern]
@init {
ExecutionEngine engine = new CLPPredicate();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
}
: COLON
fc=lisp_list[context, new LispForm(context)] {
@@ -493,7 +525,7 @@
return_value_restriction[String op, FieldConstraintDescr fc]
@init {
ExecutionEngine engine = new CLPReturnValue();
- ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
}
: EQUALS
func=lisp_list[context, new LispForm(context)] {
@@ -519,7 +551,7 @@
}
;
-lisp_list[ExecutionBuildContext context, LispList list] returns[ValueHandler valueHandler]
+lisp_list[BuildContext context, LispList list] returns[ValueHandler valueHandler]
: LEFT_PAREN
( a=lisp_atom[context] { list.add( a ); }
| a=lisp_list[context, list.createList()] { list.add( a ); }
@@ -528,7 +560,7 @@
{ valueHandler = list.getValueHandler(); }
;
-lisp_atom[ExecutionBuildContext context] returns[ValueHandler value]
+lisp_atom[BuildContext context] returns[ValueHandler value]
@init {
value = null;
}
@@ -564,18 +596,19 @@
{ $channel=HIDDEN; }
;
-DEFRULE : 'defrule';
-OR : 'or';
-AND : 'and';
-NOT : 'not';
-EXISTS : 'exists';
-TEST : 'test';
+DEFRULE : 'defrule';
+DEFFUNCTION : 'defunction';
+OR : 'or';
+AND : 'and';
+NOT : 'not';
+EXISTS : 'exists';
+TEST : 'test';
-NULL : 'null';
+NULL : 'null';
-DECLARE : 'declare';
+DECLARE : 'declare';
-SALIENCE: 'salience';
+SALIENCE : 'salience';
//MODIFY : 'modify';
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/AddFunctionTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/AddFunctionTest.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/AddFunctionTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -11,7 +11,7 @@
import org.drools.clp.valuehandlers.CLPLocalDeclarationVariable;
import org.drools.clp.valuehandlers.CLPPreviousDeclarationVariable;
import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.ObjectValueHandler;
import org.drools.clp.valuehandlers.TempTokenVariable;
import org.drools.common.InternalFactHandle;
@@ -88,7 +88,7 @@
pattern1 ) ) );
ValueHandler val1 = new TempTokenVariable( "pd" );
- ValueHandler val2 = new LocalVariableValue( "lv",
+ ValueHandler val2 = new IndexedLocalVariableValue( "lv",
0 );
ValueHandler val3 = new TempTokenVariable( "ld" );
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/BlockExecutionTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/BlockExecutionTest.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/BlockExecutionTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -23,7 +23,7 @@
public void testAddWithModify() {
BlockExecutionEngine engine = new BlockExecutionEngine();
- ExecutionBuildContext build = new ExecutionBuildContext(engine, this.registry );
+ BuildContext build = new ExecutionBuildContext(engine, this.registry );
FunctionCaller addCaller = new FunctionCaller( new PlusFunction() );
addCaller.addParameter( new ObjectValueHandler( new BigDecimal( 20) ) );
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/CompiledFunctionsTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/CompiledFunctionsTest.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/CompiledFunctionsTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -6,7 +6,9 @@
import java.io.PrintStream;
import java.io.Reader;
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.antlr.runtime.ANTLRStringStream;
@@ -15,7 +17,7 @@
import org.antlr.runtime.TokenStream;
import org.drools.Person;
import org.drools.clp.valuehandlers.ListValueHandler;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.LongValueHandler;
import org.drools.clp.valuehandlers.ObjectValueHandler;
import org.drools.compiler.SwitchingCommonTokenStream;
@@ -26,7 +28,7 @@
private CLPParser parser;
public void testPrintout() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(printout d xx (eq 1 1) ?c (create$ (+ 1 1) x y) zzz)" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(printout d xx (eq 1 1) ?c (create$ (+ 1 1) x y) zzz)" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
1 );
@@ -45,7 +47,7 @@
}
public void testBindAndModify() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (+ 20 11) ) (modify ?p (age ?x) )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (+ 20 11) ) (modify ?p (age ?x) )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
2 );
@@ -63,7 +65,7 @@
}
public void testSimpleCreate$() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (create$ 1 2 3) )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (create$ 1 2 3) )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
1 );
@@ -83,7 +85,7 @@
}
public void testNestedCreate$() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (create$ 1 2 (+ 1 2) ) ) (bind ?y (create$ (+ 1 0) ?x (create$ a b ?x (+ 1 1) ) 3) )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (create$ 1 2 (+ 1 2) ) ) (bind ?y (create$ (+ 1 0) ?x (create$ a b ?x (+ 1 1) ) 3) )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
2 );
@@ -130,7 +132,7 @@
}
public void testIf() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(if (< ?x ?y ) then (modify ?p (age 15) ) (printout d 15) else (modify ?p (age 5)) (printout d 5) )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(if (< ?x ?y ) then (modify ?p (age 15) ) (printout d 15) else (modify ?p (age 5)) (printout d 5) )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
2 );
@@ -141,7 +143,7 @@
vars.put( "?x",
new LongValueHandler( 10 ) );
vars.put( "?y",
- new LocalVariableValue( "?y",
+ new IndexedLocalVariableValue( "?y",
0 ) );
vars.put( "?p",
new ObjectValueHandler( p ) );
@@ -168,7 +170,7 @@
}
public void testWhile() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(while (< ?x ?y) do (bind ?x (+ ?x 1)) (printout d ?x \" \") )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(while (< ?x ?y) do (bind ?x (+ ?x 1)) (printout d ?x \" \") )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
2 );
@@ -176,10 +178,10 @@
Map vars = new HashMap();
vars.put( "?x",
- new LocalVariableValue( "?x",
+ new IndexedLocalVariableValue( "?x",
0 ) );
vars.put( "?y",
- new LocalVariableValue( "?y",
+ new IndexedLocalVariableValue( "?y",
1 ) );
engine.replaceTempTokens( vars );
@@ -199,7 +201,7 @@
}
public void testForeach() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x 0) (foreach ?e (create$ 1 2 3) (bind ?x (+ ?x ?e) ) (printout d ?x \" \") )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x 0) (foreach ?e (create$ 1 2 3) (bind ?x (+ ?x ?e) ) (printout d ?x \" \") )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
2 );
@@ -215,7 +217,7 @@
}
public void testSwitch() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?cheese ?var) (switch ?cheese (case stilton then (bind ?x ?cheese ) (break) ) (case cheddar then (bind ?x ?cheese ) (break) ) (default (bind ?x \"default\" ) ) )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?cheese ?var) (switch ?cheese (case stilton then (bind ?x ?cheese ) (break) ) (case cheddar then (bind ?x ?cheese ) (break) ) (default (bind ?x \"default\" ) ) )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
3 );
@@ -223,7 +225,7 @@
Map vars = new HashMap();
vars.put( "?var",
- new LocalVariableValue( "?var",
+ new IndexedLocalVariableValue( "?var",
2 ) );
engine.replaceTempTokens( vars );
@@ -250,7 +252,7 @@
}
public void testProgn() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?n 2) (while (progn (bind ?n (* ?n ?n)) (< ?n 1000)) do (printout d ?n) )" ).rhs();
+ BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?n 2) (while (progn (bind ?n (* ?n ?n)) (< ?n 1000)) do (printout d ?n) )" ).execution_block();
ExecutionContext context = new ExecutionContext( null,
null,
2 );
@@ -264,10 +266,22 @@
}
public void testFactorial() throws Exception {
- BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(deffunction factorial (?n) (if (>= ?n 1) then (* ?n (factorial (- ?n 1))) else 1))" ).rhs();
- //engine.ex
- }
+ Deffunction engine = (Deffunction) parse( "(deffunction factorial (?n) (if (>= ?n 1) then (* ?n (factorial (- ?n 1))) else 1)) " ).deffunction();
+
+ ExecutionContext context = new ExecutionContext( null,
+ null,
+ 1 );
+ ByteArrayOutputStream bais = new ByteArrayOutputStream();
+ context.addPrintoutRouter( "d", new PrintStream(bais) );
+
+ //engine.execute( context );
+ engine.execute( new ValueHandler[] { new LongValueHandler( 6 ) }, context );
+
+
+ assertEquals( "416256", new String( bais.toByteArray() ) );
+ }
+
private CLPParser parse(final String text) throws Exception {
this.parser = newParser( newTokenStream( newLexer( newCharStream( text ) ) ) );
return this.parser;
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/DeffunctionTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/DeffunctionTest.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/DeffunctionTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -4,7 +4,7 @@
import org.drools.clp.functions.PlusFunction;
import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.LongValueHandler;
import junit.framework.TestCase;
@@ -12,13 +12,10 @@
public class DeffunctionTest extends TestCase {
public void test1() {
Deffunction function = new Deffunction("x");
+
+ ValueHandler a = function.addParameter( "a" );
+ ValueHandler b =function.addParameter( "b" );
- ValueHandler a = new LocalVariableValue("a", 0);
- function.addParameter( a );
-
- ValueHandler b = new LocalVariableValue("b", 1);
- function.addParameter( b );
-
Function add = new PlusFunction();
FunctionCaller caller = new FunctionCaller(add);
caller.addParameter( a );
@@ -27,10 +24,10 @@
function.addFunction( caller );
ExecutionContext context = new ExecutionContext(null, null, 2);
- ValueHandler q = new LocalVariableValue("q", 0);
+ ValueHandler q = new IndexedLocalVariableValue("q", 0);
q.setValue( context, new LongValueHandler( 10 ) );
- ValueHandler w = new LocalVariableValue("w", 1);
+ ValueHandler w = new IndexedLocalVariableValue("w", 1);
w.setValue( context, new LongValueHandler( 7 ) );
assertEquals( new BigDecimal( 17 ), function.execute( new ValueHandler[] { q, w }, context ).getBigDecimalValue( context ) );
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -46,7 +46,7 @@
}
public void testParseFunction() throws Exception {
- ExecutionBuildContext context = new ExecutionBuildContext( new CLPPredicate(), this.registry );
+ BuildContext context = new ExecutionBuildContext( new CLPPredicate(), this.registry );
FunctionCaller fc = ( FunctionCaller ) parse( "(< 1 2)" ).lisp_list( context, new LispForm(context) );
assertEquals( "<", fc.getName() );
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ModifyFunctionTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ModifyFunctionTest.java 2007-05-07 23:08:58 UTC (rev 11725)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ModifyFunctionTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -3,7 +3,7 @@
import org.drools.Person;
import org.drools.clp.functions.ModifyFunction;
import org.drools.clp.valuehandlers.ListValueHandler;
-import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
import org.drools.clp.valuehandlers.ObjectValueHandler;
import junit.framework.TestCase;
@@ -16,7 +16,7 @@
ExecutionContext context = new ExecutionContext(null, null, 1);
//context.setLocalVariable( 0, p );
- LocalVariableValue var = new LocalVariableValue("p", 0);
+ IndexedLocalVariableValue var = new IndexedLocalVariableValue("p", 0);
var.setValue( context, new ObjectValueHandler( p ) );
ListValueHandler list = new ListValueHandler();
Added: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java 2007-05-07 23:18:42 UTC (rev 11726)
@@ -0,0 +1,5 @@
+package org.drools.clp;
+
+public class ShellTest {
+
+}
More information about the jboss-svn-commits
mailing list