[jboss-svn-commits] JBL Code SVN: r20705 - in labs/jbossrules/trunk/drools-clips/src: main/java/org/drools/rule/builder/dialect/clips and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jun 23 13:38:42 EDT 2008


Author: mark.proctor at jboss.com
Date: 2008-06-23 13:38:42 -0400 (Mon, 23 Jun 2008)
New Revision: 20705

Modified:
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ParserHandler.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/Shell.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialect.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialectConfiguration.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsEvalBuilder.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsPredicateBuilder.java
   labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clips/ShellTest.java
Log:
JBRULES-720 Clips Parser
-Update drools-eclipse to take advantage of JBRULES-1656 and JBRULES-1657. Where you can now attach a rulebase and use multiple namespaces.

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g 2008-02-07 02:53:25
+// $ANTLR 3.0.1 C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g 2008-06-23 04:10:53
 
 	package org.drools.clips;
 
@@ -10,63 +10,66 @@
 import java.util.Map;
 import java.util.HashMap;
 public class ClipsLexer extends Lexer {
-    public static final int RIGHT_SQUARE=38;
-    public static final int RIGHT_CURLY=40;
-    public static final int EQUALS=23;
-    public static final int FLOAT=24;
-    public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
-    public static final int SYMBOL_CHAR=34;
-    public static final int NOT=14;
-    public static final int AND=12;
-    public static final int FIRST_SYMBOL_CHAR=43;
+    public static final int RIGHT_SQUARE=41;
+    public static final int RIGHT_CURLY=43;
+    public static final int EQUALS=26;
+    public static final int FLOAT=27;
+    public static final int SH_STYLE_SINGLE_LINE_COMMENT=38;
+    public static final int SYMBOL_CHAR=37;
+    public static final int NOT=17;
+    public static final int AND=15;
+    public static final int FIRST_SYMBOL_CHAR=46;
     public static final int EOF=-1;
-    public static final int HexDigit=31;
-    public static final int DEFFUNCTION=7;
-    public static final int ASSIGN_OP=18;
+    public static final int HexDigit=34;
+    public static final int DEFFUNCTION=11;
+    public static final int TYPE=10;
+    public static final int ASSIGN_OP=21;
     public static final int RIGHT_PAREN=6;
     public static final int NAME=5;
-    public static final int EOL=27;
-    public static final int DEFRULE=8;
-    public static final int TILDE=21;
-    public static final int PIPE=19;
-    public static final int VAR=17;
-    public static final int EXISTS=15;
-    public static final int SYMBOL=42;
-    public static final int NULL=26;
-    public static final int BOOL=25;
-    public static final int SALIENCE=10;
-    public static final int AMPERSAND=20;
-    public static final int INT=11;
-    public static final int Tokens=46;
-    public static final int MULTI_LINE_COMMENT=41;
-    public static final int T45=45;
-    public static final int T44=44;
-    public static final int COLON=22;
-    public static final int WS=28;
-    public static final int UnicodeEscape=32;
-    public static final int LEFT_CURLY=39;
-    public static final int OR=13;
-    public static final int TEST=16;
+    public static final int EOL=30;
+    public static final int DEFRULE=12;
+    public static final int TILDE=24;
+    public static final int PIPE=22;
+    public static final int VAR=20;
+    public static final int EXISTS=18;
+    public static final int SYMBOL=45;
+    public static final int NULL=29;
+    public static final int BOOL=28;
+    public static final int SALIENCE=13;
+    public static final int AMPERSAND=23;
+    public static final int T48=48;
+    public static final int INT=14;
+    public static final int Tokens=49;
+    public static final int MULTI_LINE_COMMENT=44;
+    public static final int T47=47;
+    public static final int COLON=25;
+    public static final int WS=31;
+    public static final int UnicodeEscape=35;
+    public static final int SLOT=9;
+    public static final int LEFT_CURLY=42;
+    public static final int OR=16;
+    public static final int TEST=19;
     public static final int LEFT_PAREN=4;
-    public static final int DECLARE=29;
-    public static final int LEFT_SQUARE=37;
-    public static final int EscapeSequence=30;
-    public static final int OctalEscape=33;
-    public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
-    public static final int STRING=9;
+    public static final int DECLARE=32;
+    public static final int DEFTEMPLATE=7;
+    public static final int LEFT_SQUARE=40;
+    public static final int OctalEscape=36;
+    public static final int EscapeSequence=33;
+    public static final int C_STYLE_SINGLE_LINE_COMMENT=39;
+    public static final int STRING=8;
     public ClipsLexer() {;} 
     public ClipsLexer(CharStream input) {
         super(input);
-        ruleMemo = new HashMap[44+1];
+        ruleMemo = new HashMap[47+1];
      }
-    public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g"; }
+    public String getGrammarFileName() { return "C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g"; }
 
-    // $ANTLR start T44
-    public final void mT44() throws RecognitionException {
+    // $ANTLR start T47
+    public final void mT47() throws RecognitionException {
         try {
-            int _type = T44;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:6:5: ( 'import' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:6:7: 'import'
+            int _type = T47;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:6:5: ( 'import' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:6:7: 'import'
             {
             match("import"); if (failed) return ;
 
@@ -78,14 +81,14 @@
         finally {
         }
     }
-    // $ANTLR end T44
+    // $ANTLR end T47
 
-    // $ANTLR start T45
-    public final void mT45() throws RecognitionException {
+    // $ANTLR start T48
+    public final void mT48() throws RecognitionException {
         try {
-            int _type = T45;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:7:5: ( '=>' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:7:7: '=>'
+            int _type = T48;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:7:5: ( '=>' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:7:7: '=>'
             {
             match("=>"); if (failed) return ;
 
@@ -97,16 +100,16 @@
         finally {
         }
     }
-    // $ANTLR end T45
+    // $ANTLR end T48
 
     // $ANTLR start WS
     public final void mWS() throws RecognitionException {
         try {
             int _type = WS;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:705:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:705:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:752:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:752:17: ( ' ' | '\\t' | '\\f' | EOL )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:705:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:752:17: ( ' ' | '\\t' | '\\f' | EOL )
             int alt1=4;
             switch ( input.LA(1) ) {
             case ' ':
@@ -133,35 +136,35 @@
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("705:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+                    new NoViableAltException("752:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
 
                 throw nvae;
             }
 
             switch (alt1) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:705:19: ' '
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:752:19: ' '
                     {
                     match(' '); if (failed) return ;
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:706:19: '\\t'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:753:19: '\\t'
                     {
                     match('\t'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:707:19: '\\f'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:754:19: '\\f'
                     {
                     match('\f'); if (failed) return ;
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:708:19: EOL
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:755:19: EOL
                     {
                     mEOL(); if (failed) return ;
 
@@ -183,12 +186,69 @@
     }
     // $ANTLR end WS
 
+    // $ANTLR start DEFTEMPLATE
+    public final void mDEFTEMPLATE() throws RecognitionException {
+        try {
+            int _type = DEFTEMPLATE;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:760:13: ( 'deftemplate' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:760:17: 'deftemplate'
+            {
+            match("deftemplate"); if (failed) return ;
+
+
+            }
+
+            this.type = _type;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end DEFTEMPLATE
+
+    // $ANTLR start SLOT
+    public final void mSLOT() throws RecognitionException {
+        try {
+            int _type = SLOT;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:761:13: ( 'slot' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:761:15: 'slot'
+            {
+            match("slot"); if (failed) return ;
+
+
+            }
+
+            this.type = _type;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end SLOT
+
+    // $ANTLR start TYPE
+    public final void mTYPE() throws RecognitionException {
+        try {
+            int _type = TYPE;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:13: ( 'type' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:15: 'type'
+            {
+            match("type"); if (failed) return ;
+
+
+            }
+
+            this.type = _type;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end TYPE
+
     // $ANTLR start DEFRULE
     public final void mDEFRULE() throws RecognitionException {
         try {
             int _type = DEFRULE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:713:10: ( 'defrule' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:713:12: 'defrule'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:10: ( 'defrule' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:12: 'defrule'
             {
             match("defrule"); if (failed) return ;
 
@@ -206,8 +266,8 @@
     public final void mDEFFUNCTION() throws RecognitionException {
         try {
             int _type = DEFFUNCTION;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:714:13: ( 'deffunction' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:714:15: 'deffunction'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:764:13: ( 'deffunction' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:764:15: 'deffunction'
             {
             match("deffunction"); if (failed) return ;
 
@@ -225,8 +285,8 @@
     public final void mOR() throws RecognitionException {
         try {
             int _type = OR;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:715:7: ( 'or' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:715:9: 'or'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:765:7: ( 'or' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:765:9: 'or'
             {
             match("or"); if (failed) return ;
 
@@ -244,8 +304,8 @@
     public final void mAND() throws RecognitionException {
         try {
             int _type = AND;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:716:7: ( 'and' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:716:9: 'and'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:766:7: ( 'and' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:766:9: 'and'
             {
             match("and"); if (failed) return ;
 
@@ -263,8 +323,8 @@
     public final void mNOT() throws RecognitionException {
         try {
             int _type = NOT;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:717:7: ( 'not' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:717:9: 'not'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:767:7: ( 'not' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:767:9: 'not'
             {
             match("not"); if (failed) return ;
 
@@ -282,8 +342,8 @@
     public final void mEXISTS() throws RecognitionException {
         try {
             int _type = EXISTS;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:718:10: ( 'exists' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:718:12: 'exists'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:768:10: ( 'exists' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:768:12: 'exists'
             {
             match("exists"); if (failed) return ;
 
@@ -301,8 +361,8 @@
     public final void mTEST() throws RecognitionException {
         try {
             int _type = TEST;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:719:8: ( 'test' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:719:10: 'test'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:769:8: ( 'test' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:769:10: 'test'
             {
             match("test"); if (failed) return ;
 
@@ -320,8 +380,8 @@
     public final void mNULL() throws RecognitionException {
         try {
             int _type = NULL;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:721:7: ( 'null' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:721:9: 'null'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:771:7: ( 'null' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:771:9: 'null'
             {
             match("null"); if (failed) return ;
 
@@ -339,8 +399,8 @@
     public final void mDECLARE() throws RecognitionException {
         try {
             int _type = DECLARE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:723:10: ( 'declare' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:723:12: 'declare'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:10: ( 'declare' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:12: 'declare'
             {
             match("declare"); if (failed) return ;
 
@@ -358,8 +418,8 @@
     public final void mSALIENCE() throws RecognitionException {
         try {
             int _type = SALIENCE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:725:10: ( 'salience' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:725:12: 'salience'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:775:10: ( 'salience' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:775:12: 'salience'
             {
             match("salience"); if (failed) return ;
 
@@ -376,10 +436,10 @@
     // $ANTLR start EOL
     public final void mEOL() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:730:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:731:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:780:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:781:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:731:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:781:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             int alt2=3;
             int LA2_0 = input.LA(1);
 
@@ -398,13 +458,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("731:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+                    new NoViableAltException("781:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
 
                 throw nvae;
             }
             switch (alt2) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:731:14: ( '\\r\\n' )=> '\\r\\n'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:781:14: ( '\\r\\n' )=> '\\r\\n'
                     {
                     match("\r\n"); if (failed) return ;
 
@@ -412,14 +472,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:732:25: '\\r'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:782:25: '\\r'
                     {
                     match('\r'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:733:25: '\\n'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:783:25: '\\n'
                     {
                     match('\n'); if (failed) return ;
 
@@ -441,10 +501,10 @@
     public final void mINT() throws RecognitionException {
         try {
             int _type = INT;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:738:2: ( ( '-' )? ( '0' .. '9' )+ )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:738:4: ( '-' )? ( '0' .. '9' )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:788:2: ( ( '-' )? ( '0' .. '9' )+ )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:788:4: ( '-' )? ( '0' .. '9' )+
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:738:4: ( '-' )?
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:788:4: ( '-' )?
             int alt3=2;
             int LA3_0 = input.LA(1);
 
@@ -453,7 +513,7 @@
             }
             switch (alt3) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:738:5: '-'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:788:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -462,7 +522,7 @@
 
             }
 
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:738:10: ( '0' .. '9' )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:788:10: ( '0' .. '9' )+
             int cnt4=0;
             loop4:
             do {
@@ -476,7 +536,7 @@
 
                 switch (alt4) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:738:11: '0' .. '9'
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:788:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -507,10 +567,10 @@
     public final void mFLOAT() throws RecognitionException {
         try {
             int _type = FLOAT;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:4: ( '-' )?
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:4: ( '-' )?
             int alt5=2;
             int LA5_0 = input.LA(1);
 
@@ -519,7 +579,7 @@
             }
             switch (alt5) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:5: '-'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -528,7 +588,7 @@
 
             }
 
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:10: ( '0' .. '9' )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:10: ( '0' .. '9' )+
             int cnt6=0;
             loop6:
             do {
@@ -542,7 +602,7 @@
 
                 switch (alt6) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:11: '0' .. '9'
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -560,7 +620,7 @@
             } while (true);
 
             match('.'); if (failed) return ;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:26: ( '0' .. '9' )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:26: ( '0' .. '9' )+
             int cnt7=0;
             loop7:
             do {
@@ -574,7 +634,7 @@
 
                 switch (alt7) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:742:27: '0' .. '9'
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:27: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -605,7 +665,7 @@
     public final void mSTRING() throws RecognitionException {
         try {
             int _type = STRING;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
             int alt10=2;
             int LA10_0 = input.LA(1);
 
@@ -618,19 +678,19 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("745:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+                    new NoViableAltException("795:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
 
                 throw nvae;
             }
             switch (alt10) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
                     {
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
                     {
                     match('\"'); if (failed) return ;
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
                     loop8:
                     do {
                         int alt8=3;
@@ -646,14 +706,14 @@
 
                         switch (alt8) {
                     	case 1 :
-                    	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:15: EscapeSequence
+                    	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:15: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:32: ~ ( '\\\\' | '\"' )
+                    	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:32: ~ ( '\\\\' | '\"' )
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -683,13 +743,13 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:797:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
                     {
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:797:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:797:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
                     {
                     match('\''); if (failed) return ;
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:797:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
                     loop9:
                     do {
                         int alt9=3;
@@ -705,14 +765,14 @@
 
                         switch (alt9) {
                     	case 1 :
-                    	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:16: EscapeSequence
+                    	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:797:16: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:33: ~ ( '\\\\' | '\\'' )
+                    	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:797:33: ~ ( '\\\\' | '\\'' )
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -753,8 +813,8 @@
     // $ANTLR start HexDigit
     public final void mHexDigit() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:751:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:751:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:801:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:801: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();
@@ -779,7 +839,7 @@
     // $ANTLR start EscapeSequence
     public final void mEscapeSequence() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:755:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:805:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
             int alt11=3;
             int LA11_0 = input.LA(1);
 
@@ -817,7 +877,7 @@
                 default:
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("753:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+                        new NoViableAltException("803:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
 
                     throw nvae;
                 }
@@ -826,13 +886,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("753:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+                    new NoViableAltException("803:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
 
                 throw nvae;
             }
             switch (alt11) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:755:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:805: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' ) {
@@ -850,14 +910,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:756:9: UnicodeEscape
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:806:9: UnicodeEscape
                     {
                     mUnicodeEscape(); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:757:9: OctalEscape
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:807:9: OctalEscape
                     {
                     mOctalEscape(); if (failed) return ;
 
@@ -874,7 +934,7 @@
     // $ANTLR start OctalEscape
     public final void mOctalEscape() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
             int alt12=3;
             int LA12_0 = input.LA(1);
 
@@ -885,9 +945,9 @@
                     int LA12_2 = input.LA(3);
 
                     if ( ((LA12_2>='0' && LA12_2<='7')) ) {
-                        int LA12_4 = input.LA(4);
+                        int LA12_5 = input.LA(4);
 
-                        if ( ((LA12_4>='0' && LA12_4<='7')) ) {
+                        if ( ((LA12_5>='0' && LA12_5<='7')) ) {
                             alt12=1;
                         }
                         else {
@@ -908,7 +968,7 @@
                 else {
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("760:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+                        new NoViableAltException("810:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
 
                     throw nvae;
                 }
@@ -916,31 +976,31 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("760:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+                    new NoViableAltException("810: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\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:14: ( '0' .. '3' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:15: '0' .. '3'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:14: ( '0' .. '3' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:15: '0' .. '3'
                     {
                     matchRange('0','3'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:25: ( '0' .. '7' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:26: '0' .. '7'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:25: ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:36: ( '0' .. '7' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:762:37: '0' .. '7'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:36: ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:37: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -950,18 +1010,18 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:813:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:14: ( '0' .. '7' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:15: '0' .. '7'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:813:14: ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:813:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:25: ( '0' .. '7' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:763:26: '0' .. '7'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:813:25: ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:813:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -971,11 +1031,11 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:764:9: '\\\\' ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:814:9: '\\\\' ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:764:14: ( '0' .. '7' )
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:764:15: '0' .. '7'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:814:14: ( '0' .. '7' )
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:814:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -995,8 +1055,8 @@
     // $ANTLR start UnicodeEscape
     public final void mUnicodeEscape() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:769:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:769:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:819:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:819:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
             {
             match('\\'); if (failed) return ;
             match('u'); if (failed) return ;
@@ -1017,10 +1077,10 @@
     public final void mBOOL() throws RecognitionException {
         try {
             int _type = BOOL;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:2: ( ( 'true' | 'false' ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:4: ( 'true' | 'false' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:2: ( ( 'true' | 'false' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:4: ( 'true' | 'false' )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:4: ( 'true' | 'false' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:4: ( 'true' | 'false' )
             int alt13=2;
             int LA13_0 = input.LA(1);
 
@@ -1033,13 +1093,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("773:4: ( 'true' | 'false' )", 13, 0, input);
+                    new NoViableAltException("823:4: ( 'true' | 'false' )", 13, 0, input);
 
                 throw nvae;
             }
             switch (alt13) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:5: 'true'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:5: 'true'
                     {
                     match("true"); if (failed) return ;
 
@@ -1047,7 +1107,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:773:12: 'false'
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:12: 'false'
                     {
                     match("false"); if (failed) return ;
 
@@ -1071,11 +1131,11 @@
     public final void mVAR() throws RecognitionException {
         try {
             int _type = VAR;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:776:6: ( '?' ( SYMBOL_CHAR )+ )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:776:8: '?' ( SYMBOL_CHAR )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:826:6: ( '?' ( SYMBOL_CHAR )+ )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:826:8: '?' ( SYMBOL_CHAR )+
             {
             match('?'); if (failed) return ;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:776:12: ( SYMBOL_CHAR )+
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:826:12: ( SYMBOL_CHAR )+
             int cnt14=0;
             loop14:
             do {
@@ -1089,7 +1149,7 @@
 
                 switch (alt14) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:776:12: SYMBOL_CHAR
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:826:12: SYMBOL_CHAR
             	    {
             	    mSYMBOL_CHAR(); if (failed) return ;
 
@@ -1120,11 +1180,11 @@
     public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = SH_STYLE_SINGLE_LINE_COMMENT;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:780:2: ( '#' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:780:4: '#' ( options {greedy=false; } : . )* EOL
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:830:2: ( '#' ( options {greedy=false; } : . )* EOL )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:830:4: '#' ( options {greedy=false; } : . )* EOL
             {
             match('#'); if (failed) return ;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:780:8: ( options {greedy=false; } : . )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:830:8: ( options {greedy=false; } : . )*
             loop15:
             do {
                 int alt15=2;
@@ -1143,7 +1203,7 @@
 
                 switch (alt15) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:780:35: .
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:830:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1173,12 +1233,12 @@
     public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = C_STYLE_SINGLE_LINE_COMMENT;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:786:2: ( '//' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:786:4: '//' ( options {greedy=false; } : . )* EOL
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:836:2: ( '//' ( options {greedy=false; } : . )* EOL )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:836:4: '//' ( options {greedy=false; } : . )* EOL
             {
             match("//"); if (failed) return ;
 
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:786:9: ( options {greedy=false; } : . )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:836:9: ( options {greedy=false; } : . )*
             loop16:
             do {
                 int alt16=2;
@@ -1197,7 +1257,7 @@
 
                 switch (alt16) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:786:36: .
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:836:36: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1227,8 +1287,8 @@
     public final void mLEFT_PAREN() throws RecognitionException {
         try {
             int _type = LEFT_PAREN;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:2: ( '(' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:792:4: '('
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:842:2: ( '(' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:842:4: '('
             {
             match('('); if (failed) return ;
 
@@ -1245,8 +1305,8 @@
     public final void mRIGHT_PAREN() throws RecognitionException {
         try {
             int _type = RIGHT_PAREN;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:2: ( ')' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:796:4: ')'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:846:2: ( ')' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:846:4: ')'
             {
             match(')'); if (failed) return ;
 
@@ -1263,8 +1323,8 @@
     public final void mLEFT_SQUARE() throws RecognitionException {
         try {
             int _type = LEFT_SQUARE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:800:2: ( '[' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:800:4: '['
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:850:2: ( '[' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:850:4: '['
             {
             match('['); if (failed) return ;
 
@@ -1281,8 +1341,8 @@
     public final void mRIGHT_SQUARE() throws RecognitionException {
         try {
             int _type = RIGHT_SQUARE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:804:2: ( ']' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:804:4: ']'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:854:2: ( ']' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:854:4: ']'
             {
             match(']'); if (failed) return ;
 
@@ -1299,8 +1359,8 @@
     public final void mLEFT_CURLY() throws RecognitionException {
         try {
             int _type = LEFT_CURLY;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:808:2: ( '{' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:808:4: '{'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:858:2: ( '{' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:858:4: '{'
             {
             match('{'); if (failed) return ;
 
@@ -1317,8 +1377,8 @@
     public final void mRIGHT_CURLY() throws RecognitionException {
         try {
             int _type = RIGHT_CURLY;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:2: ( '}' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:812:4: '}'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:862:2: ( '}' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:862:4: '}'
             {
             match('}'); if (failed) return ;
 
@@ -1335,8 +1395,8 @@
     public final void mTILDE() throws RecognitionException {
         try {
             int _type = TILDE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:815:7: ( '~' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:815:9: '~'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:865:7: ( '~' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:865:9: '~'
             {
             match('~'); if (failed) return ;
 
@@ -1353,8 +1413,8 @@
     public final void mAMPERSAND() throws RecognitionException {
         try {
             int _type = AMPERSAND;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:819:2: ( '&' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:819:4: '&'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:869:2: ( '&' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:869:4: '&'
             {
             match('&'); if (failed) return ;
 
@@ -1371,8 +1431,8 @@
     public final void mPIPE() throws RecognitionException {
         try {
             int _type = PIPE;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:2: ( '|' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:823:4: '|'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:873:2: ( '|' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:873:4: '|'
             {
             match('|'); if (failed) return ;
 
@@ -1389,8 +1449,8 @@
     public final void mASSIGN_OP() throws RecognitionException {
         try {
             int _type = ASSIGN_OP;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:827:2: ( '<-' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:827:4: '<-'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:877:2: ( '<-' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:877:4: '<-'
             {
             match("<-"); if (failed) return ;
 
@@ -1408,8 +1468,8 @@
     public final void mCOLON() throws RecognitionException {
         try {
             int _type = COLON;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:830:7: ( ':' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:830:9: ':'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:880:7: ( ':' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:880:9: ':'
             {
             match(':'); if (failed) return ;
 
@@ -1426,8 +1486,8 @@
     public final void mEQUALS() throws RecognitionException {
         try {
             int _type = EQUALS;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:832:8: ( '=' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:832:10: '='
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:882:8: ( '=' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:882:10: '='
             {
             match('='); if (failed) return ;
 
@@ -1444,12 +1504,12 @@
     public final void mMULTI_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = MULTI_LINE_COMMENT;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:835:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:835:4: '/*' ( options {greedy=false; } : . )* '*/'
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:885:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:885:4: '/*' ( options {greedy=false; } : . )* '*/'
             {
             match("/*"); if (failed) return ;
 
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:835:9: ( options {greedy=false; } : . )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:885:9: ( options {greedy=false; } : . )*
             loop17:
             do {
                 int alt17=2;
@@ -1474,7 +1534,7 @@
 
                 switch (alt17) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:835:35: .
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:885:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1505,8 +1565,8 @@
     public final void mNAME() throws RecognitionException {
         try {
             int _type = NAME;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:839:6: ( SYMBOL )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:839:8: SYMBOL
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:889:6: ( SYMBOL )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:889:8: SYMBOL
             {
             mSYMBOL(); if (failed) return ;
 
@@ -1522,11 +1582,11 @@
     // $ANTLR start SYMBOL
     public final void mSYMBOL() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:842:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:842:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:892:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:892:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
             {
             mFIRST_SYMBOL_CHAR(); if (failed) return ;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:842:28: ( SYMBOL_CHAR )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:892:28: ( SYMBOL_CHAR )*
             loop18:
             do {
                 int alt18=2;
@@ -1539,7 +1599,7 @@
 
                 switch (alt18) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:842:28: SYMBOL_CHAR
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:892:28: SYMBOL_CHAR
             	    {
             	    mSYMBOL_CHAR(); if (failed) return ;
 
@@ -1563,8 +1623,8 @@
     // $ANTLR start FIRST_SYMBOL_CHAR
     public final void mFIRST_SYMBOL_CHAR() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:847:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:847:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:897:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:897:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
             {
             if ( input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='<' && input.LA(1)<='>')||(input.LA(1)>='@' && input.LA(1)<='_')||(input.LA(1)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
                 input.consume();
@@ -1589,8 +1649,8 @@
     // $ANTLR start SYMBOL_CHAR
     public final void mSYMBOL_CHAR() throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:852:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:852:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:902:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:902:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
             {
             if ( input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='=' && input.LA(1)<='_')||(input.LA(1)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
                 input.consume();
@@ -1613,244 +1673,265 @@
     // $ANTLR end SYMBOL_CHAR
 
     public void mTokens() throws RecognitionException {
-        // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:8: ( T44 | T45 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
-        int alt19=34;
+        // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:8: ( T47 | T48 | WS | DEFTEMPLATE | SLOT | TYPE | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
+        int alt19=37;
         alt19 = dfa19.predict(input);
         switch (alt19) {
             case 1 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:10: T44
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:10: T47
                 {
-                mT44(); if (failed) return ;
+                mT47(); if (failed) return ;
 
                 }
                 break;
             case 2 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:14: T45
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:14: T48
                 {
-                mT45(); if (failed) return ;
+                mT48(); if (failed) return ;
 
                 }
                 break;
             case 3 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:18: WS
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:18: WS
                 {
                 mWS(); if (failed) return ;
 
                 }
                 break;
             case 4 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:21: DEFRULE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:21: DEFTEMPLATE
                 {
-                mDEFRULE(); if (failed) return ;
+                mDEFTEMPLATE(); if (failed) return ;
 
                 }
                 break;
             case 5 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:29: DEFFUNCTION
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:33: SLOT
                 {
-                mDEFFUNCTION(); if (failed) return ;
+                mSLOT(); if (failed) return ;
 
                 }
                 break;
             case 6 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:41: OR
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:38: TYPE
                 {
-                mOR(); if (failed) return ;
+                mTYPE(); if (failed) return ;
 
                 }
                 break;
             case 7 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:44: AND
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:43: DEFRULE
                 {
-                mAND(); if (failed) return ;
+                mDEFRULE(); if (failed) return ;
 
                 }
                 break;
             case 8 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:48: NOT
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:51: DEFFUNCTION
                 {
-                mNOT(); if (failed) return ;
+                mDEFFUNCTION(); if (failed) return ;
 
                 }
                 break;
             case 9 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:52: EXISTS
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:63: OR
                 {
-                mEXISTS(); if (failed) return ;
+                mOR(); if (failed) return ;
 
                 }
                 break;
             case 10 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:59: TEST
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:66: AND
                 {
-                mTEST(); if (failed) return ;
+                mAND(); if (failed) return ;
 
                 }
                 break;
             case 11 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:64: NULL
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:70: NOT
                 {
-                mNULL(); if (failed) return ;
+                mNOT(); if (failed) return ;
 
                 }
                 break;
             case 12 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:69: DECLARE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:74: EXISTS
                 {
-                mDECLARE(); if (failed) return ;
+                mEXISTS(); if (failed) return ;
 
                 }
                 break;
             case 13 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:77: SALIENCE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:81: TEST
                 {
-                mSALIENCE(); if (failed) return ;
+                mTEST(); if (failed) return ;
 
                 }
                 break;
             case 14 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:86: INT
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:86: NULL
                 {
-                mINT(); if (failed) return ;
+                mNULL(); if (failed) return ;
 
                 }
                 break;
             case 15 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:90: FLOAT
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:91: DECLARE
                 {
-                mFLOAT(); if (failed) return ;
+                mDECLARE(); if (failed) return ;
 
                 }
                 break;
             case 16 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:96: STRING
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:99: SALIENCE
                 {
-                mSTRING(); if (failed) return ;
+                mSALIENCE(); if (failed) return ;
 
                 }
                 break;
             case 17 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:103: BOOL
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:108: INT
                 {
-                mBOOL(); if (failed) return ;
+                mINT(); if (failed) return ;
 
                 }
                 break;
             case 18 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:108: VAR
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:112: FLOAT
                 {
-                mVAR(); if (failed) return ;
+                mFLOAT(); if (failed) return ;
 
                 }
                 break;
             case 19 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:112: SH_STYLE_SINGLE_LINE_COMMENT
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:118: STRING
                 {
-                mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+                mSTRING(); if (failed) return ;
 
                 }
                 break;
             case 20 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:141: C_STYLE_SINGLE_LINE_COMMENT
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:125: BOOL
                 {
-                mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+                mBOOL(); if (failed) return ;
 
                 }
                 break;
             case 21 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:169: LEFT_PAREN
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:130: VAR
                 {
-                mLEFT_PAREN(); if (failed) return ;
+                mVAR(); if (failed) return ;
 
                 }
                 break;
             case 22 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:180: RIGHT_PAREN
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:134: SH_STYLE_SINGLE_LINE_COMMENT
                 {
-                mRIGHT_PAREN(); if (failed) return ;
+                mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
 
                 }
                 break;
             case 23 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:192: LEFT_SQUARE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:163: C_STYLE_SINGLE_LINE_COMMENT
                 {
-                mLEFT_SQUARE(); if (failed) return ;
+                mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
 
                 }
                 break;
             case 24 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:204: RIGHT_SQUARE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:191: LEFT_PAREN
                 {
-                mRIGHT_SQUARE(); if (failed) return ;
+                mLEFT_PAREN(); if (failed) return ;
 
                 }
                 break;
             case 25 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:217: LEFT_CURLY
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:202: RIGHT_PAREN
                 {
-                mLEFT_CURLY(); if (failed) return ;
+                mRIGHT_PAREN(); if (failed) return ;
 
                 }
                 break;
             case 26 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:228: RIGHT_CURLY
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:214: LEFT_SQUARE
                 {
-                mRIGHT_CURLY(); if (failed) return ;
+                mLEFT_SQUARE(); if (failed) return ;
 
                 }
                 break;
             case 27 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:240: TILDE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:226: RIGHT_SQUARE
                 {
-                mTILDE(); if (failed) return ;
+                mRIGHT_SQUARE(); if (failed) return ;
 
                 }
                 break;
             case 28 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:246: AMPERSAND
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:239: LEFT_CURLY
                 {
-                mAMPERSAND(); if (failed) return ;
+                mLEFT_CURLY(); if (failed) return ;
 
                 }
                 break;
             case 29 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:256: PIPE
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:250: RIGHT_CURLY
                 {
-                mPIPE(); if (failed) return ;
+                mRIGHT_CURLY(); if (failed) return ;
 
                 }
                 break;
             case 30 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:261: ASSIGN_OP
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:262: TILDE
                 {
-                mASSIGN_OP(); if (failed) return ;
+                mTILDE(); if (failed) return ;
 
                 }
                 break;
             case 31 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:271: COLON
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:268: AMPERSAND
                 {
-                mCOLON(); if (failed) return ;
+                mAMPERSAND(); if (failed) return ;
 
                 }
                 break;
             case 32 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:277: EQUALS
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:278: PIPE
                 {
-                mEQUALS(); if (failed) return ;
+                mPIPE(); if (failed) return ;
 
                 }
                 break;
             case 33 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:284: MULTI_LINE_COMMENT
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:283: ASSIGN_OP
                 {
-                mMULTI_LINE_COMMENT(); if (failed) return ;
+                mASSIGN_OP(); if (failed) return ;
 
                 }
                 break;
             case 34 :
-                // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:303: NAME
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:293: COLON
                 {
+                mCOLON(); if (failed) return ;
+
+                }
+                break;
+            case 35 :
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:299: EQUALS
+                {
+                mEQUALS(); if (failed) return ;
+
+                }
+                break;
+            case 36 :
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:306: MULTI_LINE_COMMENT
+                {
+                mMULTI_LINE_COMMENT(); if (failed) return ;
+
+                }
+                break;
+            case 37 :
+                // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:1:325: NAME
+                {
                 mNAME(); if (failed) return ;
 
                 }
@@ -1862,8 +1943,8 @@
 
     // $ANTLR start synpred1
     public final void synpred1_fragment() throws RecognitionException {   
-        // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:731:14: ( '\\r\\n' )
-        // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:731:16: '\\r\\n'
+        // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:781:14: ( '\\r\\n' )
+        // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:781:16: '\\r\\n'
         {
         match("\r\n"); if (failed) return ;
 
@@ -1890,74 +1971,76 @@
 
     protected DFA19 dfa19 = new DFA19(this);
     static final String DFA19_eotS =
-        "\1\uffff\1\35\1\40\1\uffff\10\35\1\54\1\uffff\1\35\1\uffff\2\35"+
-        "\2\uffff\1\62\1\63\1\64\1\65\3\uffff\1\35\1\67\1\uffff\1\35\1\71"+
-        "\1\uffff\1\35\1\74\7\35\1\54\1\35\1\uffff\2\35\1\uffff\2\35\4\uffff"+
-        "\1\113\1\uffff\1\35\1\uffff\2\35\1\uffff\1\120\1\35\1\122\4\35\1"+
-        "\127\2\35\1\uffff\1\35\1\uffff\1\35\1\uffff\4\35\1\uffff\1\136\1"+
-        "\uffff\1\35\1\140\1\141\1\35\1\uffff\1\35\1\111\4\35\1\uffff\1\35"+
-        "\2\uffff\1\35\1\140\1\152\3\35\1\156\1\35\1\uffff\1\35\1\161\1\162"+
-        "\1\uffff\2\35\2\uffff\1\165\1\35\1\uffff\1\35\1\170\1\uffff";
+        "\1\uffff\1\35\1\40\1\uffff\10\35\1\56\1\uffff\1\35\1\uffff\2\35"+
+        "\2\uffff\1\64\1\65\1\66\1\67\3\uffff\1\35\1\71\1\uffff\1\35\1\73"+
+        "\1\uffff\6\35\1\103\4\35\1\56\1\35\1\uffff\2\35\1\uffff\2\35\4\uffff"+
+        "\1\117\1\uffff\1\35\1\uffff\7\35\1\uffff\1\132\1\133\2\35\1\136"+
+        "\2\35\1\uffff\2\35\2\uffff\5\35\1\146\1\35\1\150\1\151\1\152\2\uffff"+
+        "\1\153\1\35\1\uffff\1\35\1\116\5\35\1\uffff\1\35\4\uffff\1\35\1"+
+        "\150\1\165\5\35\1\173\1\uffff\1\174\2\35\1\177\1\35\2\uffff\2\35"+
+        "\1\uffff\1\u0083\2\35\1\uffff\2\35\1\u0088\1\u0089\2\uffff";
     static final String DFA19_eofS =
-        "\171\uffff";
+        "\u008a\uffff";
     static final String DFA19_minS =
-        "\1\11\1\155\1\41\1\uffff\1\145\1\162\1\156\1\157\1\170\1\145\1\141"+
+        "\1\11\1\155\1\41\1\uffff\1\145\1\141\1\145\1\162\1\156\1\157\1\170"+
         "\1\60\1\41\1\uffff\1\141\1\uffff\1\0\1\52\2\uffff\4\41\3\uffff\1"+
-        "\55\1\41\1\uffff\1\160\1\41\1\uffff\1\143\1\41\1\144\1\154\1\164"+
-        "\1\151\1\165\1\163\1\154\1\41\1\60\1\uffff\1\154\1\0\1\uffff\2\0"+
-        "\4\uffff\1\41\1\uffff\1\157\1\uffff\1\146\1\154\1\uffff\1\41\1\154"+
-        "\1\41\1\163\1\145\1\164\1\151\1\41\1\163\1\0\1\uffff\1\0\1\uffff"+
-        "\1\0\1\uffff\1\162\2\165\1\141\1\uffff\1\41\1\uffff\1\164\2\41\1"+
-        "\145\1\uffff\1\145\1\41\1\164\1\156\1\154\1\162\1\uffff\1\163\2"+
-        "\uffff\1\156\2\41\1\143\2\145\1\41\1\143\1\uffff\1\164\2\41\1\uffff"+
-        "\1\145\1\151\2\uffff\1\41\1\157\1\uffff\1\156\1\41\1\uffff";
+        "\55\1\41\1\uffff\1\160\1\41\1\uffff\1\143\1\157\1\154\1\165\1\160"+
+        "\1\163\1\41\1\144\1\164\1\154\1\151\1\41\1\60\1\uffff\1\154\1\0"+
+        "\1\uffff\2\0\4\uffff\1\41\1\uffff\1\157\1\uffff\1\154\1\146\1\164"+
+        "\1\151\2\145\1\164\1\uffff\2\41\1\154\1\163\1\41\1\163\1\0\1\uffff"+
+        "\2\0\2\uffff\1\162\1\141\1\165\1\145\1\165\1\41\1\145\3\41\2\uffff"+
+        "\1\41\1\164\1\uffff\1\145\1\41\1\164\1\162\1\156\1\155\1\154\1\uffff"+
+        "\1\156\4\uffff\1\163\2\41\1\145\1\143\1\160\1\145\1\143\1\41\1\uffff"+
+        "\1\41\1\164\1\154\1\41\1\145\2\uffff\1\151\1\141\1\uffff\1\41\1"+
+        "\157\1\164\1\uffff\1\156\1\145\2\41\2\uffff";
     static final String DFA19_maxS =
-        "\1\176\1\155\1\175\1\uffff\1\145\1\162\1\156\1\165\1\170\1\162\1"+
-        "\141\1\71\1\175\1\uffff\1\141\1\uffff\1\ufffe\1\57\2\uffff\4\175"+
-        "\3\uffff\1\55\1\175\1\uffff\1\160\1\175\1\uffff\1\146\1\175\1\144"+
-        "\1\154\1\164\1\151\1\165\1\163\1\154\1\175\1\71\1\uffff\1\154\1"+
-        "\ufffe\1\uffff\2\ufffe\4\uffff\1\175\1\uffff\1\157\1\uffff\1\162"+
-        "\1\154\1\uffff\1\175\1\154\1\175\1\163\1\145\1\164\1\151\1\175\1"+
-        "\163\1\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe\1\uffff\1\162\2\165"+
-        "\1\141\1\uffff\1\175\1\uffff\1\164\2\175\1\145\1\uffff\1\145\1\175"+
-        "\1\164\1\156\1\154\1\162\1\uffff\1\163\2\uffff\1\156\2\175\1\143"+
-        "\2\145\1\175\1\143\1\uffff\1\164\2\175\1\uffff\1\145\1\151\2\uffff"+
-        "\1\175\1\157\1\uffff\1\156\1\175\1\uffff";
+        "\1\176\1\155\1\175\1\uffff\1\145\1\154\1\171\1\162\1\156\1\165\1"+
+        "\170\1\71\1\175\1\uffff\1\141\1\uffff\1\ufffe\1\57\2\uffff\4\175"+
+        "\3\uffff\1\55\1\175\1\uffff\1\160\1\175\1\uffff\1\146\1\157\1\154"+
+        "\1\165\1\160\1\163\1\175\1\144\1\164\1\154\1\151\1\175\1\71\1\uffff"+
+        "\1\154\1\ufffe\1\uffff\2\ufffe\4\uffff\1\175\1\uffff\1\157\1\uffff"+
+        "\1\154\2\164\1\151\2\145\1\164\1\uffff\2\175\1\154\1\163\1\175\1"+
+        "\163\1\ufffe\1\uffff\2\ufffe\2\uffff\1\162\1\141\1\165\1\145\1\165"+
+        "\1\175\1\145\3\175\2\uffff\1\175\1\164\1\uffff\1\145\1\175\1\164"+
+        "\1\162\1\156\1\155\1\154\1\uffff\1\156\4\uffff\1\163\2\175\1\145"+
+        "\1\143\1\160\1\145\1\143\1\175\1\uffff\1\175\1\164\1\154\1\175\1"+
+        "\145\2\uffff\1\151\1\141\1\uffff\1\175\1\157\1\164\1\uffff\1\156"+
+        "\1\145\2\175\2\uffff";
     static final String DFA19_acceptS =
-        "\3\uffff\1\3\11\uffff\1\20\1\uffff\1\22\2\uffff\1\25\1\26\4\uffff"+
-        "\1\33\1\34\1\35\2\uffff\1\42\2\uffff\1\40\13\uffff\1\16\2\uffff"+
-        "\1\23\2\uffff\1\27\1\30\1\31\1\32\1\uffff\1\37\1\uffff\1\2\2\uffff"+
-        "\1\6\12\uffff\1\24\1\uffff\1\41\1\uffff\1\36\4\uffff\1\7\1\uffff"+
-        "\1\10\4\uffff\1\17\6\uffff\1\13\1\uffff\1\21\1\12\10\uffff\1\1\3"+
-        "\uffff\1\11\2\uffff\1\4\1\14\2\uffff\1\15\2\uffff\1\5";
+        "\3\uffff\1\3\11\uffff\1\23\1\uffff\1\25\2\uffff\1\30\1\31\4\uffff"+
+        "\1\36\1\37\1\40\2\uffff\1\45\2\uffff\1\43\15\uffff\1\21\2\uffff"+
+        "\1\26\2\uffff\1\32\1\33\1\34\1\35\1\uffff\1\42\1\uffff\1\2\7\uffff"+
+        "\1\11\7\uffff\1\27\2\uffff\1\44\1\41\12\uffff\1\12\1\13\2\uffff"+
+        "\1\22\7\uffff\1\5\1\uffff\1\24\1\6\1\15\1\16\11\uffff\1\1\5\uffff"+
+        "\1\14\1\17\2\uffff\1\7\3\uffff\1\20\4\uffff\1\10\1\4";
     static final String DFA19_specialS =
-        "\171\uffff}>";
+        "\u008a\uffff}>";
     static final String[] DFA19_transitionS = {
             "\2\3\1\uffff\2\3\22\uffff\1\3\1\35\1\15\1\20\2\35\1\31\1\15"+
             "\1\22\1\23\3\35\1\13\1\35\1\21\12\14\1\34\1\uffff\1\33\1\2\1"+
-            "\35\1\17\33\35\1\24\1\35\1\25\2\35\1\uffff\1\6\2\35\1\4\1\10"+
-            "\1\16\2\35\1\1\4\35\1\7\1\5\3\35\1\12\1\11\6\35\1\26\1\32\1"+
-            "\27\1\30",
+            "\35\1\17\33\35\1\24\1\35\1\25\2\35\1\uffff\1\10\2\35\1\4\1\12"+
+            "\1\16\2\35\1\1\4\35\1\11\1\7\3\35\1\5\1\6\6\35\1\26\1\32\1\27"+
+            "\1\30",
             "\1\36",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\1\35\1\37\41\35\1\uffff"+
             "\33\35\1\uffff\1\35",
             "",
             "\1\41",
-            "\1\42",
-            "\1\43",
-            "\1\45\5\uffff\1\44",
-            "\1\46",
-            "\1\50\14\uffff\1\47",
-            "\1\51",
-            "\12\52",
-            "\1\35\1\uffff\3\35\4\uffff\4\35\1\53\1\35\12\52\1\35\2\uffff"+
+            "\1\43\12\uffff\1\42",
+            "\1\46\14\uffff\1\44\6\uffff\1\45",
+            "\1\47",
+            "\1\50",
+            "\1\51\5\uffff\1\52",
+            "\1\53",
+            "\12\54",
+            "\1\35\1\uffff\3\35\4\uffff\4\35\1\55\1\35\12\54\1\35\2\uffff"+
             "\43\35\1\uffff\33\35\1\uffff\1\35",
             "",
-            "\1\55",
+            "\1\57",
             "",
-            "\41\57\1\56\1\57\3\56\4\57\21\56\2\57\43\56\1\57\33\56\1\57"+
-            "\1\56\uff81\57",
-            "\1\61\4\uffff\1\60",
+            "\41\61\1\60\1\61\3\60\4\61\21\60\2\61\43\60\1\61\33\60\1\61"+
+            "\1\60\uff81\61",
+            "\1\63\4\uffff\1\62",
             "",
             "",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
@@ -1971,36 +2054,38 @@
             "",
             "",
             "",
-            "\1\66",
+            "\1\70",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
             "",
-            "\1\70",
+            "\1\72",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
             "",
-            "\1\73\2\uffff\1\72",
-            "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
-            "\1\uffff\1\35",
-            "\1\75",
+            "\1\74\2\uffff\1\75",
             "\1\76",
             "\1\77",
             "\1\100",
             "\1\101",
             "\1\102",
-            "\1\103",
-            "\1\35\1\uffff\3\35\4\uffff\4\35\1\53\1\35\12\52\1\35\2\uffff"+
+            "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+            "\1\uffff\1\35",
+            "\1\104",
+            "\1\105",
+            "\1\106",
+            "\1\107",
+            "\1\35\1\uffff\3\35\4\uffff\4\35\1\55\1\35\12\54\1\35\2\uffff"+
             "\43\35\1\uffff\33\35\1\uffff\1\35",
-            "\12\104",
+            "\12\110",
             "",
-            "\1\105",
-            "\41\57\1\56\1\57\3\56\4\57\21\56\2\57\43\56\1\57\33\56\1\57"+
-            "\1\56\uff81\57",
+            "\1\111",
+            "\41\61\1\60\1\61\3\60\4\61\21\60\2\61\43\60\1\61\33\60\1\61"+
+            "\1\60\uff81\61",
             "",
-            "\41\107\1\106\1\107\3\106\4\107\21\106\2\107\43\106\1\107\33"+
-            "\106\1\107\1\106\uff81\107",
-            "\41\111\1\112\1\111\3\112\4\111\1\110\20\112\2\111\43\112\1"+
-            "\111\33\112\1\111\1\112\uff81\111",
+            "\41\113\1\112\1\113\3\112\4\113\21\112\2\113\43\112\1\113\33"+
+            "\112\1\113\1\112\uff81\113",
+            "\41\116\1\115\1\116\3\115\4\116\1\114\20\115\2\116\43\115\1"+
+            "\116\33\115\1\116\1\115\uff81\116",
             "",
             "",
             "",
@@ -2008,87 +2093,105 @@
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
             "",
-            "\1\114",
+            "\1\120",
             "",
-            "\1\115\13\uffff\1\116",
-            "\1\117",
+            "\1\121",
+            "\1\122\13\uffff\1\124\1\uffff\1\123",
+            "\1\125",
+            "\1\126",
+            "\1\127",
+            "\1\130",
+            "\1\131",
             "",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "\1\121",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "\1\123",
-            "\1\124",
-            "\1\125",
-            "\1\126",
-            "\1\35\1\uffff\3\35\4\uffff\6\35\12\104\1\35\2\uffff\43\35\1"+
+            "\1\134",
+            "\1\135",
+            "\1\35\1\uffff\3\35\4\uffff\6\35\12\110\1\35\2\uffff\43\35\1"+
             "\uffff\33\35\1\uffff\1\35",
-            "\1\130",
-            "\41\107\1\106\1\107\3\106\4\107\21\106\2\107\43\106\1\107\33"+
-            "\106\1\107\1\106\uff81\107",
+            "\1\137",
+            "\41\113\1\112\1\113\3\112\4\113\21\112\2\113\43\112\1\113\33"+
+            "\112\1\113\1\112\uff81\113",
             "",
-            "\41\111\1\112\1\111\3\112\4\111\1\110\4\112\1\131\13\112\2\111"+
-            "\43\112\1\111\33\112\1\111\1\112\uff81\111",
+            "\41\116\1\115\1\116\3\115\4\116\1\114\4\115\1\140\13\115\2\116"+
+            "\43\115\1\116\33\115\1\116\1\115\uff81\116",
+            "\41\116\1\115\1\116\3\115\4\116\1\114\20\115\2\116\43\115\1"+
+            "\116\33\115\1\116\1\115\uff81\116",
             "",
-            "\41\111\1\112\1\111\3\112\4\111\1\110\20\112\2\111\43\112\1"+
-            "\111\33\112\1\111\1\112\uff81\111",
             "",
-            "\1\132",
-            "\1\133",
-            "\1\134",
-            "\1\135",
-            "",
+            "\1\141",
+            "\1\142",
+            "\1\143",
+            "\1\144",
+            "\1\145",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "",
-            "\1\137",
+            "\1\147",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "\1\142",
+            "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+            "\1\uffff\1\35",
             "",
-            "\1\143",
-            "\1\112\1\uffff\3\112\4\uffff\1\110\20\112\2\uffff\43\112\1\uffff"+
-            "\33\112\1\uffff\1\112",
-            "\1\144",
-            "\1\145",
-            "\1\146",
-            "\1\147",
             "",
-            "\1\150",
+            "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+            "\1\uffff\1\35",
+            "\1\154",
             "",
+            "\1\155",
+            "\1\115\1\uffff\3\115\4\uffff\1\114\20\115\2\uffff\43\115\1\uffff"+
+            "\33\115\1\uffff\1\115",
+            "\1\156",
+            "\1\157",
+            "\1\160",
+            "\1\161",
+            "\1\162",
             "",
-            "\1\151",
+            "\1\163",
+            "",
+            "",
+            "",
+            "",
+            "\1\164",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "\1\153",
-            "\1\154",
-            "\1\155",
+            "\1\166",
+            "\1\167",
+            "\1\170",
+            "\1\171",
+            "\1\172",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "\1\157",
             "",
-            "\1\160",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
+            "\1\175",
+            "\1\176",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
+            "\1\u0080",
             "",
-            "\1\163",
-            "\1\164",
             "",
+            "\1\u0081",
+            "\1\u0082",
             "",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
-            "\1\166",
+            "\1\u0084",
+            "\1\u0085",
             "",
-            "\1\167",
+            "\1\u0086",
+            "\1\u0087",
             "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
             "\1\uffff\1\35",
+            "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+            "\1\uffff\1\35",
+            "",
             ""
     };
 
@@ -2122,7 +2225,7 @@
             this.transition = DFA19_transition;
         }
         public String getDescription() {
-            return "1:1: Tokens : ( T44 | T45 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
+            return "1:1: Tokens : ( T47 | T48 | WS | DEFTEMPLATE | SLOT | TYPE | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
         }
     }
  

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g 2008-02-07 02:53:24
+// $ANTLR 3.0.1 C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g 2008-06-23 04:10:53
 
 	package org.drools.clips;
 
@@ -23,58 +23,61 @@
 import java.util.HashMap;
 public class ClipsParser extends Parser {
     public static final String[] tokenNames = new String[] {
-        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "VAR", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL_CHAR", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "FIRST_SYMBOL_CHAR", "'import'", "'=>'"
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFTEMPLATE", "STRING", "SLOT", "TYPE", "DEFFUNCTION", "DEFRULE", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "VAR", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL_CHAR", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "FIRST_SYMBOL_CHAR", "'import'", "'=>'"
     };
-    public static final int RIGHT_SQUARE=38;
-    public static final int RIGHT_CURLY=40;
-    public static final int EQUALS=23;
-    public static final int FLOAT=24;
-    public static final int NOT=14;
-    public static final int SYMBOL_CHAR=34;
-    public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
-    public static final int AND=12;
+    public static final int RIGHT_SQUARE=41;
+    public static final int RIGHT_CURLY=43;
+    public static final int EQUALS=26;
+    public static final int FLOAT=27;
+    public static final int NOT=17;
+    public static final int SYMBOL_CHAR=37;
+    public static final int SH_STYLE_SINGLE_LINE_COMMENT=38;
+    public static final int AND=15;
+    public static final int FIRST_SYMBOL_CHAR=46;
     public static final int EOF=-1;
-    public static final int FIRST_SYMBOL_CHAR=43;
-    public static final int HexDigit=31;
-    public static final int DEFFUNCTION=7;
-    public static final int ASSIGN_OP=18;
+    public static final int HexDigit=34;
+    public static final int DEFFUNCTION=11;
+    public static final int TYPE=10;
+    public static final int ASSIGN_OP=21;
     public static final int RIGHT_PAREN=6;
     public static final int NAME=5;
-    public static final int EOL=27;
-    public static final int DEFRULE=8;
-    public static final int TILDE=21;
-    public static final int PIPE=19;
-    public static final int VAR=17;
-    public static final int EXISTS=15;
-    public static final int SYMBOL=42;
-    public static final int NULL=26;
-    public static final int BOOL=25;
-    public static final int SALIENCE=10;
-    public static final int AMPERSAND=20;
-    public static final int INT=11;
-    public static final int MULTI_LINE_COMMENT=41;
-    public static final int COLON=22;
-    public static final int WS=28;
-    public static final int UnicodeEscape=32;
-    public static final int LEFT_CURLY=39;
-    public static final int OR=13;
-    public static final int TEST=16;
+    public static final int EOL=30;
+    public static final int DEFRULE=12;
+    public static final int TILDE=24;
+    public static final int PIPE=22;
+    public static final int VAR=20;
+    public static final int EXISTS=18;
+    public static final int SYMBOL=45;
+    public static final int NULL=29;
+    public static final int BOOL=28;
+    public static final int SALIENCE=13;
+    public static final int AMPERSAND=23;
+    public static final int INT=14;
+    public static final int MULTI_LINE_COMMENT=44;
+    public static final int COLON=25;
+    public static final int WS=31;
+    public static final int UnicodeEscape=35;
+    public static final int SLOT=9;
+    public static final int LEFT_CURLY=42;
+    public static final int OR=16;
+    public static final int TEST=19;
     public static final int LEFT_PAREN=4;
-    public static final int DECLARE=29;
-    public static final int LEFT_SQUARE=37;
-    public static final int EscapeSequence=30;
-    public static final int OctalEscape=33;
-    public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
-    public static final int STRING=9;
+    public static final int DECLARE=32;
+    public static final int DEFTEMPLATE=7;
+    public static final int LEFT_SQUARE=40;
+    public static final int EscapeSequence=33;
+    public static final int OctalEscape=36;
+    public static final int C_STYLE_SINGLE_LINE_COMMENT=39;
+    public static final int STRING=8;
 
         public ClipsParser(TokenStream input) {
             super(input);
-            ruleMemo = new HashMap[27+1];
+            ruleMemo = new HashMap[29+1];
          }
         
 
     public String[] getTokenNames() { return tokenNames; }
-    public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g"; }
+    public String getGrammarFileName() { return "C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g"; }
 
     
     	private PackageDescr packageDescr;
@@ -225,48 +228,55 @@
 
 
     // $ANTLR start eval
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:222:1: eval[ParserHandler handler] : (i= importDescr | f= deffunction | r= defrule | form= lisp_form )* ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:222:1: eval[ParserHandler handler] : (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )* ;
     public final void eval(ParserHandler handler) throws RecognitionException {
         ImportDescr i = null;
 
         FunctionDescr f = null;
 
+        TypeDeclarationDescr t = null;
+
         RuleDescr r = null;
 
         LispForm form = null;
 
 
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:223:2: ( (i= importDescr | f= deffunction | r= defrule | form= lisp_form )* )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:224:5: (i= importDescr | f= deffunction | r= defrule | form= lisp_form )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:223:2: ( (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )* )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:224:5: (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )*
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:224:5: (i= importDescr | f= deffunction | r= defrule | form= lisp_form )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:224:5: (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )*
             loop1:
             do {
-                int alt1=5;
+                int alt1=6;
                 int LA1_0 = input.LA(1);
 
                 if ( (LA1_0==LEFT_PAREN) ) {
                     switch ( input.LA(2) ) {
-                    case DEFFUNCTION:
+                    case 47:
                         {
-                        alt1=2;
+                        alt1=1;
                         }
                         break;
                     case DEFRULE:
                         {
+                        alt1=4;
+                        }
+                        break;
+                    case DEFTEMPLATE:
+                        {
                         alt1=3;
                         }
                         break;
-                    case 44:
+                    case DEFFUNCTION:
                         {
-                        alt1=1;
+                        alt1=2;
                         }
                         break;
                     case NAME:
                     case VAR:
                         {
-                        alt1=4;
+                        alt1=5;
                         }
                         break;
 
@@ -277,7 +287,7 @@
 
                 switch (alt1) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:224:10: i= importDescr
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:224:10: i= importDescr
             	    {
             	    pushFollow(FOLLOW_importDescr_in_eval60);
             	    i=importDescr();
@@ -290,7 +300,7 @@
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:225:7: f= deffunction
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:225:7: f= deffunction
             	    {
             	    pushFollow(FOLLOW_deffunction_in_eval71);
             	    f=deffunction();
@@ -303,9 +313,22 @@
             	    }
             	    break;
             	case 3 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:226:7: r= defrule
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:226:7: t= deftemplate
             	    {
-            	    pushFollow(FOLLOW_defrule_in_eval84);
+            	    pushFollow(FOLLOW_deftemplate_in_eval84);
+            	    t=deftemplate();
+            	    _fsp--;
+            	    if (failed) return ;
+            	    if ( backtracking==0 ) {
+            	       handler.templateHandler( t ); 
+            	    }
+
+            	    }
+            	    break;
+            	case 4 :
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:227:7: r= defrule
+            	    {
+            	    pushFollow(FOLLOW_defrule_in_eval96);
             	    r=defrule();
             	    _fsp--;
             	    if (failed) return ;
@@ -315,10 +338,10 @@
 
             	    }
             	    break;
-            	case 4 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:227:7: form= lisp_form
+            	case 5 :
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:228:7: form= lisp_form
             	    {
-            	    pushFollow(FOLLOW_lisp_form_in_eval96);
+            	    pushFollow(FOLLOW_lisp_form_in_eval108);
             	    form=lisp_form();
             	    _fsp--;
             	    if (failed) return ;
@@ -350,24 +373,24 @@
 
 
     // $ANTLR start importDescr
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:244:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:245:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
     public final ImportDescr importDescr() throws RecognitionException {
         ImportDescr importDescr = null;
 
         Token importName=null;
 
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:245:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:245:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:246:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:246:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr124); if (failed) return importDescr;
-            match(input,44,FOLLOW_44_in_importDescr126); if (failed) return importDescr;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr136); if (failed) return importDescr;
+            match(input,47,FOLLOW_47_in_importDescr138); if (failed) return importDescr;
             importName=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_importDescr130); if (failed) return importDescr;
+            match(input,NAME,FOLLOW_NAME_in_importDescr142); if (failed) return importDescr;
             if ( backtracking==0 ) {
                importDescr = new ImportDescr( importName.getText() ); 
             }
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr134); if (failed) return importDescr;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr146); if (failed) return importDescr;
 
             }
 
@@ -383,8 +406,141 @@
     // $ANTLR end importDescr
 
 
+    // $ANTLR start deftemplate
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:294:1: deftemplate returns [TypeDeclarationDescr typeDescr] : loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING ( deftemplate_slot[typeDescr] )* RIGHT_PAREN ;
+    public final TypeDeclarationDescr deftemplate() throws RecognitionException {
+        TypeDeclarationDescr typeDescr = null;
+
+        Token loc=null;
+        Token deftemplateName=null;
+        Token documentation=null;
+
+        try {
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:295:5: (loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING ( deftemplate_slot[typeDescr] )* RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:296:5: loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING ( deftemplate_slot[typeDescr] )* RIGHT_PAREN
+            {
+            loc=(Token)input.LT(1);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deftemplate181); if (failed) return typeDescr;
+            match(input,DEFTEMPLATE,FOLLOW_DEFTEMPLATE_in_deftemplate188); if (failed) return typeDescr;
+            deftemplateName=(Token)input.LT(1);
+            match(input,NAME,FOLLOW_NAME_in_deftemplate192); if (failed) return typeDescr;
+            if ( backtracking==0 ) {
+               	  			  		
+              	  		debug( "start rule: " + deftemplateName.getText() );
+              	  		String templateStr = deftemplateName.getText();
+              
+                          String mod = null;
+              	        if ( templateStr.indexOf("::") >= 0 ) {
+                              mod = templateStr.substring(0, templateStr.indexOf("::"));
+              	            templateStr = templateStr.substring(templateStr.indexOf("::")+2);
+              			}		    
+              		    
+              		    typeDescr = new TypeDeclarationDescr( templateStr );
+              		    if( mod != null ) {
+              		        typeDescr.setNamespace( mod );
+              		    }		    
+              		        
+              			typeDescr.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+              			typeDescr.setStartCharacter( ((CommonToken)loc).getStartIndex() ); 
+              		
+              											
+              		
+            }
+            documentation=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_deftemplate203); if (failed) return typeDescr;
+            if ( backtracking==0 ) {
+              
+              		// do nothing here for now
+              	
+            }
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:321:4: ( deftemplate_slot[typeDescr] )*
+            loop2:
+            do {
+                int alt2=2;
+                int LA2_0 = input.LA(1);
+
+                if ( (LA2_0==LEFT_PAREN) ) {
+                    alt2=1;
+                }
+
+
+                switch (alt2) {
+            	case 1 :
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:321:4: deftemplate_slot[typeDescr]
+            	    {
+            	    pushFollow(FOLLOW_deftemplate_slot_in_deftemplate216);
+            	    deftemplate_slot(typeDescr);
+            	    _fsp--;
+            	    if (failed) return typeDescr;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop2;
+                }
+            } while (true);
+
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deftemplate224); if (failed) return typeDescr;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return typeDescr;
+    }
+    // $ANTLR end deftemplate
+
+
+    // $ANTLR start deftemplate_slot
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:325:1: deftemplate_slot[TypeDeclarationDescr typeDescr] : LEFT_PAREN SLOT slotName= NAME LEFT_PAREN TYPE slotType= NAME RIGHT_PAREN RIGHT_PAREN ;
+    public final void deftemplate_slot(TypeDeclarationDescr typeDescr) throws RecognitionException {
+        Token slotName=null;
+        Token slotType=null;
+
+        
+             
+        try {
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:328:6: ( LEFT_PAREN SLOT slotName= NAME LEFT_PAREN TYPE slotType= NAME RIGHT_PAREN RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:329:5: LEFT_PAREN SLOT slotName= NAME LEFT_PAREN TYPE slotType= NAME RIGHT_PAREN RIGHT_PAREN
+            {
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deftemplate_slot262); if (failed) return ;
+            match(input,SLOT,FOLLOW_SLOT_in_deftemplate_slot269); if (failed) return ;
+            slotName=(Token)input.LT(1);
+            match(input,NAME,FOLLOW_NAME_in_deftemplate_slot273); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deftemplate_slot283); if (failed) return ;
+            match(input,TYPE,FOLLOW_TYPE_in_deftemplate_slot294); if (failed) return ;
+            slotType=(Token)input.LT(1);
+            match(input,NAME,FOLLOW_NAME_in_deftemplate_slot298); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deftemplate_slot308); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+                          typeDescr.addField( new TypeFieldDescr(slotName.getText(), new PatternDescr( slotType.getText() ) ) );
+                      
+            }
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deftemplate_slot316); if (failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return ;
+    }
+    // $ANTLR end deftemplate_slot
+
+
     // $ANTLR start deffunction
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:293:1: deffunction returns [FunctionDescr functionDescr] : LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:339:1: deffunction returns [FunctionDescr functionDescr] : LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN ;
     public final FunctionDescr deffunction() throws RecognitionException {
         FunctionDescr functionDescr = null;
 
@@ -401,37 +557,37 @@
                 functionDescr = null;
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:298:2: ( LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:298:4: LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:344:2: ( LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:344:4: LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction169); if (failed) return functionDescr;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction352); if (failed) return functionDescr;
             t=(Token)input.LT(1);
-            match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction179); if (failed) return functionDescr;
-            pushFollow(FOLLOW_lisp_atom_in_deffunction189);
+            match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction362); if (failed) return functionDescr;
+            pushFollow(FOLLOW_lisp_atom_in_deffunction372);
             name=lisp_atom();
             _fsp--;
             if (failed) return functionDescr;
-            pushFollow(FOLLOW_lisp_form_in_deffunction199);
+            pushFollow(FOLLOW_lisp_form_in_deffunction382);
             params=lisp_form();
             _fsp--;
             if (failed) return functionDescr;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:302:3: (form= lisp_form )+
-            int cnt2=0;
-            loop2:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:348:3: (form= lisp_form )+
+            int cnt3=0;
+            loop3:
             do {
-                int alt2=2;
-                int LA2_0 = input.LA(1);
+                int alt3=2;
+                int LA3_0 = input.LA(1);
 
-                if ( (LA2_0==LEFT_PAREN) ) {
-                    alt2=1;
+                if ( (LA3_0==LEFT_PAREN) ) {
+                    alt3=1;
                 }
 
 
-                switch (alt2) {
+                switch (alt3) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:302:4: form= lisp_form
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:348:4: form= lisp_form
             	    {
-            	    pushFollow(FOLLOW_lisp_form_in_deffunction208);
+            	    pushFollow(FOLLOW_lisp_form_in_deffunction391);
             	    form=lisp_form();
             	    _fsp--;
             	    if (failed) return functionDescr;
@@ -443,16 +599,16 @@
             	    break;
 
             	default :
-            	    if ( cnt2 >= 1 ) break loop2;
+            	    if ( cnt3 >= 1 ) break loop3;
             	    if (backtracking>0) {failed=true; return functionDescr;}
                         EarlyExitException eee =
-                            new EarlyExitException(2, input);
+                            new EarlyExitException(3, input);
                         throw eee;
                 }
-                cnt2++;
+                cnt3++;
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction230); if (failed) return functionDescr;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction413); if (failed) return functionDescr;
             if ( backtracking==0 ) {
                functionDescr = FunctionHandlers.createFunctionDescr( name, params, content ); 
             }
@@ -472,7 +628,7 @@
 
 
     // $ANTLR start defrule
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:308:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:354:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN ;
     public final RuleDescr defrule() throws RecognitionException {
         RuleDescr rule = null;
 
@@ -485,23 +641,23 @@
          
         	        rule = null; 
         	        AndDescr lhs = null;
-        	        PatternDescr colum = null;
-        	        AttributeDescr module = null;	      
+        	        PatternDescr colum = null;  
                     Set declarations = null;  
         	      
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:316:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:316:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:361:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:361:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN
             {
             loc=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule267); if (failed) return rule;
-            match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule275); if (failed) return rule;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule450); if (failed) return rule;
+            match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule458); if (failed) return rule;
             ruleName=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_defrule279); if (failed) return rule;
+            match(input,NAME,FOLLOW_NAME_in_defrule462); if (failed) return rule;
             if ( backtracking==0 ) {
                	  			  		
               	  		debug( "start rule: " + ruleName.getText() );
               	  		String ruleStr = ruleName.getText();
+              	  		AttributeDescr module = null;
               
               	        if ( ruleStr.indexOf("::") >= 0 ) {
               	            String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
@@ -514,6 +670,7 @@
               		    
               		    rule = new RuleDescr( ruleStr, null ); 
               		    if( module != null ) {
+              		        rule.setNamespace( module.getValue() );
               		    	rule.addAttribute( module );
               		    }
               		        
@@ -532,32 +689,32 @@
               		
             }
             documentation=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_defrule291); if (failed) return rule;
+            match(input,STRING,FOLLOW_STRING_in_defrule474); if (failed) return rule;
             if ( backtracking==0 ) {
               
               	    	// do nothing here for now
               		
             }
-            pushFollow(FOLLOW_ruleAttribute_in_defrule297);
+            pushFollow(FOLLOW_ruleAttribute_in_defrule480);
             ruleAttribute(rule);
             _fsp--;
             if (failed) return rule;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:355:3: ( ce[lhs, declarations] )*
-            loop3:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:402:3: ( ce[lhs, declarations] )*
+            loop4:
             do {
-                int alt3=2;
-                int LA3_0 = input.LA(1);
+                int alt4=2;
+                int LA4_0 = input.LA(1);
 
-                if ( (LA3_0==LEFT_PAREN||LA3_0==VAR) ) {
-                    alt3=1;
+                if ( (LA4_0==LEFT_PAREN||LA4_0==VAR) ) {
+                    alt4=1;
                 }
 
 
-                switch (alt3) {
+                switch (alt4) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:355:3: ce[lhs, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:402:3: ce[lhs, declarations]
             	    {
-            	    pushFollow(FOLLOW_ce_in_defrule305);
+            	    pushFollow(FOLLOW_ce_in_defrule488);
             	    ce(lhs,  declarations);
             	    _fsp--;
             	    if (failed) return rule;
@@ -566,19 +723,19 @@
             	    break;
 
             	default :
-            	    break loop3;
+            	    break loop4;
                 }
             } while (true);
 
-            match(input,45,FOLLOW_45_in_defrule314); if (failed) return rule;
-            pushFollow(FOLLOW_rule_consequence_in_defrule323);
+            match(input,48,FOLLOW_48_in_defrule497); if (failed) return rule;
+            pushFollow(FOLLOW_rule_consequence_in_defrule506);
             list=rule_consequence();
             _fsp--;
             if (failed) return rule;
             if ( backtracking==0 ) {
                rule.setConsequence( list ); 
             }
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule331); if (failed) return rule;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule514); if (failed) return rule;
 
             }
 
@@ -595,7 +752,7 @@
 
 
     // $ANTLR start rule_consequence
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:364:1: rule_consequence returns [List list] : (l= lisp_form )* ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:411:1: rule_consequence returns [List list] : (l= lisp_form )* ;
     public final List rule_consequence() throws RecognitionException {
         List list = null;
 
@@ -606,25 +763,25 @@
                 list = null;
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:368:5: ( (l= lisp_form )* )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:369:3: (l= lisp_form )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:415:5: ( (l= lisp_form )* )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:416:3: (l= lisp_form )*
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:369:3: (l= lisp_form )*
-            loop4:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:416:3: (l= lisp_form )*
+            loop5:
             do {
-                int alt4=2;
-                int LA4_0 = input.LA(1);
+                int alt5=2;
+                int LA5_0 = input.LA(1);
 
-                if ( (LA4_0==LEFT_PAREN) ) {
-                    alt4=1;
+                if ( (LA5_0==LEFT_PAREN) ) {
+                    alt5=1;
                 }
 
 
-                switch (alt4) {
+                switch (alt5) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:369:4: l= lisp_form
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:416:4: l= lisp_form
             	    {
-            	    pushFollow(FOLLOW_lisp_form_in_rule_consequence363);
+            	    pushFollow(FOLLOW_lisp_form_in_rule_consequence546);
             	    l=lisp_form();
             	    _fsp--;
             	    if (failed) return list;
@@ -636,7 +793,7 @@
             	    break;
 
             	default :
-            	    break loop4;
+            	    break loop5;
                 }
             } while (true);
 
@@ -656,59 +813,59 @@
 
 
     // $ANTLR start ruleAttribute
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:372:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:419:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
     public final void ruleAttribute(RuleDescr rule) throws RecognitionException {
         AttributeDescr d = null;
 
 
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:373:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:374:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:420:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:421:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:374:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
-            int alt6=2;
-            int LA6_0 = input.LA(1);
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:421:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+            int alt7=2;
+            int LA7_0 = input.LA(1);
 
-            if ( (LA6_0==LEFT_PAREN) ) {
-                int LA6_1 = input.LA(2);
+            if ( (LA7_0==LEFT_PAREN) ) {
+                int LA7_1 = input.LA(2);
 
-                if ( (LA6_1==DECLARE) ) {
-                    alt6=1;
+                if ( (LA7_1==DECLARE) ) {
+                    alt7=1;
                 }
             }
-            switch (alt6) {
+            switch (alt7) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:374:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:421:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
                     {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute396); if (failed) return ;
-                    match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute398); if (failed) return ;
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:375:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
-                    int alt5=2;
-                    int LA5_0 = input.LA(1);
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute579); if (failed) return ;
+                    match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute581); if (failed) return ;
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:422:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+                    int alt6=2;
+                    int LA6_0 = input.LA(1);
 
-                    if ( (LA5_0==LEFT_PAREN) ) {
-                        alt5=1;
+                    if ( (LA6_0==LEFT_PAREN) ) {
+                        alt6=1;
                     }
-                    switch (alt5) {
+                    switch (alt6) {
                         case 1 :
-                            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:375:6: LEFT_PAREN d= salience RIGHT_PAREN
+                            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:422:6: LEFT_PAREN d= salience RIGHT_PAREN
                             {
-                            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute405); if (failed) return ;
-                            pushFollow(FOLLOW_salience_in_ruleAttribute409);
+                            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute588); if (failed) return ;
+                            pushFollow(FOLLOW_salience_in_ruleAttribute592);
                             d=salience();
                             _fsp--;
                             if (failed) return ;
                             if ( backtracking==0 ) {
                                rule.addAttribute( d ); 
                             }
-                            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute413); if (failed) return ;
+                            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute596); if (failed) return ;
 
                             }
                             break;
 
                     }
 
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute420); if (failed) return ;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute603); if (failed) return ;
 
                     }
                     break;
@@ -731,7 +888,7 @@
 
 
     // $ANTLR start salience
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:379:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:426:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
     public final AttributeDescr salience() throws RecognitionException {
         AttributeDescr d = null;
 
@@ -742,13 +899,13 @@
         		d = null;
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:383:2: (loc= SALIENCE i= INT )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:384:3: loc= SALIENCE i= INT
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:430:2: (loc= SALIENCE i= INT )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:431:3: loc= SALIENCE i= INT
             {
             loc=(Token)input.LT(1);
-            match(input,SALIENCE,FOLLOW_SALIENCE_in_salience450); if (failed) return d;
+            match(input,SALIENCE,FOLLOW_SALIENCE_in_salience633); if (failed) return d;
             i=(Token)input.LT(1);
-            match(input,INT,FOLLOW_INT_in_salience454); if (failed) return d;
+            match(input,INT,FOLLOW_INT_in_salience637); if (failed) return d;
             if ( backtracking==0 ) {
               
               			d = new AttributeDescr( "salience", i.getText() );
@@ -773,72 +930,72 @@
 
 
     // $ANTLR start ce
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:394:1: ce[ConditionalElementDescr in_ce, Set declarations] : ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:441:1: ce[ConditionalElementDescr in_ce, Set declarations] : ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) ;
     public final void ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:395:2: ( ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:395:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:442:2: ( ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:442:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:395:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
-            int alt7=7;
-            int LA7_0 = input.LA(1);
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:442:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
+            int alt8=7;
+            int LA8_0 = input.LA(1);
 
-            if ( (LA7_0==LEFT_PAREN) ) {
+            if ( (LA8_0==LEFT_PAREN) ) {
                 switch ( input.LA(2) ) {
-                case NAME:
+                case AND:
                     {
-                    alt7=6;
+                    alt8=1;
                     }
                     break;
-                case OR:
+                case TEST:
                     {
-                    alt7=2;
+                    alt8=5;
                     }
                     break;
-                case AND:
+                case EXISTS:
                     {
-                    alt7=1;
+                    alt8=4;
                     }
                     break;
-                case TEST:
+                case NOT:
                     {
-                    alt7=5;
+                    alt8=3;
                     }
                     break;
-                case EXISTS:
+                case OR:
                     {
-                    alt7=4;
+                    alt8=2;
                     }
                     break;
-                case NOT:
+                case NAME:
                     {
-                    alt7=3;
+                    alt8=6;
                     }
                     break;
                 default:
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("395:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 7, 1, input);
+                        new NoViableAltException("442:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 8, 1, input);
 
                     throw nvae;
                 }
 
             }
-            else if ( (LA7_0==VAR) ) {
-                alt7=7;
+            else if ( (LA8_0==VAR) ) {
+                alt8=7;
             }
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("395:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 7, 0, input);
+                    new NoViableAltException("442:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 8, 0, input);
 
                 throw nvae;
             }
-            switch (alt7) {
+            switch (alt8) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:395:8: and_ce[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:442:8: and_ce[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_and_ce_in_ce480);
+                    pushFollow(FOLLOW_and_ce_in_ce663);
                     and_ce(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -846,9 +1003,9 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:396:7: or_ce[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:443:7: or_ce[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_or_ce_in_ce490);
+                    pushFollow(FOLLOW_or_ce_in_ce673);
                     or_ce(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -856,9 +1013,9 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:397:7: not_ce[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:444:7: not_ce[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_not_ce_in_ce499);
+                    pushFollow(FOLLOW_not_ce_in_ce682);
                     not_ce(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -866,9 +1023,9 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:398:7: exists_ce[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:445:7: exists_ce[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_exists_ce_in_ce508);
+                    pushFollow(FOLLOW_exists_ce_in_ce691);
                     exists_ce(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -876,9 +1033,9 @@
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:399:8: eval_ce[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:446:8: eval_ce[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_eval_ce_in_ce522);
+                    pushFollow(FOLLOW_eval_ce_in_ce705);
                     eval_ce(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -886,9 +1043,9 @@
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:400:7: normal_pattern[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:447:7: normal_pattern[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_normal_pattern_in_ce536);
+                    pushFollow(FOLLOW_normal_pattern_in_ce719);
                     normal_pattern(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -896,9 +1053,9 @@
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:401:7: bound_pattern[in_ce, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:448:7: bound_pattern[in_ce, declarations]
                     {
-                    pushFollow(FOLLOW_bound_pattern_in_ce545);
+                    pushFollow(FOLLOW_bound_pattern_in_ce728);
                     bound_pattern(in_ce,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -924,40 +1081,40 @@
 
 
     // $ANTLR start and_ce
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:405:1: and_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:452:1: and_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN ;
     public final void and_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         
                 AndDescr andDescr= null;        
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:409:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:409:4: LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:456:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:456:4: LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce572); if (failed) return ;
-            match(input,AND,FOLLOW_AND_in_and_ce577); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce755); if (failed) return ;
+            match(input,AND,FOLLOW_AND_in_and_ce760); if (failed) return ;
             if ( backtracking==0 ) {
               
               	    	andDescr = new AndDescr();
               			in_ce.addDescr( andDescr );
               		
             }
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:414:3: ( ce[andDescr, declarations] )+
-            int cnt8=0;
-            loop8:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:461:3: ( ce[andDescr, declarations] )+
+            int cnt9=0;
+            loop9:
             do {
-                int alt8=2;
-                int LA8_0 = input.LA(1);
+                int alt9=2;
+                int LA9_0 = input.LA(1);
 
-                if ( (LA8_0==LEFT_PAREN||LA8_0==VAR) ) {
-                    alt8=1;
+                if ( (LA9_0==LEFT_PAREN||LA9_0==VAR) ) {
+                    alt9=1;
                 }
 
 
-                switch (alt8) {
+                switch (alt9) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:414:3: ce[andDescr, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:461:3: ce[andDescr, declarations]
             	    {
-            	    pushFollow(FOLLOW_ce_in_and_ce583);
+            	    pushFollow(FOLLOW_ce_in_and_ce766);
             	    ce(andDescr,  declarations);
             	    _fsp--;
             	    if (failed) return ;
@@ -966,16 +1123,16 @@
             	    break;
 
             	default :
-            	    if ( cnt8 >= 1 ) break loop8;
+            	    if ( cnt9 >= 1 ) break loop9;
             	    if (backtracking>0) {failed=true; return ;}
                         EarlyExitException eee =
-                            new EarlyExitException(8, input);
+                            new EarlyExitException(9, input);
                         throw eee;
                 }
-                cnt8++;
+                cnt9++;
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce592); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce775); if (failed) return ;
 
             }
 
@@ -992,40 +1149,40 @@
 
 
     // $ANTLR start or_ce
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:418:1: or_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:465:1: or_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN ;
     public final void or_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         
                 OrDescr orDescr= null;         
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:422:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:422:4: LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:469:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:469:4: LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce620); if (failed) return ;
-            match(input,OR,FOLLOW_OR_in_or_ce625); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce803); if (failed) return ;
+            match(input,OR,FOLLOW_OR_in_or_ce808); if (failed) return ;
             if ( backtracking==0 ) {
               
               	    	orDescr = new OrDescr();
               			in_ce.addDescr( orDescr );
               		
             }
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:427:3: ( ce[orDescr, declarations] )+
-            int cnt9=0;
-            loop9:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:474:3: ( ce[orDescr, declarations] )+
+            int cnt10=0;
+            loop10:
             do {
-                int alt9=2;
-                int LA9_0 = input.LA(1);
+                int alt10=2;
+                int LA10_0 = input.LA(1);
 
-                if ( (LA9_0==LEFT_PAREN||LA9_0==VAR) ) {
-                    alt9=1;
+                if ( (LA10_0==LEFT_PAREN||LA10_0==VAR) ) {
+                    alt10=1;
                 }
 
 
-                switch (alt9) {
+                switch (alt10) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:427:3: ce[orDescr, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:474:3: ce[orDescr, declarations]
             	    {
-            	    pushFollow(FOLLOW_ce_in_or_ce631);
+            	    pushFollow(FOLLOW_ce_in_or_ce814);
             	    ce(orDescr,  declarations);
             	    _fsp--;
             	    if (failed) return ;
@@ -1034,16 +1191,16 @@
             	    break;
 
             	default :
-            	    if ( cnt9 >= 1 ) break loop9;
+            	    if ( cnt10 >= 1 ) break loop10;
             	    if (backtracking>0) {failed=true; return ;}
                         EarlyExitException eee =
-                            new EarlyExitException(9, input);
+                            new EarlyExitException(10, input);
                         throw eee;
                 }
-                cnt9++;
+                cnt10++;
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce640); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce823); if (failed) return ;
 
             }
 
@@ -1060,28 +1217,28 @@
 
 
     // $ANTLR start not_ce
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:431:1: not_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:478:1: not_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN ;
     public final void not_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         
                 NotDescr notDescr= null;         
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:435:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:435:4: LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:482:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:482:4: LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce668); if (failed) return ;
-            match(input,NOT,FOLLOW_NOT_in_not_ce673); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce851); if (failed) return ;
+            match(input,NOT,FOLLOW_NOT_in_not_ce856); if (failed) return ;
             if ( backtracking==0 ) {
               
               			notDescr = new NotDescr();
               		    in_ce.addDescr( notDescr );
               		
             }
-            pushFollow(FOLLOW_ce_in_not_ce679);
+            pushFollow(FOLLOW_ce_in_not_ce862);
             ce(notDescr,  declarations);
             _fsp--;
             if (failed) return ;
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce687); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce870); if (failed) return ;
 
             }
 
@@ -1098,28 +1255,28 @@
 
 
     // $ANTLR start exists_ce
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:444:1: exists_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:491:1: exists_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN ;
     public final void exists_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         
                 ExistsDescr existsDescr= null;        
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:448:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:448:4: LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:495:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:495:4: LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce716); if (failed) return ;
-            match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce721); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce899); if (failed) return ;
+            match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce904); if (failed) return ;
             if ( backtracking==0 ) {
               
               		    existsDescr = new ExistsDescr();
               		    in_ce.addDescr( existsDescr );
               		
             }
-            pushFollow(FOLLOW_ce_in_exists_ce727);
+            pushFollow(FOLLOW_ce_in_exists_ce910);
             ce(existsDescr,  declarations);
             _fsp--;
             if (failed) return ;
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce735); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce918); if (failed) return ;
 
             }
 
@@ -1136,25 +1293,25 @@
 
 
     // $ANTLR start eval_ce
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:457:1: eval_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN TEST t= lisp_form RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:504:1: eval_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN TEST t= lisp_form RIGHT_PAREN ;
     public final void eval_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         LispForm t = null;
 
 
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:458:2: ( LEFT_PAREN TEST t= lisp_form RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:458:4: LEFT_PAREN TEST t= lisp_form RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:505:2: ( LEFT_PAREN TEST t= lisp_form RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:505:4: LEFT_PAREN TEST t= lisp_form RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce754); if (failed) return ;
-            match(input,TEST,FOLLOW_TEST_in_eval_ce759); if (failed) return ;
-            pushFollow(FOLLOW_lisp_form_in_eval_ce766);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce937); if (failed) return ;
+            match(input,TEST,FOLLOW_TEST_in_eval_ce942); if (failed) return ;
+            pushFollow(FOLLOW_lisp_form_in_eval_ce949);
             t=lisp_form();
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
                EvalDescr evalDescr = new EvalDescr(); evalDescr.setContent( t ); in_ce.addDescr( evalDescr ); 
             }
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce776); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce959); if (failed) return ;
 
             }
 
@@ -1171,7 +1328,7 @@
 
 
     // $ANTLR start normal_pattern
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:464:1: normal_pattern[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:511:1: normal_pattern[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
     public final void normal_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         Token name=null;
 
@@ -1180,12 +1337,12 @@
                 ConditionalElementDescr top = null;
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:469:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:469:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:516:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:516:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern804); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern987); if (failed) return ;
             name=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_normal_pattern811); if (failed) return ;
+            match(input,NAME,FOLLOW_NAME_in_normal_pattern994); if (failed) return ;
             if ( backtracking==0 ) {
               
               			pattern = new PatternDescr(name.getText());
@@ -1194,22 +1351,22 @@
               			
               		
             }
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:476:3: ( field_constriant[top, declarations] )*
-            loop10:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:523:3: ( field_constriant[top, declarations] )*
+            loop11:
             do {
-                int alt10=2;
-                int LA10_0 = input.LA(1);
+                int alt11=2;
+                int LA11_0 = input.LA(1);
 
-                if ( (LA10_0==LEFT_PAREN) ) {
-                    alt10=1;
+                if ( (LA11_0==LEFT_PAREN) ) {
+                    alt11=1;
                 }
 
 
-                switch (alt10) {
+                switch (alt11) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:476:3: field_constriant[top, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:523:3: field_constriant[top, declarations]
             	    {
-            	    pushFollow(FOLLOW_field_constriant_in_normal_pattern817);
+            	    pushFollow(FOLLOW_field_constriant_in_normal_pattern1000);
             	    field_constriant(top,  declarations);
             	    _fsp--;
             	    if (failed) return ;
@@ -1218,11 +1375,11 @@
             	    break;
 
             	default :
-            	    break loop10;
+            	    break loop11;
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern827); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern1010); if (failed) return ;
 
             }
 
@@ -1239,7 +1396,7 @@
 
 
     // $ANTLR start bound_pattern
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:482:1: bound_pattern[ConditionalElementDescr in_ce, Set declarations] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:529:1: bound_pattern[ConditionalElementDescr in_ce, Set declarations] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
     public final void bound_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
         Token var=null;
         Token name=null;
@@ -1250,20 +1407,20 @@
                 ConditionalElementDescr top = null;        
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:488:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:488:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:535:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:535:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
             {
             var=(Token)input.LT(1);
-            match(input,VAR,FOLLOW_VAR_in_bound_pattern855); if (failed) return ;
+            match(input,VAR,FOLLOW_VAR_in_bound_pattern1038); if (failed) return ;
             if ( backtracking==0 ) {
               
               			identifier = var.getText();
               		
             }
-            match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern861); if (failed) return ;
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern863); if (failed) return ;
+            match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern1044); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern1046); if (failed) return ;
             name=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_bound_pattern867); if (failed) return ;
+            match(input,NAME,FOLLOW_NAME_in_bound_pattern1050); if (failed) return ;
             if ( backtracking==0 ) {
               
               			pattern = new PatternDescr(name.getText());
@@ -1272,22 +1429,22 @@
               			top = pattern.getConstraint();				    
               		
             }
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:498:3: ( field_constriant[top, declarations] )*
-            loop11:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:545:3: ( field_constriant[top, declarations] )*
+            loop12:
             do {
-                int alt11=2;
-                int LA11_0 = input.LA(1);
+                int alt12=2;
+                int LA12_0 = input.LA(1);
 
-                if ( (LA11_0==LEFT_PAREN) ) {
-                    alt11=1;
+                if ( (LA12_0==LEFT_PAREN) ) {
+                    alt12=1;
                 }
 
 
-                switch (alt11) {
+                switch (alt12) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:498:3: field_constriant[top, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:545:3: field_constriant[top, declarations]
             	    {
-            	    pushFollow(FOLLOW_field_constriant_in_bound_pattern876);
+            	    pushFollow(FOLLOW_field_constriant_in_bound_pattern1059);
             	    field_constriant(top,  declarations);
             	    _fsp--;
             	    if (failed) return ;
@@ -1296,11 +1453,11 @@
             	    break;
 
             	default :
-            	    break loop11;
+            	    break loop12;
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern883); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern1066); if (failed) return ;
 
             }
 
@@ -1317,7 +1474,7 @@
 
 
     // $ANTLR start field_constriant
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:502:1: field_constriant[ConditionalElementDescr base, Set declarations] : LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:549:1: field_constriant[ConditionalElementDescr base, Set declarations] : LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN ;
     public final void field_constriant(ConditionalElementDescr base, Set declarations) throws RecognitionException {
         Token f=null;
 
@@ -1329,12 +1486,12 @@
         		String op = "==";
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:510:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:511:3: LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:557:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:558:3: LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant914); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant1097); if (failed) return ;
             f=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_field_constriant918); if (failed) return ;
+            match(input,NAME,FOLLOW_NAME_in_field_constriant1101); if (failed) return ;
             if ( backtracking==0 ) {
               
               			fc = new FieldConstraintDescr(f.getText());
@@ -1343,14 +1500,14 @@
               			top = fc.getRestriction();		
               		
             }
-            pushFollow(FOLLOW_or_restr_connective_in_field_constriant933);
+            pushFollow(FOLLOW_or_restr_connective_in_field_constriant1116);
             or_restr_connective(top,  base,  fc,  declarations);
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
                if ( top.getRestrictions().size() != 0 ) base.addDescr( fc ); 
             }
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant943); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant1126); if (failed) return ;
 
             }
 
@@ -1367,41 +1524,41 @@
 
 
     // $ANTLR start or_restr_connective
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:538:1: or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] options {backtrack=true; } : and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:585:1: or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] options {backtrack=true; } : and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* ;
     public final void or_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
         
         		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:545:2: ( and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:546:3: and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:592:2: ( and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:593:3: and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
             {
-            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective982);
+            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective1165);
             and_restr_connective(or,  ceBase,  fcBase,  declarations);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:547:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
-            loop12:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:594:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
+            loop13:
             do {
-                int alt12=2;
-                int LA12_0 = input.LA(1);
+                int alt13=2;
+                int LA13_0 = input.LA(1);
 
-                if ( (LA12_0==PIPE) ) {
-                    alt12=1;
+                if ( (LA13_0==PIPE) ) {
+                    alt13=1;
                 }
 
 
-                switch (alt12) {
+                switch (alt13) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:549:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:596:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
             	    {
-            	    match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective1006); if (failed) return ;
+            	    match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective1189); if (failed) return ;
             	    if ( backtracking==0 ) {
             	      
             	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
             	      			
             	    }
-            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective1016);
+            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective1199);
             	    and_restr_connective(or,  ceBase,  fcBase,  declarations);
             	    _fsp--;
             	    if (failed) return ;
@@ -1410,7 +1567,7 @@
             	    break;
 
             	default :
-            	    break loop12;
+            	    break loop13;
                 }
             } while (true);
 
@@ -1437,36 +1594,36 @@
 
 
     // $ANTLR start and_restr_connective
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:564:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:611:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* ;
     public final void and_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
         
         		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:568:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:569:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:615:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:616:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
             {
-            pushFollow(FOLLOW_restriction_in_and_restr_connective1048);
+            pushFollow(FOLLOW_restriction_in_and_restr_connective1231);
             restriction(and,  ceBase,  fcBase,  declarations);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:570:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
-            loop13:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:617:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+            loop14:
             do {
-                int alt13=2;
-                int LA13_0 = input.LA(1);
+                int alt14=2;
+                int LA14_0 = input.LA(1);
 
-                if ( (LA13_0==AMPERSAND) ) {
-                    alt13=1;
+                if ( (LA14_0==AMPERSAND) ) {
+                    alt14=1;
                 }
 
 
-                switch (alt13) {
+                switch (alt14) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:570:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:617:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
             	    {
-            	    match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective1056); if (failed) return ;
-            	    pushFollow(FOLLOW_restriction_in_and_restr_connective1058);
+            	    match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective1239); if (failed) return ;
+            	    pushFollow(FOLLOW_restriction_in_and_restr_connective1241);
             	    restriction(and,  ceBase,  fcBase,  declarations);
             	    _fsp--;
             	    if (failed) return ;
@@ -1475,7 +1632,7 @@
             	    break;
 
             	default :
-            	    break loop13;
+            	    break loop14;
                 }
             } while (true);
 
@@ -1502,7 +1659,7 @@
 
 
     // $ANTLR start restriction
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:589:1: restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ] : ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:636:1: restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ] : ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) ;
     public final void restriction(RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
         String lc = null;
 
@@ -1511,21 +1668,21 @@
         			String op = "==";
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:593:2: ( ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:593:4: ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:640:2: ( ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:640:4: ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:593:4: ( TILDE )?
-            int alt14=2;
-            int LA14_0 = input.LA(1);
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:640:4: ( TILDE )?
+            int alt15=2;
+            int LA15_0 = input.LA(1);
 
-            if ( (LA14_0==TILDE) ) {
-                alt14=1;
+            if ( (LA15_0==TILDE) ) {
+                alt15=1;
             }
-            switch (alt14) {
+            switch (alt15) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:593:5: TILDE
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:640:5: TILDE
                     {
-                    match(input,TILDE,FOLLOW_TILDE_in_restriction1091); if (failed) return ;
+                    match(input,TILDE,FOLLOW_TILDE_in_restriction1274); if (failed) return ;
                     if ( backtracking==0 ) {
                       op = "!=";
                     }
@@ -1535,22 +1692,22 @@
 
             }
 
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:594:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
-            int alt15=4;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:641:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
+            int alt16=4;
             switch ( input.LA(1) ) {
             case COLON:
                 {
-                alt15=1;
+                alt16=1;
                 }
                 break;
             case EQUALS:
                 {
-                alt15=2;
+                alt16=2;
                 }
                 break;
             case VAR:
                 {
-                alt15=3;
+                alt16=3;
                 }
                 break;
             case NAME:
@@ -1560,22 +1717,22 @@
             case BOOL:
             case NULL:
                 {
-                alt15=4;
+                alt16=4;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("594:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )", 15, 0, input);
+                    new NoViableAltException("641:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )", 16, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt15) {
+            switch (alt16) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:594:5: predicate_constraint[rc, op, base]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:641:5: predicate_constraint[rc, op, base]
                     {
-                    pushFollow(FOLLOW_predicate_constraint_in_restriction1107);
+                    pushFollow(FOLLOW_predicate_constraint_in_restriction1290);
                     predicate_constraint(rc,  op,  base);
                     _fsp--;
                     if (failed) return ;
@@ -1583,9 +1740,9 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:595:7: return_value_restriction[op, rc]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:642:7: return_value_restriction[op, rc]
                     {
-                    pushFollow(FOLLOW_return_value_restriction_in_restriction1123);
+                    pushFollow(FOLLOW_return_value_restriction_in_restriction1306);
                     return_value_restriction(op,  rc);
                     _fsp--;
                     if (failed) return ;
@@ -1593,9 +1750,9 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:596:7: variable_restriction[op, rc, base, fcBase, declarations]
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:643:7: variable_restriction[op, rc, base, fcBase, declarations]
                     {
-                    pushFollow(FOLLOW_variable_restriction_in_restriction1132);
+                    pushFollow(FOLLOW_variable_restriction_in_restriction1315);
                     variable_restriction(op,  rc,  base,  fcBase,  declarations);
                     _fsp--;
                     if (failed) return ;
@@ -1603,9 +1760,9 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:597:8: lc= literal_restriction
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:644:8: lc= literal_restriction
                     {
-                    pushFollow(FOLLOW_literal_restriction_in_restriction1144);
+                    pushFollow(FOLLOW_literal_restriction_in_restriction1327);
                     lc=literal_restriction();
                     _fsp--;
                     if (failed) return ;
@@ -1637,17 +1794,17 @@
 
 
     // $ANTLR start predicate_constraint
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:604:1: predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base] : COLON t= lisp_form ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:651:1: predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base] : COLON t= lisp_form ;
     public final void predicate_constraint(RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base) throws RecognitionException {
         LispForm t = null;
 
 
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:605:2: ( COLON t= lisp_form )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:605:4: COLON t= lisp_form
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:652:2: ( COLON t= lisp_form )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:652:4: COLON t= lisp_form
             {
-            match(input,COLON,FOLLOW_COLON_in_predicate_constraint1177); if (failed) return ;
-            pushFollow(FOLLOW_lisp_form_in_predicate_constraint1183);
+            match(input,COLON,FOLLOW_COLON_in_predicate_constraint1360); if (failed) return ;
+            pushFollow(FOLLOW_lisp_form_in_predicate_constraint1366);
             t=lisp_form();
             _fsp--;
             if (failed) return ;
@@ -1670,17 +1827,17 @@
 
 
     // $ANTLR start return_value_restriction
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:611:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS t= lisp_form ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:658:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS t= lisp_form ;
     public final void return_value_restriction(String op, RestrictionConnectiveDescr rc) throws RecognitionException {
         LispForm t = null;
 
 
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:612:2: ( EQUALS t= lisp_form )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:612:4: EQUALS t= lisp_form
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:659:2: ( EQUALS t= lisp_form )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:659:4: EQUALS t= lisp_form
             {
-            match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1202); if (failed) return ;
-            pushFollow(FOLLOW_lisp_form_in_return_value_restriction1209);
+            match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1385); if (failed) return ;
+            pushFollow(FOLLOW_lisp_form_in_return_value_restriction1392);
             t=lisp_form();
             _fsp--;
             if (failed) return ;
@@ -1703,17 +1860,17 @@
 
 
     // $ANTLR start variable_restriction
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:617:1: variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : VAR ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:664:1: variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : VAR ;
     public final void variable_restriction(String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
         Token VAR1=null;
 
          String identifier = null;
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:619:2: ( VAR )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:619:4: VAR
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:666:2: ( VAR )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:666:4: VAR
             {
             VAR1=(Token)input.LT(1);
-            match(input,VAR,FOLLOW_VAR_in_variable_restriction1237); if (failed) return ;
+            match(input,VAR,FOLLOW_VAR_in_variable_restriction1420); if (failed) return ;
             if ( backtracking==0 ) {
               
               	        identifier =  VAR1.getText().replace( '?', '$');
@@ -1744,7 +1901,7 @@
 
 
     // $ANTLR start literal_restriction
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:634:1: literal_restriction returns [String text] : t= literal ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:681:1: literal_restriction returns [String text] : t= literal ;
     public final String literal_restriction() throws RecognitionException {
         String text = null;
 
@@ -1755,10 +1912,10 @@
         		text = null;
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:638:2: (t= literal )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:639:6: t= literal
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:685:2: (t= literal )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:686:6: t= literal
             {
-            pushFollow(FOLLOW_literal_in_literal_restriction1270);
+            pushFollow(FOLLOW_literal_in_literal_restriction1453);
             t=literal();
             _fsp--;
             if (failed) return text;
@@ -1783,7 +1940,7 @@
 
 
     // $ANTLR start lisp_form
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:656:1: lisp_form returns [LispForm lispForm] : LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:703:1: lisp_form returns [LispForm lispForm] : LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN ;
     public final LispForm lisp_form() throws RecognitionException {
         LispForm lispForm = null;
 
@@ -1798,33 +1955,33 @@
                 lispForm = null;
             
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:661:2: ( LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:661:4: LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:708:2: ( LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:708:4: LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_form1298); if (failed) return lispForm;
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:663:3: (t= NAME | t= VAR )
-            int alt16=2;
-            int LA16_0 = input.LA(1);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_form1481); if (failed) return lispForm;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:710:3: (t= NAME | t= VAR )
+            int alt17=2;
+            int LA17_0 = input.LA(1);
 
-            if ( (LA16_0==NAME) ) {
-                alt16=1;
+            if ( (LA17_0==NAME) ) {
+                alt17=1;
             }
-            else if ( (LA16_0==VAR) ) {
-                alt16=2;
+            else if ( (LA17_0==VAR) ) {
+                alt17=2;
             }
             else {
                 if (backtracking>0) {failed=true; return lispForm;}
                 NoViableAltException nvae =
-                    new NoViableAltException("663:3: (t= NAME | t= VAR )", 16, 0, input);
+                    new NoViableAltException("710:3: (t= NAME | t= VAR )", 17, 0, input);
 
                 throw nvae;
             }
-            switch (alt16) {
+            switch (alt17) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:664:7: t= NAME
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:711:7: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_lisp_form1315); if (failed) return lispForm;
+                    match(input,NAME,FOLLOW_NAME_in_lisp_form1498); if (failed) return lispForm;
                     if ( backtracking==0 ) {
                        list.add( new SymbolLispAtom( t.getText() ) ); 
                     }
@@ -1832,10 +1989,10 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:666:7: t= VAR
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:713:7: t= VAR
                     {
                     t=(Token)input.LT(1);
-                    match(input,VAR,FOLLOW_VAR_in_lisp_form1335); if (failed) return lispForm;
+                    match(input,VAR,FOLLOW_VAR_in_lisp_form1518); if (failed) return lispForm;
                     if ( backtracking==0 ) {
                        list.add( new VariableLispAtom( t.getText() ) ); 
                     }
@@ -1845,25 +2002,25 @@
 
             }
 
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:668:3: (a= lisp_atom | l= lisp_form )*
-            loop17:
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:715:3: (a= lisp_atom | l= lisp_form )*
+            loop18:
             do {
-                int alt17=3;
-                int LA17_0 = input.LA(1);
+                int alt18=3;
+                int LA18_0 = input.LA(1);
 
-                if ( (LA17_0==NAME||LA17_0==STRING||LA17_0==INT||LA17_0==VAR||(LA17_0>=FLOAT && LA17_0<=NULL)) ) {
-                    alt17=1;
+                if ( (LA18_0==NAME||LA18_0==STRING||LA18_0==INT||LA18_0==VAR||(LA18_0>=FLOAT && LA18_0<=NULL)) ) {
+                    alt18=1;
                 }
-                else if ( (LA17_0==LEFT_PAREN) ) {
-                    alt17=2;
+                else if ( (LA18_0==LEFT_PAREN) ) {
+                    alt18=2;
                 }
 
 
-                switch (alt17) {
+                switch (alt18) {
             	case 1 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:668:6: a= lisp_atom
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:715:6: a= lisp_atom
             	    {
-            	    pushFollow(FOLLOW_lisp_atom_in_lisp_form1358);
+            	    pushFollow(FOLLOW_lisp_atom_in_lisp_form1541);
             	    a=lisp_atom();
             	    _fsp--;
             	    if (failed) return lispForm;
@@ -1874,9 +2031,9 @@
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:669:6: l= lisp_form
+            	    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:716:6: l= lisp_form
             	    {
-            	    pushFollow(FOLLOW_lisp_form_in_lisp_form1369);
+            	    pushFollow(FOLLOW_lisp_form_in_lisp_form1552);
             	    l=lisp_form();
             	    _fsp--;
             	    if (failed) return lispForm;
@@ -1888,11 +2045,11 @@
             	    break;
 
             	default :
-            	    break loop17;
+            	    break loop18;
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_form1396); if (failed) return lispForm;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_form1579); if (failed) return lispForm;
             if ( backtracking==0 ) {
                lispForm = new LispForm( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) ); 
             }
@@ -1912,7 +2069,7 @@
 
 
     // $ANTLR start lisp_atom
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:675:1: lisp_atom returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:722:1: lisp_atom returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
     public final SExpression lisp_atom() throws RecognitionException {
         SExpression sExpression = null;
 
@@ -1922,61 +2079,61 @@
         		sExpression  =  null;		
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:679:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:680:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:726:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:727:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:680:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
-            int alt18=7;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:727:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
+            int alt19=7;
             switch ( input.LA(1) ) {
             case VAR:
                 {
-                alt18=1;
+                alt19=1;
                 }
                 break;
             case STRING:
                 {
-                alt18=2;
+                alt19=2;
                 }
                 break;
             case FLOAT:
                 {
-                alt18=3;
+                alt19=3;
                 }
                 break;
             case INT:
                 {
-                alt18=4;
+                alt19=4;
                 }
                 break;
             case BOOL:
                 {
-                alt18=5;
+                alt19=5;
                 }
                 break;
             case NULL:
                 {
-                alt18=6;
+                alt19=6;
                 }
                 break;
             case NAME:
                 {
-                alt18=7;
+                alt19=7;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return sExpression;}
                 NoViableAltException nvae =
-                    new NoViableAltException("680:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )", 18, 0, input);
+                    new NoViableAltException("727:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )", 19, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt18) {
+            switch (alt19) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:681:6: t= VAR
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:728:6: t= VAR
                     {
                     t=(Token)input.LT(1);
-                    match(input,VAR,FOLLOW_VAR_in_lisp_atom1440); if (failed) return sExpression;
+                    match(input,VAR,FOLLOW_VAR_in_lisp_atom1623); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new VariableLispAtom( t.getText() ); 
                     }
@@ -1984,10 +2141,10 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:682:6: t= STRING
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:729:6: t= STRING
                     {
                     t=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_lisp_atom1452); if (failed) return sExpression;
+                    match(input,STRING,FOLLOW_STRING_in_lisp_atom1635); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new StringLispAtom( getString( t ) ); 
                     }
@@ -1995,10 +2152,10 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:683:6: t= FLOAT
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:730:6: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1474); if (failed) return sExpression;
+                    match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1657); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new FloatLispAtom( t.getText() ); 
                     }
@@ -2006,10 +2163,10 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:684:6: t= INT
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:731:6: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_lisp_atom1486); if (failed) return sExpression;
+                    match(input,INT,FOLLOW_INT_in_lisp_atom1669); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new IntLispAtom( t.getText() ); 
                     }
@@ -2017,10 +2174,10 @@
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:685:7: t= BOOL
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:732:7: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1499); if (failed) return sExpression;
+                    match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1682); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new BoolLispAtom( t.getText() ); 
                     }
@@ -2028,10 +2185,10 @@
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:686:7: t= NULL
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:733:7: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_lisp_atom1515); if (failed) return sExpression;
+                    match(input,NULL,FOLLOW_NULL_in_lisp_atom1698); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new NullLispAtom( null ); 
                     }
@@ -2039,10 +2196,10 @@
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:687:14: t= NAME
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:734:14: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_lisp_atom1541); if (failed) return sExpression;
+                    match(input,NAME,FOLLOW_NAME_in_lisp_atom1724); if (failed) return sExpression;
                     if ( backtracking==0 ) {
                        sExpression = new SymbolLispAtom( "\"" +t.getText() + "\""); 
                     }
@@ -2068,7 +2225,7 @@
 
 
     // $ANTLR start literal
-    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:692:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:739:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
     public final String literal() throws RecognitionException {
         String text = null;
 
@@ -2078,56 +2235,56 @@
         		text = null;
         	
         try {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:696:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:696:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:743:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:743:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
             {
-            // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:696:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
-            int alt19=6;
+            // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:743:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            int alt20=6;
             switch ( input.LA(1) ) {
             case STRING:
                 {
-                alt19=1;
+                alt20=1;
                 }
                 break;
             case NAME:
                 {
-                alt19=2;
+                alt20=2;
                 }
                 break;
             case INT:
                 {
-                alt19=3;
+                alt20=3;
                 }
                 break;
             case FLOAT:
                 {
-                alt19=4;
+                alt20=4;
                 }
                 break;
             case BOOL:
                 {
-                alt19=5;
+                alt20=5;
                 }
                 break;
             case NULL:
                 {
-                alt19=6;
+                alt20=6;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return text;}
                 NoViableAltException nvae =
-                    new NoViableAltException("696:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 19, 0, input);
+                    new NoViableAltException("743:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 20, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt19) {
+            switch (alt20) {
                 case 1 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:696:8: t= STRING
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:743:8: t= STRING
                     {
                     t=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_literal1585); if (failed) return text;
+                    match(input,STRING,FOLLOW_STRING_in_literal1768); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = getString( t ); 
                     }
@@ -2135,10 +2292,10 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:697:7: t= NAME
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:744:7: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_literal1598); if (failed) return text;
+                    match(input,NAME,FOLLOW_NAME_in_literal1781); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -2146,10 +2303,10 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:698:7: t= INT
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:745:7: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_literal1614); if (failed) return text;
+                    match(input,INT,FOLLOW_INT_in_literal1797); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -2157,10 +2314,10 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:699:7: t= FLOAT
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:746:7: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_literal1629); if (failed) return text;
+                    match(input,FLOAT,FOLLOW_FLOAT_in_literal1812); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -2168,10 +2325,10 @@
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:700:7: t= BOOL
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:747:7: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_literal1642); if (failed) return text;
+                    match(input,BOOL,FOLLOW_BOOL_in_literal1825); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -2179,10 +2336,10 @@
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:701:7: t= NULL
+                    // C:\\dev\\drools\\trunk5\\drools-clips\\src\\main\\resources\\org\\drools\\cips\\Clips.g:748:7: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_literal1656); if (failed) return text;
+                    match(input,NULL,FOLLOW_NULL_in_literal1839); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = null; 
                     }
@@ -2211,112 +2368,127 @@
 
     public static final BitSet FOLLOW_importDescr_in_eval60 = new BitSet(new long[]{0x0000000000000012L});
     public static final BitSet FOLLOW_deffunction_in_eval71 = new BitSet(new long[]{0x0000000000000012L});
-    public static final BitSet FOLLOW_defrule_in_eval84 = new BitSet(new long[]{0x0000000000000012L});
-    public static final BitSet FOLLOW_lisp_form_in_eval96 = new BitSet(new long[]{0x0000000000000012L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_importDescr124 = new BitSet(new long[]{0x0000100000000000L});
-    public static final BitSet FOLLOW_44_in_importDescr126 = new BitSet(new long[]{0x0000000000000020L});
-    public static final BitSet FOLLOW_NAME_in_importDescr130 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_importDescr134 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction169 = new BitSet(new long[]{0x0000000000000080L});
-    public static final BitSet FOLLOW_DEFFUNCTION_in_deffunction179 = new BitSet(new long[]{0x0000000007020A20L});
-    public static final BitSet FOLLOW_lisp_atom_in_deffunction189 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_form_in_deffunction199 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_form_in_deffunction208 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction230 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_defrule267 = new BitSet(new long[]{0x0000000000000100L});
-    public static final BitSet FOLLOW_DEFRULE_in_defrule275 = new BitSet(new long[]{0x0000000000000020L});
-    public static final BitSet FOLLOW_NAME_in_defrule279 = new BitSet(new long[]{0x0000000000000200L});
-    public static final BitSet FOLLOW_STRING_in_defrule291 = new BitSet(new long[]{0x0000200000020010L});
-    public static final BitSet FOLLOW_ruleAttribute_in_defrule297 = new BitSet(new long[]{0x0000200000020010L});
-    public static final BitSet FOLLOW_ce_in_defrule305 = new BitSet(new long[]{0x0000200000020010L});
-    public static final BitSet FOLLOW_45_in_defrule314 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_rule_consequence_in_defrule323 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule331 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_lisp_form_in_rule_consequence363 = new BitSet(new long[]{0x0000000000000012L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute396 = new BitSet(new long[]{0x0000000020000000L});
-    public static final BitSet FOLLOW_DECLARE_in_ruleAttribute398 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute405 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_salience_in_ruleAttribute409 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute413 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute420 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_SALIENCE_in_salience450 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_INT_in_salience454 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_and_ce_in_ce480 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_or_ce_in_ce490 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_not_ce_in_ce499 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_exists_ce_in_ce508 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_eval_ce_in_ce522 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_normal_pattern_in_ce536 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_bound_pattern_in_ce545 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce572 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_AND_in_and_ce577 = new BitSet(new long[]{0x0000000000020010L});
-    public static final BitSet FOLLOW_ce_in_and_ce583 = new BitSet(new long[]{0x0000000000020050L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce592 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce620 = new BitSet(new long[]{0x0000000000002000L});
-    public static final BitSet FOLLOW_OR_in_or_ce625 = new BitSet(new long[]{0x0000000000020010L});
-    public static final BitSet FOLLOW_ce_in_or_ce631 = new BitSet(new long[]{0x0000000000020050L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce640 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce668 = new BitSet(new long[]{0x0000000000004000L});
-    public static final BitSet FOLLOW_NOT_in_not_ce673 = new BitSet(new long[]{0x0000000000020010L});
-    public static final BitSet FOLLOW_ce_in_not_ce679 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce687 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce716 = new BitSet(new long[]{0x0000000000008000L});
-    public static final BitSet FOLLOW_EXISTS_in_exists_ce721 = new BitSet(new long[]{0x0000000000020010L});
-    public static final BitSet FOLLOW_ce_in_exists_ce727 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce735 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce754 = new BitSet(new long[]{0x0000000000010000L});
-    public static final BitSet FOLLOW_TEST_in_eval_ce759 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_form_in_eval_ce766 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce776 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern804 = new BitSet(new long[]{0x0000000000000020L});
-    public static final BitSet FOLLOW_NAME_in_normal_pattern811 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_field_constriant_in_normal_pattern817 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern827 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VAR_in_bound_pattern855 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern861 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern863 = new BitSet(new long[]{0x0000000000000020L});
-    public static final BitSet FOLLOW_NAME_in_bound_pattern867 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_field_constriant_in_bound_pattern876 = new BitSet(new long[]{0x0000000000000050L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern883 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant914 = new BitSet(new long[]{0x0000000000000020L});
-    public static final BitSet FOLLOW_NAME_in_field_constriant918 = new BitSet(new long[]{0x0000000007E20A20L});
-    public static final BitSet FOLLOW_or_restr_connective_in_field_constriant933 = new BitSet(new long[]{0x0000000000000040L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant943 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective982 = new BitSet(new long[]{0x0000000000080002L});
-    public static final BitSet FOLLOW_PIPE_in_or_restr_connective1006 = new BitSet(new long[]{0x0000000007E20A20L});
-    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective1016 = new BitSet(new long[]{0x0000000000080002L});
-    public static final BitSet FOLLOW_restriction_in_and_restr_connective1048 = new BitSet(new long[]{0x0000000000100002L});
-    public static final BitSet FOLLOW_AMPERSAND_in_and_restr_connective1056 = new BitSet(new long[]{0x0000000007E20A20L});
-    public static final BitSet FOLLOW_restriction_in_and_restr_connective1058 = new BitSet(new long[]{0x0000000000100002L});
-    public static final BitSet FOLLOW_TILDE_in_restriction1091 = new BitSet(new long[]{0x0000000007C20A20L});
-    public static final BitSet FOLLOW_predicate_constraint_in_restriction1107 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_return_value_restriction_in_restriction1123 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_variable_restriction_in_restriction1132 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_restriction_in_restriction1144 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_COLON_in_predicate_constraint1177 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_form_in_predicate_constraint1183 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1202 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_form_in_return_value_restriction1209 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VAR_in_variable_restriction1237 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_literal_restriction1270 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_form1298 = new BitSet(new long[]{0x0000000000020020L});
-    public static final BitSet FOLLOW_NAME_in_lisp_form1315 = new BitSet(new long[]{0x0000000007020A70L});
-    public static final BitSet FOLLOW_VAR_in_lisp_form1335 = new BitSet(new long[]{0x0000000007020A70L});
-    public static final BitSet FOLLOW_lisp_atom_in_lisp_form1358 = new BitSet(new long[]{0x0000000007020A70L});
-    public static final BitSet FOLLOW_lisp_form_in_lisp_form1369 = new BitSet(new long[]{0x0000000007020A70L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_form1396 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VAR_in_lisp_atom1440 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_lisp_atom1452 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_lisp_atom1474 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_lisp_atom1486 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_lisp_atom1499 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_lisp_atom1515 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NAME_in_lisp_atom1541 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_literal1585 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NAME_in_literal1598 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_literal1614 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_literal1629 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_literal1642 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_literal1656 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_deftemplate_in_eval84 = new BitSet(new long[]{0x0000000000000012L});
+    public static final BitSet FOLLOW_defrule_in_eval96 = new BitSet(new long[]{0x0000000000000012L});
+    public static final BitSet FOLLOW_lisp_form_in_eval108 = new BitSet(new long[]{0x0000000000000012L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_importDescr136 = new BitSet(new long[]{0x0000800000000000L});
+    public static final BitSet FOLLOW_47_in_importDescr138 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_importDescr142 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_importDescr146 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_deftemplate181 = new BitSet(new long[]{0x0000000000000080L});
+    public static final BitSet FOLLOW_DEFTEMPLATE_in_deftemplate188 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_deftemplate192 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_STRING_in_deftemplate203 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_deftemplate_slot_in_deftemplate216 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_deftemplate224 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_deftemplate_slot262 = new BitSet(new long[]{0x0000000000000200L});
+    public static final BitSet FOLLOW_SLOT_in_deftemplate_slot269 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_deftemplate_slot273 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_deftemplate_slot283 = new BitSet(new long[]{0x0000000000000400L});
+    public static final BitSet FOLLOW_TYPE_in_deftemplate_slot294 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_deftemplate_slot298 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_deftemplate_slot308 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_deftemplate_slot316 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction352 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_DEFFUNCTION_in_deffunction362 = new BitSet(new long[]{0x0000000038104120L});
+    public static final BitSet FOLLOW_lisp_atom_in_deffunction372 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_form_in_deffunction382 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_form_in_deffunction391 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction413 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_defrule450 = new BitSet(new long[]{0x0000000000001000L});
+    public static final BitSet FOLLOW_DEFRULE_in_defrule458 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_defrule462 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_STRING_in_defrule474 = new BitSet(new long[]{0x0001000000100010L});
+    public static final BitSet FOLLOW_ruleAttribute_in_defrule480 = new BitSet(new long[]{0x0001000000100010L});
+    public static final BitSet FOLLOW_ce_in_defrule488 = new BitSet(new long[]{0x0001000000100010L});
+    public static final BitSet FOLLOW_48_in_defrule497 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_rule_consequence_in_defrule506 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule514 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lisp_form_in_rule_consequence546 = new BitSet(new long[]{0x0000000000000012L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute579 = new BitSet(new long[]{0x0000000100000000L});
+    public static final BitSet FOLLOW_DECLARE_in_ruleAttribute581 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute588 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_salience_in_ruleAttribute592 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute596 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute603 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_SALIENCE_in_salience633 = new BitSet(new long[]{0x0000000000004000L});
+    public static final BitSet FOLLOW_INT_in_salience637 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_ce_in_ce663 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_or_ce_in_ce673 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_not_ce_in_ce682 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_exists_ce_in_ce691 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_eval_ce_in_ce705 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_normal_pattern_in_ce719 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_bound_pattern_in_ce728 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce755 = new BitSet(new long[]{0x0000000000008000L});
+    public static final BitSet FOLLOW_AND_in_and_ce760 = new BitSet(new long[]{0x0000000000100010L});
+    public static final BitSet FOLLOW_ce_in_and_ce766 = new BitSet(new long[]{0x0000000000100050L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce775 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce803 = new BitSet(new long[]{0x0000000000010000L});
+    public static final BitSet FOLLOW_OR_in_or_ce808 = new BitSet(new long[]{0x0000000000100010L});
+    public static final BitSet FOLLOW_ce_in_or_ce814 = new BitSet(new long[]{0x0000000000100050L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce823 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce851 = new BitSet(new long[]{0x0000000000020000L});
+    public static final BitSet FOLLOW_NOT_in_not_ce856 = new BitSet(new long[]{0x0000000000100010L});
+    public static final BitSet FOLLOW_ce_in_not_ce862 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce870 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce899 = new BitSet(new long[]{0x0000000000040000L});
+    public static final BitSet FOLLOW_EXISTS_in_exists_ce904 = new BitSet(new long[]{0x0000000000100010L});
+    public static final BitSet FOLLOW_ce_in_exists_ce910 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce918 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce937 = new BitSet(new long[]{0x0000000000080000L});
+    public static final BitSet FOLLOW_TEST_in_eval_ce942 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_form_in_eval_ce949 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce959 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern987 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_normal_pattern994 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_field_constriant_in_normal_pattern1000 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern1010 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VAR_in_bound_pattern1038 = new BitSet(new long[]{0x0000000000200000L});
+    public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern1044 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern1046 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_bound_pattern1050 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_field_constriant_in_bound_pattern1059 = new BitSet(new long[]{0x0000000000000050L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern1066 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant1097 = new BitSet(new long[]{0x0000000000000020L});
+    public static final BitSet FOLLOW_NAME_in_field_constriant1101 = new BitSet(new long[]{0x000000003F104120L});
+    public static final BitSet FOLLOW_or_restr_connective_in_field_constriant1116 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant1126 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective1165 = new BitSet(new long[]{0x0000000000400002L});
+    public static final BitSet FOLLOW_PIPE_in_or_restr_connective1189 = new BitSet(new long[]{0x000000003F104120L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective1199 = new BitSet(new long[]{0x0000000000400002L});
+    public static final BitSet FOLLOW_restriction_in_and_restr_connective1231 = new BitSet(new long[]{0x0000000000800002L});
+    public static final BitSet FOLLOW_AMPERSAND_in_and_restr_connective1239 = new BitSet(new long[]{0x000000003F104120L});
+    public static final BitSet FOLLOW_restriction_in_and_restr_connective1241 = new BitSet(new long[]{0x0000000000800002L});
+    public static final BitSet FOLLOW_TILDE_in_restriction1274 = new BitSet(new long[]{0x000000003E104120L});
+    public static final BitSet FOLLOW_predicate_constraint_in_restriction1290 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_return_value_restriction_in_restriction1306 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_variable_restriction_in_restriction1315 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_restriction_in_restriction1327 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_COLON_in_predicate_constraint1360 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_form_in_predicate_constraint1366 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1385 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_form_in_return_value_restriction1392 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VAR_in_variable_restriction1420 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_literal_restriction1453 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_form1481 = new BitSet(new long[]{0x0000000000100020L});
+    public static final BitSet FOLLOW_NAME_in_lisp_form1498 = new BitSet(new long[]{0x0000000038104170L});
+    public static final BitSet FOLLOW_VAR_in_lisp_form1518 = new BitSet(new long[]{0x0000000038104170L});
+    public static final BitSet FOLLOW_lisp_atom_in_lisp_form1541 = new BitSet(new long[]{0x0000000038104170L});
+    public static final BitSet FOLLOW_lisp_form_in_lisp_form1552 = new BitSet(new long[]{0x0000000038104170L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_form1579 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VAR_in_lisp_atom1623 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_lisp_atom1635 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_lisp_atom1657 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_lisp_atom1669 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_lisp_atom1682 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_lisp_atom1698 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NAME_in_lisp_atom1724 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_literal1768 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NAME_in_literal1781 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_literal1797 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_literal1812 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_literal1825 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_literal1839 = new BitSet(new long[]{0x0000000000000002L});
 
 }
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ParserHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ParserHandler.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ParserHandler.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -3,6 +3,7 @@
 import org.drools.lang.descr.FunctionDescr;
 import org.drools.lang.descr.ImportDescr;
 import org.drools.lang.descr.RuleDescr;
+import org.drools.lang.descr.TypeDeclarationDescr;
 
 public interface ParserHandler {  
     
@@ -10,6 +11,8 @@
     
     public void functionHandler(FunctionDescr ruleDescr);
     
+    public void templateHandler(TypeDeclarationDescr typeDescr);
+    
     public void ruleHandler(RuleDescr ruleDescr);
     
     public void lispFormHandler(LispForm lispForm);  

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/Shell.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/Shell.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/Shell.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -34,7 +34,11 @@
 import org.drools.lang.descr.ImportDescr;
 import org.drools.lang.descr.PackageDescr;
 import org.drools.lang.descr.RuleDescr;
-import org.drools.rule.MVELDialectData;
+import org.drools.lang.descr.TypeDeclarationDescr;
+import org.drools.rule.ImportDeclaration;
+import org.drools.rule.MVELDialectRuntimeData;
+import org.drools.rule.Namespaceable;
+import org.drools.rule.Package;
 import org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration;
 import org.drools.spi.GlobalResolver;
 import org.mvel.MVEL;
@@ -53,13 +57,14 @@
     PrintRouterContext {
     private Map<String, Object> vars;
 
+    private PackageBuilder      packageBuilder;
     private RuleBase            ruleBase;
     private StatefulSession     session;
 
     // private Map                 functions;
 
-    private Map                 directImports;
-    private Set                 dynamicImports;
+    //    private Map                 directImports;
+    //    private Set                 dynamicImports;
 
     private ClassTypeResolver   typeResolver;
 
@@ -75,13 +80,17 @@
     public Shell(RuleBase ruleBase) {
         this.moduleName = MAIN;
         this.ruleBase = ruleBase;
+
+        this.packageBuilder = new PackageBuilder();
+        this.packageBuilder.setRuleBase( this.ruleBase );
+
         this.session = this.ruleBase.newStatefulSession();
         // this.functions = new HashMap();
-        this.directImports = new HashMap();
-        this.dynamicImports = new HashSet();
+        //        this.directImports = new HashMap();
+        //        this.dynamicImports = new HashSet();
 
-        this.typeResolver = new ClassTypeResolver( new HashSet(),
-                                                   ((InternalRuleBase) this.ruleBase).getConfiguration().getClassLoader() );
+        //        this.typeResolver = new ClassTypeResolver( new HashSet(),
+        //                                                   ((InternalRuleBase) this.ruleBase).getConfiguration().getClassLoader() );
 
         this.factory = (DroolsMVELFactory) new DroolsMVELFactory( null,
                                                                   null,
@@ -121,14 +130,15 @@
             this.resolver = resolver;
         }
 
-        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-            vars    = (Map<String, Object>)in.readObject();
-            resolver    = (GlobalResolver)in.readObject();
+        public void readExternal(ObjectInput in) throws IOException,
+                                                ClassNotFoundException {
+            vars = (Map<String, Object>) in.readObject();
+            resolver = (GlobalResolver) in.readObject();
         }
 
         public void writeExternal(ObjectOutput out) throws IOException {
-            out.writeObject(vars);
-            out.writeObject(resolver);
+            out.writeObject( vars );
+            out.writeObject( resolver );
         }
 
         public Object resolveGlobal(String identifier) {
@@ -148,25 +158,14 @@
     }
 
     public void importHandler(ImportDescr descr) {
-        String importText = descr.getTarget().trim();
+        // use the current focus as the default namespace for these imports
+        PackageDescr pkgDescr = createPackageDescr( this.session.getAgenda().getFocus().getName() );
+        pkgDescr.addImport( descr );
+        this.packageBuilder.addPackage( pkgDescr );
+    }
 
-        this.typeResolver.addImport( descr.getTarget() );
-
-        if ( importText.endsWith( "*" ) ) {
-            this.dynamicImports.add( importText );
-        } else {
-            Class cls;
-            try {
-                cls = this.typeResolver.resolveType( importText );
-            } catch ( ClassNotFoundException e ) {
-                throw new RuntimeException( "Unable to resolve : " + importText );
-            }
-            this.directImports.put( cls.getSimpleName(),
-                                    cls );
-        }
-    }    
-    
     public void functionHandler(FunctionDescr functionDescr) {
+        setModuleName( functionDescr );
         Appendable builder = new StringBuilderAppendable();
 
         // strip lead/trailing quotes
@@ -195,24 +194,24 @@
                                    builder );
         }
         builder.append( "}" );
-      
+
         functionDescr.setContent( builder.toString() );
         functionDescr.setDialect( "mvel" );
 
-        PackageDescr pkgDescr = createPackageDescr( "MAIN" );
+        PackageDescr pkgDescr = createPackageDescr( functionDescr.getNamespace() );
         pkgDescr.addFunction( functionDescr );
 
         PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
         conf.getDialectConfiguration( "mvel" );
         MVELDialectConfiguration mvelConf = (MVELDialectConfiguration) conf.getDialectConfiguration( "mvel" );
-        mvelConf.setLangLevel( 5 ); 
-        
+        mvelConf.setLangLevel( 5 );
+
         PackageBuilder pkgBuilder = new PackageBuilder( conf );
         pkgBuilder.addPackage( pkgDescr );
-                
+
         if ( pkgBuilder.getErrors().isEmpty() ) {
             this.ruleBase.addPackage( pkgBuilder.getPackage() );
-        }        
+        }
     }
 
     public void lispFormHandler(LispForm lispForm) {
@@ -222,58 +221,85 @@
 
         ParserContext context = new ParserContext();
 
-        for ( Iterator it = this.directImports.entrySet().iterator(); it.hasNext(); ) {
-            Entry entry = (Entry) it.next();
-            context.addImport( (String) entry.getKey(),
-                               (Class) entry.getValue() );
-        }
+        String namespace = this.session.getAgenda().getFocus().getName();
 
-        for ( Iterator it = this.dynamicImports.iterator(); it.hasNext(); ) {
-            String importText = ((String) it.next()).trim();
-            context.addPackageImport( importText.substring( 0,
-                                                            importText.length() - 2 ) );
+        Package pkg = this.ruleBase.getPackage( namespace );
+
+        if ( pkg != null ) {
+            // only time this will be null is if we have yet to do any packagedescr work
+
+            try {
+                for ( Iterator it = pkg.getImports().entrySet().iterator(); it.hasNext(); ) {
+                    Entry entry = (Entry) it.next();
+                    String importName = ((ImportDeclaration) entry.getValue()).getTarget();
+                    if ( importName.endsWith( "*" )) {
+                        context.addPackageImport( importName.substring( 0,
+                                                                        importName.length() - 2 ) );                        
+                    } else {
+                        Class cls = pkg.getDialectRuntimeRegistry().getClassLoader().loadClass( importName );
+                        context.addImport( cls.getSimpleName(),
+                                           (Class) cls );
+                    }
+                }
+            } catch ( Exception e ) {
+                e.printStackTrace();
+            }
+
+            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( "mvel" );
+            this.factory.setNextFactory( data.getFunctionFactory() );
         }
 
         ExpressionCompiler expr = new ExpressionCompiler( appendable.toString() );
         Serializable executable = expr.compile( context );
 
-        if (  this.ruleBase.getPackage( "MAIN" ) != null ) {
-            MVELDialectData data = (MVELDialectData)  this.ruleBase.getPackage( "MAIN" ).getDialectDatas().getDialectData( "mvel" );
-            factory.setNextFactory( data.getFunctionFactory() );
-        }
-
         MVEL.executeExpression( executable,
                                 this,
                                 this.factory );
+    }
 
+    public void templateHandler(TypeDeclarationDescr typeDescr) {
+        setModuleName( typeDescr );
+
+        PackageDescr pkg = createPackageDescr( typeDescr.getNamespace() );
+        //pkg.addRule( ruleDescr );
+        pkg.addTypeDeclaration( typeDescr );
+
+        this.packageBuilder.addPackage( pkg );
+
+        //        try {
+        //            this.ruleBase.addPackage( builder.getPackage() );
+        //        } catch ( Exception e ) {
+        //            e.printStackTrace();
+        //        }     
     }
 
     public void ruleHandler(RuleDescr ruleDescr) {
-        String module = getModuleName( ruleDescr.getAttributes() );
-
-        PackageDescr pkg = createPackageDescr( module );
+        setModuleName( ruleDescr );
+        PackageDescr pkg = createPackageDescr( ruleDescr.getNamespace() );
         pkg.addRule( ruleDescr );
 
-        PackageBuilder builder = new PackageBuilder();
-        builder.addPackage( pkg );
+        this.packageBuilder.addPackage( pkg );
 
-        try {
-            this.ruleBase.addPackage( builder.getPackage() );
-        } catch ( Exception e ) {
-            e.printStackTrace();
-        }
+        this.session.fireAllRules();
+
+        //        try {
+        //            this.ruleBase.addPackage( builder.getPackage() );
+        //        } catch ( Exception e ) {
+        //            e.printStackTrace();
+        //        }
     }
 
-    public String getModuleName(List list) {
-        for ( Iterator it = list.iterator(); it.hasNext(); ) {
-            AttributeDescr attr = (AttributeDescr) it.next();
-            if ( attr.getName().equals( "agenda-group" ) ) {
-                return attr.getValue();
-            }
+    public void setModuleName(Namespaceable namespaceable) {
+        // if the namespace is not set, set it to the current focus module
+        if ( isEmpty( namespaceable.getNamespace() ) ) {
+            namespaceable.setNamespace( this.session.getAgenda().getFocus().getName() );
         }
-        return "MAIN";
     }
 
+    public boolean isEmpty(String string) {
+        return (string == null || string.trim().length() == 0);
+    }
+
     public void eval(String string) {
         eval( new StringReader( string ) );
     }
@@ -380,9 +406,9 @@
         pkg.addAttribute( new AttributeDescr( "dialect",
                                               "clips" ) );
 
-        for ( Iterator it = this.typeResolver.getImports().iterator(); it.hasNext(); ) {
-            pkg.addImport( new ImportDescr( (String) it.next() ) );
-        }
+        //        for ( Iterator it = this.typeResolver.getImports().iterator(); it.hasNext(); ) {
+        //            pkg.addImport( new ImportDescr( (String) it.next() ) );
+        //        }
 
         return pkg;
     }

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialect.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialect.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialect.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -4,6 +4,7 @@
 
 import org.drools.commons.jci.readers.MemoryResourceReader;
 import org.drools.compiler.PackageBuilder;
+import org.drools.compiler.PackageRegistry;
 import org.drools.rule.Package;
 import org.drools.rule.builder.ConsequenceBuilder;
 import org.drools.rule.builder.ReturnValueBuilder;
@@ -19,20 +20,28 @@
 
     public final static String                   ID          = "clips";
 
-    public ClipsDialect() {
-        super();
+    public ClipsDialect(PackageBuilder builder,
+                                   PackageRegistry pkgRegistry,
+                                   Package pkg) {
+        super( setConf( builder ), pkgRegistry, pkg);
+
     }
+    
+    /**
+     * hack so I can set a conf value while calling a constructor
+     * @param builder
+     * @return
+     */
+    private static PackageBuilder setConf(PackageBuilder builder) {
+        MVELDialectConfiguration conf = (MVELDialectConfiguration) builder.getPackageBuilderConfiguration().getDialectConfiguration( "mvel" );
+        conf.setLangLevel( 5 );
+        return builder;
+    }
 
     public String getId() {
         return ID;
     }
 
-    public void init(PackageBuilder builder) {
-        MVELDialectConfiguration conf = (MVELDialectConfiguration) builder.getPackageBuilderConfiguration().getDialectConfiguration( "mvel" );
-        conf.setLangLevel( 5 );
-        super.init( builder );
-    }
-
     public ConsequenceBuilder getConsequenceBuilder() {
         return this.consequence;
     }

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialectConfiguration.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialectConfiguration.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsDialectConfiguration.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -4,6 +4,8 @@
 import org.drools.compiler.DialectConfiguration;
 import org.drools.compiler.PackageBuilder;
 import org.drools.compiler.PackageBuilderConfiguration;
+import org.drools.compiler.PackageRegistry;
+import org.drools.rule.Package;
 import org.drools.rule.builder.dialect.mvel.MVELDialect;
 import org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration;
 
@@ -15,8 +17,8 @@
 public class ClipsDialectConfiguration
     extends MVELDialectConfiguration {
     
-    public Dialect getDialect() {
-        return new ClipsDialect();
+    public Dialect newDialect(PackageBuilder packageBuilder, PackageRegistry pkgRegistry, Package pkg) {
+        return new ClipsDialect(packageBuilder, pkgRegistry, pkg);
     }    
 
 }

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsEvalBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsEvalBuilder.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsEvalBuilder.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -30,7 +30,7 @@
 import org.drools.lang.descr.EvalDescr;
 import org.drools.rule.Declaration;
 import org.drools.rule.EvalCondition;
-import org.drools.rule.MVELDialectData;
+import org.drools.rule.MVELDialectRuntimeData;
 import org.drools.rule.Pattern;
 import org.drools.rule.RuleConditionElement;
 import org.drools.rule.builder.RuleBuildContext;

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsPredicateBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsPredicateBuilder.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/rule/builder/dialect/clips/ClipsPredicateBuilder.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -28,7 +28,7 @@
 import org.drools.compiler.DescrBuildError;
 import org.drools.lang.descr.PredicateDescr;
 import org.drools.rule.Declaration;
-import org.drools.rule.MVELDialectData;
+import org.drools.rule.MVELDialectRuntimeData;
 import org.drools.rule.PredicateConstraint;
 import org.drools.rule.builder.PredicateBuilder;
 import org.drools.rule.builder.RuleBuildContext;

Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clips/ShellTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clips/ShellTest.java	2008-06-23 17:37:50 UTC (rev 20704)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clips/ShellTest.java	2008-06-23 17:38:42 UTC (rev 20705)
@@ -3,6 +3,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -239,7 +241,50 @@
         assertEquals( "yy truexx true",
                       new String( this.baos.toByteArray() ) );        
     }    
+    
+    public void testTemplateCreation() throws Exception {
+        this.shell.eval( "(deftemplate Person (slot name (type String) ) (slot age (type int) ) )" );
 
+        this.shell.eval( "(defrule yyy  => (printout t yy \" \" (eq 1 1) ) ) )" );
+        Package pkg = shell.getStatefulSession().getRuleBase().getPackage( "MAIN" );
+
+        Rule rule = pkg.getRule( "yyy" );
+        assertEquals( "yyy",
+                      rule.getName() );
+
+        this.shell.eval( "(defrule xxx (Person (name ?name&bob) (age 30) ) (Person  (name ?name) (age 35)) => (printout t xx \" \" (eq 1 1) ) )" );
+
+        rule = pkg.getRule( "xxx" );
+        assertEquals( "xxx",
+                      rule.getName() );
+
+        assertEquals( 2,
+                      pkg.getRules().length );
+
+        WorkingMemory wm = shell.getStatefulSession();
+        Class personClass = this.shell.getStatefulSession().getRuleBase().getPackage( "MAIN" ).getPackageScopeClassLoader().loadClass( "MAIN.Person" );
+        
+        Method nameMethod = personClass.getMethod( "setName", new Class[] { String.class } );
+        Method ageMethod = personClass.getMethod( "setAge", new Class[] { int.class } );
+        
+        Object bob1 = personClass.newInstance();
+        nameMethod.invoke( bob1, "bob" );
+        ageMethod.invoke( bob1, 30 );
+
+        
+        Object bob2 = personClass.newInstance();
+        nameMethod.invoke( bob2, "bob" );
+        ageMethod.invoke( bob2, 35 );
+        //Constructor constructor = personClass.getConstructor( new Class[] { String.class,String.class, int.class} );        
+        wm.insert( bob1 );
+        wm.insert( bob2 );
+        
+        
+        wm.fireAllRules();
+        assertEquals( "yy truexx true",
+                      new String( this.baos.toByteArray() ) );      	
+    }
+
     public void testEmptyLHSRule() {
         String rule1 = "(defrule testRule => (printout t hello) (printout t goodbye))";
         this.shell.eval( rule1 );




More information about the jboss-svn-commits mailing list