[jboss-svn-commits] JBL Code SVN: r10519 - in labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp: ValueHandlers and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Mar 24 15:56:46 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-03-24 15:56:46 -0400 (Sat, 24 Mar 2007)
New Revision: 10519

Added:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BaseValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BooleanValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPGlobalVariable.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPLocalDeclarationVariable.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPPreviousDeclarationVariable.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/DoubleValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/FunctionCaller.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ListValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LocalVariableValue.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LongValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ObjectValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/TempTokenVariable.java
Removed:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BaseValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BooleanValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPGlobalVariable.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLocalDeclarationVariable.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPreviousDeclarationVariable.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/DoubleValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/FunctionCaller.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ListValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LocalVariableValue.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LongValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ObjectValueHandler.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/TempTokenVariable.java
Modified:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BlockExecutionEngine.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPEval.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPFactory.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPredicate.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPReturnValue.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/Deffunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionBuildContext.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionEngine.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispData.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispForm.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/AddFunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/BindFunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/CreateListFunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/IfFunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/LessThanFunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/MultiplyFunction.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/WhileFunction.java
Log:
-JBRULES-720 Clips Parser
-Moved ValueHandlers into their own package

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BaseValueHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BaseValueHandler.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BaseValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,64 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-public abstract class BaseValueHandler implements ValueHandler {        
-    
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        Object object = getValue( context );
-        if ( object instanceof BigDecimal ) {
-            return (BigDecimal) object;
-        } else {
-            return new BigDecimal( object.toString() );
-        }
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        Object object = getValue( context );
-        if ( object instanceof BigInteger ) {
-            return (BigInteger) object;
-        } else {
-            return new BigInteger( object.toString() );
-        }
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return ((Boolean) getValue(context)).booleanValue();
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        return ((Double) getValue(context)).doubleValue();
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        return ((Float) getValue(context)).floatValue();
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        return ((Integer) getValue(context)).intValue();
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        return ((Long) getValue(context)).longValue();
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        return ((Short) getValue(context)).shortValue();
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return (String) getValue(context);
-    }      
-    
-    public String toString() {
-        String name = getClass().getName();
-        name = name.substring( name.lastIndexOf( "." ) + 1 );
-        try {
-            return "[" + name + " value = '" + getValue(null) + "']";
-        } catch (Exception e) {
-            return "[" + name + " value = N/A]";
-        }
-    }
-    
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BlockExecutionEngine.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BlockExecutionEngine.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BlockExecutionEngine.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -3,6 +3,7 @@
 import java.util.Map;
 
 import org.drools.WorkingMemory;
+import org.drools.clp.valuehandlers.FunctionCaller;
 import org.drools.common.InternalWorkingMemory;
 import org.drools.reteoo.ReteTuple;
 import org.drools.spi.Consequence;

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BooleanValueHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BooleanValueHandler.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BooleanValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,88 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.drools.base.SimpleValueType;
-
-public class BooleanValueHandler implements ValueHandler {
-    private boolean booleanValue;
-    
-    public BooleanValueHandler(String booleanValue) {
-        this.booleanValue = Boolean.valueOf( booleanValue ).booleanValue();
-    } 
-    
-    public BooleanValueHandler(boolean booleanValue) {
-        this.booleanValue = booleanValue;
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.BOOLEAN;
-    }
-
-    public void setValue(ExecutionContext context, Object value) {
-        throw new RuntimeException( "LiteralValues cannot be set");
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        return new Boolean( this.booleanValue );
-    }
-    
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to BitDecimal" );
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to BitInteger" );
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return this.booleanValue;
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to double" );
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to float" );
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to int" );
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to long" );
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "Boolean format exception, cannot be cast to short" ); 
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return Boolean.toString( this.booleanValue );
-    }      
-    
-    public String toString() {
-        return "[BooleanLiteralValue value='" + this.booleanValue + "']";
-    }
-
-    public int hashCode() {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + (booleanValue ? 1231 : 1237);
-        return result;
-    }
-
-    public boolean equals(Object obj) {
-        if ( this == obj ) return true;
-        if ( obj == null ) return false;
-        if ( !(obj instanceof BooleanValueHandler) ) return false;
-        final BooleanValueHandler other = (BooleanValueHandler) obj;
-        if ( booleanValue != other.booleanValue ) return false;
-        return true;
-    }
-    
-    
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPEval.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPEval.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPEval.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -6,6 +6,7 @@
 import java.util.Map;
 
 import org.drools.WorkingMemory;
+import org.drools.clp.valuehandlers.FunctionCaller;
 import org.drools.common.InternalWorkingMemory;
 import org.drools.reteoo.ReteTuple;
 import org.drools.rule.Declaration;

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPFactory.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPFactory.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPFactory.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -6,6 +6,9 @@
 
 import org.drools.WorkingMemory;
 import org.drools.base.ValueType;
