[jboss-svn-commits] JBL Code SVN: r13945 - in labs/jbossrules/trunk/drools-clips: src/main/java/org/drools and 11 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 1 21:25:41 EDT 2007
Author: mark.proctor at jboss.com
Date: 2007-08-01 21:25:41 -0400 (Wed, 01 Aug 2007)
New Revision: 13945
Added:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/base/
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/base/clp/
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/base/clp/CLPConsequence.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContextImpl.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialect.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialectConfiguration.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClpConsequenceBuilder.java
Removed:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/NamedShellVariableValue.java
Modified:
labs/jbossrules/trunk/drools-clips/.classpath
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/ExecutionContext.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ParserHandler.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/PrintoutFunction.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
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
Log:
-Start of creating eclipse Dialect for the ClipsConsequenceBuilder
Modified: labs/jbossrules/trunk/drools-clips/.classpath
===================================================================
--- labs/jbossrules/trunk/drools-clips/.classpath 2007-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/.classpath 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,19 +1,19 @@
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
- <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
- <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar" sourcepath="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/3.2.3.v_686_R32x/core-3.2.3.v_686_R32x.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/drools/drools-core/4.0.0.SNAPSHOT/drools-core-4.0.0.SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/drools/drools-compiler/4.0.0.SNAPSHOT/drools-compiler-4.0.0.SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/antlr/antlr-runtime/3.0/antlr-runtime-3.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O.jar" sourcepath="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mvel/mvel14/1.2pre2/mvel14-1.2pre2.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/janino/janino/2.5.7/janino-2.5.7.jar"/>
- <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0.jar" sourcepath="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0-sources.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/xstream/xstream/1.1.3/xstream-1.1.3.jar" sourcepath="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/antlr/antlr-runtime/3.0/antlr-runtime-3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O.jar" sourcepath="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mvel/mvel14/1.2pre2/mvel14-1.2pre2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/janino/janino/2.5.7/janino-2.5.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0.jar" sourcepath="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0-sources.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/drools-compiler"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/drools-core"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/base/clp/CLPConsequence.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/base/clp/CLPConsequence.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/base/clp/CLPConsequence.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -0,0 +1,15 @@
+package org.drools.base.clp;
+
+import org.drools.WorkingMemory;
+import org.drools.spi.Consequence;
+import org.drools.spi.KnowledgeHelper;
+
+public class CLPConsequence implements Consequence {
+
+ public void evaluate(KnowledgeHelper knowledgeHelper,
+ WorkingMemory workingMemory) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+}
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/BlockExecutionEngine.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -42,7 +42,7 @@
public void execute(InternalWorkingMemory workingMemory,
ReteTuple tuple,
Object object) {
- execute( new ExecutionContext( workingMemory,
+ execute( new ExecutionContextImpl( workingMemory,
tuple,
object,
this.index - 1 ) );
@@ -50,7 +50,7 @@
public void execute(InternalWorkingMemory workingMemory,
ReteTuple tuple) {
- execute( new ExecutionContext( workingMemory,
+ execute( new ExecutionContextImpl( workingMemory,
tuple,
this.index - 1 ) );
}
@@ -67,7 +67,7 @@
public void evaluate(KnowledgeHelper knowledgeHelper,
WorkingMemory workingMemory) throws Exception {
- ExecutionContext context = new ExecutionContext( (InternalWorkingMemory) workingMemory,
+ ExecutionContext context = new ExecutionContextImpl( (InternalWorkingMemory) workingMemory,
(ReteTuple) knowledgeHelper.getTuple(),
this.index - 1 );
execute( context );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPEval.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -49,7 +49,7 @@
public boolean evaluate(Tuple tuple,
Declaration[] requiredDeclarations,
WorkingMemory workingMemory) throws Exception {
- ExecutionContext context = new ExecutionContext( (InternalWorkingMemory) workingMemory,
+ ExecutionContext context = new ExecutionContextImpl( (InternalWorkingMemory) workingMemory,
(ReteTuple) tuple,
this.index - 1 );
return this.function.getBooleanValue( context );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,8 +1,8 @@
-// $ANTLR 3.0 /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g 2007-05-24 15:54:48
+// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-07-26 18:28:19
+
+ package org.drools.clp;
- package org.drools.clp;
-
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
@@ -10,60 +10,60 @@
import java.util.Map;
import java.util.HashMap;
public class CLPLexer extends Lexer {
- public static final int EXISTS=16;
+ 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 HexDigit=31;
+ public static final int DEFFUNCTION=5;
+ public static final int ASSIGN_OP=18;
+ public static final int RIGHT_PAREN=8;
+ public static final int NAME=6;
+ public static final int EOL=27;
public static final int DEFRULE=9;
- public static final int HexDigit=31;
- public static final int FLOAT=24;
public static final int TILDE=21;
- public static final int OR=14;
public static final int PIPE=20;
- public static final int ASSIGN_OP=18;
- public static final int AND=13;
- public static final int EscapeSequence=30;
- public static final int INT=12;
+ public static final int VAR=7;
+ public static final int EXISTS=16;
public static final int SYMBOL=34;
- public static final int LEFT_SQUARE=37;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int NULL=26;
+ public static final int BOOL=25;
public static final int AMPERSAND=19;
- public static final int DECLARE=29;
- public static final int LEFT_CURLY=39;
- public static final int LEFT_PAREN=4;
- public static final int RIGHT_CURLY=40;
- public static final int BOOL=25;
- public static final int DEFFUNCTION=5;
- public static final int WS=28;
- public static final int STRING=10;
+ public static final int SALIENCE=11;
+ public static final int INT=12;
public static final int T42=42;
- public static final int VAR=7;
- public static final int EQUALS=23;
- public static final int UnicodeEscape=32;
- public static final int EOF=-1;
- public static final int EOL=27;
- public static final int NULL=26;
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=29;
+ public static final int LEFT_SQUARE=37;
public static final int OctalEscape=33;
- public static final int SALIENCE=11;
- public static final int MULTI_LINE_COMMENT=41;
- public static final int TEST=17;
- public static final int NAME=6;
- public static final int RIGHT_PAREN=8;
- public static final int NOT=15;
- public static final int RIGHT_SQUARE=38;
+ 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[41+1];
}
- public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g"; }
+ public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
// $ANTLR start T42
public final void mT42() throws RecognitionException {
try {
int _type = T42;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:6:7: ( '=>' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:6:7: '=>'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: ( '=>' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: '=>'
{
match("=>"); if (failed) return ;
@@ -81,10 +81,10 @@
public final void mWS() throws RecognitionException {
try {
int _type = WS;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:596:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:596:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:598:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:598:17: ( ' ' | '\\t' | '\\f' | EOL )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:596:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:598:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -111,35 +111,35 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("596:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+ new NoViableAltException("598:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:596:19: ' '
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:598:19: ' '
{
match(' '); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:597:19: '\\t'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:19: '\\t'
{
match('\t'); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:598:19: '\\f'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:600:19: '\\f'
{
match('\f'); if (failed) return ;
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:599:19: EOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:601:19: EOL
{
mEOL(); if (failed) return ;
@@ -165,8 +165,8 @@
public final void mDEFRULE() throws RecognitionException {
try {
int _type = DEFRULE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:604:12: ( 'defrule' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:604:12: 'defrule'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:606:12: ( 'defrule' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:606:12: 'defrule'
{
match("defrule"); if (failed) return ;
@@ -184,8 +184,8 @@
public final void mDEFFUNCTION() throws RecognitionException {
try {
int _type = DEFFUNCTION;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:605:15: ( 'deffunction' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:605:15: 'deffunction'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:607:15: ( 'deffunction' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:607:15: 'deffunction'
{
match("deffunction"); if (failed) return ;
@@ -203,8 +203,8 @@
public final void mOR() throws RecognitionException {
try {
int _type = OR;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:606:9: ( 'or' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:606:9: 'or'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:9: ( 'or' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:9: 'or'
{
match("or"); if (failed) return ;
@@ -222,8 +222,8 @@
public final void mAND() throws RecognitionException {
try {
int _type = AND;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:607:9: ( 'and' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:607:9: 'and'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:9: ( 'and' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:9: 'and'
{
match("and"); if (failed) return ;
@@ -241,8 +241,8 @@
public final void mNOT() throws RecognitionException {
try {
int _type = NOT;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:608:9: ( 'not' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:608:9: 'not'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: ( 'not' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: 'not'
{
match("not"); if (failed) return ;
@@ -260,8 +260,8 @@
public final void mEXISTS() throws RecognitionException {
try {
int _type = EXISTS;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:609:12: ( 'exists' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:609:12: 'exists'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:12: ( 'exists' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:12: 'exists'
{
match("exists"); if (failed) return ;
@@ -279,8 +279,8 @@
public final void mTEST() throws RecognitionException {
try {
int _type = TEST;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:610:10: ( 'test' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:610:10: 'test'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:10: ( 'test' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:10: 'test'
{
match("test"); if (failed) return ;
@@ -298,8 +298,8 @@
public final void mNULL() throws RecognitionException {
try {
int _type = NULL;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:612:9: ( 'null' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:612:9: 'null'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:614:9: ( 'null' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:614:9: 'null'
{
match("null"); if (failed) return ;
@@ -317,8 +317,8 @@
public final void mDECLARE() throws RecognitionException {
try {
int _type = DECLARE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:614:12: ( 'declare' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:614:12: 'declare'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:616:12: ( 'declare' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:616:12: 'declare'
{
match("declare"); if (failed) return ;
@@ -336,8 +336,8 @@
public final void mSALIENCE() throws RecognitionException {
try {
int _type = SALIENCE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:616:12: ( 'salience' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:616:12: 'salience'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:618:12: ( 'salience' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:618:12: 'salience'
{
match("salience"); if (failed) return ;
@@ -354,10 +354,10 @@
// $ANTLR start EOL
public final void mEOL() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:622:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:622:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:622:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
@@ -376,13 +376,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("622:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+ new NoViableAltException("624:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
throw nvae;
}
switch (alt2) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:622:14: ( '\\r\\n' )=> '\\r\\n'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -390,14 +390,14 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:623:25: '\\r'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:625:25: '\\r'
{
match('\r'); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:624:25: '\\n'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:626:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -419,10 +419,10 @@
public final void mINT() throws RecognitionException {
try {
int _type = INT;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:629:4: ( ( '-' )? ( '0' .. '9' )+ )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:629:4: ( '-' )? ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:4: ( ( '-' )? ( '0' .. '9' )+ )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:4: ( '-' )? ( '0' .. '9' )+
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:629:4: ( '-' )?
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
@@ -431,7 +431,7 @@
}
switch (alt3) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:629:5: '-'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:5: '-'
{
match('-'); if (failed) return ;
@@ -440,7 +440,7 @@
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:629:10: ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -454,7 +454,7 @@
switch (alt4) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:629:11: '0' .. '9'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -485,10 +485,10 @@
public final void mFLOAT() throws RecognitionException {
try {
int _type = FLOAT;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:4: ( '-' )?
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -497,7 +497,7 @@
}
switch (alt5) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:5: '-'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:5: '-'
{
match('-'); if (failed) return ;
@@ -506,7 +506,7 @@
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:10: ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -520,7 +520,7 @@
switch (alt6) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:11: '0' .. '9'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -538,7 +538,7 @@
} while (true);
match('.'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:26: ( '0' .. '9' )+
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -552,7 +552,7 @@
switch (alt7) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:633:27: '0' .. '9'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:635:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -583,7 +583,7 @@
public final void mSTRING() throws RecognitionException {
try {
int _type = STRING;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:8: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:8: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
@@ -596,19 +596,19 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("636:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+ new NoViableAltException("638:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
throw nvae;
}
switch (alt10) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
loop8:
do {
int alt8=3;
@@ -624,14 +624,14 @@
switch (alt8) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:15: EscapeSequence
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:15: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:637:32: ~ ( '\\\\' | '\"' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:32: ~ ( '\\\\' | '\"' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -661,13 +661,13 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:638:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:638:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:638:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\''); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:638:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
loop9:
do {
int alt9=3;
@@ -683,14 +683,14 @@
switch (alt9) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:638:16: EscapeSequence
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:16: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:638:33: ~ ( '\\\\' | '\\'' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:33: ~ ( '\\\\' | '\\'' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -731,8 +731,8 @@
// $ANTLR start HexDigit
public final void mHexDigit() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:642:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:642:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644: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();
@@ -757,7 +757,7 @@
// $ANTLR start EscapeSequence
public final void mEscapeSequence() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:646:9: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:9: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
int alt11=3;
int LA11_0 = input.LA(1);
@@ -795,7 +795,7 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("644:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+ new NoViableAltException("646:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
throw nvae;
}
@@ -804,13 +804,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("644:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+ new NoViableAltException("646:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:646:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648: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' ) {
@@ -828,14 +828,14 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:647:9: UnicodeEscape
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:9: UnicodeEscape
{
mUnicodeEscape(); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:648:9: OctalEscape
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:650:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -852,7 +852,7 @@
// $ANTLR start OctalEscape
public final void mOctalEscape() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
int alt12=3;
int LA12_0 = input.LA(1);
@@ -863,9 +863,9 @@
int LA12_2 = input.LA(3);
if ( ((LA12_2>='0' && LA12_2<='7')) ) {
- int LA12_5 = input.LA(4);
+ int LA12_4 = input.LA(4);
- if ( ((LA12_5>='0' && LA12_5<='7')) ) {
+ if ( ((LA12_4>='0' && LA12_4<='7')) ) {
alt12=1;
}
else {
@@ -886,7 +886,7 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("651:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+ new NoViableAltException("653:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
throw nvae;
}
@@ -894,31 +894,31 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("651:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+ new NoViableAltException("653:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:14: ( '0' .. '3' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:15: '0' .. '3'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:14: ( '0' .. '3' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:15: '0' .. '3'
{
matchRange('0','3'); if (failed) return ;
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:25: ( '0' .. '7' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:26: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:25: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:36: ( '0' .. '7' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:653:37: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:36: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:37: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -928,18 +928,18 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:654:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:654:14: ( '0' .. '7' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:654:15: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:14: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:654:25: ( '0' .. '7' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:654:26: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:25: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -949,11 +949,11 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:655:9: '\\\\' ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:657:9: '\\\\' ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:655:14: ( '0' .. '7' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:655:15: '0' .. '7'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:657:14: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:657:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -973,8 +973,8 @@
// $ANTLR start UnicodeEscape
public final void mUnicodeEscape() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:660:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:660:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -995,10 +995,10 @@
public final void mBOOL() throws RecognitionException {
try {
int _type = BOOL;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:664:4: ( ( 'true' | 'false' ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:664:4: ( 'true' | 'false' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: ( ( 'true' | 'false' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: ( 'true' | 'false' )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:664:4: ( 'true' | 'false' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
@@ -1011,13 +1011,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("664:4: ( 'true' | 'false' )", 13, 0, input);
+ new NoViableAltException("666:4: ( 'true' | 'false' )", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:664:5: 'true'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:5: 'true'
{
match("true"); if (failed) return ;
@@ -1025,7 +1025,7 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:664:12: 'false'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:12: 'false'
{
match("false"); if (failed) return ;
@@ -1049,8 +1049,8 @@
public final void mVAR() throws RecognitionException {
try {
int _type = VAR;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:667:8: ( '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )* )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:667:8: '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669:8: ( '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )* )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669: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') ) {
@@ -1064,7 +1064,7 @@
recover(mse); throw mse;
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:667:38: ( SYMBOL )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669:38: ( SYMBOL )*
loop14:
do {
int alt14=2;
@@ -1077,7 +1077,7 @@
switch (alt14) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:667:38: SYMBOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669:38: SYMBOL
{
mSYMBOL(); if (failed) return ;
@@ -1103,11 +1103,11 @@
public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = SH_STYLE_SINGLE_LINE_COMMENT;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:671:4: ( '#' ( options {greedy=false; } : . )* EOL )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:671:4: '#' ( options {greedy=false; } : . )* EOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:673:4: ( '#' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:673:4: '#' ( options {greedy=false; } : . )* EOL
{
match('#'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:671:8: ( options {greedy=false; } : . )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:673:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1126,7 +1126,7 @@
switch (alt15) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:671:35: .
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:673:35: .
{
matchAny(); if (failed) return ;
@@ -1156,12 +1156,12 @@
public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = C_STYLE_SINGLE_LINE_COMMENT;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:677:4: ( '//' ( options {greedy=false; } : . )* EOL )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:677:4: '//' ( options {greedy=false; } : . )* EOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:679:4: ( '//' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:679:4: '//' ( options {greedy=false; } : . )* EOL
{
match("//"); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:677:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:679:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -1180,7 +1180,7 @@
switch (alt16) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:677:36: .
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:679:36: .
{
matchAny(); if (failed) return ;
@@ -1210,8 +1210,8 @@
public final void mLEFT_PAREN() throws RecognitionException {
try {
int _type = LEFT_PAREN;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:683:4: ( '(' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:683:4: '('
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:685:4: ( '(' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:685:4: '('
{
match('('); if (failed) return ;
@@ -1228,8 +1228,8 @@
public final void mRIGHT_PAREN() throws RecognitionException {
try {
int _type = RIGHT_PAREN;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:687:4: ( ')' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:687:4: ')'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:4: ( ')' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:4: ')'
{
match(')'); if (failed) return ;
@@ -1246,8 +1246,8 @@
public final void mLEFT_SQUARE() throws RecognitionException {
try {
int _type = LEFT_SQUARE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:691:4: ( '[' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:691:4: '['
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:693:4: ( '[' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:693:4: '['
{
match('['); if (failed) return ;
@@ -1264,8 +1264,8 @@
public final void mRIGHT_SQUARE() throws RecognitionException {
try {
int _type = RIGHT_SQUARE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:695:4: ( ']' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:695:4: ']'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:697:4: ( ']' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:697:4: ']'
{
match(']'); if (failed) return ;
@@ -1282,8 +1282,8 @@
public final void mLEFT_CURLY() throws RecognitionException {
try {
int _type = LEFT_CURLY;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:699:4: ( '{' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:699:4: '{'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:4: ( '{' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:4: '{'
{
match('{'); if (failed) return ;
@@ -1300,8 +1300,8 @@
public final void mRIGHT_CURLY() throws RecognitionException {
try {
int _type = RIGHT_CURLY;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:703:4: ( '}' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:703:4: '}'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:705:4: ( '}' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:705:4: '}'
{
match('}'); if (failed) return ;
@@ -1318,8 +1318,8 @@
public final void mTILDE() throws RecognitionException {
try {
int _type = TILDE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:706:9: ( '~' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:706:9: '~'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:9: ( '~' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:9: '~'
{
match('~'); if (failed) return ;
@@ -1336,8 +1336,8 @@
public final void mAMPERSAND() throws RecognitionException {
try {
int _type = AMPERSAND;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:710:4: ( '&' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:710:4: '&'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:4: ( '&' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:4: '&'
{
match('&'); if (failed) return ;
@@ -1354,8 +1354,8 @@
public final void mPIPE() throws RecognitionException {
try {
int _type = PIPE;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:714:4: ( '|' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:714:4: '|'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:4: ( '|' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:4: '|'
{
match('|'); if (failed) return ;
@@ -1372,8 +1372,8 @@
public final void mASSIGN_OP() throws RecognitionException {
try {
int _type = ASSIGN_OP;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:718:4: ( '<-' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:718:4: '<-'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:720:4: ( '<-' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:720:4: '<-'
{
match("<-"); if (failed) return ;
@@ -1391,8 +1391,8 @@
public final void mCOLON() throws RecognitionException {
try {
int _type = COLON;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:721:9: ( ':' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:721:9: ':'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:723:9: ( ':' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:723:9: ':'
{
match(':'); if (failed) return ;
@@ -1409,8 +1409,8 @@
public final void mEQUALS() throws RecognitionException {
try {
int _type = EQUALS;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:723:10: ( '=' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:723:10: '='
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:10: ( '=' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:10: '='
{
match('='); if (failed) return ;
@@ -1427,12 +1427,12 @@
public final void mMULTI_LINE_COMMENT() throws RecognitionException {
try {
int _type = MULTI_LINE_COMMENT;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:726:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:726:4: '/*' ( options {greedy=false; } : . )* '*/'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:728:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:728:4: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*"); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:726:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:728:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -1457,7 +1457,7 @@
switch (alt17) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:726:35: .
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:728:35: .
{
matchAny(); if (failed) return ;
@@ -1488,8 +1488,8 @@
public final void mNAME() throws RecognitionException {
try {
int _type = NAME;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:730:8: ( SYMBOL )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:730:8: SYMBOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:8: ( SYMBOL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:8: SYMBOL
{
mSYMBOL(); if (failed) return ;
@@ -1505,10 +1505,10 @@
// $ANTLR start SYMBOL
public final void mSYMBOL() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:4: ( ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )* )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:4: ( ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )* )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )
int alt18=2;
int LA18_0 = input.LA(1);
@@ -1521,16 +1521,16 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("734:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )", 18, 0, input);
+ new NoViableAltException("736:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )", 18, 0, input);
throw nvae;
}
switch (alt18) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:6: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736: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();
@@ -1550,10 +1550,10 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:734:66: '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:736: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') ) {
@@ -1576,7 +1576,7 @@
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:735:11: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:737:11: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
loop19:
do {
int alt19=2;
@@ -1589,7 +1589,7 @@
switch (alt19) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:735:12: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:737: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();
@@ -1621,236 +1621,236 @@
// $ANTLR end SYMBOL
public void mTokens() throws RecognitionException {
- // /home/etirelli/workspace/jboss/jbossrules/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 )
+ // C:\\dev\\jbossrules\\trunk07\\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 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:10: T42
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: T42
{
mT42(); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:14: WS
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:14: WS
{
mWS(); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:17: DEFRULE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:17: DEFRULE
{
mDEFRULE(); if (failed) return ;
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:25: DEFFUNCTION
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:25: DEFFUNCTION
{
mDEFFUNCTION(); if (failed) return ;
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:37: OR
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:37: OR
{
mOR(); if (failed) return ;
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:40: AND
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:40: AND
{
mAND(); if (failed) return ;
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:44: NOT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:44: NOT
{
mNOT(); if (failed) return ;
}
break;
case 8 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:48: EXISTS
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:48: EXISTS
{
mEXISTS(); if (failed) return ;
}
break;
case 9 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:55: TEST
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:55: TEST
{
mTEST(); if (failed) return ;
}
break;
case 10 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:60: NULL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:60: NULL
{
mNULL(); if (failed) return ;
}
break;
case 11 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:65: DECLARE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:65: DECLARE
{
mDECLARE(); if (failed) return ;
}
break;
case 12 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:73: SALIENCE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:73: SALIENCE
{
mSALIENCE(); if (failed) return ;
}
break;
case 13 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:82: INT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:82: INT
{
mINT(); if (failed) return ;
}
break;
case 14 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:86: FLOAT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:86: FLOAT
{
mFLOAT(); if (failed) return ;
}
break;
case 15 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:92: STRING
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:92: STRING
{
mSTRING(); if (failed) return ;
}
break;
case 16 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:99: BOOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:99: BOOL
{
mBOOL(); if (failed) return ;
}
break;
case 17 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:104: VAR
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:104: VAR
{
mVAR(); if (failed) return ;
}
break;
case 18 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:108: SH_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:108: SH_STYLE_SINGLE_LINE_COMMENT
{
mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 19 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:137: C_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:137: C_STYLE_SINGLE_LINE_COMMENT
{
mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 20 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:165: LEFT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:165: LEFT_PAREN
{
mLEFT_PAREN(); if (failed) return ;
}
break;
case 21 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:176: RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:176: RIGHT_PAREN
{
mRIGHT_PAREN(); if (failed) return ;
}
break;
case 22 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:188: LEFT_SQUARE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:188: LEFT_SQUARE
{
mLEFT_SQUARE(); if (failed) return ;
}
break;
case 23 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:200: RIGHT_SQUARE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:200: RIGHT_SQUARE
{
mRIGHT_SQUARE(); if (failed) return ;
}
break;
case 24 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:213: LEFT_CURLY
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:213: LEFT_CURLY
{
mLEFT_CURLY(); if (failed) return ;
}
break;
case 25 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:224: RIGHT_CURLY
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:224: RIGHT_CURLY
{
mRIGHT_CURLY(); if (failed) return ;
}
break;
case 26 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:236: TILDE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:236: TILDE
{
mTILDE(); if (failed) return ;
}
break;
case 27 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:242: AMPERSAND
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:242: AMPERSAND
{
mAMPERSAND(); if (failed) return ;
}
break;
case 28 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:252: PIPE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:252: PIPE
{
mPIPE(); if (failed) return ;
}
break;
case 29 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:257: ASSIGN_OP
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:257: ASSIGN_OP
{
mASSIGN_OP(); if (failed) return ;
}
break;
case 30 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:267: COLON
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:267: COLON
{
mCOLON(); if (failed) return ;
}
break;
case 31 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:273: EQUALS
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:273: EQUALS
{
mEQUALS(); if (failed) return ;
}
break;
case 32 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:280: MULTI_LINE_COMMENT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:280: MULTI_LINE_COMMENT
{
mMULTI_LINE_COMMENT(); if (failed) return ;
}
break;
case 33 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:1:299: NAME
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:299: NAME
{
mNAME(); if (failed) return ;
@@ -1863,8 +1863,8 @@
// $ANTLR start synpred1
public final void synpred1_fragment() throws RecognitionException {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:622:14: ( '\\r\\n' )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:622:16: '\\r\\n'
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:14: ( '\\r\\n' )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:16: '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -1893,44 +1893,45 @@
static final String DFA20_eotS =
"\1\uffff\1\40\1\uffff\1\2\10\36\1\53\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\53\1\uffff\3\36\1\15\2\36\1\uffff\2\36\4\uffff"+
- "\1\121\2\uffff\2\36\1\uffff\1\125\1\126\5\36\1\134\6\36\1\uffff"+
- "\2\36\2\uffff\3\36\2\uffff\1\145\1\36\1\147\1\150\1\36\1\uffff\4"+
- "\36\1\115\3\36\1\uffff\1\36\2\uffff\3\36\1\150\3\36\1\166\3\36\1"+
- "\172\1\173\1\uffff\3\36\2\uffff\1\176\1\36\1\uffff\1\36\1\u0081"+
- "\1\uffff";
+ "\1\36\1\76\7\36\1\53\1\uffff\3\36\1\15\1\36\1\uffff\3\36\4\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\36\1\u0081\1\uffff";
static final String DFA20_eofS =
"\u0082\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\uffff\1\60\1\42\2\0\1\154\1\0\1\uffff\2\0\4\uffff"+
- "\1\0\2\uffff\1\146\1\154\1\uffff\2\0\1\154\1\163\1\164\1\145\1\151"+
- "\1\0\1\60\3\0\1\163\1\0\1\uffff\2\0\2\uffff\2\165\1\141\2\uffff"+
- "\1\0\1\164\2\0\1\145\1\uffff\1\60\2\0\1\145\1\0\1\156\1\154\1\162"+
- "\1\uffff\1\163\2\uffff\1\156\1\60\2\0\1\143\2\145\1\0\1\143\1\60"+
- "\1\164\2\0\1\uffff\1\145\1\0\1\151\2\uffff\1\0\1\157\1\uffff\1\156"+
- "\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\uffff\1\60\1\42\2\0\1\154\1\uffff\3\0\4\uffff"+
+ "\1\0\2\uffff\1\146\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\2"+
+ "\165\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\156\1\162\1\uffff\1\163\2\uffff\1\156\1\60\2"+
+ "\0\1\145\1\143\1\145\1\0\1\143\1\60\1\0\1\164\1\0\1\uffff\1\145"+
+ "\1\0\1\uffff\1\151\1\uffff\1\0\1\157\1\uffff\1\156\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\uffff\1\71"+
- "\1\165\2\ufffe\1\154\1\ufffe\1\uffff\2\ufffe\4\uffff\1\ufffe\2\uffff"+
- "\1\162\1\154\1\uffff\2\ufffe\1\154\1\163\1\164\1\145\1\151\1\ufffe"+
- "\1\146\3\ufffe\1\163\1\ufffe\1\uffff\2\ufffe\2\uffff\2\165\1\141"+
- "\2\uffff\1\ufffe\1\164\2\ufffe\1\145\1\uffff\1\146\2\ufffe\1\145"+
- "\1\ufffe\1\156\1\154\1\162\1\uffff\1\163\2\uffff\1\156\1\146\2\ufffe"+
- "\1\143\2\145\1\ufffe\1\143\1\146\1\164\2\ufffe\1\uffff\1\145\1\ufffe"+
- "\1\151\2\uffff\1\ufffe\1\157\1\uffff\1\156\1\ufffe\1\uffff";
+ "\1\144\1\154\1\164\1\151\1\165\1\163\1\154\1\ufffe\1\uffff\1\71"+
+ "\1\165\2\ufffe\1\154\1\uffff\3\ufffe\4\uffff\1\ufffe\2\uffff\1\162"+
+ "\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"+
+ "\2\165\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\156\1\162\1\uffff\1\163\2\uffff"+
+ "\1\156\1\146\2\ufffe\1\145\1\143\1\145\1\ufffe\1\143\1\146\1\ufffe"+
+ "\1\164\1\ufffe\1\uffff\1\145\1\ufffe\1\uffff\1\151\1\uffff\1\ufffe"+
+ "\1\157\1\uffff\1\156\1\ufffe\1\uffff";
static final String DFA20_acceptS =
"\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\12\uffff\1\15\6\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\40\2\uffff\1\23\1\35\3\uffff\1\6\1\7\5\uffff\1\16\10\uffff"+
- "\1\12\1\uffff\1\11\1\20\15\uffff\1\10\3\uffff\1\3\1\13\2\uffff\1"+
- "\14\2\uffff\1\4";
+ "\1\32\1\33\1\34\2\uffff\1\41\1\uffff\1\37\12\uffff\1\15\5\uffff"+
+ "\1\22\3\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\2\uffff\1\4";
static final String DFA20_specialS =
"\u0082\uffff}>";
static final String[] DFA20_transitionS = {
@@ -1949,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,9 +1964,9 @@
"\56",
"\1\60",
"",
- "\11\61\2\62\2\61\1\62\22\61\1\62\1\61\1\62\3\61\1\62\1\61\2"+
- "\62\21\61\2\62\2\61\1\62\74\61\1\62\1\61\1\62\uff80\61",
- "\1\63\4\uffff\1\64",
+ "\11\62\2\61\2\62\1\61\22\62\1\61\1\62\1\61\3\62\1\61\1\62\2"+
+ "\61\21\62\2\61\2\62\1\61\74\62\1\61\1\62\1\61\uff80\62",
+ "\1\64\4\uffff\1\63",
"",
"",
"\11\36\2\uffff\2\36\1\uffff\22\36\1\uffff\1\36\1\uffff\3\36"+
@@ -2008,9 +2009,9 @@
"\1\uffff\74\36\1\uffff\1\36\1\uffff\uff80\36",
"",
"\12\106",
- "\1\15\4\uffff\1\110\10\uffff\4\111\4\112\44\uffff\1\110\5\uffff"+
- "\1\110\3\uffff\1\110\7\uffff\1\110\3\uffff\1\110\1\uffff\1\110"+
- "\1\107",
+ "\1\15\4\uffff\1\107\10\uffff\4\111\4\112\44\uffff\1\107\5\uffff"+
+ "\1\107\3\uffff\1\107\7\uffff\1\107\3\uffff\1\107\1\uffff\1\107"+
+ "\1\110",
"\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",
@@ -2018,15 +2019,15 @@
"\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\113",
- "\11\61\2\62\2\61\1\62\22\61\1\62\1\61\1\62\3\61\1\62\1\61\2"+
- "\62\21\61\2\62\2\61\1\62\74\61\1\62\1\61\1\62\uff80\61",
"",
- "\11\116\2\115\2\116\1\115\22\116\1\115\1\116\1\115\3\116\1\115"+
- "\1\116\2\115\1\114\20\116\2\115\2\116\1\115\74\116\1\115\1\116"+
- "\1\115\uff80\116",
- "\11\117\2\120\2\117\1\120\22\117\1\120\1\117\1\120\3\117\1\120"+
- "\1\117\2\120\21\117\2\120\2\117\1\120\74\117\1\120\1\117\1\120"+
- "\uff80\117",
+ "\11\62\2\61\2\62\1\61\22\62\1\61\1\62\1\61\3\62\1\61\1\62\2"+
+ "\61\21\62\2\61\2\62\1\61\74\62\1\61\1\62\1\61\uff80\62",
+ "\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\20\120\2\117\2\120\1\117\74\120\1\117\1\120"+
+ "\1\117\uff80\120",
"",
"",
"",
@@ -2036,16 +2037,16 @@
"\1\36\1\uffff\uff80\36",
"",
"",
- "\1\122\13\uffff\1\123",
+ "\1\123\13\uffff\1\122",
"\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\127",
"\1\130",
"\1\131",
"\1\132",
@@ -2053,10 +2054,10 @@
"\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",
- "\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\21\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1\56\1\15\uff80"+
"\56",
+ "\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\136\3\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1"+
"\56\1\15\uff80\56",
@@ -2064,26 +2065,26 @@
"\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\140",
- "\11\116\2\115\2\116\1\115\22\116\1\115\1\116\1\115\3\116\1\115"+
- "\1\116\2\115\1\114\4\116\1\141\13\116\2\115\2\116\1\115\74\116"+
- "\1\115\1\116\1\115\uff80\116",
+ "\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\116\2\115\2\116\1\115\22\116\1\115\1\116\1\115\3\116\1\115"+
- "\1\116\2\115\1\114\20\116\2\115\2\116\1\115\74\116\1\115\1\116"+
- "\1\115\uff80\116",
- "\11\117\2\120\2\117\1\120\22\117\1\120\1\117\1\120\3\117\1\120"+
- "\1\117\2\120\21\117\2\120\2\117\1\120\74\117\1\120\1\117\1\120"+
- "\uff80\117",
+ "\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\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\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\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"+
@@ -2101,9 +2102,9 @@
"\15\21\56\2\15\2\56\1\15\34\56\1\55\37\56\1\15\1\56\1\15\uff80"+
"\56",
"\1\154",
- "\11\116\2\uffff\2\116\1\uffff\22\116\1\uffff\1\116\1\uffff\3"+
- "\116\1\uffff\1\116\2\uffff\1\114\20\116\2\uffff\2\116\1\uffff"+
- "\74\116\1\uffff\1\116\1\uffff\uff80\116",
+ "\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\155",
"\1\156",
"\1\157",
@@ -2127,10 +2128,10 @@
"\1\36\1\uffff\uff80\36",
"\1\167",
"\12\170\7\uffff\6\170\32\uffff\6\170",
- "\1\171",
"\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",
@@ -2139,9 +2140,9 @@
"\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",
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,91 +1,64 @@
-// $ANTLR 3.0 /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g 2007-05-24 15:54:47
+// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-07-26 18:28:19
+
+ package org.drools.clp;
+
+ import org.drools.clp.valuehandlers.*;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.HashMap;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
- package org.drools.clp;
-
- import java.util.ArrayList;
-import java.util.Iterator;
+
+import org.antlr.runtime.*;
+import java.util.Stack;
import java.util.List;
+import java.util.ArrayList;
-import org.antlr.runtime.BitSet;
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.EarlyExitException;
-import org.antlr.runtime.FailedPredicateException;
-import org.antlr.runtime.MismatchedNotSetException;
-import org.antlr.runtime.MismatchedSetException;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.MismatchedTreeNodeException;
-import org.antlr.runtime.NoViableAltException;
-import org.antlr.runtime.Parser;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.runtime.Token;
-import org.antlr.runtime.TokenStream;
-import org.drools.clp.valuehandlers.BooleanValueHandler;
-import org.drools.clp.valuehandlers.DoubleValueHandler;
-import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.LongValueHandler;
-import org.drools.clp.valuehandlers.ObjectValueHandler;
-import org.drools.lang.descr.AndDescr;
-import org.drools.lang.descr.AttributeDescr;
-import org.drools.lang.descr.ConditionalElementDescr;
-import org.drools.lang.descr.DescrFactory;
-import org.drools.lang.descr.EvalDescr;
-import org.drools.lang.descr.ExistsDescr;
-import org.drools.lang.descr.FieldBindingDescr;
-import org.drools.lang.descr.FieldConstraintDescr;
-import org.drools.lang.descr.LiteralRestrictionDescr;
-import org.drools.lang.descr.NotDescr;
-import org.drools.lang.descr.OrDescr;
-import org.drools.lang.descr.PackageDescr;
-import org.drools.lang.descr.PatternDescr;
-import org.drools.lang.descr.PredicateDescr;
-import org.drools.lang.descr.RestrictionConnectiveDescr;
-import org.drools.lang.descr.ReturnValueRestrictionDescr;
-import org.drools.lang.descr.RuleDescr;
-import org.drools.lang.descr.VariableRestrictionDescr;
-
public class CLPParser extends Parser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "DEFFUNCTION", "NAME", "VAR", "RIGHT_PAREN", "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 EXISTS=16;
- public static final int LEFT_PAREN=4;
+ 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 DEFRULE=9;
+ 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=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=8;
+ public static final int NAME=6;
public static final int WS=28;
- public static final int STRING=10;
- public static final int FLOAT=24;
+ 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 OR=14;
+ public static final int TEST=17;
+ public static final int LEFT_PAREN=4;
+ public static final int DECLARE=29;
public static final int PIPE=20;
- public static final int EQUALS=23;
public static final int VAR=7;
- public static final int ASSIGN_OP=18;
- public static final int UnicodeEscape=32;
- public static final int AND=13;
- public static final int EscapeSequence=30;
- public static final int INT=12;
- public static final int EOF=-1;
- public static final int EOL=27;
- public static final int NULL=26;
- public static final int SYMBOL=34;
+ public static final int EXISTS=16;
public static final int LEFT_SQUARE=37;
- public static final int COLON=22;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
public static final int OctalEscape=33;
- public static final int SALIENCE=11;
- public static final int MULTI_LINE_COMMENT=41;
- public static final int TEST=17;
- public static final int AMPERSAND=19;
- public static final int NAME=6;
- public static final int DECLARE=29;
- public static final int RIGHT_PAREN=8;
- public static final int NOT=15;
- public static final int LEFT_CURLY=39;
- public static final int RIGHT_SQUARE=38;
+ 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);
@@ -93,186 +66,220 @@
public String[] getTokenNames() { return tokenNames; }
- public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g"; }
+ public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
+
+ private PackageDescr packageDescr;
+ private List errors = new ArrayList();
+ private String source = "unknown";
+ private int lineOffset = 0;
+ private DescrFactory factory = new DescrFactory();
+ private boolean parserDebug = false;
+ private FunctionRegistry functionRegistry;
+
+ public void setFunctionRegistry(FunctionRegistry functionRegistry) {
+ this.functionRegistry = functionRegistry;
+ }
+
+ public void setParserDebug(boolean parserDebug) {
+ this.parserDebug = parserDebug;
+ }
+
+ public void debug(String message) {
+ if ( parserDebug )
+ System.err.println( "drl parser: " + message );
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public DescrFactory getFactory() {
+ return factory;
+ }
+
+ public String getSource() {
+ return this.source;
+ }
+
+ public PackageDescr getPackageDescr() {
+ return packageDescr;
+ }
+
+ private int offset(int line) {
+ return line + lineOffset;
+ }
+
+ /**
+ * This will set the offset to record when reparsing. Normally is zero of course
+ */
+ public void setLineOffset(int i) {
+ this.lineOffset = i;
+ }
+
+ private String getString(Token token) {
+ String orig = token.getText();
+ return orig.substring( 1, orig.length() -1 );
+ }
+
+ public void reportError(RecognitionException ex) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( errorRecovery ) {
+ return;
+ }
+ errorRecovery = true;
+
+ ex.line = offset(ex.line); //add the offset if there is one
+ errors.add( ex );
+ }
+
+ /** return the raw RecognitionException errors */
+ public List getErrors() {
+ return errors;
+ }
+
+ /** Return a list of pretty strings summarising the errors */
+ public List getErrorMessages() {
+ List messages = new ArrayList();
+ for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+ messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+ }
+ return messages;
+ }
+
+ /** return true if any parser errors were accumulated */
+ public boolean hasErrors() {
+ return ! errors.isEmpty();
+ }
+
+ /** This will take a RecognitionException, and create a sensible error message out of it */
+ public String createErrorMessage(RecognitionException e)
+ {
+ StringBuffer message = new StringBuffer();
+ message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+ if ( e instanceof MismatchedTokenException ) {
+ MismatchedTokenException mte = (MismatchedTokenException)e;
+ message.append("mismatched token: "+
+ e.token+
+ "; expecting type "+
+ tokenNames[mte.expecting]);
+ }
+ else if ( e instanceof MismatchedTreeNodeException ) {
+ MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+ message.append("mismatched tree node: "+
+ //mtne.foundNode+ FIXME
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
- private PackageDescr packageDescr;
- private List errors = new ArrayList();
- private String source = "unknown";
- private int lineOffset = 0;
- private DescrFactory factory = new DescrFactory();
- private boolean parserDebug = false;
- private FunctionRegistry functionRegistry;
-
- public void setFunctionRegistry(FunctionRegistry functionRegistry) {
- this.functionRegistry = functionRegistry;
- }
-
- public void setParserDebug(boolean parserDebug) {
- this.parserDebug = parserDebug;
- }
-
- public void debug(String message) {
- if ( parserDebug )
- System.err.println( "drl parser: " + message );
- }
-
- public void setSource(String source) {
- this.source = source;
- }
- public DescrFactory getFactory() {
- return factory;
- }
- public String getSource() {
- return this.source;
- }
-
- public PackageDescr getPackageDescr() {
- return packageDescr;
- }
-
- private int offset(int line) {
- return line + lineOffset;
- }
-
- /**
- * This will set the offset to record when reparsing. Normally is zero of course
- */
- public void setLineOffset(int i) {
- this.lineOffset = i;
- }
-
- private String getString(Token token) {
- String orig = token.getText();
- return orig.substring( 1, orig.length() -1 );
- }
-
- public void reportError(RecognitionException ex) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- if ( errorRecovery ) {
- return;
- }
- errorRecovery = true;
- ex.line = offset(ex.line); //add the offset if there is one
- errors.add( ex );
- }
-
- /** return the raw RecognitionException errors */
- public List getErrors() {
- return errors;
- }
-
- /** Return a list of pretty strings summarising the errors */
- public List getErrorMessages() {
- List messages = new ArrayList();
- for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
- messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
- }
- return messages;
- }
-
- /** return true if any parser errors were accumulated */
- public boolean hasErrors() {
- return ! errors.isEmpty();
- }
-
- /** This will take a RecognitionException, and create a sensible error message out of it */
- public String createErrorMessage(RecognitionException e)
+ // $ANTLR start eval_script
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:222:1: eval_script[Shell shell] : (r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* ;
+ public final void eval_script(Shell shell) throws RecognitionException {
+ RuleDescr r = null;
+
+ ValueHandler fc = null;
+
+
+ try {
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:4: ( (r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:4: (r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
{
- StringBuffer message = new StringBuffer();
- message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
- if ( e instanceof MismatchedTokenException ) {
- MismatchedTokenException mte = (MismatchedTokenException)e;
- message.append("mismatched token: "+
- e.token+
- "; expecting type "+
- tokenNames[mte.expecting]);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:4: (r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
+ loop1:
+ do {
+ int alt1=3;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==LEFT_PAREN) ) {
+ int LA1_2 = input.LA(2);
+
+ if ( (LA1_2==DEFRULE) ) {
+ alt1=1;
}
- else if ( e instanceof MismatchedTreeNodeException ) {
- MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
- message.append("mismatched tree node: "+
- //mtne.foundNode+ FIXME
- "; expecting type "+
- tokenNames[mtne.expecting]);
+ else if ( (LA1_2==LEFT_PAREN||(LA1_2>=NAME && LA1_2<=RIGHT_PAREN)||LA1_2==STRING||LA1_2==INT||(LA1_2>=FLOAT && LA1_2<=NULL)) ) {
+ alt1=2;
}
- else if ( e instanceof NoViableAltException ) {
- NoViableAltException nvae = (NoViableAltException)e;
- message.append( "Unexpected token '" + e.token.getText() + "'" );
- /*
- message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
- " state "+nvae.stateNumber+
- " (decision="+nvae.decisionNumber+
- ") no viable alt; token="+
- e.token);
- */
- }
- else if ( e instanceof EarlyExitException ) {
- EarlyExitException eee = (EarlyExitException)e;
- message.append("required (...)+ loop (decision="+
- eee.decisionNumber+
- ") did not match anything; token="+
- e.token);
- }
- else if ( e instanceof MismatchedSetException ) {
- MismatchedSetException mse = (MismatchedSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof MismatchedNotSetException ) {
- MismatchedNotSetException mse = (MismatchedNotSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof FailedPredicateException ) {
- FailedPredicateException fpe = (FailedPredicateException)e;
- message.append("rule "+fpe.ruleName+" failed predicate: {"+
- fpe.predicateText+"}?");
- } else if (e instanceof GeneralParseException) {
- message.append(" " + e.getMessage());
- }
- return message.toString();
- }
-
- void checkTrailingSemicolon(String text, int line) {
- if (text.trim().endsWith( ";" ) ) {
- this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
- }
- }
-
+ }
- // $ANTLR start execution_list
- // /home/etirelli/workspace/jboss/jbossrules/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;
+ switch (alt1) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:7: r= defrule
+ {
+ pushFollow(FOLLOW_defrule_in_eval_script53);
+ r=defrule();
+ _fsp--;
+ shell.ruleDescrHandler( r );
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:225:7: fc= lisp_list[shell, new LispForm(shell) ]
+ {
+ pushFollow(FOLLOW_lisp_list_in_eval_script70);
+ fc=lisp_list(shell, new LispForm(shell) );
+ _fsp--;
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
-
- try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:237:3: ( (fc= lisp_list[context, new LispForm(context) ] ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:237:3: (fc= lisp_list[context, new LispForm(context) ] )
- {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:237:3: (fc= lisp_list[context, new LispForm(context) ] )
- // /home/etirelli/workspace/jboss/jbossrules/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--;
+ shell.lispFormHandler(fc);
- context.addFunction( (FunctionCaller) fc );
+ }
+ break;
- }
+ default :
+ break loop1;
+ }
+ } while (true);
}
@@ -284,13 +291,13 @@
}
finally {
}
- return engine;
+ return ;
}
- // $ANTLR end execution_list
+ // $ANTLR end eval_script
// $ANTLR start deffunction
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:241:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:241:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
public final Deffunction deffunction() throws RecognitionException {
Deffunction function = null;
@@ -300,71 +307,71 @@
ValueHandler fc = null;
-
- BuildContext context;
+
+ BuildContext context;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:245:4: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:245:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:245:4: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:245:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (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);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction103);
+ match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction111);
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 );
+ match(input,NAME,FOLLOW_NAME_in_deffunction120);
+
+ function = new Deffunction( ruleName.getText() );
+ functionRegistry.addFunction( function );
+ context = new ExecutionBuildContext( function, functionRegistry );
loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction120);
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:253:4: (v= VAR )*
- loop1:
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction128);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:253:4: (v= VAR )*
+ loop2:
do {
- int alt1=2;
- int LA1_0 = input.LA(1);
+ int alt2=2;
+ int LA2_0 = input.LA(1);
- if ( (LA1_0==VAR) ) {
- alt1=1;
+ if ( (LA2_0==VAR) ) {
+ alt2=1;
}
- switch (alt1) {
+ switch (alt2) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:253:5: v= VAR
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:253:5: v= VAR
{
v=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_deffunction130);
-
- context.addVariable( function.addParameter( v.getText() ) );
+ match(input,VAR,FOLLOW_VAR_in_deffunction138);
+
+ context.addVariable( function.addParameter( v.getText() ) );
}
break;
default :
- break loop1;
+ break loop2;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction143);
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:257:5: (fc= lisp_list[context, new LispForm(context) ] )*
- loop2:
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction151);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:257:5: (fc= lisp_list[context, new LispForm(context) ] )*
+ loop3:
do {
- int alt2=2;
- int LA2_0 = input.LA(1);
+ int alt3=2;
+ int LA3_0 = input.LA(1);
- if ( (LA2_0==LEFT_PAREN) ) {
- alt2=1;
+ if ( (LA3_0==LEFT_PAREN) ) {
+ alt3=1;
}
- switch (alt2) {
+ switch (alt3) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:257:6: fc= lisp_list[context, new LispForm(context) ]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:257:6: fc= lisp_list[context, new LispForm(context) ]
{
- pushFollow(FOLLOW_lisp_list_in_deffunction152);
+ pushFollow(FOLLOW_lisp_list_in_deffunction160);
fc=lisp_list(context, new LispForm(context) );
_fsp--;
@@ -374,11 +381,11 @@
break;
default :
- break loop2;
+ break loop3;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction163);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction171);
}
@@ -395,7 +402,7 @@
// $ANTLR start defrule
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:271:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:271: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;
@@ -405,73 +412,75 @@
ExecutionEngine engine = null;
-
- rule = null;
- AndDescr lhs = null;
- PatternDescr colum = null;
- AttributeDescr module = null;
+
+ rule = null;
+ AndDescr lhs = null;
+ PatternDescr colum = null;
+ AttributeDescr module = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:278:4: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:278:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:278:4: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:278: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_defrule189);
- match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule197);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule197);
+ match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule205);
ruleName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_defrule201);
-
- debug( "start rule: " + ruleName.getText() );
- String ruleStr = ruleName.getText();
-
- if ( ruleStr.indexOf("::") >= 0 ) {
- String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
- ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
- module = new AttributeDescr( "agenda-group", mod );
- module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
- module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
- module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
- }
-
- rule = new RuleDescr( ruleStr, null );
- if( module != null ) {
- rule.addAttribute( module );
- }
-
- rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ match(input,NAME,FOLLOW_NAME_in_defrule209);
+
+ debug( "start rule: " + ruleName.getText() );
+ String ruleStr = ruleName.getText();
+
+ if ( ruleStr.indexOf("::") >= 0 ) {
+ String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
+ ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
+ module = new AttributeDescr( "agenda-group", mod );
+ module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
+ module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
+ module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
+ }
+
+ rule = new RuleDescr( ruleStr, null );
+ if( module != null ) {
+ rule.addAttribute( module );
+ }
+
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ // not sure how you define where a LHS starts in clips, so just putting it here for now
+ lhs = new AndDescr();
+ rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ rule.addAttribute( new AttributeDescr( "dialect", "clips") );
- // not sure how you define where a LHS starts in clips, so just putting it here for now
- lhs = new AndDescr();
- rule.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
documentation=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_defrule213);
-
- // do nothing here for now
+ match(input,STRING,FOLLOW_STRING_in_defrule221);
+
+ // do nothing here for now
- pushFollow(FOLLOW_ruleAttribute_in_defrule219);
+ pushFollow(FOLLOW_ruleAttribute_in_defrule227);
ruleAttribute(rule);
_fsp--;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:313:3: ( ce[lhs] )*
- loop3:
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:315:3: ( ce[lhs] )*
+ loop4:
do {
- int alt3=2;
- int LA3_0 = input.LA(1);
+ int alt4=2;
+ int LA4_0 = input.LA(1);
- if ( (LA3_0==LEFT_PAREN||LA3_0==VAR) ) {
- alt3=1;
+ if ( (LA4_0==LEFT_PAREN||LA4_0==VAR) ) {
+ alt4=1;
}
- switch (alt3) {
+ switch (alt4) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:313:3: ce[lhs]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:315:3: ce[lhs]
{
- pushFollow(FOLLOW_ce_in_defrule227);
+ pushFollow(FOLLOW_ce_in_defrule235);
ce(lhs);
_fsp--;
@@ -480,17 +489,17 @@
break;
default :
- break loop3;
+ break loop4;
}
} while (true);
- match(input,42,FOLLOW_42_in_defrule236);
- pushFollow(FOLLOW_execution_block_in_defrule245);
+ match(input,42,FOLLOW_42_in_defrule244);
+ pushFollow(FOLLOW_execution_block_in_defrule253);
engine=execution_block();
_fsp--;
rule.setConsequence( engine );
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule254);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule262);
}
@@ -507,57 +516,57 @@
// $ANTLR start ruleAttribute
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:323:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:325: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 {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:325:3: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:325:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:327:3: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:327:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:325:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
- int alt5=2;
- int LA5_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:327:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
- if ( (LA5_0==LEFT_PAREN) ) {
- int LA5_1 = input.LA(2);
+ if ( (LA6_0==LEFT_PAREN) ) {
+ int LA6_1 = input.LA(2);
- if ( (LA5_1==DECLARE) ) {
- alt5=1;
+ if ( (LA6_1==DECLARE) ) {
+ alt6=1;
}
}
- switch (alt5) {
+ switch (alt6) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:325:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:327:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute271);
- match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute273);
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:326:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
- int alt4=2;
- int LA4_0 = input.LA(1);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute279);
+ match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute281);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:328:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+ int alt5=2;
+ int LA5_0 = input.LA(1);
- if ( (LA4_0==LEFT_PAREN) ) {
- alt4=1;
+ if ( (LA5_0==LEFT_PAREN) ) {
+ alt5=1;
}
- switch (alt4) {
+ switch (alt5) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:326:6: LEFT_PAREN d= salience RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:328:6: LEFT_PAREN d= salience RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute280);
- pushFollow(FOLLOW_salience_in_ruleAttribute284);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute288);
+ pushFollow(FOLLOW_salience_in_ruleAttribute292);
d=salience();
_fsp--;
rule.addAttribute( d );
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute288);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute296);
}
break;
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute295);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute303);
}
break;
@@ -580,29 +589,29 @@
// $ANTLR start salience
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:330:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:332:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
public final AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token i=null;
-
- d = null;
+
+ d = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:335:3: (loc= SALIENCE i= INT )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:335:3: loc= SALIENCE i= INT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:3: (loc= SALIENCE i= INT )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:3: loc= SALIENCE i= INT
{
loc=(Token)input.LT(1);
- match(input,SALIENCE,FOLLOW_SALIENCE_in_salience325);
+ match(input,SALIENCE,FOLLOW_SALIENCE_in_salience333);
i=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_salience329);
-
- d = new AttributeDescr( "salience", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
- d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+ match(input,INT,FOLLOW_INT_in_salience337);
+
+ d = new AttributeDescr( "salience", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ d.setEndCharacter( ((CommonToken)i).getStopIndex() );
}
@@ -620,70 +629,70 @@
// $ANTLR start ce
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:345: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\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:347: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 {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:346: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] ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:346: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\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:348: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\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:348: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] )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:346: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 alt6=7;
- int LA6_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:348: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 ( (LA6_0==LEFT_PAREN) ) {
+ if ( (LA7_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
case EXISTS:
{
- alt6=4;
+ alt7=4;
}
break;
- case OR:
+ case NOT:
{
- alt6=2;
+ alt7=3;
}
break;
- case NAME:
+ case OR:
{
- alt6=6;
+ alt7=2;
}
break;
- case NOT:
+ case TEST:
{
- alt6=3;
+ alt7=5;
}
break;
case AND:
{
- alt6=1;
+ alt7=1;
}
break;
- case TEST:
+ case NAME:
{
- alt6=5;
+ alt7=6;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("346: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] )", 6, 1, input);
+ new NoViableAltException("348: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 ( (LA6_0==VAR) ) {
- alt6=7;
+ else if ( (LA7_0==VAR) ) {
+ alt7=7;
}
else {
NoViableAltException nvae =
- new NoViableAltException("346: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] )", 6, 0, input);
+ new NoViableAltException("348: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 (alt6) {
+ switch (alt7) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:346:8: and_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:348:8: and_ce[in_ce]
{
- pushFollow(FOLLOW_and_ce_in_ce355);
+ pushFollow(FOLLOW_and_ce_in_ce363);
and_ce(in_ce);
_fsp--;
@@ -691,9 +700,9 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:347:7: or_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:349:7: or_ce[in_ce]
{
- pushFollow(FOLLOW_or_ce_in_ce365);
+ pushFollow(FOLLOW_or_ce_in_ce373);
or_ce(in_ce);
_fsp--;
@@ -701,9 +710,9 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:348:7: not_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:350:7: not_ce[in_ce]
{
- pushFollow(FOLLOW_not_ce_in_ce374);
+ pushFollow(FOLLOW_not_ce_in_ce382);
not_ce(in_ce);
_fsp--;
@@ -711,9 +720,9 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:349:7: exists_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:351:7: exists_ce[in_ce]
{
- pushFollow(FOLLOW_exists_ce_in_ce383);
+ pushFollow(FOLLOW_exists_ce_in_ce391);
exists_ce(in_ce);
_fsp--;
@@ -721,9 +730,9 @@
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:350:8: eval_ce[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:352:8: eval_ce[in_ce]
{
- pushFollow(FOLLOW_eval_ce_in_ce397);
+ pushFollow(FOLLOW_eval_ce_in_ce405);
eval_ce(in_ce);
_fsp--;
@@ -731,9 +740,9 @@
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:351:7: normal_pattern[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:353:7: normal_pattern[in_ce]
{
- pushFollow(FOLLOW_normal_pattern_in_ce411);
+ pushFollow(FOLLOW_normal_pattern_in_ce419);
normal_pattern(in_ce);
_fsp--;
@@ -741,9 +750,9 @@
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:352:7: bound_pattern[in_ce]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:7: bound_pattern[in_ce]
{
- pushFollow(FOLLOW_bound_pattern_in_ce420);
+ pushFollow(FOLLOW_bound_pattern_in_ce428);
bound_pattern(in_ce);
_fsp--;
@@ -769,37 +778,37 @@
// $ANTLR start execution_block
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:356:1: execution_block returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358: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;
-
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ engine = new BlockExecutionEngine();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:363:3: ( (fc= lisp_list[context, new LispForm(context) ] )* )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:363:3: (fc= lisp_list[context, new LispForm(context) ] )*
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:3: ( (fc= lisp_list[context, new LispForm(context) ] )* )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:3: (fc= lisp_list[context, new LispForm(context) ] )*
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:363:3: (fc= lisp_list[context, new LispForm(context) ] )*
- loop7:
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:3: (fc= lisp_list[context, new LispForm(context) ] )*
+ loop8:
do {
- int alt7=2;
- int LA7_0 = input.LA(1);
+ int alt8=2;
+ int LA8_0 = input.LA(1);
- if ( (LA7_0==LEFT_PAREN) ) {
- alt7=1;
+ if ( (LA8_0==LEFT_PAREN) ) {
+ alt8=1;
}
- switch (alt7) {
+ switch (alt8) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:363:4: fc= lisp_list[context, new LispForm(context) ]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:4: fc= lisp_list[context, new LispForm(context) ]
{
- pushFollow(FOLLOW_lisp_list_in_execution_block452);
+ pushFollow(FOLLOW_lisp_list_in_execution_block460);
fc=lisp_list(context, new LispForm(context) );
_fsp--;
@@ -809,7 +818,7 @@
break;
default :
- break loop7;
+ break loop8;
}
} while (true);
@@ -829,38 +838,38 @@
// $ANTLR start and_ce
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:366:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:368: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;
+
+ AndDescr andDescr= null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:370:4: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:370:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:372:4: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:372:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce480);
- match(input,AND,FOLLOW_AND_in_and_ce485);
-
- andDescr = new AndDescr();
- in_ce.addDescr( andDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce488);
+ match(input,AND,FOLLOW_AND_in_and_ce493);
+
+ andDescr = new AndDescr();
+ in_ce.addDescr( andDescr );
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:375:3: ( ce[andDescr] )+
- int cnt8=0;
- loop8:
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:3: ( ce[andDescr] )+
+ int cnt9=0;
+ loop9:
do {
- int alt8=2;
- int LA8_0 = input.LA(1);
+ int alt9=2;
+ int LA9_0 = input.LA(1);
- if ( (LA8_0==LEFT_PAREN||LA8_0==VAR) ) {
- alt8=1;
+ if ( (LA9_0==LEFT_PAREN||LA9_0==VAR) ) {
+ alt9=1;
}
- switch (alt8) {
+ switch (alt9) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:375:3: ce[andDescr]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:3: ce[andDescr]
{
- pushFollow(FOLLOW_ce_in_and_ce491);
+ pushFollow(FOLLOW_ce_in_and_ce499);
ce(andDescr);
_fsp--;
@@ -869,15 +878,15 @@
break;
default :
- if ( cnt8 >= 1 ) break loop8;
+ if ( cnt9 >= 1 ) break loop9;
EarlyExitException eee =
- new EarlyExitException(8, input);
+ new EarlyExitException(9, input);
throw eee;
}
- cnt8++;
+ cnt9++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce500);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce508);
}
@@ -894,38 +903,38 @@
// $ANTLR start or_ce
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:379:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:381: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;
+
+ OrDescr orDescr= null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:383:4: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:383:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:385:4: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:385:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce528);
- match(input,OR,FOLLOW_OR_in_or_ce533);
-
- orDescr = new OrDescr();
- in_ce.addDescr( orDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce536);
+ match(input,OR,FOLLOW_OR_in_or_ce541);
+
+ orDescr = new OrDescr();
+ in_ce.addDescr( orDescr );
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:388:3: ( ce[orDescr] )+
- int cnt9=0;
- loop9:
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:390:3: ( ce[orDescr] )+
+ int cnt10=0;
+ loop10:
do {
- int alt9=2;
- int LA9_0 = input.LA(1);
+ int alt10=2;
+ int LA10_0 = input.LA(1);
- if ( (LA9_0==LEFT_PAREN||LA9_0==VAR) ) {
- alt9=1;
+ if ( (LA10_0==LEFT_PAREN||LA10_0==VAR) ) {
+ alt10=1;
}
- switch (alt9) {
+ switch (alt10) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:388:3: ce[orDescr]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:390:3: ce[orDescr]
{
- pushFollow(FOLLOW_ce_in_or_ce539);
+ pushFollow(FOLLOW_ce_in_or_ce547);
ce(orDescr);
_fsp--;
@@ -934,15 +943,15 @@
break;
default :
- if ( cnt9 >= 1 ) break loop9;
+ if ( cnt10 >= 1 ) break loop10;
EarlyExitException eee =
- new EarlyExitException(9, input);
+ new EarlyExitException(10, input);
throw eee;
}
- cnt9++;
+ cnt10++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce548);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce556);
}
@@ -959,26 +968,26 @@
// $ANTLR start not_ce
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:392:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394: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;
+
+ NotDescr notDescr= null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:396:4: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:396:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce576);
- match(input,NOT,FOLLOW_NOT_in_not_ce581);
-
- notDescr = new NotDescr();
- in_ce.addDescr( notDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce584);
+ match(input,NOT,FOLLOW_NOT_in_not_ce589);
+
+ notDescr = new NotDescr();
+ in_ce.addDescr( notDescr );
- pushFollow(FOLLOW_ce_in_not_ce587);
+ pushFollow(FOLLOW_ce_in_not_ce595);
ce(notDescr);
_fsp--;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce595);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce603);
}
@@ -995,26 +1004,26 @@
// $ANTLR start exists_ce
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:405:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:407: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;
+
+ ExistsDescr existsDescr= null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:409:4: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:409:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:411:4: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:411:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce624);
- match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce629);
-
- existsDescr = new ExistsDescr();
- in_ce.addDescr( existsDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce632);
+ match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce637);
+
+ existsDescr = new ExistsDescr();
+ in_ce.addDescr( existsDescr );
- pushFollow(FOLLOW_ce_in_exists_ce635);
+ pushFollow(FOLLOW_ce_in_exists_ce643);
ce(existsDescr);
_fsp--;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce643);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce651);
}
@@ -1031,35 +1040,35 @@
// $ANTLR start eval_ce
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:418:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:420: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;
-
- EvalDescr evalDescr= null;
- ExecutionEngine engine = new CLPEval();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ EvalDescr evalDescr= null;
+ ExecutionEngine engine = new CLPEval();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:424:4: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:424:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:426:4: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:426:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce671);
- match(input,TEST,FOLLOW_TEST_in_eval_ce676);
-
- evalDescr = new EvalDescr();
- in_ce.addDescr( evalDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce679);
+ match(input,TEST,FOLLOW_TEST_in_eval_ce684);
+
+ evalDescr = new EvalDescr();
+ in_ce.addDescr( evalDescr );
- pushFollow(FOLLOW_lisp_list_in_eval_ce684);
+ pushFollow(FOLLOW_lisp_list_in_eval_ce692);
fc=lisp_list(context, new LispForm(context));
_fsp--;
-
- engine.addFunction( (FunctionCaller) fc );
- evalDescr.setContent( engine );
+
+ engine.addFunction( (FunctionCaller) fc );
+ evalDescr.setContent( engine );
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce695);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce703);
}
@@ -1076,40 +1085,40 @@
// $ANTLR start normal_pattern
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:436:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:438: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;
-
- PatternDescr pattern = null;
+
+ PatternDescr pattern = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:440:4: ( LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:440:4: LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:442:4: ( LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:442:4: LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern723);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern731);
name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_normal_pattern730);
-
- pattern = new PatternDescr(name.getText());
- in_ce.addDescr( pattern );
+ match(input,NAME,FOLLOW_NAME_in_normal_pattern738);
+
+ pattern = new PatternDescr(name.getText());
+ in_ce.addDescr( pattern );
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:445:3: ( field_constriant[pattern] )*
- loop10:
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:3: ( field_constriant[pattern] )*
+ loop11:
do {
- int alt10=2;
- int LA10_0 = input.LA(1);
+ int alt11=2;
+ int LA11_0 = input.LA(1);
- if ( (LA10_0==LEFT_PAREN) ) {
- alt10=1;
+ if ( (LA11_0==LEFT_PAREN) ) {
+ alt11=1;
}
- switch (alt10) {
+ switch (alt11) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:445:3: field_constriant[pattern]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:3: field_constriant[pattern]
{
- pushFollow(FOLLOW_field_constriant_in_normal_pattern736);
+ pushFollow(FOLLOW_field_constriant_in_normal_pattern744);
field_constriant(pattern);
_fsp--;
@@ -1118,11 +1127,11 @@
break;
default :
- break loop10;
+ break loop11;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern746);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern754);
}
@@ -1139,49 +1148,49 @@
// $ANTLR start bound_pattern
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:451:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:453: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;
-
- PatternDescr pattern = null;
- String identifier = null;
+
+ PatternDescr pattern = null;
+ String identifier = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:456:4: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:456:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:458:4: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:458: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_pattern774);
-
- identifier = var.getText();
+ match(input,VAR,FOLLOW_VAR_in_bound_pattern782);
+
+ identifier = var.getText();
- match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern780);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern782);
+ match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern788);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern790);
name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_bound_pattern786);
-
- pattern = new PatternDescr(name.getText());
- pattern.setIdentifier( identifier );
- in_ce.addDescr( pattern );
+ match(input,NAME,FOLLOW_NAME_in_bound_pattern794);
+
+ pattern = new PatternDescr(name.getText());
+ pattern.setIdentifier( identifier );
+ in_ce.addDescr( pattern );
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:465:3: ( field_constriant[pattern] )*
- loop11:
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:467:3: ( field_constriant[pattern] )*
+ loop12:
do {
- int alt11=2;
- int LA11_0 = input.LA(1);
+ int alt12=2;
+ int LA12_0 = input.LA(1);
- if ( (LA11_0==LEFT_PAREN) ) {
- alt11=1;
+ if ( (LA12_0==LEFT_PAREN) ) {
+ alt12=1;
}
- switch (alt11) {
+ switch (alt12) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:465:3: field_constriant[pattern]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:467:3: field_constriant[pattern]
{
- pushFollow(FOLLOW_field_constriant_in_bound_pattern795);
+ pushFollow(FOLLOW_field_constriant_in_bound_pattern803);
field_constriant(pattern);
_fsp--;
@@ -1190,11 +1199,11 @@
break;
default :
- break loop11;
+ break loop12;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern802);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern810);
}
@@ -1211,34 +1220,34 @@
// $ANTLR start field_constriant
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:469:1: field_constriant[PatternDescr pattern] : LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:471: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;
-
- List list = new ArrayList();
- FieldBindingDescr fbd = null;
- FieldConstraintDescr fc = null;
- String op = "==";
+
+ List list = new ArrayList();
+ FieldBindingDescr fbd = null;
+ FieldConstraintDescr fc = null;
+ String op = "==";
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:477:3: ( LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:477:3: LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:479:3: ( LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:479:3: LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant833);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant841);
f=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_field_constriant837);
-
- fc = new FieldConstraintDescr(f.getText());
- fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
- pattern.addConstraint( fc );
+ match(input,NAME,FOLLOW_NAME_in_field_constriant845);
+
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
+ pattern.addConstraint( fc );
- pushFollow(FOLLOW_connected_constraint_in_field_constriant852);
+ pushFollow(FOLLOW_connected_constraint_in_field_constriant860);
connected_constraint(fc, pattern);
_fsp--;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant858);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant866);
}
@@ -1255,33 +1264,33 @@
// $ANTLR start connected_constraint
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:489:1: connected_constraint[FieldConstraintDescr fc, PatternDescr pattern] : restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:491: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 {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:491:2: ( restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:491:2: restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:493:2: ( restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:493:2: restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
{
- pushFollow(FOLLOW_restriction_in_connected_constraint874);
+ pushFollow(FOLLOW_restriction_in_connected_constraint882);
restriction(fc, pattern);
_fsp--;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:492:2: ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
- int alt12=3;
- int LA12_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:494:2: ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
+ int alt13=3;
+ int LA13_0 = input.LA(1);
- if ( (LA12_0==AMPERSAND) ) {
- alt12=1;
+ if ( (LA13_0==AMPERSAND) ) {
+ alt13=1;
}
- else if ( (LA12_0==PIPE) ) {
- alt12=2;
+ else if ( (LA13_0==PIPE) ) {
+ alt13=2;
}
- switch (alt12) {
+ switch (alt13) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:493:6: AMPERSAND connected_constraint[fc, pattern]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:495:6: AMPERSAND connected_constraint[fc, pattern]
{
- match(input,AMPERSAND,FOLLOW_AMPERSAND_in_connected_constraint886);
+ match(input,AMPERSAND,FOLLOW_AMPERSAND_in_connected_constraint894);
fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
- pushFollow(FOLLOW_connected_constraint_in_connected_constraint895);
+ pushFollow(FOLLOW_connected_constraint_in_connected_constraint903);
connected_constraint(fc, pattern);
_fsp--;
@@ -1289,11 +1298,11 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:496:6: PIPE connected_constraint[fc, pattern]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:498:6: PIPE connected_constraint[fc, pattern]
{
- match(input,PIPE,FOLLOW_PIPE_in_connected_constraint907);
+ match(input,PIPE,FOLLOW_PIPE_in_connected_constraint915);
fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
- pushFollow(FOLLOW_connected_constraint_in_connected_constraint916);
+ pushFollow(FOLLOW_connected_constraint_in_connected_constraint924);
connected_constraint(fc, pattern);
_fsp--;
@@ -1319,30 +1328,30 @@
// $ANTLR start restriction
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:501: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\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:503: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;
-
- String op = "==";
+
+ String op = "==";
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:505:4: ( ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:505:4: ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:507:4: ( ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:507:4: ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:505:4: ( TILDE )?
- int alt13=2;
- int LA13_0 = input.LA(1);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:507:4: ( TILDE )?
+ int alt14=2;
+ int LA14_0 = input.LA(1);
- if ( (LA13_0==TILDE) ) {
- alt13=1;
+ if ( (LA14_0==TILDE) ) {
+ alt14=1;
}
- switch (alt13) {
+ switch (alt14) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:505:5: TILDE
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:507:5: TILDE
{
- match(input,TILDE,FOLLOW_TILDE_in_restriction942);
+ match(input,TILDE,FOLLOW_TILDE_in_restriction950);
op = "!=";
}
@@ -1350,22 +1359,22 @@
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:506:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
- int alt14=4;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:508: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:
{
- alt14=1;
+ alt15=1;
}
break;
case EQUALS:
{
- alt14=2;
+ alt15=2;
}
break;
case VAR:
{
- alt14=3;
+ alt15=3;
}
break;
case NAME:
@@ -1375,21 +1384,21 @@
case BOOL:
case NULL:
{
- alt14=4;
+ alt15=4;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("506:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 14, 0, input);
+ new NoViableAltException("508:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 15, 0, input);
throw nvae;
}
- switch (alt14) {
+ switch (alt15) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:506:5: predicate_constraint[op, pattern]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:508:5: predicate_constraint[op, pattern]
{
- pushFollow(FOLLOW_predicate_constraint_in_restriction958);
+ pushFollow(FOLLOW_predicate_constraint_in_restriction966);
predicate_constraint(op, pattern);
_fsp--;
@@ -1397,9 +1406,9 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:507:7: return_value_restriction[op, fc]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:509:7: return_value_restriction[op, fc]
{
- pushFollow(FOLLOW_return_value_restriction_in_restriction974);
+ pushFollow(FOLLOW_return_value_restriction_in_restriction982);
return_value_restriction(op, fc);
_fsp--;
@@ -1407,9 +1416,9 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:508:7: variable_restriction[op, fc]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:510:7: variable_restriction[op, fc]
{
- pushFollow(FOLLOW_variable_restriction_in_restriction983);
+ pushFollow(FOLLOW_variable_restriction_in_restriction991);
variable_restriction(op, fc);
_fsp--;
@@ -1417,15 +1426,15 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:509:8: lc= literal_restriction
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:511:8: lc= literal_restriction
{
- pushFollow(FOLLOW_literal_restriction_in_restriction995);
+ pushFollow(FOLLOW_literal_restriction_in_restriction1003);
lc=literal_restriction();
_fsp--;
-
- fc.addRestriction( new LiteralRestrictionDescr(op, lc) );
- op = "==";
+
+ fc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+ op = "==";
}
@@ -1449,27 +1458,27 @@
// $ANTLR start predicate_constraint
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:516:1: predicate_constraint[String op, PatternDescr pattern] : COLON fc= lisp_list[context, new LispForm(context)] ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:518: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();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ ExecutionEngine engine = new CLPPredicate();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:521:4: ( COLON fc= lisp_list[context, new LispForm(context)] )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:521:4: COLON fc= lisp_list[context, new LispForm(context)]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:523:4: ( COLON fc= lisp_list[context, new LispForm(context)] )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:523:4: COLON fc= lisp_list[context, new LispForm(context)]
{
- match(input,COLON,FOLLOW_COLON_in_predicate_constraint1037);
- pushFollow(FOLLOW_lisp_list_in_predicate_constraint1043);
+ match(input,COLON,FOLLOW_COLON_in_predicate_constraint1045);
+ pushFollow(FOLLOW_lisp_list_in_predicate_constraint1051);
fc=lisp_list(context, new LispForm(context));
_fsp--;
-
- engine.addFunction( (FunctionCaller) fc );
- pattern.addConstraint( new PredicateDescr( engine ) );
+
+ engine.addFunction( (FunctionCaller) fc );
+ pattern.addConstraint( new PredicateDescr( engine ) );
}
@@ -1487,27 +1496,27 @@
// $ANTLR start return_value_restriction
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:530:1: return_value_restriction[String op, FieldConstraintDescr fc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:532: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();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ ExecutionEngine engine = new CLPReturnValue();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:535:4: ( EQUALS func= lisp_list[context, new LispForm(context)] )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:535:4: EQUALS func= lisp_list[context, new LispForm(context)]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:537:4: ( EQUALS func= lisp_list[context, new LispForm(context)] )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:537:4: EQUALS func= lisp_list[context, new LispForm(context)]
{
- match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1069);
- pushFollow(FOLLOW_lisp_list_in_return_value_restriction1076);
+ match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1077);
+ pushFollow(FOLLOW_lisp_list_in_return_value_restriction1084);
func=lisp_list(context, new LispForm(context));
_fsp--;
-
- engine.addFunction( (FunctionCaller) func );
- fc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
+
+ engine.addFunction( (FunctionCaller) func );
+ fc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
}
@@ -1525,18 +1534,18 @@
// $ANTLR start variable_restriction
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:542:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:544:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
public final void variable_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
Token var=null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:543:4: (var= VAR )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:543:4: var= VAR
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: (var= VAR )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: var= VAR
{
var=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_variable_restriction1097);
-
- fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
+ match(input,VAR,FOLLOW_VAR_in_variable_restriction1105);
+
+ fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
}
@@ -1554,26 +1563,26 @@
// $ANTLR start literal_restriction
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:549:1: literal_restriction returns [String text] : t= literal ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:551:1: literal_restriction returns [String text] : t= literal ;
public final String literal_restriction() throws RecognitionException {
String text = null;
String t = null;
-
- text = null;
+
+ text = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:554:6: (t= literal )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:554:6: t= literal
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:6: (t= literal )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:6: t= literal
{
- pushFollow(FOLLOW_literal_in_literal_restriction1130);
+ pushFollow(FOLLOW_literal_in_literal_restriction1138);
t=literal();
_fsp--;
-
- text = t;
+
+ text = t;
}
@@ -1591,7 +1600,7 @@
// $ANTLR start lisp_list
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:559:1: lisp_list[BuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:561: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;
@@ -1599,29 +1608,29 @@
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:560:4: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:560:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:4: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1149);
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:561:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
- loop15:
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1157);
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
+ loop16:
do {
- int alt15=3;
- int LA15_0 = input.LA(1);
+ int alt16=3;
+ int LA16_0 = input.LA(1);
- if ( ((LA15_0>=NAME && LA15_0<=VAR)||LA15_0==STRING||LA15_0==INT||(LA15_0>=FLOAT && LA15_0<=NULL)) ) {
- alt15=1;
+ if ( ((LA16_0>=NAME && LA16_0<=VAR)||LA16_0==STRING||LA16_0==INT||(LA16_0>=FLOAT && LA16_0<=NULL)) ) {
+ alt16=1;
}
- else if ( (LA15_0==LEFT_PAREN) ) {
- alt15=2;
+ else if ( (LA16_0==LEFT_PAREN) ) {
+ alt16=2;
}
- switch (alt15) {
+ switch (alt16) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:561:6: a= lisp_atom[context]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:6: a= lisp_atom[context]
{
- pushFollow(FOLLOW_lisp_atom_in_lisp_list1159);
+ pushFollow(FOLLOW_lisp_atom_in_lisp_list1167);
a=lisp_atom(context);
_fsp--;
@@ -1630,9 +1639,9 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:562:6: a= lisp_list[context, list.createList()]
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:6: a= lisp_list[context, list.createList()]
{
- pushFollow(FOLLOW_lisp_list_in_lisp_list1175);
+ pushFollow(FOLLOW_lisp_list_in_lisp_list1183);
a=lisp_list(context, list.createList());
_fsp--;
@@ -1642,11 +1651,11 @@
break;
default :
- break loop15;
+ break loop16;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1205);
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1213);
valueHandler = list.getValueHandler();
}
@@ -1664,124 +1673,124 @@
// $ANTLR start lisp_atom
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:568:1: lisp_atom[BuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:570: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;
-
- value = null;
+
+ value = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:573:3: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:573:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:575:3: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:575:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:573:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
- int alt16=7;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:575:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+ int alt17=7;
switch ( input.LA(1) ) {
case VAR:
{
- alt16=1;
+ alt17=1;
}
break;
case STRING:
{
- alt16=2;
+ alt17=2;
}
break;
case NAME:
{
- alt16=3;
+ alt17=3;
}
break;
case FLOAT:
{
- alt16=4;
+ alt17=4;
}
break;
case INT:
{
- alt16=5;
+ alt17=5;
}
break;
case BOOL:
{
- alt16=6;
+ alt17=6;
}
break;
case NULL:
{
- alt16=7;
+ alt17=7;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("573:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 16, 0, input);
+ new NoViableAltException("575:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 17, 0, input);
throw nvae;
}
- switch (alt16) {
+ switch (alt17) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:573:6: t= VAR
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:575:6: t= VAR
{
t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom1242);
+ match(input,VAR,FOLLOW_VAR_in_lisp_atom1250);
value = context.getVariableValueHandler(t.getText() );
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:574:6: t= STRING
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:576:6: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom1254);
+ match(input,STRING,FOLLOW_STRING_in_lisp_atom1262);
value = new ObjectValueHandler( getString( t ) );
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:575:7: t= NAME
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom1266);
+ match(input,NAME,FOLLOW_NAME_in_lisp_atom1274);
value = new ObjectValueHandler( t.getText() );
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:576:6: t= FLOAT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:578:6: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1281);
+ match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1289);
value = new DoubleValueHandler( t.getText() );
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:577:6: t= INT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom1293);
+ match(input,INT,FOLLOW_INT_in_lisp_atom1301);
value = new LongValueHandler( t.getText() );
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:578:6: t= BOOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:6: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1309);
+ match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1317);
value = new BooleanValueHandler( t.getText() );
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:579:6: t= NULL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:581:6: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom1327);
+ match(input,NULL,FOLLOW_NULL_in_lisp_atom1335);
value = ObjectValueHandler.NULL;
}
@@ -1805,110 +1814,110 @@
// $ANTLR start literal
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:583:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:585: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;
Token t=null;
-
- text = null;
+
+ text = null;
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:587:4: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:587:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:589:4: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:589:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:587:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
- int alt17=6;
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:589:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ int alt18=6;
switch ( input.LA(1) ) {
case STRING:
{
- alt17=1;
+ alt18=1;
}
break;
case NAME:
{
- alt17=2;
+ alt18=2;
}
break;
case INT:
{
- alt17=3;
+ alt18=3;
}
break;
case FLOAT:
{
- alt17=4;
+ alt18=4;
}
break;
case BOOL:
{
- alt17=5;
+ alt18=5;
}
break;
case NULL:
{
- alt17=6;
+ alt18=6;
}
break;
default:
NoViableAltException nvae =
- new NoViableAltException("587:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 17, 0, input);
+ new NoViableAltException("589:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 18, 0, input);
throw nvae;
}
- switch (alt17) {
+ switch (alt18) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:587:8: t= STRING
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:589:8: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_literal1363);
+ match(input,STRING,FOLLOW_STRING_in_literal1371);
text = getString( t );
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:588:7: t= NAME
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_literal1376);
+ match(input,NAME,FOLLOW_NAME_in_literal1384);
text = t.getText();
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:589:7: t= INT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:591:7: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_literal1392);
+ match(input,INT,FOLLOW_INT_in_literal1400);
text = t.getText();
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:590:7: t= FLOAT
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:7: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_literal1407);
+ match(input,FLOAT,FOLLOW_FLOAT_in_literal1415);
text = t.getText();
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:591:7: t= BOOL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:7: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_literal1420);
+ match(input,BOOL,FOLLOW_BOOL_in_literal1428);
text = t.getText();
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLP.g:592:7: t= NULL
+ // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:7: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_literal1434);
+ match(input,NULL,FOLLOW_NULL_in_literal1442);
text = null;
}
@@ -1933,106 +1942,107 @@
- 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[]{0x0000000000000010L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction120 = new BitSet(new long[]{0x0000000000000180L});
- public static final BitSet FOLLOW_VAR_in_deffunction130 = new BitSet(new long[]{0x0000000000000180L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction143 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_lisp_list_in_deffunction152 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction163 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_defrule189 = new BitSet(new long[]{0x0000000000000200L});
- public static final BitSet FOLLOW_DEFRULE_in_defrule197 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_defrule201 = new BitSet(new long[]{0x0000000000000400L});
- public static final BitSet FOLLOW_STRING_in_defrule213 = new BitSet(new long[]{0x0000040000000090L});
- public static final BitSet FOLLOW_ruleAttribute_in_defrule219 = new BitSet(new long[]{0x0000040000000090L});
- public static final BitSet FOLLOW_ce_in_defrule227 = new BitSet(new long[]{0x0000040000000090L});
- public static final BitSet FOLLOW_42_in_defrule236 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_execution_block_in_defrule245 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule254 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute271 = new BitSet(new long[]{0x0000000020000000L});
- public static final BitSet FOLLOW_DECLARE_in_ruleAttribute273 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute280 = new BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_salience_in_ruleAttribute284 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute288 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute295 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SALIENCE_in_salience325 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_INT_in_salience329 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_and_ce_in_ce355 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_or_ce_in_ce365 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_not_ce_in_ce374 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_exists_ce_in_ce383 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_eval_ce_in_ce397 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_normal_pattern_in_ce411 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_bound_pattern_in_ce420 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lisp_list_in_execution_block452 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce480 = new BitSet(new long[]{0x0000000000002000L});
- public static final BitSet FOLLOW_AND_in_and_ce485 = new BitSet(new long[]{0x0000000000000090L});
- public static final BitSet FOLLOW_ce_in_and_ce491 = new BitSet(new long[]{0x0000000000000190L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce500 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce528 = new BitSet(new long[]{0x0000000000004000L});
- public static final BitSet FOLLOW_OR_in_or_ce533 = new BitSet(new long[]{0x0000000000000090L});
- public static final BitSet FOLLOW_ce_in_or_ce539 = new BitSet(new long[]{0x0000000000000190L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce548 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce576 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_NOT_in_not_ce581 = new BitSet(new long[]{0x0000000000000090L});
- public static final BitSet FOLLOW_ce_in_not_ce587 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce595 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce624 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_EXISTS_in_exists_ce629 = new BitSet(new long[]{0x0000000000000090L});
- public static final BitSet FOLLOW_ce_in_exists_ce635 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce643 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce671 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_TEST_in_eval_ce676 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_eval_ce684 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce695 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern723 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_normal_pattern730 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_field_constriant_in_normal_pattern736 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern746 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_bound_pattern774 = new BitSet(new long[]{0x0000000000040000L});
- public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern780 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern782 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_bound_pattern786 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_field_constriant_in_bound_pattern795 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern802 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant833 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_NAME_in_field_constriant837 = new BitSet(new long[]{0x0000000007E014C0L});
- public static final BitSet FOLLOW_connected_constraint_in_field_constriant852 = new BitSet(new long[]{0x0000000000000100L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant858 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_restriction_in_connected_constraint874 = new BitSet(new long[]{0x0000000000180002L});
- public static final BitSet FOLLOW_AMPERSAND_in_connected_constraint886 = new BitSet(new long[]{0x0000000007E014C0L});
- public static final BitSet FOLLOW_connected_constraint_in_connected_constraint895 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_PIPE_in_connected_constraint907 = new BitSet(new long[]{0x0000000007E014C0L});
- public static final BitSet FOLLOW_connected_constraint_in_connected_constraint916 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_TILDE_in_restriction942 = new BitSet(new long[]{0x0000000007C014C0L});
- public static final BitSet FOLLOW_predicate_constraint_in_restriction958 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_return_value_restriction_in_restriction974 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_variable_restriction_in_restriction983 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_restriction_in_restriction995 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_COLON_in_predicate_constraint1037 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_predicate_constraint1043 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1069 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_return_value_restriction1076 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_variable_restriction1097 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_literal_restriction1130 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1149 = new BitSet(new long[]{0x00000000070015D0L});
- public static final BitSet FOLLOW_lisp_atom_in_lisp_list1159 = new BitSet(new long[]{0x00000000070015D0L});
- public static final BitSet FOLLOW_lisp_list_in_lisp_list1175 = new BitSet(new long[]{0x00000000070015D0L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1205 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_lisp_atom1242 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_lisp_atom1254 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_lisp_atom1266 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_lisp_atom1281 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_lisp_atom1293 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_lisp_atom1309 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_lisp_atom1327 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_literal1363 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_literal1376 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_literal1392 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_literal1407 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_literal1420 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_literal1434 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_defrule_in_eval_script53 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_lisp_list_in_eval_script70 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction103 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_DEFFUNCTION_in_deffunction111 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_deffunction120 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction128 = new BitSet(new long[]{0x0000000000000180L});
+ public static final BitSet FOLLOW_VAR_in_deffunction138 = new BitSet(new long[]{0x0000000000000180L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction151 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_lisp_list_in_deffunction160 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction171 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_defrule197 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_DEFRULE_in_defrule205 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_defrule209 = new BitSet(new long[]{0x0000000000000400L});
+ public static final BitSet FOLLOW_STRING_in_defrule221 = new BitSet(new long[]{0x0000040000000090L});
+ public static final BitSet FOLLOW_ruleAttribute_in_defrule227 = new BitSet(new long[]{0x0000040000000090L});
+ public static final BitSet FOLLOW_ce_in_defrule235 = new BitSet(new long[]{0x0000040000000090L});
+ public static final BitSet FOLLOW_42_in_defrule244 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_execution_block_in_defrule253 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule262 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute279 = new BitSet(new long[]{0x0000000020000000L});
+ public static final BitSet FOLLOW_DECLARE_in_ruleAttribute281 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute288 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_salience_in_ruleAttribute292 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute296 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute303 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_SALIENCE_in_salience333 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_INT_in_salience337 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_and_ce_in_ce363 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_or_ce_in_ce373 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_not_ce_in_ce382 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_exists_ce_in_ce391 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_eval_ce_in_ce405 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_normal_pattern_in_ce419 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_bound_pattern_in_ce428 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lisp_list_in_execution_block460 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce488 = new BitSet(new long[]{0x0000000000002000L});
+ public static final BitSet FOLLOW_AND_in_and_ce493 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_ce_in_and_ce499 = new BitSet(new long[]{0x0000000000000190L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce508 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce536 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_OR_in_or_ce541 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_ce_in_or_ce547 = new BitSet(new long[]{0x0000000000000190L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce556 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce584 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_NOT_in_not_ce589 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_ce_in_not_ce595 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce603 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce632 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_EXISTS_in_exists_ce637 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_ce_in_exists_ce643 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce651 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce679 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_TEST_in_eval_ce684 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_eval_ce692 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce703 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern731 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_normal_pattern738 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_field_constriant_in_normal_pattern744 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern754 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_bound_pattern782 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern788 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern790 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_bound_pattern794 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_field_constriant_in_bound_pattern803 = new BitSet(new long[]{0x0000000000000110L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern810 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant841 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_NAME_in_field_constriant845 = new BitSet(new long[]{0x0000000007E014C0L});
+ public static final BitSet FOLLOW_connected_constraint_in_field_constriant860 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant866 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_restriction_in_connected_constraint882 = new BitSet(new long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_AMPERSAND_in_connected_constraint894 = new BitSet(new long[]{0x0000000007E014C0L});
+ public static final BitSet FOLLOW_connected_constraint_in_connected_constraint903 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_PIPE_in_connected_constraint915 = new BitSet(new long[]{0x0000000007E014C0L});
+ public static final BitSet FOLLOW_connected_constraint_in_connected_constraint924 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_TILDE_in_restriction950 = new BitSet(new long[]{0x0000000007C014C0L});
+ public static final BitSet FOLLOW_predicate_constraint_in_restriction966 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_return_value_restriction_in_restriction982 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_variable_restriction_in_restriction991 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_restriction_in_restriction1003 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_COLON_in_predicate_constraint1045 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_predicate_constraint1051 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1077 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_return_value_restriction1084 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_variable_restriction1105 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_literal_restriction1138 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1157 = new BitSet(new long[]{0x00000000070015D0L});
+ public static final BitSet FOLLOW_lisp_atom_in_lisp_list1167 = new BitSet(new long[]{0x00000000070015D0L});
+ public static final BitSet FOLLOW_lisp_list_in_lisp_list1183 = new BitSet(new long[]{0x00000000070015D0L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1213 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_lisp_atom1250 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_lisp_atom1262 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_lisp_atom1274 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_lisp_atom1289 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_lisp_atom1301 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_lisp_atom1317 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_lisp_atom1335 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_literal1371 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_literal1384 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_literal1400 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_literal1415 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_literal1428 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_literal1442 = 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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPPredicate.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -50,7 +50,7 @@
Declaration[] previousDeclarations,
Declaration[] localDeclarations,
WorkingMemory workingMemory) throws Exception {
- ExecutionContext context = new ExecutionContext( (InternalWorkingMemory) workingMemory,
+ ExecutionContext context = new ExecutionContextImpl( (InternalWorkingMemory) workingMemory,
(ReteTuple) tuple,
object,
this.index - 1 );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPReturnValue.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -53,7 +53,7 @@
Declaration[] previousDeclarations,
Declaration[] localDeclarations,
WorkingMemory workingMemory) throws Exception {
- ExecutionContext context = new ExecutionContext( (InternalWorkingMemory) workingMemory,
+ ExecutionContext context = new ExecutionContextImpl( (InternalWorkingMemory) workingMemory,
(ReteTuple) tuple,
object,
this.index - 1 );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -84,7 +84,7 @@
private ExecutionContext initContext(ValueHandler[] args,
ExecutionContext context) {
- ExecutionContext newContext = new ExecutionContext( context.getWorkingMemory(),
+ ExecutionContext newContext = new ExecutionContextImpl( context.getWorkingMemory(),
context.getTuple(),
args.length );
for ( int i = 0, length = args.length; i < length; i++ ) {
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContext.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,99 +1,29 @@
package org.drools.clp;
-import java.io.OutputStream;
import java.io.PrintStream;
-import java.util.HashMap;
import java.util.Map;
import org.drools.common.InternalWorkingMemory;
import org.drools.reteoo.ReteTuple;
-public class ExecutionContext {
- private InternalWorkingMemory workingMemory;
- private ReteTuple tuple;
- private Object object;
- private ValueHandler[] localVariables;
- private Map printoutRouters;
- private Shell shell;
+public interface ExecutionContext {
-
- public ExecutionContext(InternalWorkingMemory workingMemory,
- ReteTuple tuple,
- int localVariableSize) {
- this( null, workingMemory, tuple, localVariableSize);
- }
-
- public ExecutionContext(Shell shell,
- InternalWorkingMemory workingMemory,
- ReteTuple tuple,
- int localVariableSize) {
- this( shell,
- workingMemory,
- tuple,
- null,
- localVariableSize );
- }
+ public void setPrintoutRouters(Map printoutRouters);
- public ExecutionContext(InternalWorkingMemory workingMemory,
- 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;
- this.localVariables = new ValueHandler[localVariableSize];
- this.printoutRouters = new HashMap();
- this.printoutRouters.put( "t", System.out );
- }
-
- public void setPrintoutRouters(Map printoutRouters) {
- this.printoutRouters = printoutRouters;
- }
-
- public void addPrintoutRouter(String identifier, PrintStream stream) {
- this.printoutRouters.put( identifier, stream );
- }
-
- public PrintStream getPrintoutRouters(String identifier) {
- return ( PrintStream ) this.printoutRouters.get( identifier );
- }
+ public void addPrintoutRouter(String identifier,
+ PrintStream stream);
- public ReteTuple getTuple() {
- return tuple;
- }
+ public PrintStream getPrintoutRouters(String identifier);
- public InternalWorkingMemory getWorkingMemory() {
- return workingMemory;
- }
+ public InternalWorkingMemory getWorkingMemory();
- public Object getObject() {
- return this.object;
- }
+ public Object getObject();
+
+ public ReteTuple getTuple();
- public ValueHandler getLocalVariable(int index) {
- return localVariables[index];
- }
+ public ValueHandler getLocalVariable(int index);
public void setLocalVariable(int index,
- ValueHandler valueHandler) {
- this.localVariables[index] = valueHandler;
- }
+ ValueHandler valueHandler);
- public ValueHandler getShellVariable(String identifier) {
- return null;
- }
-
- public void setShellVariable(String identifier,
- ValueHandler valueHandler) {
- //this.localVariables[index] = valueHandler;
- }
-}
+}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContextImpl.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContextImpl.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ExecutionContextImpl.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -0,0 +1,94 @@
+package org.drools.clp;
+
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.drools.common.InternalWorkingMemory;
+import org.drools.reteoo.ReteTuple;
+
+public class ExecutionContextImpl implements ExecutionContext {
+ private InternalWorkingMemory workingMemory;
+ private ReteTuple tuple;
+ private Object object;
+ private ValueHandler[] localVariables;
+ private Map printoutRouters;
+
+
+ public ExecutionContextImpl(InternalWorkingMemory workingMemory,
+ ReteTuple tuple,
+ int localVariableSize) {
+ this( workingMemory, tuple, null, localVariableSize);
+ }
+
+
+ public ExecutionContextImpl(InternalWorkingMemory workingMemory,
+ ReteTuple tuple,
+ Object object,
+ int localVariableSize) {
+ this.workingMemory = workingMemory;
+ this.tuple = tuple;
+ this.object = object;
+ this.localVariables = new ValueHandler[localVariableSize];
+ this.printoutRouters = new HashMap();
+ this.printoutRouters.put( "t", System.out );
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#setPrintoutRouters(java.util.Map)
+ */
+ public void setPrintoutRouters(Map printoutRouters) {
+ this.printoutRouters = printoutRouters;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#addPrintoutRouter(java.lang.String, java.io.PrintStream)
+ */
+ public void addPrintoutRouter(String identifier, PrintStream stream) {
+ this.printoutRouters.put( identifier, stream );
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getPrintoutRouters(java.lang.String)
+ */
+ public PrintStream getPrintoutRouters(String identifier) {
+ return ( PrintStream ) this.printoutRouters.get( identifier );
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getTuple()
+ */
+ public ReteTuple getTuple() {
+ return tuple;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getWorkingMemory()
+ */
+ public InternalWorkingMemory getWorkingMemory() {
+ return workingMemory;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getObject()
+ */
+ public Object getObject() {
+ return this.object;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getLocalVariable(int)
+ */
+ public ValueHandler getLocalVariable(int index) {
+ return localVariables[index];
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#setLocalVariable(int, org.drools.clp.ValueHandler)
+ */
+ public void setLocalVariable(int index,
+ ValueHandler valueHandler) {
+ this.localVariables[index] = valueHandler;
+ }
+}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ParserHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ParserHandler.java 2007-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/ParserHandler.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -8,5 +8,5 @@
public void ruleDescrHandler(RuleDescr ruleDescr);
- public void lispFormHandler(ExecutionEngine engine);
+ public void lispFormHandler(ValueHandler valueHandler);
}
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Shell.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,5 +1,6 @@
package org.drools.clp;
+import java.io.PrintStream;
import java.io.Reader;
import java.util.Collections;
import java.util.HashMap;
@@ -17,92 +18,117 @@
import org.drools.RuleBaseFactory;
import org.drools.StatefulSession;
import org.drools.clp.valuehandlers.FunctionCaller;
-import org.drools.clp.valuehandlers.NamedShellVariableValue;
+import org.drools.clp.valuehandlers.IndexedLocalVariableValue;
+import org.drools.clp.valuehandlers.TempTokenVariable;
+import org.drools.common.InternalWorkingMemory;
import org.drools.compiler.PackageBuilder;
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.reteoo.ReteTuple;
import org.drools.spi.GlobalResolver;
-public class Shell implements ParserHandler, GlobalResolver, BuildContext {
- private static final long serialVersionUID = 1L;
- private FunctionRegistry registry;
- private Map variables;
+public class Shell
+ implements
+ ParserHandler,
+ //GlobalResolver,
+ BuildContext,
+ ExecutionContext {
+ private static final long serialVersionUID = 1L;
+ private FunctionRegistry registry;
+
+ private ValueHandler[] variables;
+ private Map vars = new HashMap();
+
private Map properties = Collections.EMPTY_MAP;
+
+ private RuleBase ruleBase;
+ private StatefulSession session;
+
+ private Map printoutRouters;
- private RuleBase ruleBase;
- private StatefulSession session;
-
+ private int index;
+
public Shell() {
this.ruleBase = RuleBaseFactory.newRuleBase();
- this.session = ruleBase.newStatefulSession();
- this.session.setGlobalResolver( this );
- this.variables = new HashMap();
+ this.session = this.ruleBase.newStatefulSession();
+ //this.session.setGlobalResolver( this );
+ this.variables = new ValueHandler[50];
+
+ this.registry = new FunctionRegistry( BuiltinFunctions.getInstance() );
}
-
- public void evalReader(Reader reader) {
+
+ public void evalReader(Reader reader) {
try {
CLPParser parser = new CLPParser( new CommonTokenStream( new DRLLexer( new ANTLRReaderStream( reader ) ) ) );
- evalParser( parser );
- } catch (Exception e) {
- throw new RuntimeException( "Unable to parser Reader", e);
- }
+ evalParser( parser );
+ } catch ( Exception e ) {
+ throw new RuntimeException( "Unable to parser Reader",
+ e );
+ }
}
-
+
public void evalString(String text) {
- CLPParser parser = new CLPParser( newTokenStream( newLexer( newCharStream( text ) ) ) ) ;
+ CLPParser parser = new CLPParser( newTokenStream( newLexer( newCharStream( text ) ) ) );
evalParser( parser );
}
-
+
private void evalParser(CLPParser parser) {
parser.setFunctionRegistry( this.registry );
+ try {
+ parser.eval_script( this );
+ } catch ( Exception e ) {
+ throw new RuntimeException( e );
+ }
//parser.setF
}
-
-// public void functionHandler(FunctionDescr ruleDescr) {
-// throw new RuntimeException( "Drools Clips does not support FunctionDescr" );
-// }
-
-// public void functionHandler(FunctionCaller functionCaller) {
-//
-// }
-
- public void lispFormHandler(ExecutionEngine engine) {
- //engine.
-
+ // public void functionHandler(FunctionDescr ruleDescr) {
+ // throw new RuntimeException( "Drools Clips does not support FunctionDescr" );
+ // }
+
+ // public void functionHandler(FunctionCaller functionCaller) {
+ //
+ // }
+
+ public void lispFormHandler(ValueHandler valueHandler) {
+ ExecutionContext context = new ExecutionContextImpl( null,
+ null,
+ 0 );
+ valueHandler.getValue( context );
}
public void ruleDescrHandler(RuleDescr ruleDescr) {
String module = getModuleName( ruleDescr.getAttributes() );
-
- PackageDescr pkg = new PackageDescr(module);
-
+
+ PackageDescr pkg = new PackageDescr( module );
+ pkg.addRule( ruleDescr );
+
PackageBuilder builder = new PackageBuilder();
- builder.addPackage( pkg );
- }
-
+ builder.addPackage( pkg );
+ }
+
public String getModuleName(List list) {
for ( Iterator it = list.iterator(); it.hasNext(); ) {
- AttributeDescr attr = ( AttributeDescr ) it.next();
+ AttributeDescr attr = (AttributeDescr) it.next();
if ( attr.getName().equals( "agenda-group" ) ) {
return attr.getValue();
}
}
return "MAIN";
- }
-
-// public PackageBuilder getBuilder(String namespace) {
-// PackageBuilder builder = (PackageBuilder) this.packageBulders.get( namespace );
-// if ( builder == null ) {
-// builder = new PackageBuilder();
-// this.packageBulders.put( namespace, builder );
-// }
-// return builder;
-//
-// }
+ }
+ // public PackageBuilder getBuilder(String namespace) {
+ // PackageBuilder builder = (PackageBuilder) this.packageBulders.get( namespace );
+ // if ( builder == null ) {
+ // builder = new PackageBuilder();
+ // this.packageBulders.put( namespace, builder );
+ // }
+ // return builder;
+ //
+ // }
+
private CharStream newCharStream(final String text) {
return new ANTLRStringStream( text );
}
@@ -115,25 +141,26 @@
return new CommonTokenStream( lexer );
}
- public Object resolve(String name) {
- return this.variables.get( name );
- }
-
public void addFunction(FunctionCaller function) {
//function.getValue( this );
-
+
}
- public ValueHandler createLocalVariable(String identifier) {
- ValueHandler var = (ValueHandler) this.variables.get( identifier );
- if ( var == null ) {
- var = new NamedShellVariableValue( identifier );
- this.variables.put( identifier,
- var );
- }
- return var;
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getLocalVariable(int)
+ */
+ public ValueHandler getLocalVariable(int index) {
+ return variables[index];
}
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#setLocalVariable(int, org.drools.clp.ValueHandler)
+ */
+ public void setLocalVariable(int index,
+ ValueHandler valueHandler) {
+ this.variables[index] = valueHandler;
+ }
+
public FunctionRegistry getFunctionRegistry() {
return this.registry;
}
@@ -157,22 +184,76 @@
return this.properties.get( key );
}
- public ValueHandler getVariableValueHandler(String identifier) {
- return ( ValueHandler ) this.variables.get( identifier );
+ public Object getObject() {
+ // TODO Auto-generated method stub
+ return null;
}
+ public InternalWorkingMemory getWorkingMemory() {
+ return ( InternalWorkingMemory) this.session;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#setPrintoutRouters(java.util.Map)
+ */
+ public void setPrintoutRouters(Map printoutRouters) {
+ this.printoutRouters = printoutRouters;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#addPrintoutRouter(java.lang.String, java.io.PrintStream)
+ */
+ public void addPrintoutRouter(String identifier,
+ PrintStream stream) {
+ this.printoutRouters.put( identifier,
+ stream );
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.clp.ExecutionContext#getPrintoutRouters(java.lang.String)
+ */
+ public PrintStream getPrintoutRouters(String identifier) {
+ return (PrintStream) this.printoutRouters.get( identifier );
+ }
+
+ public ValueHandler createLocalVariable(String identifier) {
+ return new IndexedLocalVariableValue( identifier,
+ this.index++ );
+ }
+
public void addVariable(VariableValueHandler var) {
- this.variables.put( var.getIdentifier(), var );
+ this.vars.put( var.getIdentifier(), var);
}
- public Object resolveGlobal(String identifier) {
- // TODO Auto-generated method stub
- return null;
- }
+ /* (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 ) {
+ var = new TempTokenVariable( identifier );
+ }
+ return var;
+ }
- public void setGlobal(String identifier, Object value) {
- // TODO Auto-generated method stub
-
- }
+ public Object resolve(String identifier) {
+ ValueHandler var = (ValueHandler) this.vars.get( identifier );
+ return var.getObject( this );
+ }
+// public Object resolveGlobal(String arg0) {
+// // TODO Auto-generated method stub
+// return null;
+// }
+//
+// public void setGlobal(String arg0,
+// Object arg1) {
+// // TODO Auto-generated method stub
+//
+// }
+
+ public ReteTuple getTuple() {
+ 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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,7 +1,6 @@
package org.drools.clp.functions;
import org.drools.clp.BuildContext;
-import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
import org.drools.clp.LispForm;
import org.drools.clp.LispList;
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/PrintoutFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/PrintoutFunction.java 2007-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/PrintoutFunction.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -19,8 +19,12 @@
public ValueHandler execute(ValueHandler[] args,
ExecutionContext context) {
- PrintStream route = context.getPrintoutRouters( args[0].getStringValue( context ) );
+ PrintStream route = context.getPrintoutRouters( args[0].getStringValue( context ) );
+ if ( route == null ) {
+ throw new RuntimeException("printout route '" + args[0].getStringValue( context ) + "' does not exists" );
+ }
+
for ( int i = 1; i < args.length; i++ ) {
ValueHandler value = args[i].getValue( context );
if ( value != null && value.getValueType( context ) == SimpleValueType.LIST ) {
Deleted: 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 2007-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/valuehandlers/NamedShellVariableValue.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,62 +0,0 @@
-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 = 400L;
-
- /** 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() + "']";
- }
-
-}
-
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialect.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialect.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialect.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -0,0 +1,237 @@
+package org.drools.rule.builder.dialect.clp;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.drools.base.ClassFieldExtractorCache;
+import org.drools.base.TypeResolver;
+import org.drools.compiler.Dialect;
+import org.drools.compiler.PackageBuilder;
+import org.drools.lang.descr.AccumulateDescr;
+import org.drools.lang.descr.AndDescr;
+import org.drools.lang.descr.BaseDescr;
+import org.drools.lang.descr.CollectDescr;
+import org.drools.lang.descr.EvalDescr;
+import org.drools.lang.descr.ExistsDescr;
+import org.drools.lang.descr.ForallDescr;
+import org.drools.lang.descr.FromDescr;
+import org.drools.lang.descr.FunctionDescr;
+import org.drools.lang.descr.NotDescr;
+import org.drools.lang.descr.OrDescr;
+import org.drools.lang.descr.PatternDescr;
+import org.drools.lang.descr.QueryDescr;
+import org.drools.lang.descr.RuleDescr;
+import org.drools.rule.Package;
+import org.drools.rule.builder.AccumulateBuilder;
+import org.drools.rule.builder.ConsequenceBuilder;
+import org.drools.rule.builder.FromBuilder;
+import org.drools.rule.builder.GroupElementBuilder;
+import org.drools.rule.builder.PatternBuilder;
+import org.drools.rule.builder.PredicateBuilder;
+import org.drools.rule.builder.QueryBuilder;
+import org.drools.rule.builder.ReturnValueBuilder;
+import org.drools.rule.builder.RuleBuildContext;
+import org.drools.rule.builder.RuleClassBuilder;
+import org.drools.rule.builder.RuleConditionBuilder;
+import org.drools.rule.builder.SalienceBuilder;
+import org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration;
+public class ClipsDialect implements Dialect {
+
+ public final static String ID = "ClipsDialect";
+
+ private final static String EXPRESSION_DIALECT_NAME = "MVEL";
+
+ private final ClpConsequenceBuilder consequence = new ClpConsequenceBuilder();
+
+ private Package pkg;
+ private ClipsDialectConfiguration configuration;
+ private TypeResolver typeResolver;
+ private ClassFieldExtractorCache classFieldExtractorCache;
+
+ // a map of registered builders
+ private Map builders;
+
+ public void init(PackageBuilder builder) {
+ this.pkg = builder.getPackage();
+ this.configuration = (ClipsDialectConfiguration) builder.getPackageBuilderConfiguration().getDialectConfiguration( "clips" );
+ this.typeResolver = builder.getTypeResolver();
+ this.classFieldExtractorCache = builder.getClassFieldExtractorCache();
+
+ initBuilder();
+ }
+
+ public void initBuilder() {
+ // statically adding all builders to the map
+ // but in the future we can move that to a configuration
+ // if we want to
+ this.builders = new HashMap();
+
+ final GroupElementBuilder gebuilder = new GroupElementBuilder();
+
+ this.builders.put( AndDescr.class,
+ gebuilder );
+
+ this.builders.put( OrDescr.class,
+ gebuilder );
+
+ this.builders.put( NotDescr.class,
+ gebuilder );
+
+ this.builders.put( ExistsDescr.class,
+ gebuilder );
+
+ this.builders.put( PatternDescr.class,
+ getPatternBuilder() );
+
+// this.builders.put( FromDescr.class,
+// getFromBuilder() );
+//
+// this.builders.put( QueryDescr.class,
+// getQueryBuilder() );
+//
+// this.builders.put( AccumulateDescr.class,
+// getAccumulateBuilder() );
+//
+// this.builders.put( EvalDescr.class,
+// getEvalBuilder() );
+//
+// this.builders.put( CollectDescr.class,
+// collect );
+//
+// this.builders.put( ForallDescr.class,
+// forall );
+//
+// this.builders.put( FunctionDescr.class,
+// function );
+ }
+
+ public void init(Package pkg) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void init(RuleDescr ruleDescr) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addFunction(FunctionDescr functionDescr,
+ TypeResolver typeResolver) {
+ // TODO Auto-generated method stub
+ }
+
+ public void addImport(String importEntry) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addRule(RuleBuildContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addStaticImport(String importEntry) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public AnalysisResult analyzeBlock(RuleBuildContext context,
+ BaseDescr descr,
+ String text) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public AnalysisResult analyzeExpression(RuleBuildContext context,
+ BaseDescr descr,
+ Object content) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void compileAll() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public AccumulateBuilder getAccumulateBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RuleConditionBuilder getBuilder(final Class clazz) {
+ return (RuleConditionBuilder) this.builders.get( clazz );
+ }
+
+ public Map getBuilders() {
+ return this.builders;
+ }
+
+ public ClassFieldExtractorCache getClassFieldExtractorCache() {
+ return this.classFieldExtractorCache;
+ }
+
+ public ConsequenceBuilder getConsequenceBuilder() {
+ return consequence;
+ }
+
+ public RuleConditionBuilder getEvalBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getExpressionDialectName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FromBuilder getFromBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getId() {
+ return ID;
+ }
+
+ public PatternBuilder getPatternBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PredicateBuilder getPredicateBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public QueryBuilder getQueryBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getResults() {
+ return new ArrayList();
+ }
+
+ public ReturnValueBuilder getReturnValueBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RuleClassBuilder getRuleClassBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SalienceBuilder getSalienceBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TypeResolver getTypeResolver() {
+ return this.typeResolver;
+ }
+
+}
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialectConfiguration.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialectConfiguration.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClipsDialectConfiguration.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -0,0 +1,35 @@
+package org.drools.rule.builder.dialect.clp;
+
+import org.drools.compiler.Dialect;
+import org.drools.compiler.DialectConfiguration;
+import org.drools.compiler.PackageBuilder;
+import org.drools.compiler.PackageBuilderConfiguration;
+
+/**
+ * The Clips dialect.
+ *
+ *
+ */
+public class ClipsDialectConfiguration
+ implements
+ DialectConfiguration {
+
+ private ClipsDialect dialect;
+ private PackageBuilderConfiguration conf;
+
+ public Dialect getDialect() {
+ if ( this.dialect == null ) {
+ this.dialect = new ClipsDialect();
+ }
+ return this.dialect;
+ }
+
+ public void init(PackageBuilderConfiguration conf) {
+ this.conf = conf;
+ }
+
+ public PackageBuilderConfiguration getPackageBuilderConfiguration() {
+ return this.conf;
+ }
+
+}
Added: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClpConsequenceBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClpConsequenceBuilder.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clp/ClpConsequenceBuilder.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -0,0 +1,17 @@
+package org.drools.rule.builder.dialect.clp;
+
+import org.drools.clp.ExecutionEngine;
+import org.drools.rule.Rule;
+import org.drools.rule.builder.ConsequenceBuilder;
+import org.drools.rule.builder.RuleBuildContext;
+
+public class ClpConsequenceBuilder implements ConsequenceBuilder {
+
+ public void build(RuleBuildContext context) {
+ Rule rule = context.getRule();
+ ExecutionEngine rhs = ( ExecutionEngine ) context.getRuleDescr().getConsequence();
+ //rule.setConsequence( rhs );
+
+ }
+
+}
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,737 +1,739 @@
-grammar CLP;
-
- at parser::header {
- package org.drools.clp;
-
- import org.drools.clp.valuehandlers.*;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Iterator;
- import java.util.HashMap;
- import java.util.StringTokenizer;
- import org.drools.lang.descr.*;
- import org.drools.compiler.SwitchingCommonTokenStream;
-}
-
- at parser::members {
- private PackageDescr packageDescr;
- private List errors = new ArrayList();
- private String source = "unknown";
- private int lineOffset = 0;
- private DescrFactory factory = new DescrFactory();
- private boolean parserDebug = false;
- private FunctionRegistry functionRegistry;
-
- public void setFunctionRegistry(FunctionRegistry functionRegistry) {
- this.functionRegistry = functionRegistry;
- }
-
- public void setParserDebug(boolean parserDebug) {
- this.parserDebug = parserDebug;
- }
-
- public void debug(String message) {
- if ( parserDebug )
- System.err.println( "drl parser: " + message );
- }
-
- public void setSource(String source) {
- this.source = source;
- }
- public DescrFactory getFactory() {
- return factory;
- }
-
- public String getSource() {
- return this.source;
- }
-
- public PackageDescr getPackageDescr() {
- return packageDescr;
- }
-
- private int offset(int line) {
- return line + lineOffset;
- }
-
- /**
- * This will set the offset to record when reparsing. Normally is zero of course
- */
- public void setLineOffset(int i) {
- this.lineOffset = i;
- }
-
- private String getString(Token token) {
- String orig = token.getText();
- return orig.substring( 1, orig.length() -1 );
- }
-
- public void reportError(RecognitionException ex) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- if ( errorRecovery ) {
- return;
- }
- errorRecovery = true;
-
- ex.line = offset(ex.line); //add the offset if there is one
- errors.add( ex );
- }
-
- /** return the raw RecognitionException errors */
- public List getErrors() {
- return errors;
- }
-
- /** Return a list of pretty strings summarising the errors */
- public List getErrorMessages() {
- List messages = new ArrayList();
- for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
- messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
- }
- return messages;
- }
-
- /** return true if any parser errors were accumulated */
- public boolean hasErrors() {
- return ! errors.isEmpty();
- }
-
- /** This will take a RecognitionException, and create a sensible error message out of it */
- public String createErrorMessage(RecognitionException e)
- {
- StringBuffer message = new StringBuffer();
- message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
- if ( e instanceof MismatchedTokenException ) {
- MismatchedTokenException mte = (MismatchedTokenException)e;
- message.append("mismatched token: "+
- e.token+
- "; expecting type "+
- tokenNames[mte.expecting]);
- }
- else if ( e instanceof MismatchedTreeNodeException ) {
- MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
- message.append("mismatched tree node: "+
- //mtne.foundNode+ FIXME
- "; expecting type "+
- tokenNames[mtne.expecting]);
- }
- else if ( e instanceof NoViableAltException ) {
- NoViableAltException nvae = (NoViableAltException)e;
- message.append( "Unexpected token '" + e.token.getText() + "'" );
- /*
- message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
- " state "+nvae.stateNumber+
- " (decision="+nvae.decisionNumber+
- ") no viable alt; token="+
- e.token);
- */
- }
- else if ( e instanceof EarlyExitException ) {
- EarlyExitException eee = (EarlyExitException)e;
- message.append("required (...)+ loop (decision="+
- eee.decisionNumber+
- ") did not match anything; token="+
- e.token);
- }
- else if ( e instanceof MismatchedSetException ) {
- MismatchedSetException mse = (MismatchedSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof MismatchedNotSetException ) {
- MismatchedNotSetException mse = (MismatchedNotSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof FailedPredicateException ) {
- FailedPredicateException fpe = (FailedPredicateException)e;
- message.append("rule "+fpe.ruleName+" failed predicate: {"+
- fpe.predicateText+"}?");
- } else if (e instanceof GeneralParseException) {
- message.append(" " + e.getMessage());
- }
- return message.toString();
- }
-
- void checkTrailingSemicolon(String text, int line) {
- if (text.trim().endsWith( ";" ) ) {
- this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
- }
- }
-
-}
-
- at lexer::header {
- package org.drools.clp;
-}
-
-/*
-opt_semicolon
- : ';'?
- ;
-
-
-compilation_unit
- :
- ( statement )+
- ;
-*/
-/*
-statement
- :
- //later we add the other possible statements here
- ( //do something with the returned rule here )
- ;
-*/
-/* prolog
- @init {
- String packageName = "";
- }
- : ( n=package_statement { packageName = n; } )?
- {
- this.packageDescr = factory.createPackage( packageName );
- }
- ;
-
-statement
- :
- ( import_statement
- | function_import_statement
- | global
- | function
- | t=template {this.packageDescr.addFactTemplate( t ); }
- | r=rule { if( r != null ) this.packageDescr.addRule( r ); }
- | q=query { if( q != null ) this.packageDescr.addRule( q ); }
- )
- ;
-
-package_statement returns [String packageName]
- @init{
- packageName = null;
- }
- :
- PACKAGE n=dotted_name[null] opt_semicolon
- {
- packageName = n;
- }
- ;
-*/
-/*
-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 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 );
- }
- loc=LEFT_PAREN
- (v=VAR {
- context.addVariable( function.addParameter( v.getText() ) );
- })*
- RIGHT_PAREN
- (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 {
- rule = null;
- AndDescr lhs = null;
- PatternDescr colum = null;
- AttributeDescr module = null;
- }
- : loc=LEFT_PAREN
-
- DEFRULE ruleName=NAME
- {
- debug( "start rule: " + ruleName.getText() );
- String ruleStr = ruleName.getText();
-
- if ( ruleStr.indexOf("::") >= 0 ) {
- String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
- ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
- module = new AttributeDescr( "agenda-group", mod );
- module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
- module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
- module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
- }
-
- rule = new RuleDescr( ruleStr, null );
- if( module != null ) {
- rule.addAttribute( module );
- }
-
- rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
- // not sure how you define where a LHS starts in clips, so just putting it here for now
- lhs = new AndDescr();
- rule.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
- }
- documentation=STRING {
- // do nothing here for now
- }
- ruleAttribute[rule]
-
- ce[lhs]*
-
- '=>'
-
- engine=execution_block { rule.setConsequence( engine ); }
-
- RIGHT_PAREN
- ;
-
-
-ruleAttribute[RuleDescr rule]
- :
- ( LEFT_PAREN 'declare'
- ( LEFT_PAREN d=salience { rule.addAttribute( d ); } RIGHT_PAREN )?
- RIGHT_PAREN )?
- ;
-
-salience returns [AttributeDescr d ]
- @init {
- d = null;
- }
- :
- loc=SALIENCE i=INT
- {
- d = new AttributeDescr( "salience", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
- d.setEndCharacter( ((CommonToken)i).getStopIndex() );
- }
- ;
-
-
-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]
- )
- ;
-
-execution_block returns[ExecutionEngine engine]
- @init {
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
-
- :
- (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
- ;
-
-and_ce[ConditionalElementDescr in_ce]
- @init {
- AndDescr andDescr= null;
- }
- : LEFT_PAREN
- AND {
- andDescr = new AndDescr();
- in_ce.addDescr( andDescr );
- }
- ce[andDescr]+
- RIGHT_PAREN
- ;
-
-or_ce[ConditionalElementDescr in_ce]
- @init {
- OrDescr orDescr= null;
- }
- : LEFT_PAREN
- OR {
- orDescr = new OrDescr();
- in_ce.addDescr( orDescr );
- }
- ce[orDescr]+
- RIGHT_PAREN
- ;
-
-not_ce[ConditionalElementDescr in_ce]
- @init {
- NotDescr notDescr= null;
- }
- : LEFT_PAREN
- NOT {
- notDescr = new NotDescr();
- in_ce.addDescr( notDescr );
- }
- ce[notDescr]
- RIGHT_PAREN
- ;
-
-exists_ce[ConditionalElementDescr in_ce]
- @init {
- ExistsDescr existsDescr= null;
- }
- : LEFT_PAREN
- EXISTS {
- existsDescr = new ExistsDescr();
- in_ce.addDescr( existsDescr );
- }
- ce[existsDescr]
- RIGHT_PAREN
- ;
-
-eval_ce[ConditionalElementDescr in_ce]
- @init {
- EvalDescr evalDescr= null;
- ExecutionEngine engine = new CLPEval();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
- : LEFT_PAREN
- TEST {
- evalDescr = new EvalDescr();
- in_ce.addDescr( evalDescr );
- }
- fc=lisp_list[context, new LispForm(context)] {
- engine.addFunction( (FunctionCaller) fc );
- evalDescr.setContent( engine );
- }
- RIGHT_PAREN
- ;
-
-normal_pattern[ConditionalElementDescr in_ce]
- @init {
- PatternDescr pattern = null;
- }
- : LEFT_PAREN
- name=NAME {
- pattern = new PatternDescr(name.getText());
- in_ce.addDescr( pattern );
- }
- field_constriant[pattern]*
- RIGHT_PAREN
- ;
-
-
-
-bound_pattern[ConditionalElementDescr in_ce]
- @init {
- PatternDescr pattern = null;
- String identifier = null;
- }
- : var=VAR {
- identifier = var.getText();
- }
- ASSIGN_OP LEFT_PAREN name=NAME
- {
- pattern = new PatternDescr(name.getText());
- pattern.setIdentifier( identifier );
- in_ce.addDescr( pattern );
- }
- field_constriant[pattern]*
- RIGHT_PAREN
- ;
-
-field_constriant[PatternDescr pattern]
- @init {
- List list = new ArrayList();
- FieldBindingDescr fbd = null;
- FieldConstraintDescr fc = null;
- String op = "==";
- }
- :
- LEFT_PAREN f=NAME
- {
- fc = new FieldConstraintDescr(f.getText());
- fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
- pattern.addConstraint( fc );
- }
-
- connected_constraint[fc, pattern]
- RIGHT_PAREN
- ;
-
-connected_constraint[FieldConstraintDescr fc, PatternDescr pattern]
- :
- restriction[fc, pattern]
- (
- AMPERSAND { fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); }
- connected_constraint[fc, pattern]
- |
- PIPE {fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); }
- connected_constraint[fc, pattern]
- )?
- ;
-
-restriction[FieldConstraintDescr fc, PatternDescr pattern]
- @init {
- String op = "==";
- }
- : (TILDE{op = "!=";})?
- ( predicate_constraint[op, pattern]
- | return_value_restriction[op, fc]
- | variable_restriction[op, fc]
- | lc=literal_restriction {
- fc.addRestriction( new LiteralRestrictionDescr(op, lc) );
- op = "==";
- }
- )
- ;
-
-predicate_constraint[String op, PatternDescr pattern]
- @init {
- ExecutionEngine engine = new CLPPredicate();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
- : COLON
- fc=lisp_list[context, new LispForm(context)] {
- engine.addFunction( (FunctionCaller) fc );
- pattern.addConstraint( new PredicateDescr( engine ) );
- }
-
- ;
-
-
-return_value_restriction[String op, FieldConstraintDescr fc]
- @init {
- ExecutionEngine engine = new CLPReturnValue();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
- : EQUALS
- func=lisp_list[context, new LispForm(context)] {
- engine.addFunction( (FunctionCaller) func );
- fc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
- }
- ;
-
-variable_restriction[String op, FieldConstraintDescr fc]
- : var=VAR {
- fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
- }
- ;
-
-
-literal_restriction returns [String text]
- @init {
- text = null;
- }
- :
- t=literal {
- text = t;
- }
- ;
-
-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 ); }
- )*
- RIGHT_PAREN
- { valueHandler = list.getValueHandler(); }
- ;
-
-lisp_atom[BuildContext context] returns[ValueHandler value]
- @init {
- value = null;
- }
- :
- ( t=VAR { value = context.getVariableValueHandler(t.getText() ); }
- | t=STRING { value = new ObjectValueHandler( getString( t ) ); }
- | t=NAME { value = new ObjectValueHandler( t.getText() ); }
- | t=FLOAT { value = new DoubleValueHandler( t.getText() ); }
- | t=INT { value = new LongValueHandler( t.getText() ); }
- | t=BOOL { value = new BooleanValueHandler( t.getText() ); }
- | t=NULL { value = ObjectValueHandler.NULL; }
- )
- ;
-
-literal returns [String text]
- @init {
- text = null;
- }
- : ( t=STRING { text = getString( t ); }
- | t=NAME { text = t.getText(); }
- | t=INT { text = t.getText(); }
- | t=FLOAT { text = t.getText(); }
- | t=BOOL { text = t.getText(); }
- | t=NULL { text = null; }
- )
- ;
-
-WS : ( ' '
- | '\t'
- | '\f'
- | EOL
- )
- { $channel=HIDDEN; }
- ;
-
-DEFRULE : 'defrule';
-DEFFUNCTION : 'deffunction';
-OR : 'or';
-AND : 'and';
-NOT : 'not';
-EXISTS : 'exists';
-TEST : 'test';
-
-NULL : 'null';
-
-DECLARE : 'declare';
-
-SALIENCE : 'salience';
-
-//MODIFY : 'modify';
-
-fragment
-EOL :
- ( ( '\r\n' )=> '\r\n' // Evil DOS
- | '\r' // Macintosh
- | '\n' // Unix (the right way)
- )
- ;
-
-INT
- : ('-')?('0'..'9')+
- ;
-
-FLOAT
- : ('-')?('0'..'9')+ '.' ('0'..'9')+
- ;
-
-STRING
- : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
- | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
- ;
-
-fragment
-HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
-
-fragment
-EscapeSequence
- : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
- | UnicodeEscape
- | OctalEscape
- ;
-
-fragment
-OctalEscape
- : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
- | '\\' ('0'..'7') ('0'..'7')
- | '\\' ('0'..'7')
- ;
-
-fragment
-UnicodeEscape
- : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
- ;
-
-BOOL
- : ('true'|'false')
- ;
-
-VAR : '?'('a'..'z'|'A'..'Z'|'_'|'$')SYMBOL*
- ;
-
-SH_STYLE_SINGLE_LINE_COMMENT
- : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
- { $channel=HIDDEN; }
- ;
-
-
-C_STYLE_SINGLE_LINE_COMMENT
- : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
- { $channel=HIDDEN; }
- ;
-
-
-LEFT_PAREN
- : '('
- ;
-
-RIGHT_PAREN
- : ')'
- ;
-
-LEFT_SQUARE
- : '['
- ;
-
-RIGHT_SQUARE
- : ']'
- ;
-
-LEFT_CURLY
- : '{'
- ;
-
-RIGHT_CURLY
- : '}'
- ;
-
-TILDE : '~'
- ;
-
-AMPERSAND
- : '&'
- ;
-
-PIPE
- : '|'
- ;
-
-ASSIGN_OP
- : '<-'
- ;
-
-COLON : ':';
-
-EQUALS : '=';
-
-MULTI_LINE_COMMENT
- : '/*' (options{greedy=false;} : .)* '*/'
- { $channel=HIDDEN; }
- ;
-
-NAME : SYMBOL ;
-
-fragment
-SYMBOL
- : ((~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))|('$' ~('?'|' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<')))
- (~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
- ;
-
+grammar CLP;
+
+ at parser::header {
+ package org.drools.clp;
+
+ import org.drools.clp.valuehandlers.*;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.HashMap;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
+}
+
+ at parser::members {
+ private PackageDescr packageDescr;
+ private List errors = new ArrayList();
+ private String source = "unknown";
+ private int lineOffset = 0;
+ private DescrFactory factory = new DescrFactory();
+ private boolean parserDebug = false;
+ private FunctionRegistry functionRegistry;
+
+ public void setFunctionRegistry(FunctionRegistry functionRegistry) {
+ this.functionRegistry = functionRegistry;
+ }
+
+ public void setParserDebug(boolean parserDebug) {
+ this.parserDebug = parserDebug;
+ }
+
+ public void debug(String message) {
+ if ( parserDebug )
+ System.err.println( "drl parser: " + message );
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public DescrFactory getFactory() {
+ return factory;
+ }
+
+ public String getSource() {
+ return this.source;
+ }
+
+ public PackageDescr getPackageDescr() {
+ return packageDescr;
+ }
+
+ private int offset(int line) {
+ return line + lineOffset;
+ }
+
+ /**
+ * This will set the offset to record when reparsing. Normally is zero of course
+ */
+ public void setLineOffset(int i) {
+ this.lineOffset = i;
+ }
+
+ private String getString(Token token) {
+ String orig = token.getText();
+ return orig.substring( 1, orig.length() -1 );
+ }
+
+ public void reportError(RecognitionException ex) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( errorRecovery ) {
+ return;
+ }
+ errorRecovery = true;
+
+ ex.line = offset(ex.line); //add the offset if there is one
+ errors.add( ex );
+ }
+
+ /** return the raw RecognitionException errors */
+ public List getErrors() {
+ return errors;
+ }
+
+ /** Return a list of pretty strings summarising the errors */
+ public List getErrorMessages() {
+ List messages = new ArrayList();
+ for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+ messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+ }
+ return messages;
+ }
+
+ /** return true if any parser errors were accumulated */
+ public boolean hasErrors() {
+ return ! errors.isEmpty();
+ }
+
+ /** This will take a RecognitionException, and create a sensible error message out of it */
+ public String createErrorMessage(RecognitionException e)
+ {
+ StringBuffer message = new StringBuffer();
+ message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+ if ( e instanceof MismatchedTokenException ) {
+ MismatchedTokenException mte = (MismatchedTokenException)e;
+ message.append("mismatched token: "+
+ e.token+
+ "; expecting type "+
+ tokenNames[mte.expecting]);
+ }
+ else if ( e instanceof MismatchedTreeNodeException ) {
+ MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+ message.append("mismatched tree node: "+
+ //mtne.foundNode+ FIXME
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
+}
+
+ at lexer::header {
+ package org.drools.clp;
+}
+
+/*
+opt_semicolon
+ : ';'?
+ ;
+
+
+compilation_unit
+ :
+ ( statement )+
+ ;
+*/
+/*
+statement
+ :
+ //later we add the other possible statements here
+ ( //do something with the returned rule here )
+ ;
+*/
+/* prolog
+ @init {
+ String packageName = "";
+ }
+ : ( n=package_statement { packageName = n; } )?
+ {
+ this.packageDescr = factory.createPackage( packageName );
+ }
+ ;
+
+statement
+ :
+ ( import_statement
+ | function_import_statement
+ | global
+ | function
+ | t=template {this.packageDescr.addFactTemplate( t ); }
+ | r=rule { if( r != null ) this.packageDescr.addRule( r ); }
+ | q=query { if( q != null ) this.packageDescr.addRule( q ); }
+ )
+ ;
+
+package_statement returns [String packageName]
+ @init{
+ packageName = null;
+ }
+ :
+ PACKAGE n=dotted_name[null] opt_semicolon
+ {
+ packageName = n;
+ }
+ ;
+*/
+
+eval_script[Shell shell]
+ : ( r=defrule { shell.ruleDescrHandler( r ); }
+ //e=execution_block { parserHandler.lispFormHandler( e ); }
+ | fc=lisp_list[shell, new LispForm(shell) ] { shell.lispFormHandler(fc); }
+ )*
+ ;
+/*
+
+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 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 );
+ }
+ loc=LEFT_PAREN
+ (v=VAR {
+ context.addVariable( function.addParameter( v.getText() ) );
+ })*
+ RIGHT_PAREN
+ (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 {
+ rule = null;
+ AndDescr lhs = null;
+ PatternDescr colum = null;
+ AttributeDescr module = null;
+ }
+ : loc=LEFT_PAREN
+
+ DEFRULE ruleName=NAME
+ {
+ debug( "start rule: " + ruleName.getText() );
+ String ruleStr = ruleName.getText();
+
+ if ( ruleStr.indexOf("::") >= 0 ) {
+ String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
+ ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
+ module = new AttributeDescr( "agenda-group", mod );
+ module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
+ module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
+ module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
+ }
+
+ rule = new RuleDescr( ruleStr, null );
+ if( module != null ) {
+ rule.addAttribute( module );
+ }
+
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ // not sure how you define where a LHS starts in clips, so just putting it here for now
+ lhs = new AndDescr();
+ rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ rule.addAttribute( new AttributeDescr( "dialect", "clips") );
+ }
+ documentation=STRING {
+ // do nothing here for now
+ }
+ ruleAttribute[rule]
+
+ ce[lhs]*
+
+ '=>'
+
+ engine=execution_block { rule.setConsequence( engine ); }
+
+ RIGHT_PAREN
+ ;
+
+
+ruleAttribute[RuleDescr rule]
+ :
+ ( LEFT_PAREN 'declare'
+ ( LEFT_PAREN d=salience { rule.addAttribute( d ); } RIGHT_PAREN )?
+ RIGHT_PAREN )?
+ ;
+
+salience returns [AttributeDescr d ]
+ @init {
+ d = null;
+ }
+ :
+ loc=SALIENCE i=INT
+ {
+ d = new AttributeDescr( "salience", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+ }
+ ;
+
+
+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]
+ )
+ ;
+
+execution_block returns[ExecutionEngine engine]
+ @init {
+ engine = new BlockExecutionEngine();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ }
+
+ :
+ (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
+ ;
+
+and_ce[ConditionalElementDescr in_ce]
+ @init {
+ AndDescr andDescr= null;
+ }
+ : LEFT_PAREN
+ AND {
+ andDescr = new AndDescr();
+ in_ce.addDescr( andDescr );
+ }
+ ce[andDescr]+
+ RIGHT_PAREN
+ ;
+
+or_ce[ConditionalElementDescr in_ce]
+ @init {
+ OrDescr orDescr= null;
+ }
+ : LEFT_PAREN
+ OR {
+ orDescr = new OrDescr();
+ in_ce.addDescr( orDescr );
+ }
+ ce[orDescr]+
+ RIGHT_PAREN
+ ;
+
+not_ce[ConditionalElementDescr in_ce]
+ @init {
+ NotDescr notDescr= null;
+ }
+ : LEFT_PAREN
+ NOT {
+ notDescr = new NotDescr();
+ in_ce.addDescr( notDescr );
+ }
+ ce[notDescr]
+ RIGHT_PAREN
+ ;
+
+exists_ce[ConditionalElementDescr in_ce]
+ @init {
+ ExistsDescr existsDescr= null;
+ }
+ : LEFT_PAREN
+ EXISTS {
+ existsDescr = new ExistsDescr();
+ in_ce.addDescr( existsDescr );
+ }
+ ce[existsDescr]
+ RIGHT_PAREN
+ ;
+
+eval_ce[ConditionalElementDescr in_ce]
+ @init {
+ EvalDescr evalDescr= null;
+ ExecutionEngine engine = new CLPEval();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ }
+ : LEFT_PAREN
+ TEST {
+ evalDescr = new EvalDescr();
+ in_ce.addDescr( evalDescr );
+ }
+ fc=lisp_list[context, new LispForm(context)] {
+ engine.addFunction( (FunctionCaller) fc );
+ evalDescr.setContent( engine );
+ }
+ RIGHT_PAREN
+ ;
+
+normal_pattern[ConditionalElementDescr in_ce]
+ @init {
+ PatternDescr pattern = null;
+ }
+ : LEFT_PAREN
+ name=NAME {
+ pattern = new PatternDescr(name.getText());
+ in_ce.addDescr( pattern );
+ }
+ field_constriant[pattern]*
+ RIGHT_PAREN
+ ;
+
+
+
+bound_pattern[ConditionalElementDescr in_ce]
+ @init {
+ PatternDescr pattern = null;
+ String identifier = null;
+ }
+ : var=VAR {
+ identifier = var.getText();
+ }
+ ASSIGN_OP LEFT_PAREN name=NAME
+ {
+ pattern = new PatternDescr(name.getText());
+ pattern.setIdentifier( identifier );
+ in_ce.addDescr( pattern );
+ }
+ field_constriant[pattern]*
+ RIGHT_PAREN
+ ;
+
+field_constriant[PatternDescr pattern]
+ @init {
+ List list = new ArrayList();
+ FieldBindingDescr fbd = null;
+ FieldConstraintDescr fc = null;
+ String op = "==";
+ }
+ :
+ LEFT_PAREN f=NAME
+ {
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
+ pattern.addConstraint( fc );
+ }
+
+ connected_constraint[fc, pattern]
+ RIGHT_PAREN
+ ;
+
+connected_constraint[FieldConstraintDescr fc, PatternDescr pattern]
+ :
+ restriction[fc, pattern]
+ (
+ AMPERSAND { fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); }
+ connected_constraint[fc, pattern]
+ |
+ PIPE {fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); }
+ connected_constraint[fc, pattern]
+ )?
+ ;
+
+restriction[FieldConstraintDescr fc, PatternDescr pattern]
+ @init {
+ String op = "==";
+ }
+ : (TILDE{op = "!=";})?
+ ( predicate_constraint[op, pattern]
+ | return_value_restriction[op, fc]
+ | variable_restriction[op, fc]
+ | lc=literal_restriction {
+ fc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+ op = "==";
+ }
+ )
+ ;
+
+predicate_constraint[String op, PatternDescr pattern]
+ @init {
+ ExecutionEngine engine = new CLPPredicate();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ }
+ : COLON
+ fc=lisp_list[context, new LispForm(context)] {
+ engine.addFunction( (FunctionCaller) fc );
+ pattern.addConstraint( new PredicateDescr( engine ) );
+ }
+
+ ;
+
+
+return_value_restriction[String op, FieldConstraintDescr fc]
+ @init {
+ ExecutionEngine engine = new CLPReturnValue();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ }
+ : EQUALS
+ func=lisp_list[context, new LispForm(context)] {
+ engine.addFunction( (FunctionCaller) func );
+ fc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
+ }
+ ;
+
+variable_restriction[String op, FieldConstraintDescr fc]
+ : var=VAR {
+ fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
+ }
+ ;
+
+
+literal_restriction returns [String text]
+ @init {
+ text = null;
+ }
+ :
+ t=literal {
+ text = t;
+ }
+ ;
+
+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 ); }
+ )*
+ RIGHT_PAREN
+ { valueHandler = list.getValueHandler(); }
+ ;
+
+lisp_atom[BuildContext context] returns[ValueHandler value]
+ @init {
+ value = null;
+ }
+ :
+ ( t=VAR { value = context.getVariableValueHandler(t.getText() ); }
+ | t=STRING { value = new ObjectValueHandler( getString( t ) ); }
+ | t=NAME { value = new ObjectValueHandler( t.getText() ); }
+ | t=FLOAT { value = new DoubleValueHandler( t.getText() ); }
+ | t=INT { value = new LongValueHandler( t.getText() ); }
+ | t=BOOL { value = new BooleanValueHandler( t.getText() ); }
+ | t=NULL { value = ObjectValueHandler.NULL; }
+ )
+ ;
+
+literal returns [String text]
+ @init {
+ text = null;
+ }
+ : ( t=STRING { text = getString( t ); }
+ | t=NAME { text = t.getText(); }
+ | t=INT { text = t.getText(); }
+ | t=FLOAT { text = t.getText(); }
+ | t=BOOL { text = t.getText(); }
+ | t=NULL { text = null; }
+ )
+ ;
+
+WS : ( ' '
+ | '\t'
+ | '\f'
+ | EOL
+ )
+ { $channel=HIDDEN; }
+ ;
+
+DEFRULE : 'defrule';
+DEFFUNCTION : 'deffunction';
+OR : 'or';
+AND : 'and';
+NOT : 'not';
+EXISTS : 'exists';
+TEST : 'test';
+
+NULL : 'null';
+
+DECLARE : 'declare';
+
+SALIENCE : 'salience';
+
+//MODIFY : 'modify';
+
+fragment
+EOL :
+ ( ( '\r\n' )=> '\r\n' // Evil DOS
+ | '\r' // Macintosh
+ | '\n' // Unix (the right way)
+ )
+ ;
+
+INT
+ : ('-')?('0'..'9')+
+ ;
+
+FLOAT
+ : ('-')?('0'..'9')+ '.' ('0'..'9')+
+ ;
+
+STRING
+ : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
+ | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
+ ;
+
+fragment
+HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+fragment
+EscapeSequence
+ : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+ | UnicodeEscape
+ | OctalEscape
+ ;
+
+fragment
+OctalEscape
+ : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7')
+ ;
+
+fragment
+UnicodeEscape
+ : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ ;
+
+BOOL
+ : ('true'|'false')
+ ;
+
+VAR : '?'('a'..'z'|'A'..'Z'|'_'|'$')SYMBOL*
+ ;
+
+SH_STYLE_SINGLE_LINE_COMMENT
+ : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
+ { $channel=HIDDEN; }
+ ;
+
+
+C_STYLE_SINGLE_LINE_COMMENT
+ : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
+ { $channel=HIDDEN; }
+ ;
+
+
+LEFT_PAREN
+ : '('
+ ;
+
+RIGHT_PAREN
+ : ')'
+ ;
+
+LEFT_SQUARE
+ : '['
+ ;
+
+RIGHT_SQUARE
+ : ']'
+ ;
+
+LEFT_CURLY
+ : '{'
+ ;
+
+RIGHT_CURLY
+ : '}'
+ ;
+
+TILDE : '~'
+ ;
+
+AMPERSAND
+ : '&'
+ ;
+
+PIPE
+ : '|'
+ ;
+
+ASSIGN_OP
+ : '<-'
+ ;
+
+COLON : ':';
+
+EQUALS : '=';
+
+MULTI_LINE_COMMENT
+ : '/*' (options{greedy=false;} : .)* '*/'
+ { $channel=HIDDEN; }
+ ;
+
+NAME : SYMBOL ;
+
+fragment
+SYMBOL
+ : ((~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))|('$' ~('?'|' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<')))
+ (~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
+ ;
+
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/AddFunctionTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -85,7 +85,7 @@
0 );
ValueHandler val3 = new TempTokenVariable( "ld" );
- ExecutionContext context = new ExecutionContext( workingMemory,
+ ExecutionContext context = new ExecutionContextImpl( workingMemory,
tuple,
new BigDecimal( 10 ),
1 );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/BlockExecutionTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -45,7 +45,7 @@
list.add( build.getVariableValueHandler( "?x" ) );
modifyCaller.addParameter( list );
- ExecutionContext context = new ExecutionContext(null, null, 2);
+ ExecutionContext context = new ExecutionContextImpl(null, null, 2);
Person p = new Person("mark");
context.setLocalVariable( 1, new ObjectValueHandler( p ) );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/CompiledFunctionsTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -27,7 +27,7 @@
public void testPrintout() throws Exception {
BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(printout d xx (eq 1 1) ?c (create$ (+ 1 1) x y) zzz)" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
1 );
@@ -46,7 +46,7 @@
public void testBindAndModify() throws Exception {
BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (+ 20 11) ) (modify ?p (age ?x) )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
2 );
@@ -64,7 +64,7 @@
public void testSimpleCreate$() throws Exception {
BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(bind ?x (create$ 1 2 3) )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
1 );
engine.execute( context );
@@ -84,7 +84,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) )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
2 );
engine.execute( context );
@@ -131,7 +131,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) )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
2 );
@@ -169,7 +169,7 @@
public void testWhile() throws Exception {
BlockExecutionEngine engine = (BlockExecutionEngine) parse( "(while (< ?x ?y) do (bind ?x (+ ?x 1)) (printout d ?x \" \") )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
2 );
@@ -200,7 +200,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 \" \") )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
2 );
@@ -216,7 +216,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\" ) ) )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
3 );
@@ -251,7 +251,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) )" ).execution_block();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
2 );
@@ -266,7 +266,7 @@
public void testDefTemplate() throws Exception {
Deffunction engine = (Deffunction) parse( "(deffunction factorial (?n) (if (>= ?n 1) then (* ?n (factorial (- ?n 1))) else 1)) " ).deffunction();
- ExecutionContext context = new ExecutionContext( null,
+ ExecutionContext context = new ExecutionContextImpl( null,
null,
1 );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/DeffunctionTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -10,7 +10,7 @@
import junit.framework.TestCase;
public class DeffunctionTest extends TestCase {
- public void test1() {
+ public void testSimpleDeffunction() {
Deffunction function = new Deffunction("x");
ValueHandler a = function.addParameter( "a" );
@@ -23,7 +23,7 @@
function.addFunction( caller );
- ExecutionContext context = new ExecutionContext(null, null, 2);
+ ExecutionContext context = new ExecutionContextImpl(null, null, 2);
ValueHandler q = new IndexedLocalVariableValue("q", 0);
q.setValue( context, new LongValueHandler( 10 ) );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -332,7 +332,11 @@
assertEquals("name", rule.getName() );
- AttributeDescr salience = ( AttributeDescr ) attributes.get( 1 );
+ AttributeDescr dialect = ( AttributeDescr ) attributes.get( 1 );
+ assertEquals( "dialect", dialect.getName() );
+ assertEquals( "clips", dialect.getValue() );
+
+ AttributeDescr salience = ( AttributeDescr ) attributes.get( 2 );
assertEquals( "salience", salience.getName() );
assertEquals( "-100", salience.getValue() );
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-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ModifyFunctionTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -9,11 +9,11 @@
import junit.framework.TestCase;
public class ModifyFunctionTest extends TestCase {
- public void test1() {
+ public void testSimpleModifyFunction() {
Function function = new ModifyFunction();
Person p = new Person("mark");
- ExecutionContext context = new ExecutionContext(null, null, 1);
+ ExecutionContext context = new ExecutionContextImpl(null, null, 1);
//context.setLocalVariable( 0, p );
IndexedLocalVariableValue var = new IndexedLocalVariableValue("p", 0);
Modified: 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 2007-08-01 23:03:47 UTC (rev 13944)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java 2007-08-02 01:25:41 UTC (rev 13945)
@@ -1,5 +1,17 @@
package org.drools.clp;
-public class ShellTest {
+import junit.framework.TestCase;
+import org.drools.RuleBase;
+import org.drools.rule.Package;
+import org.drools.rule.Rule;
+
+public class ShellTest extends TestCase {
+ public void test1() {
+ Shell shell = new Shell();
+ shell.evalString( "(defrule xxx => )" );
+
+ Package pkg = shell.getWorkingMemory().getRuleBase().getPackage( "MAIN" );
+ //Rule rule = pkg.getRule( "xxx" );
+ }
}
More information about the jboss-svn-commits
mailing list