+import org.drools.clp.valuehandlers.CLPGlobalVariable;
+import org.drools.clp.valuehandlers.CLPLocalDeclarationVariable;
+import org.drools.clp.valuehandlers.CLPPreviousDeclarationVariable;
 import org.drools.rule.Declaration;
 import org.drools.spi.Tuple;
 import org.mvel.integration.VariableResolver;

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPGlobalVariable.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPGlobalVariable.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPGlobalVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,46 +0,0 @@
-package org.drools.clp;
-
-
-public class CLPGlobalVariable extends BaseValueHandler implements VariableValueHandler  {
-    
-    private String identifier;
-    private Class knownType;
-    private int simpleType;
-    private CLPFactory factory;
-       
-    public CLPGlobalVariable(String identifier,
-                                    Class knownType,
-                                    int simpleType,
-                                    CLPFactory factory ) {
-        this.identifier = identifier;
-        this.factory =  factory;
-        this.knownType = knownType;
-    }
-    
-    public String getIdentifier() {
-        return this.identifier;
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return this.simpleType;
-    }    
-
-    public Class getKnownType() {
-        return this.knownType;
-    }
-
-    public Object getValue(ExecutionContext context) {
-        return this.factory.getValue( this.identifier );
-    }
-
-    public void setValue(ExecutionContext context, Object value) {
-        throw new UnsupportedOperationException( "External Variable identifer='" + getIdentifier() + "' type='" + getKnownType() + "' is final, it cannot be set" );
-    }       
-    
-    public String toString() {
-        String name = getClass().getName();
-        name = name.substring( name.lastIndexOf( "." ) + 1 );
-        return "[" + name + " identifier = '" + getIdentifier()  + "']";
-    }        
-
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,19 +1,14 @@
-// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-03-24 14:22:23
+// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-03-24 19:53:23
 
 	package org.drools.clp;
 
 
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
 import java.util.HashMap;
-
-import org.antlr.runtime.BaseRecognizer;
-import org.antlr.runtime.CharStream;
-import org.antlr.runtime.DFA;
-import org.antlr.runtime.EarlyExitException;
-import org.antlr.runtime.Lexer;
-import org.antlr.runtime.MismatchedSetException;
-import org.antlr.runtime.NoViableAltException;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.runtime.Token;
 public class CLPLexer extends Lexer {
     public static final int EXISTS=14;
     public static final int LEFT_PAREN=4;
@@ -104,10 +99,10 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:552:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:552:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:17: ( ' ' | '\\t' | '\\f' | EOL )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:552:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:17: ( ' ' | '\\t' | '\\f' | EOL )
             int alt1=4;
             switch ( input.LA(1) ) {
             case ' ':
@@ -126,35 +121,35 @@
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("552:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+                    new NoViableAltException("554:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
 
                 throw nvae;
             }
 
             switch (alt1) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:552:19: ' '
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:19: ' '
                     {
                     match(' '); if (failed) return ;
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:553:19: '\\t'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:555:19: '\\t'
                     {
                     match('\t'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:19: '\\f'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:19: '\\f'
                     {
                     match('\f'); if (failed) return ;
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:555:19: EOL
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:557:19: EOL
                     {
                     mEOL(); if (failed) return ;
 
@@ -194,8 +189,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:560:11: ( 'defrule' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:560:11: 'defrule'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:11: ( 'defrule' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:11: 'defrule'
             {
             match("defrule"); if (failed) return ;
 
@@ -227,8 +222,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:561:7: ( 'or' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:561:7: 'or'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:7: ( 'or' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:7: 'or'
             {
             match("or"); if (failed) return ;
 
@@ -260,8 +255,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:8: ( 'and' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:562:8: 'and'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:8: ( 'and' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:8: 'and'
             {
             match("and"); if (failed) return ;
 
@@ -293,8 +288,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:8: ( 'not' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:563:8: 'not'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:565:8: ( 'not' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:565:8: 'not'
             {
             match("not"); if (failed) return ;
 
@@ -326,8 +321,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:11: ( 'exists' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:564:11: 'exists'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:566:11: ( 'exists' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:566:11: 'exists'
             {
             match("exists"); if (failed) return ;
 
@@ -359,8 +354,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:565:9: ( 'test' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:565:9: 'test'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:9: ( 'test' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:9: 'test'
             {
             match("test"); if (failed) return ;
 
@@ -392,8 +387,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:8: ( 'null' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:8: 'null'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:8: ( 'null' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:8: 'null'
             {
             match("null"); if (failed) return ;
 
@@ -425,8 +420,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:11: ( 'declare' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:11: 'declare'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:11: ( 'declare' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:11: 'declare'
             {
             match("declare"); if (failed) return ;
 
@@ -458,8 +453,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:11: ( 'salience' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:571:11: 'salience'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:573:11: ( 'salience' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:573:11: 'salience'
             {
             match("salience"); if (failed) return ;
 
@@ -486,10 +481,10 @@
     public void mEOL() throws RecognitionException {
         try {
             ruleNestingLevel++;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             int alt2=3;
             int LA2_0 = input.LA(1);
             if ( (LA2_0=='\r') ) {
@@ -506,13 +501,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("577:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+                    new NoViableAltException("579:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
 
                 throw nvae;
             }
             switch (alt2) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:14: ( '\\r\\n' )=> '\\r\\n'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:14: ( '\\r\\n' )=> '\\r\\n'
                     {
                     match("\r\n"); if (failed) return ;
 
@@ -520,14 +515,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:578:25: '\\r'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:25: '\\r'
                     {
                     match('\r'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:25: '\\n'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:581:25: '\\n'
                     {
                     match('\n'); if (failed) return ;
 
@@ -555,10 +550,10 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:4: ( ( '-' )? ( '0' .. '9' )+ )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:4: ( '-' )? ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:4: ( ( '-' )? ( '0' .. '9' )+ )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:4: ( '-' )? ( '0' .. '9' )+
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:4: ( '-' )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:4: ( '-' )?
             int alt3=2;
             int LA3_0 = input.LA(1);
             if ( (LA3_0=='-') ) {
@@ -566,7 +561,7 @@
             }
             switch (alt3) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:5: '-'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -575,7 +570,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:10: ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:10: ( '0' .. '9' )+
             int cnt4=0;
             loop4:
             do {
@@ -588,7 +583,7 @@
 
                 switch (alt4) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:11: '0' .. '9'
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -633,10 +628,10 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:4: ( '-' )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:4: ( '-' )?
             int alt5=2;
             int LA5_0 = input.LA(1);
             if ( (LA5_0=='-') ) {
@@ -644,7 +639,7 @@
             }
             switch (alt5) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:5: '-'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -653,7 +648,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:10: ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:10: ( '0' .. '9' )+
             int cnt6=0;
             loop6:
             do {
@@ -666,7 +661,7 @@
 
                 switch (alt6) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:11: '0' .. '9'
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -684,7 +679,7 @@
             } while (true);
 
             match('.'); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:26: ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:26: ( '0' .. '9' )+
             int cnt7=0;
             loop7:
             do {
@@ -697,7 +692,7 @@
 
                 switch (alt7) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:27: '0' .. '9'
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:27: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -742,7 +737,7 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
             int alt10=2;
             int LA10_0 = input.LA(1);
             if ( (LA10_0=='\"') ) {
@@ -754,19 +749,19 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("591:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 10, 0, input);
+                    new NoViableAltException("593:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 10, 0, input);
 
                 throw nvae;
             }
             switch (alt10) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
                     {
                     match('\"'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
                     loop8:
                     do {
                         int alt8=3;
@@ -781,14 +776,14 @@
 
                         switch (alt8) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:15: EscapeSequence
+                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:15: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:592:32: ~ ('\\\\'|'\"')
+                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:32: ~ ('\\\\'|'\"')
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -818,13 +813,13 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
                     {
                     match('\''); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
                     loop9:
                     do {
                         int alt9=3;
@@ -839,14 +834,14 @@
 
                         switch (alt9) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:16: EscapeSequence
+                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:16: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:33: ~ ('\\\\'|'\\'')
+                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:33: ~ ('\\\\'|'\\'')
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -897,8 +892,8 @@
     public void mHexDigit() throws RecognitionException {
         try {
             ruleNestingLevel++;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:597:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:597:12: ('0'..'9'|'a'..'f'|'A'..'F')
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599: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();
@@ -925,7 +920,7 @@
     public void mEscapeSequence() throws RecognitionException {
         try {
             ruleNestingLevel++;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:601:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
             int alt11=3;
             int LA11_0 = input.LA(1);
             if ( (LA11_0=='\\') ) {
@@ -956,7 +951,7 @@
                 default:
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("599:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 1, input);
+                        new NoViableAltException("601:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 1, input);
 
                     throw nvae;
                 }
@@ -965,13 +960,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("599:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 0, input);
+                    new NoViableAltException("601:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 0, input);
 
                 throw nvae;
             }
             switch (alt11) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:601:9: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603: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' ) {
@@ -989,14 +984,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:602:9: UnicodeEscape
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:604:9: UnicodeEscape
                     {
                     mUnicodeEscape(); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: OctalEscape
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:605:9: OctalEscape
                     {
                     mOctalEscape(); if (failed) return ;
 
@@ -1015,7 +1010,7 @@
     public void mOctalEscape() throws RecognitionException {
         try {
             ruleNestingLevel++;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
             int alt12=3;
             int LA12_0 = input.LA(1);
             if ( (LA12_0=='\\') ) {
@@ -1044,7 +1039,7 @@
                 else {
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("606:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+                        new NoViableAltException("608:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
 
                     throw nvae;
                 }
@@ -1052,31 +1047,31 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("606:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+                    new NoViableAltException("608:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
 
                 throw nvae;
             }
             switch (alt12) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:14: ( '0' .. '3' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:15: '0' .. '3'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:14: ( '0' .. '3' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:15: '0' .. '3'
                     {
                     matchRange('0','3'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:25: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:26: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:25: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:36: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:608:37: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:36: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:37: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -1086,18 +1081,18 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:14: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:15: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:14: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:25: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:609:26: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:25: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -1107,11 +1102,11 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:9: '\\\\' ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:9: '\\\\' ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:14: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:610:15: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:14: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -1133,8 +1128,8 @@
     public void mUnicodeEscape() throws RecognitionException {
         try {
             ruleNestingLevel++;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:615:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:615:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
             {
             match('\\'); if (failed) return ;
             match('u'); if (failed) return ;
@@ -1161,10 +1156,10 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:4: ( ( 'true' | 'false' ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:4: ( 'true' | 'false' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:4: ( ( 'true' | 'false' ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:4: ( 'true' | 'false' )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:4: ( 'true' | 'false' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:4: ( 'true' | 'false' )
             int alt13=2;
             int LA13_0 = input.LA(1);
             if ( (LA13_0=='t') ) {
@@ -1176,13 +1171,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("619:4: ( 'true' | 'false' )", 13, 0, input);
+                    new NoViableAltException("621:4: ( 'true' | 'false' )", 13, 0, input);
 
                 throw nvae;
             }
             switch (alt13) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:5: 'true'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:5: 'true'
                     {
                     match("true"); if (failed) return ;
 
@@ -1190,7 +1185,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:12: 'false'
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:12: 'false'
                     {
                     match("false"); if (failed) return ;
 
@@ -1228,8 +1223,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:622:8: ( '?' ('a'..'z'|'A'..'Z'|'_'|'$') ( SYMBOL )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:622:8: '?' ('a'..'z'|'A'..'Z'|'_'|'$') ( SYMBOL )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:8: ( '?' ('a'..'z'|'A'..'Z'|'_'|'$') ( SYMBOL )* )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624: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') ) {
@@ -1243,7 +1238,7 @@
                 recover(mse);    throw mse;
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:622:38: ( SYMBOL )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:38: ( SYMBOL )*
             loop14:
             do {
                 int alt14=2;
@@ -1255,7 +1250,7 @@
 
                 switch (alt14) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:622:38: SYMBOL
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:624:38: SYMBOL
             	    {
             	    mSYMBOL(); if (failed) return ;
 
@@ -1295,11 +1290,11 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:626:4: ( '#' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:626:4: '#' ( options {greedy=false; } : . )* EOL
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: ( '#' ( options {greedy=false; } : . )* EOL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:4: '#' ( options {greedy=false; } : . )* EOL
             {
             match('#'); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:626:8: ( options {greedy=false; } : . )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:8: ( options {greedy=false; } : . )*
             loop15:
             do {
                 int alt15=2;
@@ -1317,7 +1312,7 @@
 
                 switch (alt15) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:626:35: .
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1361,12 +1356,12 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:4: ( '//' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:4: '//' ( options {greedy=false; } : . )* EOL
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:4: ( '//' ( options {greedy=false; } : . )* EOL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:4: '//' ( options {greedy=false; } : . )* EOL
             {
             match("//"); if (failed) return ;
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:9: ( options {greedy=false; } : . )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:9: ( options {greedy=false; } : . )*
             loop16:
             do {
                 int alt16=2;
@@ -1384,7 +1379,7 @@
 
                 switch (alt16) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:36: .
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:634:36: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1428,8 +1423,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:638:4: ( '(' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:638:4: '('
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:4: ( '(' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:4: '('
             {
             match('('); if (failed) return ;
 
@@ -1460,8 +1455,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:642:4: ( ')' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:642:4: ')'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:4: ( ')' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:4: ')'
             {
             match(')'); if (failed) return ;
 
@@ -1492,8 +1487,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:646:4: ( '[' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:646:4: '['
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:4: ( '[' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:648:4: '['
             {
             match('['); if (failed) return ;
 
@@ -1524,8 +1519,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:650:4: ( ']' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:650:4: ']'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:4: ( ']' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:4: ']'
             {
             match(']'); if (failed) return ;
 
@@ -1556,8 +1551,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:654:4: ( '{' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:654:4: '{'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:4: ( '{' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:4: '{'
             {
             match('{'); if (failed) return ;
 
@@ -1588,8 +1583,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:658:4: ( '}' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:658:4: '}'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:4: ( '}' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:4: '}'
             {
             match('}'); if (failed) return ;
 
@@ -1620,8 +1615,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:9: ( '~' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:9: '~'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:663:9: ( '~' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:663:9: '~'
             {
             match('~'); if (failed) return ;
 
@@ -1652,8 +1647,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:665:4: ( '&' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:665:4: '&'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:4: ( '&' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:4: '&'
             {
             match('&'); if (failed) return ;
 
@@ -1684,8 +1679,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669:4: ( '|' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669:4: '|'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:4: ( '|' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:4: '|'
             {
             match('|'); if (failed) return ;
 
@@ -1716,8 +1711,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:673:4: ( '<-' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:673:4: '<-'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:4: ( '<-' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:4: '<-'
             {
             match("<-"); if (failed) return ;
 
@@ -1749,8 +1744,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:676:9: ( ':' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:676:9: ':'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:9: ( ':' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:9: ':'
             {
             match(':'); if (failed) return ;
 
@@ -1781,8 +1776,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:10: ( '=' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:10: '='
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:680:10: ( '=' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:680:10: '='
             {
             match('='); if (failed) return ;
 
@@ -1813,12 +1808,12 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:681:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:681:4: '/*' ( options {greedy=false; } : . )* '*/'
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:4: '/*' ( options {greedy=false; } : . )* '*/'
             {
             match("/*"); if (failed) return ;
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:681:9: ( options {greedy=false; } : . )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:9: ( options {greedy=false; } : . )*
             loop17:
             do {
                 int alt17=2;
@@ -1841,7 +1836,7 @@
 
                 switch (alt17) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:681:35: .
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1886,8 +1881,8 @@
             int _line = getLine();
             int _charPosition = getCharPositionInLine();
             int _channel = Token.DEFAULT_CHANNEL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:685:8: ( SYMBOL )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:685:8: SYMBOL
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:687:8: ( SYMBOL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:687:8: SYMBOL
             {
             mSYMBOL(); if (failed) return ;
 
@@ -1913,10 +1908,10 @@
     public void mSYMBOL() throws RecognitionException {
         try {
             ruleNestingLevel++;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:4: ( ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) ) (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:4: ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) ) (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:4: ( ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) ) (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))* )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:4: ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) ) (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:4: ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:4: ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) )
             int alt18=2;
             int LA18_0 = input.LA(1);
             if ( ((LA18_0>='\u0000' && LA18_0<='\b')||(LA18_0>='\u000B' && LA18_0<='\f')||(LA18_0>='\u000E' && LA18_0<='\u001F')||LA18_0=='!'||LA18_0=='#'||LA18_0=='%'||LA18_0=='\''||(LA18_0>='*' && LA18_0<=':')||(LA18_0>='<' && LA18_0<='>')||(LA18_0>='@' && LA18_0<='{')||LA18_0=='}'||(LA18_0>='\u007F' && LA18_0<='\uFFFE')) ) {
@@ -1928,16 +1923,16 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("689:4: ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) )", 18, 0, input);
+                    new NoViableAltException("691:4: ( (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')) | ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')) )", 18, 0, input);
 
                 throw nvae;
             }
             switch (alt18) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:5: (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:5: (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:5: (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:6: ~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$')
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:5: (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691: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();
@@ -1957,10 +1952,10 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:65: ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'))
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:65: ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'))
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:65: ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'))
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:66: '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<')
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:65: ( '$' ~ ('?'|' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'))
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691: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') ) {
@@ -1983,7 +1978,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:690:11: (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:692:11: (~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
             loop19:
             do {
                 int alt19=2;
@@ -1995,7 +1990,7 @@
 
                 switch (alt19) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:690:12: ~ (' '|'\\t'|'\\n'|'\\r'|'\"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?')
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:692: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();

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLocalDeclarationVariable.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLocalDeclarationVariable.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLocalDeclarationVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,87 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.drools.rule.Declaration;
-
-public class CLPLocalDeclarationVariable implements VariableValueHandler {
-    
-    private Declaration declaration;
-       
-    public CLPLocalDeclarationVariable(Declaration declaration) {
-        this.declaration = declaration;
-    }        
-    public String getIdentifier() {
-        return this.declaration.getIdentifier();
-    }
-
-    public Class getKnownType() {
-        return declaration.getExtractor().getExtractToClass();
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return this.declaration.getValueType().getSimpleType(); 
-    }
-
-    public void setValue(ExecutionContext context,
-                         Object object) {
-        throw new UnsupportedOperationException( "External Variable identifer='" + getIdentifier() + "' type='" + getKnownType() + "' is final, it cannot be set" );
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        return declaration.getValue( context.getObject() );
-    }
-    
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        Object object = declaration.getValue( context.getObject() );
-        if ( object instanceof BigDecimal ) {
-            return (BigDecimal) object;
-        } else {
-            return new BigDecimal( object.toString() );
-        }
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        Object object = declaration.getValue( context.getObject() );
-        if ( object instanceof BigInteger ) {
-            return (BigInteger) object;
-        } else {
-            return new BigInteger( object.toString() );
-        }
-    }    
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return declaration.getBooleanValue( context.getObject() );
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        return declaration.getDoubleValue( context.getObject() );
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        return declaration.getFloatValue( context.getObject() );
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        return declaration.getIntValue( context.getObject() );
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        return declaration.getLongValue( context.getObject() );
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        return declaration.getShortValue( context.getObject() );
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return (String) declaration.getValue( context.getObject() );
-    }
-    
-    public String toString() {
-        String name = getClass().getName();
-        name = name.substring( name.lastIndexOf( "." ) + 1 );
-        return "[" + name + " identifier = '" + getIdentifier()  + "']";
-    }    
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,42 +1,22 @@
-// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-03-24 14:22:23
+// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-03-24 19:53:23
 
 	package org.drools.clp;
-	import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+	
+	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;
 
-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.lang.descr.AndDescr;
-import org.drools.lang.descr.AttributeDescr;
-import org.drools.lang.descr.ColumnDescr;
-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.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;
 
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
 public class CLPParser extends Parser {
     public static final String[] tokenNames = new String[] {
         "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "DEFRULE", "NAME", "STRING", "RIGHT_PAREN", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "VAR", "ASSIGN_OP", "AMPERSAND", "PIPE", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "'=>'"
@@ -243,11 +223,11 @@
 
 
     // $ANTLR start deffunction
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:1: deffunction : ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:225:1: deffunction : ;
     public void deffunction() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:225:2: ()
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:225:2: 
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:227:2: ()
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:227:2: 
             {
             }
 
@@ -260,7 +240,7 @@
 
 
     // $ANTLR start defrule
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:227:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:229:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN ;
     public RuleDescr defrule() throws RecognitionException {
         RuleDescr rule = null;
 
@@ -277,8 +257,8 @@
         	        AttributeDescr module = null;	        
         	      
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:234:4: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:234:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:236:4: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:236:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= rhs RIGHT_PAREN
             {
             loc=(Token)input.LT(1);
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule68); 
@@ -321,7 +301,7 @@
             ruleAttribute(rule);
             _fsp--;
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:269:3: ( ce[lhs] )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:271:3: ( ce[lhs] )*
             loop1:
             do {
                 int alt1=2;
@@ -333,7 +313,7 @@
 
                 switch (alt1) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:269:3: ce[lhs]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:271:3: ce[lhs]
             	    {
             	    pushFollow(FOLLOW_ce_in_defrule106);
             	    ce(lhs);
@@ -371,16 +351,16 @@
 
 
     // $ANTLR start ruleAttribute
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:279:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
     public void ruleAttribute(RuleDescr rule) throws RecognitionException {
         AttributeDescr d = null;
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:3: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:3: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
             int alt3=2;
             int LA3_0 = input.LA(1);
             if ( (LA3_0==LEFT_PAREN) ) {
@@ -391,11 +371,11 @@
             }
             switch (alt3) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
                     {
                     match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute150); 
                     match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute152); 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:282:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:284:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
                     int alt2=2;
                     int LA2_0 = input.LA(1);
                     if ( (LA2_0==LEFT_PAREN) ) {
@@ -403,7 +383,7 @@
                     }
                     switch (alt2) {
                         case 1 :
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:282:6: LEFT_PAREN d= salience RIGHT_PAREN
+                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:284:6: LEFT_PAREN d= salience RIGHT_PAREN
                             {
                             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute159); 
                             pushFollow(FOLLOW_salience_in_ruleAttribute163);
@@ -441,7 +421,7 @@
 
 
     // $ANTLR start salience
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:286:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:288:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
     public AttributeDescr salience() throws RecognitionException {
         AttributeDescr d = null;
 
@@ -452,8 +432,8 @@
         		d = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:291:3: (loc= SALIENCE i= INT )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:291:3: loc= SALIENCE i= INT
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:293:3: (loc= SALIENCE i= INT )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:293:3: loc= SALIENCE i= INT
             {
             loc=(Token)input.LT(1);
             match(input,SALIENCE,FOLLOW_SALIENCE_in_salience204); 
@@ -481,13 +461,13 @@
 
 
     // $ANTLR start ce
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:301:1: ce[ConditionalElementDescr in_ce] : ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:303:1: ce[ConditionalElementDescr in_ce] : ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) ;
     public void ce(ConditionalElementDescr in_ce) throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:302:4: ( ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:302:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:4: ( ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:302:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
             int alt4=7;
             int LA4_0 = input.LA(1);
             if ( (LA4_0==LEFT_PAREN) ) {
@@ -512,7 +492,7 @@
                     break;
                 default:
                     NoViableAltException nvae =
-                        new NoViableAltException("302:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 4, 1, input);
+                        new NoViableAltException("304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 4, 1, input);
 
                     throw nvae;
                 }
@@ -523,13 +503,13 @@
             }
             else {
                 NoViableAltException nvae =
-                    new NoViableAltException("302:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 4, 0, input);
+                    new NoViableAltException("304:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 4, 0, input);
 
                 throw nvae;
             }
             switch (alt4) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:302:8: and_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:8: and_ce[in_ce]
                     {
                     pushFollow(FOLLOW_and_ce_in_ce234);
                     and_ce(in_ce);
@@ -539,7 +519,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:303:7: or_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:305:7: or_ce[in_ce]
                     {
                     pushFollow(FOLLOW_or_ce_in_ce244);
                     or_ce(in_ce);
@@ -549,7 +529,7 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:304:7: not_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:306:7: not_ce[in_ce]
                     {
                     pushFollow(FOLLOW_not_ce_in_ce253);
                     not_ce(in_ce);
@@ -559,7 +539,7 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:305:7: exists_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:307:7: exists_ce[in_ce]
                     {
                     pushFollow(FOLLOW_exists_ce_in_ce262);
                     exists_ce(in_ce);
@@ -569,7 +549,7 @@
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:306:8: eval_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:308:8: eval_ce[in_ce]
                     {
                     pushFollow(FOLLOW_eval_ce_in_ce276);
                     eval_ce(in_ce);
@@ -579,7 +559,7 @@
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:307:7: normal_pattern[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:309:7: normal_pattern[in_ce]
                     {
                     pushFollow(FOLLOW_normal_pattern_in_ce290);
                     normal_pattern(in_ce);
@@ -589,7 +569,7 @@
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:308:7: bound_pattern[in_ce]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:310:7: bound_pattern[in_ce]
                     {
                     pushFollow(FOLLOW_bound_pattern_in_ce299);
                     bound_pattern(in_ce);
@@ -617,7 +597,7 @@
 
 
     // $ANTLR start rhs
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:312:1: rhs returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:314:1: rhs returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
     public ExecutionEngine rhs() throws RecognitionException {
         ExecutionEngine engine = null;
 
@@ -629,10 +609,10 @@
         			ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );  	
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:319:3: ( (fc= lisp_list[context, new LispForm(context) ] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:319:3: (fc= lisp_list[context, new LispForm(context) ] )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:3: ( (fc= lisp_list[context, new LispForm(context) ] )* )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:3: (fc= lisp_list[context, new LispForm(context) ] )*
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:319:3: (fc= lisp_list[context, new LispForm(context) ] )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:3: (fc= lisp_list[context, new LispForm(context) ] )*
             loop5:
             do {
                 int alt5=2;
@@ -644,7 +624,7 @@
 
                 switch (alt5) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:319:4: fc= lisp_list[context, new LispForm(context) ]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:321:4: fc= lisp_list[context, new LispForm(context) ]
             	    {
             	    pushFollow(FOLLOW_lisp_list_in_rhs331);
             	    fc=lisp_list(context,  new LispForm(context) );
@@ -676,14 +656,14 @@
 
 
     // $ANTLR start and_ce
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:322:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:324:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
     public void and_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 AndDescr andDescr= null;        
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:326:4: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:326:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:328:4: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:328:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce359); 
             match(input,AND,FOLLOW_AND_in_and_ce364); 
@@ -691,7 +671,7 @@
             	    	andDescr = new AndDescr();
             			in_ce.addDescr( andDescr );
             		
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:331:3: ( ce[andDescr] )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:3: ( ce[andDescr] )+
             int cnt6=0;
             loop6:
             do {
@@ -704,7 +684,7 @@
 
                 switch (alt6) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:331:3: ce[andDescr]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:3: ce[andDescr]
             	    {
             	    pushFollow(FOLLOW_ce_in_and_ce370);
             	    ce(andDescr);
@@ -740,14 +720,14 @@
 
 
     // $ANTLR start or_ce
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:335:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
     public void or_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 OrDescr orDescr= null;         
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:339:4: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:339:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce407); 
             match(input,OR,FOLLOW_OR_in_or_ce412); 
@@ -755,7 +735,7 @@
             	    	orDescr = new OrDescr();
             			in_ce.addDescr( orDescr );
             		
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:344:3: ( ce[orDescr] )+
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:346:3: ( ce[orDescr] )+
             int cnt7=0;
             loop7:
             do {
@@ -768,7 +748,7 @@
 
                 switch (alt7) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:344:3: ce[orDescr]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:346:3: ce[orDescr]
             	    {
             	    pushFollow(FOLLOW_ce_in_or_ce418);
             	    ce(orDescr);
@@ -804,14 +784,14 @@
 
 
     // $ANTLR start not_ce
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:348:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:350:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
     public void not_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 NotDescr notDescr= null;         
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:352:4: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:352:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce455); 
             match(input,NOT,FOLLOW_NOT_in_not_ce460); 
@@ -840,14 +820,14 @@
 
 
     // $ANTLR start exists_ce
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:361:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:363:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
     public void exists_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 ExistsDescr existsDescr= null;        
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:4: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:365:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:367:4: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:367:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce503); 
             match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce508); 
@@ -876,7 +856,7 @@
 
 
     // $ANTLR start eval_ce
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:374:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:376:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
     public void eval_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         ValueHandler fc = null;
 
@@ -887,8 +867,8 @@
         		ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );   		         
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:380:4: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:380:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:4: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce550); 
             match(input,TEST,FOLLOW_TEST_in_eval_ce555); 
@@ -921,7 +901,7 @@
 
 
     // $ANTLR start normal_pattern
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:392:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN ;
     public void normal_pattern(ConditionalElementDescr in_ce) throws RecognitionException {
         Token name=null;
 
@@ -929,8 +909,8 @@
                 ColumnDescr column = null;
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:396:4: ( LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:396:4: LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: ( LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern602); 
             name=(Token)input.LT(1);
@@ -939,7 +919,7 @@
             			column = new ColumnDescr(name.getText());
             			in_ce.addDescr( column );
             		
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:401:3: ( field_constriant[column] )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:3: ( field_constriant[column] )*
             loop8:
             do {
                 int alt8=2;
@@ -951,7 +931,7 @@
 
                 switch (alt8) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:401:3: field_constriant[column]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:3: field_constriant[column]
             	    {
             	    pushFollow(FOLLOW_field_constriant_in_normal_pattern615);
             	    field_constriant(column);
@@ -983,7 +963,7 @@
 
 
     // $ANTLR start bound_pattern
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:407:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:409:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN ;
     public void bound_pattern(ConditionalElementDescr in_ce) throws RecognitionException {
         Token var=null;
         Token name=null;
@@ -993,8 +973,8 @@
                 String identifier = null;
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:412:4: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:412:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:414:4: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:414:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[column] )* RIGHT_PAREN
             {
             var=(Token)input.LT(1);
             match(input,VAR,FOLLOW_VAR_in_bound_pattern653); 
@@ -1010,7 +990,7 @@
             			column.setIdentifier( identifier );
             			in_ce.addDescr( column );	    
             		
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:421:3: ( field_constriant[column] )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:423:3: ( field_constriant[column] )*
             loop9:
             do {
                 int alt9=2;
@@ -1022,7 +1002,7 @@
 
                 switch (alt9) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:421:3: field_constriant[column]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:423:3: field_constriant[column]
             	    {
             	    pushFollow(FOLLOW_field_constriant_in_bound_pattern674);
             	    field_constriant(column);
@@ -1054,7 +1034,7 @@
 
 
     // $ANTLR start field_constriant
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:425:1: field_constriant[ColumnDescr column] : LEFT_PAREN f= NAME connected_constraint[fc, column] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:427:1: field_constriant[ColumnDescr column] : LEFT_PAREN f= NAME connected_constraint[fc, column] RIGHT_PAREN ;
     public void field_constriant(ColumnDescr column) throws RecognitionException {
         Token f=null;
 
@@ -1065,8 +1045,8 @@
         		String op = "==";
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:433:3: ( LEFT_PAREN f= NAME connected_constraint[fc, column] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:433:3: LEFT_PAREN f= NAME connected_constraint[fc, column] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:435:3: ( LEFT_PAREN f= NAME connected_constraint[fc, column] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:435:3: LEFT_PAREN f= NAME connected_constraint[fc, column] RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant712); 
             f=(Token)input.LT(1);
@@ -1098,17 +1078,17 @@
 
 
     // $ANTLR start connected_constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:445:1: connected_constraint[FieldConstraintDescr fc, ColumnDescr column] : restriction[fc, column] ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )? ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:1: connected_constraint[FieldConstraintDescr fc, ColumnDescr column] : restriction[fc, column] ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )? ;
     public void connected_constraint(FieldConstraintDescr fc, ColumnDescr column) throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:2: ( restriction[fc, column] ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:2: restriction[fc, column] ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:2: ( restriction[fc, column] ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )? )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:2: restriction[fc, column] ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )?
             {
             pushFollow(FOLLOW_restriction_in_connected_constraint753);
             restriction(fc,  column);
             _fsp--;
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:448:2: ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:450:2: ( AMPERSAND connected_constraint[fc, column] | PIPE connected_constraint[fc, column] )?
             int alt10=3;
             int LA10_0 = input.LA(1);
             if ( (LA10_0==AMPERSAND) ) {
@@ -1119,7 +1099,7 @@
             }
             switch (alt10) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:6: AMPERSAND connected_constraint[fc, column]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:451:6: AMPERSAND connected_constraint[fc, column]
                     {
                     match(input,AMPERSAND,FOLLOW_AMPERSAND_in_connected_constraint765); 
                      fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); 
@@ -1131,7 +1111,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:452:6: PIPE connected_constraint[fc, column]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:454:6: PIPE connected_constraint[fc, column]
                     {
                     match(input,PIPE,FOLLOW_PIPE_in_connected_constraint786); 
                     fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); 
@@ -1161,7 +1141,7 @@
 
 
     // $ANTLR start restriction
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:457:1: restriction[FieldConstraintDescr fc, ColumnDescr column] : ( TILDE )? ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:459:1: restriction[FieldConstraintDescr fc, ColumnDescr column] : ( TILDE )? ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) ;
     public void restriction(FieldConstraintDescr fc, ColumnDescr column) throws RecognitionException {
         String lc = null;
 
@@ -1170,10 +1150,10 @@
         			String op = "==";
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:461:4: ( ( TILDE )? ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:461:4: ( TILDE )? ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: ( ( TILDE )? ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: ( TILDE )? ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:461:4: ( TILDE )?
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: ( TILDE )?
             int alt11=2;
             int LA11_0 = input.LA(1);
             if ( (LA11_0==TILDE) ) {
@@ -1181,7 +1161,7 @@
             }
             switch (alt11) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:461:5: TILDE
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:5: TILDE
                     {
                     match(input,TILDE,FOLLOW_TILDE_in_restriction821); 
                     op = "!=";
@@ -1191,7 +1171,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:462:3: ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:464:3: ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
             int alt12=4;
             switch ( input.LA(1) ) {
             case COLON:
@@ -1213,14 +1193,14 @@
                 break;
             default:
                 NoViableAltException nvae =
-                    new NoViableAltException("462:3: ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 12, 0, input);
+                    new NoViableAltException("464:3: ( predicate_constraint[op, column] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 12, 0, input);
 
                 throw nvae;
             }
 
             switch (alt12) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:462:5: predicate_constraint[op, column]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:464:5: predicate_constraint[op, column]
                     {
                     pushFollow(FOLLOW_predicate_constraint_in_restriction837);
                     predicate_constraint(op,  column);
@@ -1230,7 +1210,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:7: return_value_restriction[op, fc]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:465:7: return_value_restriction[op, fc]
                     {
                     pushFollow(FOLLOW_return_value_restriction_in_restriction853);
                     return_value_restriction(op,  fc);
@@ -1240,7 +1220,7 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:464:7: variable_restriction[op, fc]
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:466:7: variable_restriction[op, fc]
                     {
                     pushFollow(FOLLOW_variable_restriction_in_restriction862);
                     variable_restriction(op,  fc);
@@ -1250,7 +1230,7 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:465:8: lc= literal_restriction
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:467:8: lc= literal_restriction
                     {
                     pushFollow(FOLLOW_literal_restriction_in_restriction874);
                     lc=literal_restriction();
@@ -1282,7 +1262,7 @@
 
 
     // $ANTLR start predicate_constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:1: predicate_constraint[String op, ColumnDescr column] : COLON fc= lisp_list[context, new LispForm(context)] ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:474:1: predicate_constraint[String op, ColumnDescr column] : COLON fc= lisp_list[context, new LispForm(context)] ;
     public void predicate_constraint(String op, ColumnDescr column) throws RecognitionException {
         ValueHandler fc = null;
 
@@ -1292,8 +1272,8 @@
         		ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );    
             
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:477:4: ( COLON fc= lisp_list[context, new LispForm(context)] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:477:4: COLON fc= lisp_list[context, new LispForm(context)]
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:479:4: ( COLON fc= lisp_list[context, new LispForm(context)] )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:479:4: COLON fc= lisp_list[context, new LispForm(context)]
             {
             match(input,COLON,FOLLOW_COLON_in_predicate_constraint916); 
             pushFollow(FOLLOW_lisp_list_in_predicate_constraint922);
@@ -1320,7 +1300,7 @@
 
 
     // $ANTLR start return_value_restriction
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:486:1: return_value_restriction[String op, FieldConstraintDescr fc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:488:1: return_value_restriction[String op, FieldConstraintDescr fc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
     public void return_value_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
         ValueHandler func = null;
 
@@ -1330,8 +1310,8 @@
         		ExecutionBuildContext context = new ExecutionBuildContext( engine, functionRegistry );
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:491:4: ( EQUALS func= lisp_list[context, new LispForm(context)] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:491:4: EQUALS func= lisp_list[context, new LispForm(context)]
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:493:4: ( EQUALS func= lisp_list[context, new LispForm(context)] )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:493:4: EQUALS func= lisp_list[context, new LispForm(context)]
             {
             match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction948); 
             pushFollow(FOLLOW_lisp_list_in_return_value_restriction955);
@@ -1358,13 +1338,13 @@
 
 
     // $ANTLR start variable_restriction
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:498:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
     public void variable_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
         Token var=null;
 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:499:4: (var= VAR )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:499:4: var= VAR
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:501:4: (var= VAR )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:501:4: var= VAR
             {
             var=(Token)input.LT(1);
             match(input,VAR,FOLLOW_VAR_in_variable_restriction976); 
@@ -1387,7 +1367,7 @@
 
 
     // $ANTLR start literal_restriction
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:505:1: literal_restriction returns [String text] : t= literal ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:507:1: literal_restriction returns [String text] : t= literal ;
     public String literal_restriction() throws RecognitionException {
         String text = null;
 
@@ -1398,8 +1378,8 @@
         		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:510:6: (t= literal )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:510:6: t= literal
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:6: (t= literal )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:6: t= literal
             {
             pushFollow(FOLLOW_literal_in_literal_restriction1009);
             t=literal();
@@ -1424,7 +1404,7 @@
 
 
     // $ANTLR start lisp_list
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:515:1: lisp_list[ExecutionBuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:517:1: lisp_list[ExecutionBuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
     public ValueHandler lisp_list(ExecutionBuildContext context, LispList list) throws RecognitionException {
         ValueHandler valueHandler = null;
 
@@ -1432,11 +1412,11 @@
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:516:4: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:516:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:518:4: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:518:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
             {
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1028); 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:517:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:519:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
             loop13:
             do {
                 int alt13=3;
@@ -1451,7 +1431,7 @@
 
                 switch (alt13) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:517:6: a= lisp_atom[context]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:519:6: a= lisp_atom[context]
             	    {
             	    pushFollow(FOLLOW_lisp_atom_in_lisp_list1038);
             	    a=lisp_atom(context);
@@ -1462,7 +1442,7 @@
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:518:6: a= lisp_list[context, list.createList()]
+            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:520:6: a= lisp_list[context, list.createList()]
             	    {
             	    pushFollow(FOLLOW_lisp_list_in_lisp_list1054);
             	    a=lisp_list(context,  list.createList());
@@ -1496,7 +1476,7 @@
 
 
     // $ANTLR start lisp_atom
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:524:1: lisp_atom[ExecutionBuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:526:1: lisp_atom[ExecutionBuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
     public ValueHandler lisp_atom(ExecutionBuildContext context) throws RecognitionException {
         ValueHandler value = null;
 
@@ -1506,10 +1486,10 @@
         		value  =  null;		
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:529:3: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:529:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:529:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
             int alt14=7;
             switch ( input.LA(1) ) {
             case VAR:
@@ -1535,14 +1515,14 @@
                 break;
             default:
                 NoViableAltException nvae =
-                    new NoViableAltException("529:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 14, 0, input);
+                    new NoViableAltException("531:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 14, 0, input);
 
                 throw nvae;
             }
 
             switch (alt14) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:529:6: t= VAR
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:6: t= VAR
                     {
                     t=(Token)input.LT(1);
                     match(input,VAR,FOLLOW_VAR_in_lisp_atom1121); 
@@ -1551,56 +1531,56 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:530:6: t= STRING
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:532:6: t= STRING
                     {
                     t=(Token)input.LT(1);
                     match(input,STRING,FOLLOW_STRING_in_lisp_atom1133); 
-                     value = new ObjectValueHandler( getString( t ) ); 
+                     value = new ObjectLiteralValue( getString( t ) ); 
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:7: t= NAME
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:533:7: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_lisp_atom1148); 
-                     value = new ObjectValueHandler( t.getText() ); 
+                    match(input,NAME,FOLLOW_NAME_in_lisp_atom1145); 
+                     value = new ObjectLiteralValue( t.getText() ); 
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:532:6: t= FLOAT
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:534:6: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1163); 
-                     value = new DoubleValueHandler( t.getText() ); 
+                    match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1160); 
+                     value = new DoubleLiteralValue( t.getText() ); 
 
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:533:6: t= INT
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:535:6: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_lisp_atom1175); 
-                     value = new LongValueHandler( t.getText() ); 
+                    match(input,INT,FOLLOW_INT_in_lisp_atom1172); 
+                     value = new LongLiteralValue( t.getText() ); 
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:534:6: t= BOOL
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:536:6: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1191); 
-                     value = new BooleanValueHandler( t.getText() ); 
+                    match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1188); 
+                     value = new BooleanLiteralValue( t.getText() ); 
 
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:535:6: t= NULL
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:537:6: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_lisp_atom1209); 
-                     value = ObjectValueHandler.NULL; 
+                    match(input,NULL,FOLLOW_NULL_in_lisp_atom1206); 
+                     value = ObjectLiteralValue.NULL; 
 
                     }
                     break;
@@ -1623,7 +1603,7 @@
 
 
     // $ANTLR start literal
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:539:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:541:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
     public String literal() throws RecognitionException {
         String text = null;
 
@@ -1633,10 +1613,10 @@
         		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:543:4: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:543:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:543:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
             int alt15=6;
             switch ( input.LA(1) ) {
             case STRING:
@@ -1659,62 +1639,62 @@
                 break;
             default:
                 NoViableAltException nvae =
-                    new NoViableAltException("543:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 15, 0, input);
+                    new NoViableAltException("545:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 15, 0, input);
 
                 throw nvae;
             }
 
             switch (alt15) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:543:8: t= STRING
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:8: t= STRING
                     {
                     t=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_literal1245); 
+                    match(input,STRING,FOLLOW_STRING_in_literal1242); 
                      text = getString( t ); 
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:544:7: t= NAME
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:546:7: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_literal1258); 
+                    match(input,NAME,FOLLOW_NAME_in_literal1255); 
                      text = t.getText(); 
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:545:7: t= INT
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:547:7: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_literal1274); 
+                    match(input,INT,FOLLOW_INT_in_literal1271); 
                      text = t.getText(); 
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:546:7: t= FLOAT
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:548:7: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_literal1289); 
+                    match(input,FLOAT,FOLLOW_FLOAT_in_literal1286); 
                      text = t.getText(); 
 
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:547:7: t= BOOL
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:549:7: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_literal1302); 
+                    match(input,BOOL,FOLLOW_BOOL_in_literal1299); 
                      text = t.getText(); 
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:548:7: t= NULL
+                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:550:7: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_literal1316); 
+                    match(input,NULL,FOLLOW_NULL_in_literal1313); 
                      text = null; 
 
                     }
@@ -1820,16 +1800,16 @@
     public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1084 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_VAR_in_lisp_atom1121 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_STRING_in_lisp_atom1133 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NAME_in_lisp_atom1148 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_lisp_atom1163 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_lisp_atom1175 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_lisp_atom1191 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_lisp_atom1209 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_literal1245 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NAME_in_literal1258 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_literal1274 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_literal1289 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_literal1302 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_literal1316 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NAME_in_lisp_atom1145 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_lisp_atom1160 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_lisp_atom1172 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_lisp_atom1188 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_lisp_atom1206 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_literal1242 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NAME_in_literal1255 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_literal1271 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_literal1286 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_literal1299 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_literal1313 = new BitSet(new long[]{0x0000000000000002L});
 
 }
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPredicate.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPredicate.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPredicate.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -6,6 +6,7 @@
 import java.util.Map;
 
 import org.drools.WorkingMemory;
+import org.drools.clp.valuehandlers.FunctionCaller;
 import org.drools.common.InternalWorkingMemory;
 import org.drools.reteoo.ReteTuple;
 import org.drools.rule.Declaration;

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPreviousDeclarationVariable.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPreviousDeclarationVariable.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPreviousDeclarationVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,100 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.drools.common.InternalFactHandle;
-import org.drools.rule.Declaration;
-
-public class CLPPreviousDeclarationVariable implements VariableValueHandler {
-
-    private Declaration declaration;
-    
-    public CLPPreviousDeclarationVariable(Declaration declaration) {
-        this.declaration = declaration;
-    }
-
-    public String getIdentifier() {
-        return this.declaration.getIdentifier();
-    }
-
-    public Class getKnownType() {
-        return declaration.getExtractor().getExtractToClass();
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return this.declaration.getValueType().getSimpleType(); 
-    }
-
-    public void setValue(ExecutionContext context,
-                         Object object) {
-        throw new UnsupportedOperationException( "External Variable identifer='" + getIdentifier() + "' type='" + getKnownType() + "' is final, it cannot be set" );
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getValue( handle.getObject() );
-    }
-    
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        Object object = declaration.getValue(  handle.getObject() );
-        if ( object instanceof BigDecimal ) {
-            return (BigDecimal) object;
-        } else {
-            return new BigDecimal( object.toString() );
-        }
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        Object object = declaration.getValue(  handle.getObject() );
-        if ( object instanceof BigInteger ) {
-            return (BigInteger) object;
-        } else {
-            return new BigInteger( object.toString() );
-        }
-    }    
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getBooleanValue( handle.getObject() );
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getDoubleValue( handle.getObject() );
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getFloatValue( handle.getObject() );
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getIntValue( handle.getObject() );
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getLongValue( handle.getObject() );
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return declaration.getShortValue( handle.getObject() );
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        InternalFactHandle handle = context.getTuple().get( this.declaration );
-        return (String) declaration.getValue( handle.getObject() );
-    }
-    
-    public String toString() {
-        String name = getClass().getName();
-        name = name.substring( name.lastIndexOf( "." ) + 1 );
-        return "[" + name + " identifier = '" + getIdentifier()  + "']";
-    }    
-        
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPReturnValue.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPReturnValue.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPReturnValue.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -7,6 +7,7 @@
 
 import org.drools.WorkingMemory;
 import org.drools.base.FieldFactory;
+import org.drools.clp.valuehandlers.FunctionCaller;
 import org.drools.common.InternalWorkingMemory;
 import org.drools.reteoo.ReteTuple;
 import org.drools.rule.Declaration;

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/Deffunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/Deffunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/Deffunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,5 +1,9 @@
 package org.drools.clp;
 
+import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.ObjectValueHandler;
+
 public class Deffunction
     implements
     Function {

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/DoubleValueHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/DoubleValueHandler.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/DoubleValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,90 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.drools.base.SimpleValueType;
-
-public class DoubleValueHandler implements ValueHandler {
-    private double doubleValue;
-    
-    public DoubleValueHandler(String doubleValue) {
-        this.doubleValue = Double.valueOf( doubleValue ).doubleValue();
-    }
-    
-    public DoubleValueHandler(double doubleValue) {
-        this.doubleValue = doubleValue;
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.DECIMAL;
-    }
-
-    public void setValue(ExecutionContext context, Object value) {
-        throw new RuntimeException( "LiteralValues cannot be set");
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        return new Double( this.doubleValue );
-    }
-    
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        return new BigDecimal( this.doubleValue );
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        return BigInteger.valueOf( (long) this.doubleValue );
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return ( this.doubleValue == 0 ) ? false : true;
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        return this.doubleValue;
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        return (float) this.doubleValue;
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        return (int) this.doubleValue;
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        return (long) this.doubleValue;
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        return (short) this.doubleValue;
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return Double.toString( this.doubleValue );
-    }
-
-    public String toString() {
-        return "[DoubleLiteralValue value='" + this.doubleValue + "']";
-    }    
-    
-    public int hashCode() {
-        final int PRIME = 31;
-        int result = 1;
-        long temp;
-        temp = Double.doubleToLongBits( doubleValue );
-        result = PRIME * result + (int) (temp ^ (temp >>> 32));
-        return result;
-    }
-
-    public boolean equals(Object obj) {
-        if ( this == obj ) return true;
-        if ( obj == null ) return false;
-        if ( !(obj instanceof DoubleValueHandler) ) return false;
-        final DoubleValueHandler other = (DoubleValueHandler) obj;
-        if ( Double.doubleToLongBits( doubleValue ) != Double.doubleToLongBits( other.doubleValue ) ) return false;
-        return true;
-    }
-    
-    
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionBuildContext.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionBuildContext.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionBuildContext.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -4,6 +4,10 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.LocalVariableValue;
+import org.drools.clp.valuehandlers.TempTokenVariable;
+
 public class ExecutionBuildContext {
     private Map              vars       = new HashMap();
     private Map              properties = Collections.EMPTY_MAP;

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionEngine.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionEngine.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ExecutionEngine.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,5 +1,7 @@
 package org.drools.clp;
 
+import org.drools.clp.valuehandlers.FunctionCaller;
+
 public interface ExecutionEngine {
     public void addFunction(FunctionCaller function);
     

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/FunctionCaller.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/FunctionCaller.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/FunctionCaller.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,137 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Map;
-
-import org.drools.base.SimpleValueType;
-
-public class FunctionCaller
-    implements
-    ValueHandler {
-    private Function         function;
-
-    protected ValueHandler[] parameters;
-
-    public FunctionCaller() {
-        this( null );
-    }
-
-    public FunctionCaller(Function function) {
-        this.function = function;
-    }
-
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.FUNCTION;
-    }
-
-    public void setFunction(Function function) {
-        this.function = function;
-    }
-
-    public Function getFunction() {
-        return this.function;
-    }
-
-    public String getName() {
-        return (this.function == null) ? null : this.function.getName();
-    }
-
-    public LispList createList(int index) {
-        return this.function.createList( index );
-    }
-
-    public void addParameter(ValueHandler valueHandler) {
-        if ( this.parameters == null ) {
-            this.parameters = new ValueHandler[]{valueHandler};
-        } else {
-            ValueHandler[] temp = new ValueHandler[parameters.length + 1];
-            System.arraycopy( this.parameters,
-                              0,
-                              temp,
-                              0,
-                              this.parameters.length );
-            temp[temp.length - 1] = valueHandler;
-            this.parameters = temp;
-        }
-    }
-
-    public ValueHandler[] getParameters() {
-        return this.parameters;
-    }
-
-    private ValueHandler resolveFunction(FunctionCaller caller,
-                                         ExecutionContext context) {
-        ValueHandler result = caller.getFunction().execute( caller.getParameters(),
-                                                            context );
-        if ( result instanceof FunctionCaller ) {
-            result = resolveFunction( (FunctionCaller) result,
-                                      context );
-        }
-        return result;
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        return resolveFunction( this,
-                                context ).getValue( context );
-    }    
-
-    public void setValue(ExecutionContext context,
-                         Object object) {
-        throw new RuntimeException( "You cannot set the value on a Function" );
-    }
-
-    public void replaceTempTokens(Map variables) {
-        for ( int i = 0, length = this.parameters.length; i < length; i++ ) {
-            if ( this.parameters[i] instanceof TempTokenVariable ) {
-                TempTokenVariable var = (TempTokenVariable) this.parameters[i];
-                this.parameters[i] = (ValueHandler) variables.get( var.getIdentifier() );
-            } else if ( this.parameters[i] instanceof FunctionCaller ) {
-                ((FunctionCaller) parameters[i]).replaceTempTokens( variables );
-            } else if ( this.parameters[i] instanceof ListValueHandler ) {
-                ((ListValueHandler) parameters[i]).replaceTempTokens( variables );
-            }
-        }
-    }
-
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getBigDecimalValue( context );
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getBigIntegerValue( context );
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return resolveFunction( this, context ).getBooleanValue( context );
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getDoubleValue( context );
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getFloatValue( context );
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getIntValue( context );
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getLongValue( context );
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        return resolveFunction( this, context ).getShortValue( context );
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return resolveFunction( this, context ).getStringValue( context );
-    }
-
-    public String toString() {
-        return "[FunctionCaller " + this.function + "]";
-    }
-
-}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispData.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispData.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispData.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,5 +1,7 @@
 package org.drools.clp;
 
+import org.drools.clp.valuehandlers.ListValueHandler;
+
 public class LispData
     implements
     LispList {

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispForm.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispForm.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LispForm.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,5 +1,7 @@
 package org.drools.clp;
 
+import org.drools.clp.valuehandlers.FunctionCaller;
+
 public class LispForm implements LispList {    
     private ExecutionBuildContext context;
     private FunctionCaller caller;

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ListValueHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ListValueHandler.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ListValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,111 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Map;
-
-import org.drools.base.SimpleValueType;
-
-public class ListValueHandler implements ValueHandler {
-    private ValueHandler[] list;
-    
-    public ListValueHandler() {
-        
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.LIST;
-    }    
-    
-    public void add(ValueHandler valueHandler) {
-        if (this.list == null) {
-            this.list = new ValueHandler[] { valueHandler};
-        } else {
-            ValueHandler[] temp =  new ValueHandler[ this.list.length + 1 ];
-            System.arraycopy( this.list, 0, temp, 0, this.list.length );
-            temp[ temp.length - 1] = valueHandler;
-            this.list = temp;             
-        }            
-    }
-    
-    public ValueHandler[] getList() {
-        return this.list;
-    }
-
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return BigDecimal" );
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return BigInteger" );
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        throw new RuntimeException( "ListValueHandler cannot return Boolean" );
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return Double" );
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return Float" );
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return Int" );
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return Long" );
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        throw new RuntimeException( "ListValueHandler cannot return Short" );
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        throw new RuntimeException( "ListValueHandler cannot return String" );
-    }
-
-    public Object getValue(ExecutionContext context) {
-        return this.list;
-    }
-
-    public void setValue(ExecutionContext context,
-                         Object object) {
-        throw new RuntimeException( "cannot set value on ListValueHandler" );       
-    }
-    
-    public void replaceTempTokens(Map variables) {
-        for ( int i = 0, length = this.list.length; i < length; i++ ) {
-            if ( this.list[i] instanceof TempTokenVariable ) {
-                TempTokenVariable var = ( TempTokenVariable ) this.list[i]; 
-                this.list[i] = ( ValueHandler ) variables.get( var.getIdentifier() );
-            } else if ( this.list[i] instanceof FunctionCaller ) {
-                ((FunctionCaller)list[i]).replaceTempTokens( variables );
-            } else if ( this.list[i] instanceof ListValueHandler ) {
-                ((ListValueHandler)list[i]).replaceTempTokens( variables );
-            }
-        }  
-    }    
-    
-    public int size() {
-        return (this.list == null) ? 0 : this.list.length;
-    }
-    
-    public boolean isEmpty() {
-        return (this.list == null) ? true : this.list.length > 0; 
-    }
-    
-    public String toString() {
-        StringBuffer b = new StringBuffer();
-        b.append( "[ListValueHandler " );
-        for ( int i = 0, length = this.list.length; i < length; i++ ) {
-            b.append( this.list[i] + " " );
-        }
-        b.append("]");
-                
-        return b.toString();
-    }
-}

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LocalVariableValue.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LocalVariableValue.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LocalVariableValue.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,58 +0,0 @@
-package org.drools.clp;
-
-
-public class LocalVariableValue extends BaseValueHandler implements VariableValueHandler {
-    private static final long serialVersionUID = 320L;    
-
-    /** The identifier for the variable. */
-    private final String      identifier;    
-    private final int         index;
-    
-    /**
-     * Construct.
-     * 
-     * @param identifier
-     *            The name of the variable.
-     */
-    public LocalVariableValue(final String identifier, final int index) {
-        this.identifier = identifier;
-        this.index = index;
-    }
-    
-    /**
-     * Retrieve the variable's identifier.
-     * 
-     * @return The variable's identifier.
-     */
-    public String getIdentifier() {
-        return this.identifier;
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return context.getLocalVariable( this.index ).getValueType( context );
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        Object object = context.getLocalVariable( this.index ).getValue( context );
-        //if ( object instanceof )
-        return object;
-    }        
-    
-    public ValueHandler getRawValue(ExecutionContext context) {
-        // this is a hack as some parts of the system need the ValueHandler and not the Value
-        return context.getLocalVariable( this.index );
-    }
-
-    public void setValue(ExecutionContext context,
-                         Object object) {
-        context.setLocalVariable( this.index, (ValueHandler) object );        
-    }        
-    
-    public String toString() {
-        String name = getClass().getName();
-        name = name.substring( name.lastIndexOf( "." ) + 1 );
-        return "[" + name + " identifier = '" + getIdentifier()  + "']";
-    }    
-        
-}
-

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LongValueHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LongValueHandler.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LongValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,88 +0,0 @@
-package org.drools.clp;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.drools.base.SimpleValueType;
-
-public class LongValueHandler implements ValueHandler {
-    private long longValue;
-    
-    public LongValueHandler(String longValue) {
-        this.longValue = Long.valueOf( longValue ).longValue();
-    } 
-    
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.INTEGER;
-    }    
-    
-    public LongValueHandler(long longValue) {
-        this.longValue = longValue;
-    }
-
-    public void setValue(ExecutionContext context, Object value) {
-        throw new RuntimeException( "LiteralValues cannot be set");
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        return new Long( this.longValue );
-    }
-    
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        return new BigDecimal( this.longValue );
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        return BigInteger.valueOf( this.longValue );
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return ( this.longValue == 0 ) ? false : true;
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        return this.longValue;
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        return this.longValue;
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        return (int) this.longValue;
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        return this.longValue;
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        return (short) this.longValue;
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return Long.toString( this.longValue );
-    }
-    
-    public String toString() {
-        return "[LongLiteralValue value='" + this.longValue + "']";
-    }
-
-    public int hashCode() {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + (int) (longValue ^ (longValue >>> 32));
-        return result;
-    }
-
-    public boolean equals(Object obj) {
-        if ( this == obj ) return true;
-        if ( obj == null ) return false;
-        if ( ! ( obj instanceof LongValueHandler ) ) return false;
-        final LongValueHandler other = (LongValueHandler) obj;
-        if ( longValue != other.longValue ) return false;
-        return true;
-    }      
-    
-    
-}

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ObjectValueHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ObjectValueHandler.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ObjectValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,62 +0,0 @@
-package org.drools.clp;
-
-import org.drools.base.SimpleValueType;
-
-public class ObjectValueHandler extends BaseValueHandler {
-    public static final ObjectValueHandler NULL = new ObjectValueHandler( "null" );    
-    
-    private Object objectValue;
-    
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.OBJECT;
-    }
-    
-    public ObjectValueHandler(Object objectValue) {
-        this.objectValue = objectValue;
-    }
-
-    public void setValue(ExecutionContext context, Object value) {
-        throw new RuntimeException( "LiteralValues cannot be set");
-    }
-    
-    public Object getValue(ExecutionContext context) {
-        return this.objectValue;
-    }
-    /*
-    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
-        return (BigDecimal) getValue(context);
-    }
-
-    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
-        return (BigInteger) getValue(context);
-    }
-
-    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
-        return ((Boolean) getValue(context)).booleanValue();
-    }
-
-    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
-        return ((Double) getValue(context)).doubleValue();
-    }
-
-    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
-        return ((Float) getValue(context)).floatValue();
-    }
-
-    public int getIntValue(ExecutionContext context) throws NumberFormatException {
-        return ((Integer) getValue(context)).intValue();
-    }
-
-    public long getLongValue(ExecutionContext context) throws NumberFormatException {
-        return ((Long) getValue(context)).longValue();
-    }
-
-    public short getShortValue(ExecutionContext context) throws NumberFormatException {
-        return ((Short) getValue(context)).shortValue();
-    }
-
-    public String getStringValue(ExecutionContext context) {
-        return (String) getValue(context);
-    }      */
-
-}

Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/TempTokenVariable.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/TempTokenVariable.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/TempTokenVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,34 +0,0 @@
-package org.drools.clp;
-
-import org.drools.base.SimpleValueType;
-
-
-public class TempTokenVariable extends BaseValueHandler implements VariableValueHandler {
-
-    private String identifier;
-    
-    public TempTokenVariable(String identifier) {
-        this.identifier = identifier;
-    }
-
-    public String getIdentifier() {
-        return this.identifier;
-    }
-    
-    public int getValueType(ExecutionContext context) {
-        return SimpleValueType.UNKNOWN;
-    }    
-
-    public Object getValue(ExecutionContext context) {
-        throw new UnsupportedOperationException( "TempTokenVariable Variable identifer='" + getIdentifier() + " cannot be read" );
-    }
-
-    public void setValue(ExecutionContext context, Object value) {
-        throw new UnsupportedOperationException( "TempTokenVariable Variable identifer='" + getIdentifier() + " cannot be set" );
-    }
-
-    public void setContext(ExecutionContext context) {
-
-    }
-
-}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BaseValueHandler.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BaseValueHandler.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BaseValueHandler.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BaseValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,67 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+
+public abstract class BaseValueHandler implements ValueHandler {        
+    
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        Object object = getValue( context );
+        if ( object instanceof BigDecimal ) {
+            return (BigDecimal) object;
+        } else {
+            return new BigDecimal( object.toString() );
+        }
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        Object object = getValue( context );
+        if ( object instanceof BigInteger ) {
+            return (BigInteger) object;
+        } else {
+            return new BigInteger( object.toString() );
+        }
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return ((Boolean) getValue(context)).booleanValue();
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        return ((Double) getValue(context)).doubleValue();
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        return ((Float) getValue(context)).floatValue();
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        return ((Integer) getValue(context)).intValue();
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        return ((Long) getValue(context)).longValue();
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        return ((Short) getValue(context)).shortValue();
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return (String) getValue(context);
+    }      
+    
+    public String toString() {
+        String name = getClass().getName();
+        name = name.substring( name.lastIndexOf( "." ) + 1 );
+        try {
+            return "[" + name + " value = '" + getValue(null) + "']";
+        } catch (Exception e) {
+            return "[" + name + " value = N/A]";
+        }
+    }
+    
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BooleanValueHandler.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/BooleanValueHandler.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BooleanValueHandler.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/BooleanValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,90 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+
+public class BooleanValueHandler implements ValueHandler {
+    private boolean booleanValue;
+    
+    public BooleanValueHandler(String booleanValue) {
+        this.booleanValue = Boolean.valueOf( booleanValue ).booleanValue();
+    } 
+    
+    public BooleanValueHandler(boolean booleanValue) {
+        this.booleanValue = booleanValue;
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.BOOLEAN;
+    }
+
+    public void setValue(ExecutionContext context, Object value) {
+        throw new RuntimeException( "LiteralValues cannot be set");
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        return new Boolean( this.booleanValue );
+    }
+    
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to BitDecimal" );
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to BitInteger" );
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return this.booleanValue;
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to double" );
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to float" );
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to int" );
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to long" );
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "Boolean format exception, cannot be cast to short" ); 
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return Boolean.toString( this.booleanValue );
+    }      
+    
+    public String toString() {
+        return "[BooleanLiteralValue value='" + this.booleanValue + "']";
+    }
+
+    public int hashCode() {
+        final int PRIME = 31;
+        int result = 1;
+        result = PRIME * result + (booleanValue ? 1231 : 1237);
+        return result;
+    }
+
+    public boolean equals(Object obj) {
+        if ( this == obj ) return true;
+        if ( obj == null ) return false;
+        if ( !(obj instanceof BooleanValueHandler) ) return false;
+        final BooleanValueHandler other = (BooleanValueHandler) obj;
+        if ( booleanValue != other.booleanValue ) return false;
+        return true;
+    }
+    
+    
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPGlobalVariable.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPGlobalVariable.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPGlobalVariable.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPGlobalVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,50 @@
+package org.drools.clp.ValueHandlers;
+
+import org.drools.clp.CLPFactory;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.VariableValueHandler;
+
+
+public class CLPGlobalVariable extends BaseValueHandler implements VariableValueHandler  {
+    
+    private String identifier;
+    private Class knownType;
+    private int simpleType;
+    private CLPFactory factory;
+       
+    public CLPGlobalVariable(String identifier,
+                                    Class knownType,
+                                    int simpleType,
+                                    CLPFactory factory ) {
+        this.identifier = identifier;
+        this.factory =  factory;
+        this.knownType = knownType;
+    }
+    
+    public String getIdentifier() {
+        return this.identifier;
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return this.simpleType;
+    }    
+
+    public Class getKnownType() {
+        return this.knownType;
+    }
+
+    public Object getValue(ExecutionContext context) {
+        return this.factory.getValue( this.identifier );
+    }
+
+    public void setValue(ExecutionContext context, Object value) {
+        throw new UnsupportedOperationException( "External Variable identifer='" + getIdentifier() + "' type='" + getKnownType() + "' is final, it cannot be set" );
+    }       
+    
+    public String toString() {
+        String name = getClass().getName();
+        name = name.substring( name.lastIndexOf( "." ) + 1 );
+        return "[" + name + " identifier = '" + getIdentifier()  + "']";
+    }        
+
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPLocalDeclarationVariable.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLocalDeclarationVariable.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPLocalDeclarationVariable.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPLocalDeclarationVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,89 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.VariableValueHandler;
+import org.drools.rule.Declaration;
+
+public class CLPLocalDeclarationVariable implements VariableValueHandler {
+    
+    private Declaration declaration;
+       
+    public CLPLocalDeclarationVariable(Declaration declaration) {
+        this.declaration = declaration;
+    }        
+    public String getIdentifier() {
+        return this.declaration.getIdentifier();
+    }
+
+    public Class getKnownType() {
+        return declaration.getExtractor().getExtractToClass();
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return this.declaration.getValueType().getSimpleType(); 
+    }
+
+    public void setValue(ExecutionContext context,
+                         Object object) {
+        throw new UnsupportedOperationException( "External Variable identifer='" + getIdentifier() + "' type='" + getKnownType() + "' is final, it cannot be set" );
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        return declaration.getValue( context.getObject() );
+    }
+    
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        Object object = declaration.getValue( context.getObject() );
+        if ( object instanceof BigDecimal ) {
+            return (BigDecimal) object;
+        } else {
+            return new BigDecimal( object.toString() );
+        }
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        Object object = declaration.getValue( context.getObject() );
+        if ( object instanceof BigInteger ) {
+            return (BigInteger) object;
+        } else {
+            return new BigInteger( object.toString() );
+        }
+    }    
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return declaration.getBooleanValue( context.getObject() );
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        return declaration.getDoubleValue( context.getObject() );
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        return declaration.getFloatValue( context.getObject() );
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        return declaration.getIntValue( context.getObject() );
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        return declaration.getLongValue( context.getObject() );
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        return declaration.getShortValue( context.getObject() );
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return (String) declaration.getValue( context.getObject() );
+    }
+    
+    public String toString() {
+        String name = getClass().getName();
+        name = name.substring( name.lastIndexOf( "." ) + 1 );
+        return "[" + name + " identifier = '" + getIdentifier()  + "']";
+    }    
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPPreviousDeclarationVariable.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPPreviousDeclarationVariable.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPPreviousDeclarationVariable.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/CLPPreviousDeclarationVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,102 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.VariableValueHandler;
+import org.drools.common.InternalFactHandle;
+import org.drools.rule.Declaration;
+
+public class CLPPreviousDeclarationVariable implements VariableValueHandler {
+
+    private Declaration declaration;
+    
+    public CLPPreviousDeclarationVariable(Declaration declaration) {
+        this.declaration = declaration;
+    }
+
+    public String getIdentifier() {
+        return this.declaration.getIdentifier();
+    }
+
+    public Class getKnownType() {
+        return declaration.getExtractor().getExtractToClass();
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return this.declaration.getValueType().getSimpleType(); 
+    }
+
+    public void setValue(ExecutionContext context,
+                         Object object) {
+        throw new UnsupportedOperationException( "External Variable identifer='" + getIdentifier() + "' type='" + getKnownType() + "' is final, it cannot be set" );
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getValue( handle.getObject() );
+    }
+    
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        Object object = declaration.getValue(  handle.getObject() );
+        if ( object instanceof BigDecimal ) {
+            return (BigDecimal) object;
+        } else {
+            return new BigDecimal( object.toString() );
+        }
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        Object object = declaration.getValue(  handle.getObject() );
+        if ( object instanceof BigInteger ) {
+            return (BigInteger) object;
+        } else {
+            return new BigInteger( object.toString() );
+        }
+    }    
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getBooleanValue( handle.getObject() );
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getDoubleValue( handle.getObject() );
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getFloatValue( handle.getObject() );
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getIntValue( handle.getObject() );
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getLongValue( handle.getObject() );
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return declaration.getShortValue( handle.getObject() );
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        InternalFactHandle handle = context.getTuple().get( this.declaration );
+        return (String) declaration.getValue( handle.getObject() );
+    }
+    
+    public String toString() {
+        String name = getClass().getName();
+        name = name.substring( name.lastIndexOf( "." ) + 1 );
+        return "[" + name + " identifier = '" + getIdentifier()  + "']";
+    }    
+        
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/DoubleValueHandler.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/DoubleValueHandler.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/DoubleValueHandler.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/DoubleValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,92 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+
+public class DoubleValueHandler implements ValueHandler {
+    private double doubleValue;
+    
+    public DoubleValueHandler(String doubleValue) {
+        this.doubleValue = Double.valueOf( doubleValue ).doubleValue();
+    }
+    
+    public DoubleValueHandler(double doubleValue) {
+        this.doubleValue = doubleValue;
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.DECIMAL;
+    }
+
+    public void setValue(ExecutionContext context, Object value) {
+        throw new RuntimeException( "LiteralValues cannot be set");
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        return new Double( this.doubleValue );
+    }
+    
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        return new BigDecimal( this.doubleValue );
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        return BigInteger.valueOf( (long) this.doubleValue );
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return ( this.doubleValue == 0 ) ? false : true;
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        return this.doubleValue;
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        return (float) this.doubleValue;
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        return (int) this.doubleValue;
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        return (long) this.doubleValue;
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        return (short) this.doubleValue;
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return Double.toString( this.doubleValue );
+    }
+
+    public String toString() {
+        return "[DoubleLiteralValue value='" + this.doubleValue + "']";
+    }    
+    
+    public int hashCode() {
+        final int PRIME = 31;
+        int result = 1;
+        long temp;
+        temp = Double.doubleToLongBits( doubleValue );
+        result = PRIME * result + (int) (temp ^ (temp >>> 32));
+        return result;
+    }
+
+    public boolean equals(Object obj) {
+        if ( this == obj ) return true;
+        if ( obj == null ) return false;
+        if ( !(obj instanceof DoubleValueHandler) ) return false;
+        final DoubleValueHandler other = (DoubleValueHandler) obj;
+        if ( Double.doubleToLongBits( doubleValue ) != Double.doubleToLongBits( other.doubleValue ) ) return false;
+        return true;
+    }
+    
+    
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/FunctionCaller.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/FunctionCaller.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/FunctionCaller.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/FunctionCaller.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,141 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Map;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.Function;
+import org.drools.clp.LispList;
+import org.drools.clp.ValueHandler;
+
+public class FunctionCaller
+    implements
+    ValueHandler {
+    private Function         function;
+
+    protected ValueHandler[] parameters;
+
+    public FunctionCaller() {
+        this( null );
+    }
+
+    public FunctionCaller(Function function) {
+        this.function = function;
+    }
+
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.FUNCTION;
+    }
+
+    public void setFunction(Function function) {
+        this.function = function;
+    }
+
+    public Function getFunction() {
+        return this.function;
+    }
+
+    public String getName() {
+        return (this.function == null) ? null : this.function.getName();
+    }
+
+    public LispList createList(int index) {
+        return this.function.createList( index );
+    }
+
+    public void addParameter(ValueHandler valueHandler) {
+        if ( this.parameters == null ) {
+            this.parameters = new ValueHandler[]{valueHandler};
+        } else {
+            ValueHandler[] temp = new ValueHandler[parameters.length + 1];
+            System.arraycopy( this.parameters,
+                              0,
+                              temp,
+                              0,
+                              this.parameters.length );
+            temp[temp.length - 1] = valueHandler;
+            this.parameters = temp;
+        }
+    }
+
+    public ValueHandler[] getParameters() {
+        return this.parameters;
+    }
+
+    private ValueHandler resolveFunction(FunctionCaller caller,
+                                         ExecutionContext context) {
+        ValueHandler result = caller.getFunction().execute( caller.getParameters(),
+                                                            context );
+        if ( result instanceof FunctionCaller ) {
+            result = resolveFunction( (FunctionCaller) result,
+                                      context );
+        }
+        return result;
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        return resolveFunction( this,
+                                context ).getValue( context );
+    }    
+
+    public void setValue(ExecutionContext context,
+                         Object object) {
+        throw new RuntimeException( "You cannot set the value on a Function" );
+    }
+
+    public void replaceTempTokens(Map variables) {
+        for ( int i = 0, length = this.parameters.length; i < length; i++ ) {
+            if ( this.parameters[i] instanceof TempTokenVariable ) {
+                TempTokenVariable var = (TempTokenVariable) this.parameters[i];
+                this.parameters[i] = (ValueHandler) variables.get( var.getIdentifier() );
+            } else if ( this.parameters[i] instanceof FunctionCaller ) {
+                ((FunctionCaller) parameters[i]).replaceTempTokens( variables );
+            } else if ( this.parameters[i] instanceof ListValueHandler ) {
+                ((ListValueHandler) parameters[i]).replaceTempTokens( variables );
+            }
+        }
+    }
+
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getBigDecimalValue( context );
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getBigIntegerValue( context );
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return resolveFunction( this, context ).getBooleanValue( context );
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getDoubleValue( context );
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getFloatValue( context );
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getIntValue( context );
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getLongValue( context );
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        return resolveFunction( this, context ).getShortValue( context );
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return resolveFunction( this, context ).getStringValue( context );
+    }
+
+    public String toString() {
+        return "[FunctionCaller " + this.function + "]";
+    }
+
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ListValueHandler.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ListValueHandler.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ListValueHandler.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ListValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,113 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Map;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+
+public class ListValueHandler implements ValueHandler {
+    private ValueHandler[] list;
+    
+    public ListValueHandler() {
+        
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.LIST;
+    }    
+    
+    public void add(ValueHandler valueHandler) {
+        if (this.list == null) {
+            this.list = new ValueHandler[] { valueHandler};
+        } else {
+            ValueHandler[] temp =  new ValueHandler[ this.list.length + 1 ];
+            System.arraycopy( this.list, 0, temp, 0, this.list.length );
+            temp[ temp.length - 1] = valueHandler;
+            this.list = temp;             
+        }            
+    }
+    
+    public ValueHandler[] getList() {
+        return this.list;
+    }
+
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return BigDecimal" );
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return BigInteger" );
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        throw new RuntimeException( "ListValueHandler cannot return Boolean" );
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return Double" );
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return Float" );
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return Int" );
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return Long" );
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        throw new RuntimeException( "ListValueHandler cannot return Short" );
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        throw new RuntimeException( "ListValueHandler cannot return String" );
+    }
+
+    public Object getValue(ExecutionContext context) {
+        return this.list;
+    }
+
+    public void setValue(ExecutionContext context,
+                         Object object) {
+        throw new RuntimeException( "cannot set value on ListValueHandler" );       
+    }
+    
+    public void replaceTempTokens(Map variables) {
+        for ( int i = 0, length = this.list.length; i < length; i++ ) {
+            if ( this.list[i] instanceof TempTokenVariable ) {
+                TempTokenVariable var = ( TempTokenVariable ) this.list[i]; 
+                this.list[i] = ( ValueHandler ) variables.get( var.getIdentifier() );
+            } else if ( this.list[i] instanceof FunctionCaller ) {
+                ((FunctionCaller)list[i]).replaceTempTokens( variables );
+            } else if ( this.list[i] instanceof ListValueHandler ) {
+                ((ListValueHandler)list[i]).replaceTempTokens( variables );
+            }
+        }  
+    }    
+    
+    public int size() {
+        return (this.list == null) ? 0 : this.list.length;
+    }
+    
+    public boolean isEmpty() {
+        return (this.list == null) ? true : this.list.length > 0; 
+    }
+    
+    public String toString() {
+        StringBuffer b = new StringBuffer();
+        b.append( "[ListValueHandler " );
+        for ( int i = 0, length = this.list.length; i < length; i++ ) {
+            b.append( this.list[i] + " " );
+        }
+        b.append("]");
+                
+        return b.toString();
+    }
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LocalVariableValue.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LocalVariableValue.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LocalVariableValue.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LocalVariableValue.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,62 @@
+package org.drools.clp.ValueHandlers;
+
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+import org.drools.clp.VariableValueHandler;
+
+
+public class LocalVariableValue extends BaseValueHandler implements VariableValueHandler {
+    private static final long serialVersionUID = 320L;    
+
+    /** The identifier for the variable. */
+    private final String      identifier;    
+    private final int         index;
+    
+    /**
+     * Construct.
+     * 
+     * @param identifier
+     *            The name of the variable.
+     */
+    public LocalVariableValue(final String identifier, final int index) {
+        this.identifier = identifier;
+        this.index = index;
+    }
+    
+    /**
+     * Retrieve the variable's identifier.
+     * 
+     * @return The variable's identifier.
+     */
+    public String getIdentifier() {
+        return this.identifier;
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return context.getLocalVariable( this.index ).getValueType( context );
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        Object object = context.getLocalVariable( this.index ).getValue( context );
+        //if ( object instanceof )
+        return object;
+    }        
+    
+    public ValueHandler getRawValue(ExecutionContext context) {
+        // this is a hack as some parts of the system need the ValueHandler and not the Value
+        return context.getLocalVariable( this.index );
+    }
+
+    public void setValue(ExecutionContext context,
+                         Object object) {
+        context.setLocalVariable( this.index, (ValueHandler) object );        
+    }        
+    
+    public String toString() {
+        String name = getClass().getName();
+        name = name.substring( name.lastIndexOf( "." ) + 1 );
+        return "[" + name + " identifier = '" + getIdentifier()  + "']";
+    }    
+        
+}
+

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LongValueHandler.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/LongValueHandler.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LongValueHandler.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/LongValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,90 @@
+package org.drools.clp.ValueHandlers;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.ValueHandler;
+
+public class LongValueHandler implements ValueHandler {
+    private long longValue;
+    
+    public LongValueHandler(String longValue) {
+        this.longValue = Long.valueOf( longValue ).longValue();
+    } 
+    
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.INTEGER;
+    }    
+    
+    public LongValueHandler(long longValue) {
+        this.longValue = longValue;
+    }
+
+    public void setValue(ExecutionContext context, Object value) {
+        throw new RuntimeException( "LiteralValues cannot be set");
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        return new Long( this.longValue );
+    }
+    
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        return new BigDecimal( this.longValue );
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        return BigInteger.valueOf( this.longValue );
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return ( this.longValue == 0 ) ? false : true;
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        return this.longValue;
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        return this.longValue;
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        return (int) this.longValue;
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        return this.longValue;
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        return (short) this.longValue;
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return Long.toString( this.longValue );
+    }
+    
+    public String toString() {
+        return "[LongLiteralValue value='" + this.longValue + "']";
+    }
+
+    public int hashCode() {
+        final int PRIME = 31;
+        int result = 1;
+        result = PRIME * result + (int) (longValue ^ (longValue >>> 32));
+        return result;
+    }
+
+    public boolean equals(Object obj) {
+        if ( this == obj ) return true;
+        if ( obj == null ) return false;
+        if ( ! ( obj instanceof LongValueHandler ) ) return false;
+        final LongValueHandler other = (LongValueHandler) obj;
+        if ( longValue != other.longValue ) return false;
+        return true;
+    }      
+    
+    
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ObjectValueHandler.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ObjectValueHandler.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ObjectValueHandler.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/ObjectValueHandler.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,63 @@
+package org.drools.clp.ValueHandlers;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+
+public class ObjectValueHandler extends BaseValueHandler {
+    public static final ObjectValueHandler NULL = new ObjectValueHandler( "null" );    
+    
+    private Object objectValue;
+    
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.OBJECT;
+    }
+    
+    public ObjectValueHandler(Object objectValue) {
+        this.objectValue = objectValue;
+    }
+
+    public void setValue(ExecutionContext context, Object value) {
+        throw new RuntimeException( "LiteralValues cannot be set");
+    }
+    
+    public Object getValue(ExecutionContext context) {
+        return this.objectValue;
+    }
+    /*
+    public BigDecimal getBigDecimalValue(ExecutionContext context) throws NumberFormatException {
+        return (BigDecimal) getValue(context);
+    }
+
+    public BigInteger getBigIntegerValue(ExecutionContext context) throws NumberFormatException {
+        return (BigInteger) getValue(context);
+    }
+
+    public boolean getBooleanValue(ExecutionContext context) throws ClassCastException {
+        return ((Boolean) getValue(context)).booleanValue();
+    }
+
+    public double getDoubleValue(ExecutionContext context) throws NumberFormatException {
+        return ((Double) getValue(context)).doubleValue();
+    }
+
+    public float getFloatValue(ExecutionContext context) throws NumberFormatException {
+        return ((Float) getValue(context)).floatValue();
+    }
+
+    public int getIntValue(ExecutionContext context) throws NumberFormatException {
+        return ((Integer) getValue(context)).intValue();
+    }
+
+    public long getLongValue(ExecutionContext context) throws NumberFormatException {
+        return ((Long) getValue(context)).longValue();
+    }
+
+    public short getShortValue(ExecutionContext context) throws NumberFormatException {
+        return ((Short) getValue(context)).shortValue();
+    }
+
+    public String getStringValue(ExecutionContext context) {
+        return (String) getValue(context);
+    }      */
+
+}

Copied: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/TempTokenVariable.java (from rev 10518, labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/TempTokenVariable.java)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/TempTokenVariable.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/ValueHandlers/TempTokenVariable.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -0,0 +1,36 @@
+package org.drools.clp.ValueHandlers;
+
+import org.drools.base.SimpleValueType;
+import org.drools.clp.ExecutionContext;
+import org.drools.clp.VariableValueHandler;
+
+
+public class TempTokenVariable extends BaseValueHandler implements VariableValueHandler {
+
+    private String identifier;
+    
+    public TempTokenVariable(String identifier) {
+        this.identifier = identifier;
+    }
+
+    public String getIdentifier() {
+        return this.identifier;
+    }
+    
+    public int getValueType(ExecutionContext context) {
+        return SimpleValueType.UNKNOWN;
+    }    
+
+    public Object getValue(ExecutionContext context) {
+        throw new UnsupportedOperationException( "TempTokenVariable Variable identifer='" + getIdentifier() + " cannot be read" );
+    }
+
+    public void setValue(ExecutionContext context, Object value) {
+        throw new UnsupportedOperationException( "TempTokenVariable Variable identifer='" + getIdentifier() + " cannot be set" );
+    }
+
+    public void setContext(ExecutionContext context) {
+
+    }
+
+}

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/AddFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/AddFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/AddFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -6,8 +6,8 @@
 import org.drools.clp.Function;
 import org.drools.clp.LispForm;
 import org.drools.clp.LispList;
-import org.drools.clp.ObjectValueHandler;
 import org.drools.clp.ValueHandler;
+import org.drools.clp.valuehandlers.ObjectValueHandler;
 
 public class AddFunction extends BaseFunction implements Function {
     private static final String name = "+";

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/BindFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/BindFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/BindFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -3,12 +3,12 @@
 import org.drools.clp.ExecutionBuildContext;
 import org.drools.clp.ExecutionContext;
 import org.drools.clp.Function;
-import org.drools.clp.FunctionCaller;
 import org.drools.clp.LispForm;
 import org.drools.clp.LispList;
-import org.drools.clp.TempTokenVariable;
 import org.drools.clp.ValueHandler;
 import org.drools.clp.VariableValueHandler;
+import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.TempTokenVariable;
 
 public class BindFunction extends BaseFunction implements Function {
     private static final String name = "bind";

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/CreateListFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/CreateListFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/CreateListFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -2,9 +2,9 @@
 
 import org.drools.clp.ExecutionContext;
 import org.drools.clp.Function;
-import org.drools.clp.FunctionCaller;
-import org.drools.clp.ListValueHandler;
 import org.drools.clp.ValueHandler;
+import org.drools.clp.valuehandlers.FunctionCaller;
+import org.drools.clp.valuehandlers.ListValueHandler;
 
 public class CreateListFunction extends BaseFunction implements Function {
     private static final String name = "create$";

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/IfFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/IfFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/IfFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,12 +1,12 @@
 package org.drools.clp.functions;
 
-import org.drools.clp.BooleanValueHandler;
 import org.drools.clp.ExecutionContext;
 import org.drools.clp.Function;
 import org.drools.clp.LispForm;
 import org.drools.clp.LispList;
-import org.drools.clp.ObjectValueHandler;
 import org.drools.clp.ValueHandler;
+import org.drools.clp.valuehandlers.BooleanValueHandler;
+import org.drools.clp.valuehandlers.ObjectValueHandler;
 
 public class IfFunction extends BaseFunction  implements Function {
     private static final String name = "if";

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/LessThanFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/LessThanFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/LessThanFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -1,11 +1,11 @@
 package org.drools.clp.functions;
 
-import org.drools.clp.BooleanValueHandler;
 import org.drools.clp.ExecutionContext;
 import org.drools.clp.Function;
 import org.drools.clp.LispForm;
 import org.drools.clp.LispList;
 import org.drools.clp.ValueHandler;
+import org.drools.clp.valuehandlers.BooleanValueHandler;
 
 public class LessThanFunction extends BaseFunction  implements Function {
     private static final String name = "<";

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/MultiplyFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/MultiplyFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/MultiplyFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -6,8 +6,8 @@
 import org.drools.clp.Function;
 import org.drools.clp.LispForm;
 import org.drools.clp.LispList;
-import org.drools.clp.ObjectValueHandler;
 import org.drools.clp.ValueHandler;
+import org.drools.clp.valuehandlers.ObjectValueHandler;
 
 public class MultiplyFunction extends BaseFunction  implements Function {
     private static final String name = "*";

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/WhileFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/WhileFunction.java	2007-03-24 19:50:18 UTC (rev 10518)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/functions/WhileFunction.java	2007-03-24 19:56:46 UTC (rev 10519)
@@ -4,8 +4,8 @@
 import org.drools.clp.Function;
 import org.drools.clp.LispForm;
 import org.drools.clp.LispList;
-import org.drools.clp.ObjectValueHandler;
 import org.drools.clp.ValueHandler;
+import org.drools.clp.valuehandlers.ObjectValueHandler;
 
 public class WhileFunction extends BaseFunction implements Function {
     private static final String name = "while";




More information about the jboss-svn-commits mailing list