[jboss-svn-commits] JBL Code SVN: r14367 - in labs/jbossrules/trunk/drools-clips/src: main/resources/org/drools/clp and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Aug 19 07:54:39 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-08-19 07:54:38 -0400 (Sun, 19 Aug 2007)
New Revision: 14367

Modified:
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java
   labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java
   labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g
   labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
Log:
-still trying to get connectives to work and variable restrictions

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java	2007-08-19 10:50:17 UTC (rev 14366)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPLexer.java	2007-08-19 11:54:38 UTC (rev 14367)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-08-18 01:40:43
+// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-08-19 12:18:41
 
 	package org.drools.clp;
 
@@ -26,14 +26,14 @@
     public static final int EOL=27;
     public static final int DEFRULE=9;
     public static final int TILDE=21;
-    public static final int PIPE=20;
+    public static final int PIPE=19;
     public static final int VAR=8;
     public static final int EXISTS=16;
     public static final int SYMBOL=34;
     public static final int NULL=26;
     public static final int BOOL=25;
-    public static final int AMPERSAND=19;
     public static final int SALIENCE=11;
+    public static final int AMPERSAND=20;
     public static final int INT=12;
     public static final int T43=43;
     public static final int Tokens=44;
@@ -101,10 +101,10 @@
     public final void mWS() throws RecognitionException {
         try {
             int _type = WS;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:17: ( ' ' | '\\t' | '\\f' | EOL )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:17: ( ' ' | '\\t' | '\\f' | EOL )
             int alt1=4;
             switch ( input.LA(1) ) {
             case ' ':
@@ -131,35 +131,35 @@
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("603:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+                    new NoViableAltException("675:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
 
                 throw nvae;
             }
 
             switch (alt1) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:603:19: ' '
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:675:19: ' '
                     {
                     match(' '); if (failed) return ;
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:604:19: '\\t'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:676:19: '\\t'
                     {
                     match('\t'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:605:19: '\\f'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:677:19: '\\f'
                     {
                     match('\f'); if (failed) return ;
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:606:19: EOL
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:19: EOL
                     {
                     mEOL(); if (failed) return ;
 
@@ -185,8 +185,8 @@
     public final void mDEFRULE() throws RecognitionException {
         try {
             int _type = DEFRULE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:10: ( 'defrule' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:611:12: 'defrule'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:10: ( 'defrule' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:683:12: 'defrule'
             {
             match("defrule"); if (failed) return ;
 
@@ -204,8 +204,8 @@
     public final void mDEFFUNCTION() throws RecognitionException {
         try {
             int _type = DEFFUNCTION;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:13: ( 'deffunction' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:612:15: 'deffunction'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:684:13: ( 'deffunction' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:684:15: 'deffunction'
             {
             match("deffunction"); if (failed) return ;
 
@@ -223,8 +223,8 @@
     public final void mOR() throws RecognitionException {
         try {
             int _type = OR;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:613:7: ( 'or' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:613:9: 'or'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:685:7: ( 'or' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:685:9: 'or'
             {
             match("or"); if (failed) return ;
 
@@ -242,8 +242,8 @@
     public final void mAND() throws RecognitionException {
         try {
             int _type = AND;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:614:7: ( 'and' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:614:9: 'and'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:686:7: ( 'and' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:686:9: 'and'
             {
             match("and"); if (failed) return ;
 
@@ -261,8 +261,8 @@
     public final void mNOT() throws RecognitionException {
         try {
             int _type = NOT;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:615:7: ( 'not' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:615:9: 'not'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:687:7: ( 'not' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:687:9: 'not'
             {
             match("not"); if (failed) return ;
 
@@ -280,8 +280,8 @@
     public final void mEXISTS() throws RecognitionException {
         try {
             int _type = EXISTS;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:616:10: ( 'exists' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:616:12: 'exists'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:688:10: ( 'exists' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:688:12: 'exists'
             {
             match("exists"); if (failed) return ;
 
@@ -299,8 +299,8 @@
     public final void mTEST() throws RecognitionException {
         try {
             int _type = TEST;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:8: ( 'test' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:617:10: 'test'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:8: ( 'test' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:689:10: 'test'
             {
             match("test"); if (failed) return ;
 
@@ -318,8 +318,8 @@
     public final void mNULL() throws RecognitionException {
         try {
             int _type = NULL;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:7: ( 'null' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:619:9: 'null'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:7: ( 'null' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:691:9: 'null'
             {
             match("null"); if (failed) return ;
 
@@ -337,8 +337,8 @@
     public final void mDECLARE() throws RecognitionException {
         try {
             int _type = DECLARE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:10: ( 'declare' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:621:12: 'declare'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:693:10: ( 'declare' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:693:12: 'declare'
             {
             match("declare"); if (failed) return ;
 
@@ -356,8 +356,8 @@
     public final void mSALIENCE() throws RecognitionException {
         try {
             int _type = SALIENCE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:623:10: ( 'salience' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:623:12: 'salience'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:695:10: ( 'salience' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:695:12: 'salience'
             {
             match("salience"); if (failed) return ;
 
@@ -374,10 +374,10 @@
     // $ANTLR start EOL
     public final void mEOL() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:629:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:700:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:629:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             int alt2=3;
             int LA2_0 = input.LA(1);
 
@@ -396,13 +396,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("629:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+                    new NoViableAltException("701:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
 
                 throw nvae;
             }
             switch (alt2) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:629:14: ( '\\r\\n' )=> '\\r\\n'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:14: ( '\\r\\n' )=> '\\r\\n'
                     {
                     match("\r\n"); if (failed) return ;
 
@@ -410,14 +410,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:630:25: '\\r'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:702:25: '\\r'
                     {
                     match('\r'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:631:25: '\\n'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:703:25: '\\n'
                     {
                     match('\n'); if (failed) return ;
 
@@ -439,10 +439,10 @@
     public final void mINT() throws RecognitionException {
         try {
             int _type = INT;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:636:2: ( ( '-' )? ( '0' .. '9' )+ )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:636:4: ( '-' )? ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:2: ( ( '-' )? ( '0' .. '9' )+ )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:4: ( '-' )? ( '0' .. '9' )+
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:636:4: ( '-' )?
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:4: ( '-' )?
             int alt3=2;
             int LA3_0 = input.LA(1);
 
@@ -451,7 +451,7 @@
             }
             switch (alt3) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:636:5: '-'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -460,7 +460,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:636:10: ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:10: ( '0' .. '9' )+
             int cnt4=0;
             loop4:
             do {
@@ -474,7 +474,7 @@
 
                 switch (alt4) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:636:11: '0' .. '9'
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:708:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -505,10 +505,10 @@
     public final void mFLOAT() throws RecognitionException {
         try {
             int _type = FLOAT;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:4: ( '-' )?
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:4: ( '-' )?
             int alt5=2;
             int LA5_0 = input.LA(1);
 
@@ -517,7 +517,7 @@
             }
             switch (alt5) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:5: '-'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -526,7 +526,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:10: ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:10: ( '0' .. '9' )+
             int cnt6=0;
             loop6:
             do {
@@ -540,7 +540,7 @@
 
                 switch (alt6) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:11: '0' .. '9'
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -558,7 +558,7 @@
             } while (true);
 
             match('.'); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:26: ( '0' .. '9' )+
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:26: ( '0' .. '9' )+
             int cnt7=0;
             loop7:
             do {
@@ -572,7 +572,7 @@
 
                 switch (alt7) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:27: '0' .. '9'
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:712:27: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -603,7 +603,7 @@
     public final void mSTRING() throws RecognitionException {
         try {
             int _type = STRING;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
             int alt10=2;
             int LA10_0 = input.LA(1);
 
@@ -616,19 +616,19 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("643:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+                    new NoViableAltException("715:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
 
                 throw nvae;
             }
             switch (alt10) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
                     {
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
                     {
                     match('\"'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
                     loop8:
                     do {
                         int alt8=3;
@@ -644,14 +644,14 @@
 
                         switch (alt8) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:15: EscapeSequence
+                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:15: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:644:32: ~ ( '\\\\' | '\"' )
+                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:716:32: ~ ( '\\\\' | '\"' )
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -681,13 +681,13 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:645:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
                     {
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:645:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:645:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
                     {
                     match('\''); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:645:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
                     loop9:
                     do {
                         int alt9=3;
@@ -703,14 +703,14 @@
 
                         switch (alt9) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:645:16: EscapeSequence
+                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:16: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:645:33: ~ ( '\\\\' | '\\'' )
+                    	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:33: ~ ( '\\\\' | '\\'' )
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -751,8 +751,8 @@
     // $ANTLR start HexDigit
     public final void mHexDigit() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:649:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721: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();
@@ -777,7 +777,7 @@
     // $ANTLR start EscapeSequence
     public final void mEscapeSequence() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:653:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
             int alt11=3;
             int LA11_0 = input.LA(1);
 
@@ -815,7 +815,7 @@
                 default:
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("651:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+                        new NoViableAltException("723:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
 
                     throw nvae;
                 }
@@ -824,13 +824,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("651:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+                    new NoViableAltException("723:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
 
                 throw nvae;
             }
             switch (alt11) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:653:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725: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' ) {
@@ -848,14 +848,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:654:9: UnicodeEscape
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:726:9: UnicodeEscape
                     {
                     mUnicodeEscape(); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:9: OctalEscape
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:727:9: OctalEscape
                     {
                     mOctalEscape(); if (failed) return ;
 
@@ -872,7 +872,7 @@
     // $ANTLR start OctalEscape
     public final void mOctalEscape() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
             int alt12=3;
             int LA12_0 = input.LA(1);
 
@@ -906,7 +906,7 @@
                 else {
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("658:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+                        new NoViableAltException("730:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
 
                     throw nvae;
                 }
@@ -914,31 +914,31 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("658:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+                    new NoViableAltException("730:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
 
                 throw nvae;
             }
             switch (alt12) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:14: ( '0' .. '3' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:15: '0' .. '3'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:14: ( '0' .. '3' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:15: '0' .. '3'
                     {
                     matchRange('0','3'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:25: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:26: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:25: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:36: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:660:37: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:36: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:732:37: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -948,18 +948,18 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:14: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:15: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:14: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:25: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:661:26: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:25: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -969,11 +969,11 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:9: '\\\\' ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:734:9: '\\\\' ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:14: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662:15: '0' .. '7'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:734:14: ( '0' .. '7' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:734:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -993,8 +993,8 @@
     // $ANTLR start UnicodeEscape
     public final void mUnicodeEscape() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:739:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:739:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
             {
             match('\\'); if (failed) return ;
             match('u'); if (failed) return ;
@@ -1015,10 +1015,10 @@
     public final void mBOOL() throws RecognitionException {
         try {
             int _type = BOOL;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:2: ( ( 'true' | 'false' ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:4: ( 'true' | 'false' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:743:2: ( ( 'true' | 'false' ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:743:4: ( 'true' | 'false' )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:4: ( 'true' | 'false' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:743:4: ( 'true' | 'false' )
             int alt13=2;
             int LA13_0 = input.LA(1);
 
@@ -1031,13 +1031,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("671:4: ( 'true' | 'false' )", 13, 0, input);
+                    new NoViableAltException("743:4: ( 'true' | 'false' )", 13, 0, input);
 
                 throw nvae;
             }
             switch (alt13) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:5: 'true'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:743:5: 'true'
                     {
                     match("true"); if (failed) return ;
 
@@ -1045,7 +1045,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:12: 'false'
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:743:12: 'false'
                     {
                     match("false"); if (failed) return ;
 
@@ -1069,8 +1069,8 @@
     public final void mVAR() throws RecognitionException {
         try {
             int _type = VAR;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:674:6: ( '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )* )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:674:8: '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:746:6: ( '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )* )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:746:8: '?' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' ) ( SYMBOL )*
             {
             match('?'); if (failed) return ;
             if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
@@ -1084,7 +1084,7 @@
                 recover(mse);    throw mse;
             }
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:674:38: ( SYMBOL )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:746:38: ( SYMBOL )*
             loop14:
             do {
                 int alt14=2;
@@ -1097,7 +1097,7 @@
 
                 switch (alt14) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:674:38: SYMBOL
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:746:38: SYMBOL
             	    {
             	    mSYMBOL(); if (failed) return ;
 
@@ -1123,11 +1123,11 @@
     public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = SH_STYLE_SINGLE_LINE_COMMENT;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:2: ( '#' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:4: '#' ( options {greedy=false; } : . )* EOL
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:750:2: ( '#' ( options {greedy=false; } : . )* EOL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:750:4: '#' ( options {greedy=false; } : . )* EOL
             {
             match('#'); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:8: ( options {greedy=false; } : . )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:750:8: ( options {greedy=false; } : . )*
             loop15:
             do {
                 int alt15=2;
@@ -1146,7 +1146,7 @@
 
                 switch (alt15) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:678:35: .
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:750:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1176,12 +1176,12 @@
     public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = C_STYLE_SINGLE_LINE_COMMENT;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:684:2: ( '//' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:684:4: '//' ( options {greedy=false; } : . )* EOL
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:756:2: ( '//' ( options {greedy=false; } : . )* EOL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:756:4: '//' ( options {greedy=false; } : . )* EOL
             {
             match("//"); if (failed) return ;
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:684:9: ( options {greedy=false; } : . )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:756:9: ( options {greedy=false; } : . )*
             loop16:
             do {
                 int alt16=2;
@@ -1200,7 +1200,7 @@
 
                 switch (alt16) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:684:36: .
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:756:36: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1230,8 +1230,8 @@
     public final void mLEFT_PAREN() throws RecognitionException {
         try {
             int _type = LEFT_PAREN;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:690:2: ( '(' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:690:4: '('
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:762:2: ( '(' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:762:4: '('
             {
             match('('); if (failed) return ;
 
@@ -1248,8 +1248,8 @@
     public final void mRIGHT_PAREN() throws RecognitionException {
         try {
             int _type = RIGHT_PAREN;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:694:2: ( ')' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:694:4: ')'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:766:2: ( ')' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:766:4: ')'
             {
             match(')'); if (failed) return ;
 
@@ -1266,8 +1266,8 @@
     public final void mLEFT_SQUARE() throws RecognitionException {
         try {
             int _type = LEFT_SQUARE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:698:2: ( '[' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:698:4: '['
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:770:2: ( '[' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:770:4: '['
             {
             match('['); if (failed) return ;
 
@@ -1284,8 +1284,8 @@
     public final void mRIGHT_SQUARE() throws RecognitionException {
         try {
             int _type = RIGHT_SQUARE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:702:2: ( ']' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:702:4: ']'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:774:2: ( ']' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:774:4: ']'
             {
             match(']'); if (failed) return ;
 
@@ -1302,8 +1302,8 @@
     public final void mLEFT_CURLY() throws RecognitionException {
         try {
             int _type = LEFT_CURLY;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:706:2: ( '{' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:706:4: '{'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:778:2: ( '{' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:778:4: '{'
             {
             match('{'); if (failed) return ;
 
@@ -1320,8 +1320,8 @@
     public final void mRIGHT_CURLY() throws RecognitionException {
         try {
             int _type = RIGHT_CURLY;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:710:2: ( '}' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:710:4: '}'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:782:2: ( '}' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:782:4: '}'
             {
             match('}'); if (failed) return ;
 
@@ -1338,8 +1338,8 @@
     public final void mTILDE() throws RecognitionException {
         try {
             int _type = TILDE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:713:7: ( '~' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:713:9: '~'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:785:7: ( '~' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:785:9: '~'
             {
             match('~'); if (failed) return ;
 
@@ -1356,8 +1356,8 @@
     public final void mAMPERSAND() throws RecognitionException {
         try {
             int _type = AMPERSAND;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:2: ( '&' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:717:4: '&'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:789:2: ( '&' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:789:4: '&'
             {
             match('&'); if (failed) return ;
 
@@ -1374,8 +1374,8 @@
     public final void mPIPE() throws RecognitionException {
         try {
             int _type = PIPE;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:2: ( '|' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:721:4: '|'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:793:2: ( '|' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:793:4: '|'
             {
             match('|'); if (failed) return ;
 
@@ -1392,8 +1392,8 @@
     public final void mASSIGN_OP() throws RecognitionException {
         try {
             int _type = ASSIGN_OP;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:2: ( '<-' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:725:4: '<-'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:797:2: ( '<-' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:797:4: '<-'
             {
             match("<-"); if (failed) return ;
 
@@ -1411,8 +1411,8 @@
     public final void mCOLON() throws RecognitionException {
         try {
             int _type = COLON;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:728:7: ( ':' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:728:9: ':'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:800:7: ( ':' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:800:9: ':'
             {
             match(':'); if (failed) return ;
 
@@ -1429,8 +1429,8 @@
     public final void mEQUALS() throws RecognitionException {
         try {
             int _type = EQUALS;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:730:8: ( '=' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:730:10: '='
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:802:8: ( '=' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:802:10: '='
             {
             match('='); if (failed) return ;
 
@@ -1447,12 +1447,12 @@
     public final void mMULTI_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = MULTI_LINE_COMMENT;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:4: '/*' ( options {greedy=false; } : . )* '*/'
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:805:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:805:4: '/*' ( options {greedy=false; } : . )* '*/'
             {
             match("/*"); if (failed) return ;
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:9: ( options {greedy=false; } : . )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:805:9: ( options {greedy=false; } : . )*
             loop17:
             do {
                 int alt17=2;
@@ -1477,7 +1477,7 @@
 
                 switch (alt17) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:733:35: .
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:805:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -1508,8 +1508,8 @@
     public final void mNAME() throws RecognitionException {
         try {
             int _type = NAME;
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:737:6: ( SYMBOL )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:737:8: SYMBOL
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:809:6: ( SYMBOL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:809:8: SYMBOL
             {
             mSYMBOL(); if (failed) return ;
 
@@ -1525,10 +1525,10 @@
     // $ANTLR start SYMBOL
     public final void mSYMBOL() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:2: ( ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )* )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:2: ( ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )* )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) ) (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )
             int alt18=2;
             int LA18_0 = input.LA(1);
 
@@ -1541,16 +1541,16 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("741:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )", 18, 0, input);
+                    new NoViableAltException("813:4: ( (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) ) | ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) ) )", 18, 0, input);
 
                 throw nvae;
             }
             switch (alt18) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
                     {
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:6: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:5: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' ) )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:6: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' | '$' )
                     {
                     if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||input.LA(1)=='#'||input.LA(1)=='%'||input.LA(1)=='\''||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='<' && input.LA(1)<='>')||(input.LA(1)>='@' && input.LA(1)<='{')||input.LA(1)=='}'||(input.LA(1)>='\u007F' && input.LA(1)<='\uFFFE') ) {
                         input.consume();
@@ -1570,10 +1570,10 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
                     {
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:741:66: '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:65: ( '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' ) )
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:813:66: '$' ~ ( '?' | ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
                     {
                     match('$'); if (failed) return ;
                     if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||input.LA(1)=='\''||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='=' && input.LA(1)<='>')||(input.LA(1)>='@' && input.LA(1)<='{')||input.LA(1)=='}'||(input.LA(1)>='\u007F' && input.LA(1)<='\uFFFE') ) {
@@ -1596,7 +1596,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:742:11: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:814:11: (~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' ) )*
             loop19:
             do {
                 int alt19=2;
@@ -1609,7 +1609,7 @@
 
                 switch (alt19) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:742:12: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' )
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:814:12: ~ ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' | '?' )
             	    {
             	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||input.LA(1)=='\''||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='=' && input.LA(1)<='>')||(input.LA(1)>='@' && input.LA(1)<='{')||input.LA(1)=='}'||(input.LA(1)>='\u007F' && input.LA(1)<='\uFFFE') ) {
             	        input.consume();
@@ -1890,8 +1890,8 @@
 
     // $ANTLR start synpred1
     public final void synpred1_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:629:14: ( '\\r\\n' )
-        // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:629:16: '\\r\\n'
+        // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:14: ( '\\r\\n' )
+        // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:701:16: '\\r\\n'
         {
         match("\r\n"); if (failed) return ;
 

Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java	2007-08-19 10:50:17 UTC (rev 14366)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java	2007-08-19 11:54:38 UTC (rev 14367)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-08-18 01:40:42
+// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-08-19 12:18:41
 
 	package org.drools.clp;
 	
@@ -7,26 +7,30 @@
 	import java.util.ArrayList;
 	import java.util.Iterator;
 	import java.util.HashMap;	
+	import java.util.Set;	
+	import java.util.HashSet;			
 	import java.util.StringTokenizer;
 	import org.drools.lang.descr.*;
+	import org.drools.lang.Location;	
 
 
 import org.antlr.runtime.*;
 import java.util.Stack;
 import java.util.List;
 import java.util.ArrayList;
-
+import java.util.Map;
+import java.util.HashMap;
 public class CLPParser extends Parser {
     public static final String[] tokenNames = new String[] {
-        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "VAR", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "ASSIGN_OP", "AMPERSAND", "PIPE", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "'import'", "'=>'"
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "VAR", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "'import'", "'=>'"
     };
     public static final int RIGHT_SQUARE=38;
     public static final int RIGHT_CURLY=40;
     public static final int SYMBOL=34;
     public static final int NULL=26;
     public static final int BOOL=25;
+    public static final int AMPERSAND=20;
     public static final int SALIENCE=11;
-    public static final int AMPERSAND=19;
     public static final int FLOAT=24;
     public static final int EQUALS=23;
     public static final int INT=12;
@@ -51,7 +55,7 @@
     public static final int TEST=17;
     public static final int LEFT_PAREN=4;
     public static final int DECLARE=29;
-    public static final int PIPE=20;
+    public static final int PIPE=19;
     public static final int VAR=8;
     public static final int EXISTS=16;
     public static final int LEFT_SQUARE=37;
@@ -62,7 +66,8 @@
 
         public CLPParser(TokenStream input) {
             super(input);
-        }
+            ruleMemo = new HashMap[27+1];
+         }
         
 
     public String[] getTokenNames() { return tokenNames; }
@@ -76,6 +81,8 @@
     	private DescrFactory factory = new DescrFactory();
     	private boolean parserDebug = false;
     	private FunctionRegistry functionRegistry;	
+    	private Set declarations = new HashSet();
+    	private Location location = new Location( Location.LOCATION_UNKNOWN );	
     	
     	public void setFunctionRegistry(FunctionRegistry functionRegistry) {
     		this.functionRegistry = functionRegistry;
@@ -221,7 +228,7 @@
 
 
     // $ANTLR start eval_script
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:222:1: eval_script[Shell shell] : (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:227:1: eval_script[Shell shell] : (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* ;
     public final void eval_script(Shell  shell) throws RecognitionException {
         ImportDescr i = null;
 
@@ -231,10 +238,10 @@
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:2: ( (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:228:2: ( (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:228:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:228:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
             loop1:
             do {
                 int alt1=4;
@@ -273,36 +280,42 @@
 
                 switch (alt1) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:223:9: i= importDescr
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:228:9: i= importDescr
             	    {
             	    pushFollow(FOLLOW_importDescr_in_eval_script55);
             	    i=importDescr();
             	    _fsp--;
+            	    if (failed) return ;
+            	    if ( backtracking==0 ) {
+            	       shell.importDescrHandler( i ); 
+            	    }
 
-            	     shell.importDescrHandler( i ); 
-
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:224:7: r= defrule
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:229:7: r= defrule
             	    {
             	    pushFollow(FOLLOW_defrule_in_eval_script66);
             	    r=defrule();
             	    _fsp--;
+            	    if (failed) return ;
+            	    if ( backtracking==0 ) {
+            	       shell.ruleDescrHandler( r ); 
+            	    }
 
-            	     shell.ruleDescrHandler( r ); 
-
             	    }
             	    break;
             	case 3 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:226:7: fc= lisp_list[shell, new LispForm(shell) ]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:231:7: fc= lisp_list[shell, new LispForm(shell) ]
             	    {
             	    pushFollow(FOLLOW_lisp_list_in_eval_script83);
             	    fc=lisp_list(shell,  new LispForm(shell) );
             	    _fsp--;
+            	    if (failed) return ;
+            	    if ( backtracking==0 ) {
+            	       shell.lispFormHandler(fc); 
+            	    }
 
-            	     shell.lispFormHandler(fc); 
-
             	    }
             	    break;
 
@@ -327,22 +340,24 @@
 
 
     // $ANTLR start importDescr
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:230:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:235: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\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:231:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:231:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:236:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:236:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr106); 
-            match(input,42,FOLLOW_42_in_importDescr108); 
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr106); if (failed) return importDescr;
+            match(input,42,FOLLOW_42_in_importDescr108); if (failed) return importDescr;
             importName=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_importDescr112); 
-             importDescr = new ImportDescr( importName.getText() ); 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr115); 
+            match(input,NAME,FOLLOW_NAME_in_importDescr112); if (failed) return importDescr;
+            if ( backtracking==0 ) {
+               importDescr = new ImportDescr( importName.getText() ); 
+            }
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr115); if (failed) return importDescr;
 
             }
 
@@ -359,7 +374,7 @@
 
 
     // $ANTLR start deffunction
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:246:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:251:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
     public final Deffunction deffunction() throws RecognitionException {
         Deffunction function = null;
 
@@ -370,25 +385,27 @@
 
 
         
-        			BuildContext context;  	
+        			BuildContext context = null;  	
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:250:2: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:250:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:255:2: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:255:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN
             {
             loc=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction141); 
-            match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction149); 
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction141); if (failed) return function;
+            match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction149); if (failed) return function;
             ruleName=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_deffunction158); 
-            
-            	    	function = new Deffunction( ruleName.getText() );
-            			functionRegistry.addFunction( function );
-            	      	context = new ExecutionBuildContext( function, functionRegistry );
-            	  	
+            match(input,NAME,FOLLOW_NAME_in_deffunction158); if (failed) return function;
+            if ( backtracking==0 ) {
+              
+              	    	function = new Deffunction( ruleName.getText() );
+              			functionRegistry.addFunction( function );
+              	      	context = new ExecutionBuildContext( function, functionRegistry );
+              	  	
+            }
             loc=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction166); 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:258:4: (v= VAR )*
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction166); if (failed) return function;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:263:4: (v= VAR )*
             loop2:
             do {
                 int alt2=2;
@@ -401,13 +418,15 @@
 
                 switch (alt2) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:258:5: v= VAR
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:263:5: v= VAR
             	    {
             	    v=(Token)input.LT(1);
-            	    match(input,VAR,FOLLOW_VAR_in_deffunction176); 
-            	    
-            	    			context.addVariable( function.addParameter( v.getText() ) );
-            	    		 
+            	    match(input,VAR,FOLLOW_VAR_in_deffunction176); if (failed) return function;
+            	    if ( backtracking==0 ) {
+            	      
+            	      			context.addVariable( function.addParameter( v.getText() ) );
+            	      		 
+            	    }
 
             	    }
             	    break;
@@ -417,8 +436,8 @@
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction189); 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:262:5: (fc= lisp_list[context, new LispForm(context) ] )*
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction189); if (failed) return function;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:267:5: (fc= lisp_list[context, new LispForm(context) ] )*
             loop3:
             do {
                 int alt3=2;
@@ -431,14 +450,16 @@
 
                 switch (alt3) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:262:6: fc= lisp_list[context, new LispForm(context) ]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:267:6: fc= lisp_list[context, new LispForm(context) ]
             	    {
             	    pushFollow(FOLLOW_lisp_list_in_deffunction198);
             	    fc=lisp_list(context,  new LispForm(context) );
             	    _fsp--;
+            	    if (failed) return function;
+            	    if ( backtracking==0 ) {
+            	       context.addFunction( (FunctionCaller) fc ); 
+            	    }
 
-            	     context.addFunction( (FunctionCaller) fc ); 
-
             	    }
             	    break;
 
@@ -447,7 +468,7 @@
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction209); 
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction209); if (failed) return function;
 
             }
 
@@ -464,7 +485,7 @@
 
 
     // $ANTLR start defrule
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:276:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN ;
     public final RuleDescr defrule() throws RecognitionException {
         RuleDescr rule = null;
 
@@ -481,53 +502,57 @@
         	        AttributeDescr module = null;	        
         	      
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:288:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:288:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs] )* '=>' engine= execution_block RIGHT_PAREN
             {
             loc=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule235); 
-            match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule243); 
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule235); if (failed) return rule;
+            match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule243); if (failed) return rule;
             ruleName=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_defrule247); 
-             	  			  		
-            	  		debug( "start rule: " + ruleName.getText() );
-            	  		String ruleStr = ruleName.getText();
-            
-            	        if ( ruleStr.indexOf("::") >= 0 ) {
-            	            String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
-            	            ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
-            				module = new AttributeDescr( "agenda-group", mod );
-            				module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
-            				module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
-            				module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
-            			}
-            		    
-            		    rule = new RuleDescr( ruleStr, null ); 
-            		    if( module != null ) {
-            		    	rule.addAttribute( module );
-            		    }
-            		        
-            			rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-            			rule.setStartCharacter( ((CommonToken)loc).getStartIndex() ); 
-            		
-            			// not sure how you define where a LHS starts in clips, so just putting it here for now
-                    	lhs = new AndDescr(); 
-              	        rule.setLhs( lhs ); 
-            	        lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-            			lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );	
-            			
-            			rule.addAttribute( new AttributeDescr( "dialect", "clips") );												
-            		
+            match(input,NAME,FOLLOW_NAME_in_defrule247); if (failed) return rule;
+            if ( backtracking==0 ) {
+               	  			  		
+              	  		debug( "start rule: " + ruleName.getText() );
+              	  		String ruleStr = ruleName.getText();
+              
+              	        if ( ruleStr.indexOf("::") >= 0 ) {
+              	            String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
+              	            ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
+              				module = new AttributeDescr( "agenda-group", mod );
+              				module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
+              				module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
+              				module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
+              			}
+              		    
+              		    rule = new RuleDescr( ruleStr, null ); 
+              		    if( module != null ) {
+              		    	rule.addAttribute( module );
+              		    }
+              		        
+              			rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+              			rule.setStartCharacter( ((CommonToken)loc).getStartIndex() ); 
+              		
+              			// not sure how you define where a LHS starts in clips, so just putting it here for now
+                      	lhs = new AndDescr(); 
+                	        rule.setLhs( lhs ); 
+              	        lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+              			lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );	
+              			
+              			rule.addAttribute( new AttributeDescr( "dialect", "clips") );												
+              		
+            }
             documentation=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_defrule259); 
-            
-            	    	// do nothing here for now
-            		
+            match(input,STRING,FOLLOW_STRING_in_defrule259); if (failed) return rule;
+            if ( backtracking==0 ) {
+              
+              	    	// do nothing here for now
+              		
+            }
             pushFollow(FOLLOW_ruleAttribute_in_defrule265);
             ruleAttribute(rule);
             _fsp--;
-
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:320:3: ( ce[lhs] )*
+            if (failed) return rule;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:325:3: ( ce[lhs] )*
             loop4:
             do {
                 int alt4=2;
@@ -540,13 +565,13 @@
 
                 switch (alt4) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:320:3: ce[lhs]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:325:3: ce[lhs]
             	    {
             	    pushFollow(FOLLOW_ce_in_defrule273);
             	    ce(lhs);
             	    _fsp--;
+            	    if (failed) return rule;
 
-
             	    }
             	    break;
 
@@ -555,14 +580,16 @@
                 }
             } while (true);
 
-            match(input,43,FOLLOW_43_in_defrule282); 
+            match(input,43,FOLLOW_43_in_defrule282); if (failed) return rule;
             pushFollow(FOLLOW_execution_block_in_defrule291);
             engine=execution_block();
             _fsp--;
+            if (failed) return rule;
+            if ( backtracking==0 ) {
+               rule.setConsequence( engine ); 
+            }
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule300); if (failed) return rule;
 
-             rule.setConsequence( engine ); 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule300); 
-
             }
 
         }
@@ -578,16 +605,16 @@
 
 
     // $ANTLR start ruleAttribute
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:330:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:335:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
     public final void ruleAttribute(RuleDescr rule) throws RecognitionException {
         AttributeDescr d = null;
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:331:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:332:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:336:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:332:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
             int alt6=2;
             int LA6_0 = input.LA(1);
 
@@ -600,11 +627,11 @@
             }
             switch (alt6) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:332:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
                     {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute317); 
-                    match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute319); 
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute317); if (failed) return ;
+                    match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute319); if (failed) return ;
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:338:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
                     int alt5=2;
                     int LA5_0 = input.LA(1);
 
@@ -613,22 +640,24 @@
                     }
                     switch (alt5) {
                         case 1 :
-                            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:6: LEFT_PAREN d= salience RIGHT_PAREN
+                            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:338:6: LEFT_PAREN d= salience RIGHT_PAREN
                             {
-                            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute326); 
+                            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute326); if (failed) return ;
                             pushFollow(FOLLOW_salience_in_ruleAttribute330);
                             d=salience();
                             _fsp--;
+                            if (failed) return ;
+                            if ( backtracking==0 ) {
+                               rule.addAttribute( d ); 
+                            }
+                            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute334); if (failed) return ;
 
-                             rule.addAttribute( d ); 
-                            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute334); 
-
                             }
                             break;
 
                     }
 
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute341); 
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute341); if (failed) return ;
 
                     }
                     break;
@@ -651,7 +680,7 @@
 
 
     // $ANTLR start salience
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:337:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:342:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
     public final AttributeDescr salience() throws RecognitionException {
         AttributeDescr d = null;
 
@@ -662,19 +691,21 @@
         		d = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:2: (loc= SALIENCE i= INT )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:342:3: loc= SALIENCE i= INT
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:346:2: (loc= SALIENCE i= INT )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:347:3: loc= SALIENCE i= INT
             {
             loc=(Token)input.LT(1);
-            match(input,SALIENCE,FOLLOW_SALIENCE_in_salience371); 
+            match(input,SALIENCE,FOLLOW_SALIENCE_in_salience371); if (failed) return d;
             i=(Token)input.LT(1);
-            match(input,INT,FOLLOW_INT_in_salience375); 
-            
-            			d = new AttributeDescr( "salience", i.getText() );
-            			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-            			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-            			d.setEndCharacter( ((CommonToken)i).getStopIndex() );
-            		
+            match(input,INT,FOLLOW_INT_in_salience375); if (failed) return d;
+            if ( backtracking==0 ) {
+              
+              			d = new AttributeDescr( "salience", i.getText() );
+              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+              			d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+              		
+            }
 
             }
 
@@ -691,26 +722,26 @@
 
 
     // $ANTLR start ce
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:352:1: ce[ConditionalElementDescr in_ce] : ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:357:1: ce[ConditionalElementDescr in_ce] : ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) ;
     public final void ce(ConditionalElementDescr in_ce) throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:353:2: ( ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:353:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:2: ( ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:353:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )
             int alt7=7;
             int LA7_0 = input.LA(1);
 
             if ( (LA7_0==LEFT_PAREN) ) {
                 switch ( input.LA(2) ) {
-                case OR:
+                case NAME:
                     {
-                    alt7=2;
+                    alt7=6;
                     }
                     break;
-                case NAME:
+                case OR:
                     {
-                    alt7=6;
+                    alt7=2;
                     }
                     break;
                 case AND:
@@ -718,14 +749,14 @@
                     alt7=1;
                     }
                     break;
-                case EXISTS:
+                case TEST:
                     {
-                    alt7=4;
+                    alt7=5;
                     }
                     break;
-                case TEST:
+                case EXISTS:
                     {
-                    alt7=5;
+                    alt7=4;
                     }
                     break;
                 case NOT:
@@ -734,8 +765,9 @@
                     }
                     break;
                 default:
+                    if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("353:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 7, 1, input);
+                        new NoViableAltException("358:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 7, 1, input);
 
                     throw nvae;
                 }
@@ -745,80 +777,81 @@
                 alt7=7;
             }
             else {
+                if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("353:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 7, 0, input);
+                    new NoViableAltException("358:4: ( and_ce[in_ce] | or_ce[in_ce] | not_ce[in_ce] | exists_ce[in_ce] | eval_ce[in_ce] | normal_pattern[in_ce] | bound_pattern[in_ce] )", 7, 0, input);
 
                 throw nvae;
             }
             switch (alt7) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:353:8: and_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:8: and_ce[in_ce]
                     {
                     pushFollow(FOLLOW_and_ce_in_ce401);
                     and_ce(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:7: or_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:359:7: or_ce[in_ce]
                     {
                     pushFollow(FOLLOW_or_ce_in_ce411);
                     or_ce(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:355:7: not_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:360:7: not_ce[in_ce]
                     {
                     pushFollow(FOLLOW_not_ce_in_ce420);
                     not_ce(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:356:7: exists_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:361:7: exists_ce[in_ce]
                     {
                     pushFollow(FOLLOW_exists_ce_in_ce429);
                     exists_ce(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:357:8: eval_ce[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:362:8: eval_ce[in_ce]
                     {
                     pushFollow(FOLLOW_eval_ce_in_ce443);
                     eval_ce(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:7: normal_pattern[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:363:7: normal_pattern[in_ce]
                     {
                     pushFollow(FOLLOW_normal_pattern_in_ce457);
                     normal_pattern(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:359:7: bound_pattern[in_ce]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:364:7: bound_pattern[in_ce]
                     {
                     pushFollow(FOLLOW_bound_pattern_in_ce466);
                     bound_pattern(in_ce);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
 
@@ -840,7 +873,7 @@
 
 
     // $ANTLR start execution_block
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:363:1: execution_block returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:368:1: execution_block returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
     public final ExecutionEngine execution_block() throws RecognitionException {
         ExecutionEngine engine = null;
 
@@ -852,10 +885,10 @@
         			BuildContext context = new ExecutionBuildContext( engine, functionRegistry );  	
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:369:2: ( (fc= lisp_list[context, new LispForm(context) ] )* )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:370:3: (fc= lisp_list[context, new LispForm(context) ] )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:374:2: ( (fc= lisp_list[context, new LispForm(context) ] )* )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:375:3: (fc= lisp_list[context, new LispForm(context) ] )*
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:370:3: (fc= lisp_list[context, new LispForm(context) ] )*
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:375:3: (fc= lisp_list[context, new LispForm(context) ] )*
             loop8:
             do {
                 int alt8=2;
@@ -868,14 +901,16 @@
 
                 switch (alt8) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:370:4: fc= lisp_list[context, new LispForm(context) ]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:375:4: fc= lisp_list[context, new LispForm(context) ]
             	    {
             	    pushFollow(FOLLOW_lisp_list_in_execution_block498);
             	    fc=lisp_list(context,  new LispForm(context) );
             	    _fsp--;
+            	    if (failed) return engine;
+            	    if ( backtracking==0 ) {
+            	       context.addFunction( (FunctionCaller) fc ); 
+            	    }
 
-            	     context.addFunction( (FunctionCaller) fc ); 
-
             	    }
             	    break;
 
@@ -900,22 +935,24 @@
 
 
     // $ANTLR start and_ce
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:373:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:378:1: and_ce[ConditionalElementDescr in_ce] : LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN ;
     public final void and_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 AndDescr andDescr= null;        
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:2: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:2: ( LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:4: LEFT_PAREN AND ( ce[andDescr] )+ RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce526); 
-            match(input,AND,FOLLOW_AND_in_and_ce531); 
-            
-            	    	andDescr = new AndDescr();
-            			in_ce.addDescr( andDescr );
-            		
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:3: ( ce[andDescr] )+
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce526); if (failed) return ;
+            match(input,AND,FOLLOW_AND_in_and_ce531); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              	    	andDescr = new AndDescr();
+              			in_ce.addDescr( andDescr );
+              		
+            }
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:3: ( ce[andDescr] )+
             int cnt9=0;
             loop9:
             do {
@@ -929,18 +966,19 @@
 
                 switch (alt9) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:382:3: ce[andDescr]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:3: ce[andDescr]
             	    {
             	    pushFollow(FOLLOW_ce_in_and_ce537);
             	    ce(andDescr);
             	    _fsp--;
+            	    if (failed) return ;
 
-
             	    }
             	    break;
 
             	default :
             	    if ( cnt9 >= 1 ) break loop9;
+            	    if (backtracking>0) {failed=true; return ;}
                         EarlyExitException eee =
                             new EarlyExitException(9, input);
                         throw eee;
@@ -948,7 +986,7 @@
                 cnt9++;
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce546); 
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce546); if (failed) return ;
 
             }
 
@@ -965,22 +1003,24 @@
 
 
     // $ANTLR start or_ce
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:386:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:391:1: or_ce[ConditionalElementDescr in_ce] : LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN ;
     public final void or_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 OrDescr orDescr= null;         
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:390:2: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:390:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:395:2: ( LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:395:4: LEFT_PAREN OR ( ce[orDescr] )+ RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce574); 
-            match(input,OR,FOLLOW_OR_in_or_ce579); 
-            
-            	    	orDescr = new OrDescr();
-            			in_ce.addDescr( orDescr );
-            		
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:395:3: ( ce[orDescr] )+
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce574); if (failed) return ;
+            match(input,OR,FOLLOW_OR_in_or_ce579); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              	    	orDescr = new OrDescr();
+              			in_ce.addDescr( orDescr );
+              		
+            }
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:400:3: ( ce[orDescr] )+
             int cnt10=0;
             loop10:
             do {
@@ -994,18 +1034,19 @@
 
                 switch (alt10) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:395:3: ce[orDescr]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:400:3: ce[orDescr]
             	    {
             	    pushFollow(FOLLOW_ce_in_or_ce585);
             	    ce(orDescr);
             	    _fsp--;
+            	    if (failed) return ;
 
-
             	    }
             	    break;
 
             	default :
             	    if ( cnt10 >= 1 ) break loop10;
+            	    if (backtracking>0) {failed=true; return ;}
                         EarlyExitException eee =
                             new EarlyExitException(10, input);
                         throw eee;
@@ -1013,7 +1054,7 @@
                 cnt10++;
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce594); 
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce594); if (failed) return ;
 
             }
 
@@ -1030,27 +1071,29 @@
 
 
     // $ANTLR start not_ce
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:399:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:404:1: not_ce[ConditionalElementDescr in_ce] : LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN ;
     public final void not_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 NotDescr notDescr= null;         
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:2: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:408:2: ( LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:408:4: LEFT_PAREN NOT ce[notDescr] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce622); 
-            match(input,NOT,FOLLOW_NOT_in_not_ce627); 
-            
-            			notDescr = new NotDescr();
-            		    in_ce.addDescr( notDescr );
-            		
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce622); if (failed) return ;
+            match(input,NOT,FOLLOW_NOT_in_not_ce627); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              			notDescr = new NotDescr();
+              		    in_ce.addDescr( notDescr );
+              		
+            }
             pushFollow(FOLLOW_ce_in_not_ce633);
             ce(notDescr);
             _fsp--;
+            if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce641); if (failed) return ;
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce641); 
-
             }
 
         }
@@ -1066,27 +1109,29 @@
 
 
     // $ANTLR start exists_ce
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:412:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:417:1: exists_ce[ConditionalElementDescr in_ce] : LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN ;
     public final void exists_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         
                 ExistsDescr existsDescr= null;        
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:416:2: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:416:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:421:2: ( LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:421:4: LEFT_PAREN EXISTS ce[existsDescr] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce670); 
-            match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce675); 
-            
-            		    existsDescr = new ExistsDescr();
-            		    in_ce.addDescr( existsDescr );
-            		
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce670); if (failed) return ;
+            match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce675); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              		    existsDescr = new ExistsDescr();
+              		    in_ce.addDescr( existsDescr );
+              		
+            }
             pushFollow(FOLLOW_ce_in_exists_ce681);
             ce(existsDescr);
             _fsp--;
+            if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce689); if (failed) return ;
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce689); 
-
             }
 
         }
@@ -1102,7 +1147,7 @@
 
 
     // $ANTLR start eval_ce
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:425:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:430:1: eval_ce[ConditionalElementDescr in_ce] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
     public final void eval_ce(ConditionalElementDescr in_ce) throws RecognitionException {
         ValueHandler fc = null;
 
@@ -1113,25 +1158,29 @@
         		BuildContext context = new ExecutionBuildContext( engine, functionRegistry );   		         
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:431:2: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:431:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:436:2: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:436:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce717); 
-            match(input,TEST,FOLLOW_TEST_in_eval_ce722); 
-            
-            		    evalDescr = new EvalDescr();
-            		    in_ce.addDescr( evalDescr );
-            		
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce717); if (failed) return ;
+            match(input,TEST,FOLLOW_TEST_in_eval_ce722); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              		    evalDescr = new EvalDescr();
+              		    in_ce.addDescr( evalDescr );
+              		
+            }
             pushFollow(FOLLOW_lisp_list_in_eval_ce730);
             fc=lisp_list(context,  new LispForm(context));
             _fsp--;
+            if (failed) return ;
+            if ( backtracking==0 ) {
+              					
+              		    engine.addFunction( (FunctionCaller) fc );		
+              			evalDescr.setContent( engine );			
+              		
+            }
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce741); if (failed) return ;
 
-            					
-            		    engine.addFunction( (FunctionCaller) fc );		
-            			evalDescr.setContent( engine );			
-            		
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce741); 
-
             }
 
         }
@@ -1147,25 +1196,30 @@
 
 
     // $ANTLR start normal_pattern
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:443:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:448:1: normal_pattern[ConditionalElementDescr in_ce] : LEFT_PAREN name= NAME ( field_constriant[top] )* RIGHT_PAREN ;
     public final void normal_pattern(ConditionalElementDescr in_ce) throws RecognitionException {
         Token name=null;
 
         
                 PatternDescr pattern = null;
+                ConditionalElementDescr top = null;
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:2: ( LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:447:4: LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:453:2: ( LEFT_PAREN name= NAME ( field_constriant[top] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:453:4: LEFT_PAREN name= NAME ( field_constriant[top] )* RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern769); 
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern769); if (failed) return ;
             name=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_normal_pattern776); 
-            
-            			pattern = new PatternDescr(name.getText());
-            			in_ce.addDescr( pattern );
-            		
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:452:3: ( field_constriant[pattern] )*
+            match(input,NAME,FOLLOW_NAME_in_normal_pattern776); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              			pattern = new PatternDescr(name.getText());
+              			in_ce.addDescr( pattern );
+              			top = pattern.getConstraint();
+              			
+              		
+            }
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:460:3: ( field_constriant[top] )*
             loop11:
             do {
                 int alt11=2;
@@ -1178,13 +1232,13 @@
 
                 switch (alt11) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:452:3: field_constriant[pattern]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:460:3: field_constriant[top]
             	    {
             	    pushFollow(FOLLOW_field_constriant_in_normal_pattern782);
-            	    field_constriant(pattern);
+            	    field_constriant(top);
             	    _fsp--;
+            	    if (failed) return ;
 
-
             	    }
             	    break;
 
@@ -1193,7 +1247,7 @@
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern792); 
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern792); if (failed) return ;
 
             }
 
@@ -1210,7 +1264,7 @@
 
 
     // $ANTLR start bound_pattern
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:458:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:466:1: bound_pattern[ConditionalElementDescr in_ce] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top] )* RIGHT_PAREN ;
     public final void bound_pattern(ConditionalElementDescr in_ce) throws RecognitionException {
         Token var=null;
         Token name=null;
@@ -1218,26 +1272,32 @@
         
                 PatternDescr pattern = null;
                 String identifier = null;
+                ConditionalElementDescr top = null;        
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:463:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[pattern] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top] )* RIGHT_PAREN
             {
             var=(Token)input.LT(1);
-            match(input,VAR,FOLLOW_VAR_in_bound_pattern820); 
-            
-            			identifier = var.getText();
-            		
-            match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern826); 
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern828); 
+            match(input,VAR,FOLLOW_VAR_in_bound_pattern820); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              			identifier = var.getText();
+              		
+            }
+            match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern826); if (failed) return ;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern828); if (failed) return ;
             name=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_bound_pattern832); 
-            
-            			pattern = new PatternDescr(name.getText());
-            			pattern.setIdentifier( identifier );
-            			in_ce.addDescr( pattern );	    
-            		
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:3: ( field_constriant[pattern] )*
+            match(input,NAME,FOLLOW_NAME_in_bound_pattern832); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              			pattern = new PatternDescr(name.getText());
+              			pattern.setIdentifier( identifier );
+              			in_ce.addDescr( pattern );
+              			top = pattern.getConstraint();				    
+              		
+            }
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:482:3: ( field_constriant[top] )*
             loop12:
             do {
                 int alt12=2;
@@ -1250,13 +1310,13 @@
 
                 switch (alt12) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:472:3: field_constriant[pattern]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:482:3: field_constriant[top]
             	    {
             	    pushFollow(FOLLOW_field_constriant_in_bound_pattern841);
-            	    field_constriant(pattern);
+            	    field_constriant(top);
             	    _fsp--;
+            	    if (failed) return ;
 
-
             	    }
             	    break;
 
@@ -1265,7 +1325,7 @@
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern848); 
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern848); if (failed) return ;
 
             }
 
@@ -1282,35 +1342,39 @@
 
 
     // $ANTLR start field_constriant
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:476:1: field_constriant[PatternDescr pattern] : LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN ;
-    public final void field_constriant(PatternDescr pattern) throws RecognitionException {
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:486:1: field_constriant[ConditionalElementDescr base] : LEFT_PAREN f= NAME or_restr_connective[top, base] RIGHT_PAREN ;
+    public final void field_constriant(ConditionalElementDescr base) throws RecognitionException {
         Token f=null;
 
         
              	List list = new ArrayList();
         		FieldBindingDescr fbd = null;
         		FieldConstraintDescr fc = null;
+        		RestrictionConnectiveDescr top = null;		
         		String op = "==";
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:483:2: ( LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:484:3: LEFT_PAREN f= NAME connected_constraint[fc, pattern] RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:494:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base] RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:495:3: LEFT_PAREN f= NAME or_restr_connective[top, base] RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant879); 
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant879); if (failed) return ;
             f=(Token)input.LT(1);
-            match(input,NAME,FOLLOW_NAME_in_field_constriant883); 
-            
-            			fc = new FieldConstraintDescr(f.getText());
-            			fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
-            			fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
-            			pattern.addConstraint( fc );			
-            		
-            pushFollow(FOLLOW_connected_constraint_in_field_constriant898);
-            connected_constraint(fc,  pattern);
+            match(input,NAME,FOLLOW_NAME_in_field_constriant883); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              			fc = new FieldConstraintDescr(f.getText());
+              			fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+              			fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
+              			base.addDescr( fc );	
+              			top = fc.getRestriction();		
+              		
+            }
+            pushFollow(FOLLOW_or_restr_connective_in_field_constriant898);
+            or_restr_connective(top,  base);
             _fsp--;
+            if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant904); if (failed) return ;
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant904); 
-
             }
 
         }
@@ -1325,56 +1389,120 @@
     // $ANTLR end field_constriant
 
 
-    // $ANTLR start connected_constraint
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:496:1: connected_constraint[FieldConstraintDescr fc, PatternDescr pattern] : restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? ;
-    public final void connected_constraint(FieldConstraintDescr fc, PatternDescr pattern) throws RecognitionException {
+    // $ANTLR start or_restr_connective
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:522:1: or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase ] options {backtrack=true; } : and_restr_connective[or, ceBase] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase] )* ;
+    public final void or_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase) throws RecognitionException {
+        
+        		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+        	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:497:2: ( restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )? )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:498:2: restriction[fc, pattern] ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:529:2: ( and_restr_connective[or, ceBase] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase] )* )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:530:3: and_restr_connective[or, ceBase] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase] )*
             {
-            pushFollow(FOLLOW_restriction_in_connected_constraint920);
-            restriction(fc,  pattern);
+            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective943);
+            and_restr_connective(or,  ceBase);
             _fsp--;
+            if (failed) return ;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:531:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase] )*
+            loop13:
+            do {
+                int alt13=2;
+                int LA13_0 = input.LA(1);
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:499:2: ( AMPERSAND connected_constraint[fc, pattern] | PIPE connected_constraint[fc, pattern] )?
-            int alt13=3;
-            int LA13_0 = input.LA(1);
+                if ( (LA13_0==PIPE) ) {
+                    alt13=1;
+                }
 
-            if ( (LA13_0==AMPERSAND) ) {
-                alt13=1;
-            }
-            else if ( (LA13_0==PIPE) ) {
-                alt13=2;
-            }
-            switch (alt13) {
-                case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:500:6: AMPERSAND connected_constraint[fc, pattern]
-                    {
-                    match(input,AMPERSAND,FOLLOW_AMPERSAND_in_connected_constraint932); 
-                     fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); 
-                    pushFollow(FOLLOW_connected_constraint_in_connected_constraint941);
-                    connected_constraint(fc,  pattern);
-                    _fsp--;
 
+                switch (alt13) {
+            	case 1 :
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:533:6: PIPE and_restr_connective[or, ceBase]
+            	    {
+            	    match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective967); if (failed) return ;
+            	    if ( backtracking==0 ) {
+            	      
+            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+            	      			
+            	    }
+            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective977);
+            	    and_restr_connective(or,  ceBase);
+            	    _fsp--;
+            	    if (failed) return ;
 
-                    }
-                    break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:503:6: PIPE connected_constraint[fc, pattern]
-                    {
-                    match(input,PIPE,FOLLOW_PIPE_in_connected_constraint953); 
-                    fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); 
-                    pushFollow(FOLLOW_connected_constraint_in_connected_constraint962);
-                    connected_constraint(fc,  pattern);
-                    _fsp--;
+            	    }
+            	    break;
 
+            	default :
+            	    break loop13;
+                }
+            } while (true);
 
-                    }
-                    break;
 
             }
 
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            
+            	        if( or.getRestrictions().size() == 1 ) {
+            	                rcBase.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
+            	        } else if ( or.getRestrictions().size() > 1 ) {
+            	        	rcBase.addRestriction( or );
+            	        }
+            	
+        }
+        return ;
+    }
+    // $ANTLR end or_restr_connective
 
+
+    // $ANTLR start and_restr_connective
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:548:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase ] : restriction[and, ceBase] ( AMPERSAND restriction[and, ceBase] )* ;
+    public final void and_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase) throws RecognitionException {
+        
+        		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+        	
+        try {
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:552:2: ( restriction[and, ceBase] ( AMPERSAND restriction[and, ceBase] )* )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:553:3: restriction[and, ceBase] ( AMPERSAND restriction[and, ceBase] )*
+            {
+            pushFollow(FOLLOW_restriction_in_and_restr_connective1009);
+            restriction(and,  ceBase);
+            _fsp--;
+            if (failed) return ;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:3: ( AMPERSAND restriction[and, ceBase] )*
+            loop14:
+            do {
+                int alt14=2;
+                int LA14_0 = input.LA(1);
+
+                if ( (LA14_0==AMPERSAND) ) {
+                    alt14=1;
+                }
+
+
+                switch (alt14) {
+            	case 1 :
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:554:5: AMPERSAND restriction[and, ceBase]
+            	    {
+            	    match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective1017); if (failed) return ;
+            	    pushFollow(FOLLOW_restriction_in_and_restr_connective1019);
+            	    restriction(and,  ceBase);
+            	    _fsp--;
+            	    if (failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop14;
+                }
+            } while (true);
+
+
             }
 
         }
@@ -1383,15 +1511,22 @@
             recover(input,re);
         }
         finally {
+            
+            	        if( and.getRestrictions().size() == 1) {
+            	                rcBase.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
+            	        } else if ( and.getRestrictions().size() > 1 ) {
+            	        	rcBase.addRestriction( and );
+            	        }
+            	
         }
         return ;
     }
-    // $ANTLR end connected_constraint
+    // $ANTLR end and_restr_connective
 
 
     // $ANTLR start restriction
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:508:1: restriction[FieldConstraintDescr fc, PatternDescr pattern] : ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) ;
-    public final void restriction(FieldConstraintDescr fc, PatternDescr pattern) throws RecognitionException {
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:573:1: restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base] : ( TILDE )? ( predicate_constraint[op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base] | lc= literal_restriction ) ;
+    public final void restriction(RestrictionConnectiveDescr rc, ConditionalElementDescr base) throws RecognitionException {
         String lc = null;
 
 
@@ -1399,44 +1534,46 @@
         			String op = "==";
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:2: ( ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:4: ( TILDE )? ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:2: ( ( TILDE )? ( predicate_constraint[op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base] | lc= literal_restriction ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:4: ( TILDE )? ( predicate_constraint[op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base] | lc= literal_restriction )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:4: ( TILDE )?
-            int alt14=2;
-            int LA14_0 = input.LA(1);
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577: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\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:512:5: TILDE
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:577:5: TILDE
                     {
-                    match(input,TILDE,FOLLOW_TILDE_in_restriction988); 
-                    op = "!=";
+                    match(input,TILDE,FOLLOW_TILDE_in_restriction1052); if (failed) return ;
+                    if ( backtracking==0 ) {
+                      op = "!=";
+                    }
 
                     }
                     break;
 
             }
 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:513:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )
-            int alt15=4;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:578:3: ( predicate_constraint[op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base] | 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:
@@ -1446,59 +1583,62 @@
             case BOOL:
             case NULL:
                 {
-                alt15=4;
+                alt16=4;
                 }
                 break;
             default:
+                if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("513:3: ( predicate_constraint[op, pattern] | return_value_restriction[op, fc] | variable_restriction[op, fc] | lc= literal_restriction )", 15, 0, input);
+                    new NoViableAltException("578:3: ( predicate_constraint[op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base] | lc= literal_restriction )", 16, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt15) {
+            switch (alt16) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:513:5: predicate_constraint[op, pattern]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:578:5: predicate_constraint[op, base]
                     {
-                    pushFollow(FOLLOW_predicate_constraint_in_restriction1004);
-                    predicate_constraint(op,  pattern);
+                    pushFollow(FOLLOW_predicate_constraint_in_restriction1068);
+                    predicate_constraint(op,  base);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:514:7: return_value_restriction[op, fc]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:7: return_value_restriction[op, rc]
                     {
-                    pushFollow(FOLLOW_return_value_restriction_in_restriction1020);
-                    return_value_restriction(op,  fc);
+                    pushFollow(FOLLOW_return_value_restriction_in_restriction1084);
+                    return_value_restriction(op,  rc);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:515:7: variable_restriction[op, fc]
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:7: variable_restriction[op, rc, base]
                     {
-                    pushFollow(FOLLOW_variable_restriction_in_restriction1029);
-                    variable_restriction(op,  fc);
+                    pushFollow(FOLLOW_variable_restriction_in_restriction1093);
+                    variable_restriction(op,  rc,  base);
                     _fsp--;
+                    if (failed) return ;
 
-
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:516:8: lc= literal_restriction
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:581:8: lc= literal_restriction
                     {
-                    pushFollow(FOLLOW_literal_restriction_in_restriction1041);
+                    pushFollow(FOLLOW_literal_restriction_in_restriction1105);
                     lc=literal_restriction();
                     _fsp--;
+                    if (failed) return ;
+                    if ( backtracking==0 ) {
+                      
+                           	    			rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+                      		      		op = "==";
+                      		        
+                    }
 
-                    
-                         	    			fc.addRestriction( new LiteralRestrictionDescr(op, lc) );
-                    		      		op = "==";
-                    		        
-
                     }
                     break;
 
@@ -1520,8 +1660,8 @@
 
 
     // $ANTLR start predicate_constraint
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:523:1: predicate_constraint[String op, PatternDescr pattern] : COLON fc= lisp_list[context, new LispForm(context)] ;
-    public final void predicate_constraint(String op, PatternDescr pattern) throws RecognitionException {
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:588:1: predicate_constraint[String op, ConditionalElementDescr base] : COLON fc= lisp_list[context, new LispForm(context)] ;
+    public final void predicate_constraint(String op, ConditionalElementDescr base) throws RecognitionException {
         ValueHandler fc = null;
 
 
@@ -1530,19 +1670,21 @@
         		BuildContext context = new ExecutionBuildContext( engine, functionRegistry );    
             
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:528:2: ( COLON fc= lisp_list[context, new LispForm(context)] )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:528:4: COLON fc= lisp_list[context, new LispForm(context)]
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:2: ( COLON fc= lisp_list[context, new LispForm(context)] )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:593:4: COLON fc= lisp_list[context, new LispForm(context)]
             {
-            match(input,COLON,FOLLOW_COLON_in_predicate_constraint1083); 
-            pushFollow(FOLLOW_lisp_list_in_predicate_constraint1089);
+            match(input,COLON,FOLLOW_COLON_in_predicate_constraint1147); if (failed) return ;
+            pushFollow(FOLLOW_lisp_list_in_predicate_constraint1153);
             fc=lisp_list(context,  new LispForm(context));
             _fsp--;
+            if (failed) return ;
+            if ( backtracking==0 ) {
+              	
+              		    engine.addFunction( (FunctionCaller) fc );
+              			base.addDescr( new PredicateDescr( engine ) );
+              		
+            }
 
-            	
-            		    engine.addFunction( (FunctionCaller) fc );
-            			pattern.addConstraint( new PredicateDescr( engine ) );
-            		
-
             }
 
         }
@@ -1558,8 +1700,8 @@
 
 
     // $ANTLR start return_value_restriction
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:537:1: return_value_restriction[String op, FieldConstraintDescr fc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
-    public final void return_value_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:602:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
+    public final void return_value_restriction(String op, RestrictionConnectiveDescr rc) throws RecognitionException {
         ValueHandler func = null;
 
 
@@ -1568,19 +1710,21 @@
         		BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:542:2: ( EQUALS func= lisp_list[context, new LispForm(context)] )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:542:4: EQUALS func= lisp_list[context, new LispForm(context)]
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:607:2: ( EQUALS func= lisp_list[context, new LispForm(context)] )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:607:4: EQUALS func= lisp_list[context, new LispForm(context)]
             {
-            match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1115); 
-            pushFollow(FOLLOW_lisp_list_in_return_value_restriction1122);
+            match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1179); if (failed) return ;
+            pushFollow(FOLLOW_lisp_list_in_return_value_restriction1186);
             func=lisp_list(context,  new LispForm(context));
             _fsp--;
+            if (failed) return ;
+            if ( backtracking==0 ) {
+              					
+                 		    engine.addFunction( (FunctionCaller) func );
+              			rc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
+              		
+            }
 
-            					
-               		    engine.addFunction( (FunctionCaller) func );
-            			fc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
-            		
-
             }
 
         }
@@ -1596,19 +1740,27 @@
 
 
     // $ANTLR start variable_restriction
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:549:1: variable_restriction[String op, FieldConstraintDescr fc] : var= VAR ;
-    public final void variable_restriction(String op, FieldConstraintDescr fc) throws RecognitionException {
-        Token var=null;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:615:1: variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase] : VAR ;
+    public final void variable_restriction(String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase) throws RecognitionException {
+        Token VAR1=null;
 
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:550:2: (var= VAR )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:550:4: var= VAR
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:616:2: ( VAR )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:616:4: VAR
             {
-            var=(Token)input.LT(1);
-            match(input,VAR,FOLLOW_VAR_in_variable_restriction1143); 
-            
-            			fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
-            		
+            VAR1=(Token)input.LT(1);
+            match(input,VAR,FOLLOW_VAR_in_variable_restriction1206); if (failed) return ;
+            if ( backtracking==0 ) {
+              
+              	        if ( declarations.contains( VAR1.getText() ) ) {
+              				rc.addRestriction( new VariableRestrictionDescr(op, VAR1.getText()) );
+              		 	} else {
+              		 		FieldBindingDescr fbd = new FieldBindingDescr();
+              		 		fbd.setIdentifier( VAR1.getText() );		 		
+              		 		ceBase.addDescr( fbd );
+              		 	}
+              		
+            }
 
             }
 
@@ -1625,7 +1777,7 @@
 
 
     // $ANTLR start literal_restriction
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:556:1: literal_restriction returns [String text] : t= literal ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:628:1: literal_restriction returns [String text] : t= literal ;
     public final String literal_restriction() throws RecognitionException {
         String text = null;
 
@@ -1636,17 +1788,19 @@
         		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:560:2: (t= literal )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:561:6: t= literal
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:632:2: (t= literal )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:633:6: t= literal
             {
-            pushFollow(FOLLOW_literal_in_literal_restriction1176);
+            pushFollow(FOLLOW_literal_in_literal_restriction1239);
             t=literal();
             _fsp--;
+            if (failed) return text;
+            if ( backtracking==0 ) {
+              
+              	    	text = t;
+              	    
+            }
 
-            
-            	    	text = t;
-            	    
-
             }
 
         }
@@ -1662,7 +1816,7 @@
 
 
     // $ANTLR start lisp_list
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:566:1: lisp_list[BuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:638:1: lisp_list[BuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
     public final ValueHandler lisp_list(BuildContext context, LispList list) throws RecognitionException {
         ValueHandler valueHandler = null;
 
@@ -1670,55 +1824,61 @@
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:2: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:567:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:2: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:639:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
             {
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1195); 
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:568:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
-            loop16:
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1258); if (failed) return valueHandler;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
+            loop17:
             do {
-                int alt16=3;
-                int LA16_0 = input.LA(1);
+                int alt17=3;
+                int LA17_0 = input.LA(1);
 
-                if ( (LA16_0==NAME||LA16_0==VAR||LA16_0==STRING||LA16_0==INT||(LA16_0>=FLOAT && LA16_0<=NULL)) ) {
-                    alt16=1;
+                if ( (LA17_0==NAME||LA17_0==VAR||LA17_0==STRING||LA17_0==INT||(LA17_0>=FLOAT && LA17_0<=NULL)) ) {
+                    alt17=1;
                 }
-                else if ( (LA16_0==LEFT_PAREN) ) {
-                    alt16=2;
+                else if ( (LA17_0==LEFT_PAREN) ) {
+                    alt17=2;
                 }
 
 
-                switch (alt16) {
+                switch (alt17) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:568:6: a= lisp_atom[context]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:640:6: a= lisp_atom[context]
             	    {
-            	    pushFollow(FOLLOW_lisp_atom_in_lisp_list1205);
+            	    pushFollow(FOLLOW_lisp_atom_in_lisp_list1268);
             	    a=lisp_atom(context);
             	    _fsp--;
+            	    if (failed) return valueHandler;
+            	    if ( backtracking==0 ) {
+            	       list.add( a ); 
+            	    }
 
-            	     list.add( a ); 
-
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:569:6: a= lisp_list[context, list.createList()]
+            	    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:641:6: a= lisp_list[context, list.createList()]
             	    {
-            	    pushFollow(FOLLOW_lisp_list_in_lisp_list1221);
+            	    pushFollow(FOLLOW_lisp_list_in_lisp_list1284);
             	    a=lisp_list(context,  list.createList());
             	    _fsp--;
+            	    if (failed) return valueHandler;
+            	    if ( backtracking==0 ) {
+            	       list.add( a ); 
+            	    }
 
-            	     list.add( a ); 
-
             	    }
             	    break;
 
             	default :
-            	    break loop16;
+            	    break loop17;
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1251); 
-             valueHandler = list.getValueHandler(); 
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1314); if (failed) return valueHandler;
+            if ( backtracking==0 ) {
+               valueHandler = list.getValueHandler(); 
+            }
 
             }
 
@@ -1735,7 +1895,7 @@
 
 
     // $ANTLR start lisp_atom
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:575:1: lisp_atom[BuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:647:1: lisp_atom[BuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
     public final ValueHandler lisp_atom(BuildContext context) throws RecognitionException {
         ValueHandler value = null;
 
@@ -1745,115 +1905,130 @@
         		value  =  null;		
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:579:2: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:651:2: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
-            int alt17=7;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+            int alt18=7;
             switch ( input.LA(1) ) {
             case VAR:
                 {
-                alt17=1;
+                alt18=1;
                 }
                 break;
             case STRING:
                 {
-                alt17=2;
+                alt18=2;
                 }
                 break;
             case NAME:
                 {
-                alt17=3;
+                alt18=3;
                 }
                 break;
             case FLOAT:
                 {
-                alt17=4;
+                alt18=4;
                 }
                 break;
             case INT:
                 {
-                alt17=5;
+                alt18=5;
                 }
                 break;
             case BOOL:
                 {
-                alt17=6;
+                alt18=6;
                 }
                 break;
             case NULL:
                 {
-                alt17=7;
+                alt18=7;
                 }
                 break;
             default:
+                if (backtracking>0) {failed=true; return value;}
                 NoViableAltException nvae =
-                    new NoViableAltException("580:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 17, 0, input);
+                    new NoViableAltException("652:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 18, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt17) {
+            switch (alt18) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:580:6: t= VAR
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:652:6: t= VAR
                     {
                     t=(Token)input.LT(1);
-                    match(input,VAR,FOLLOW_VAR_in_lisp_atom1288); 
-                     value = context.getVariableValueHandler(t.getText() ); 
+                    match(input,VAR,FOLLOW_VAR_in_lisp_atom1351); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = context.getVariableValueHandler(t.getText() ); 
+                    }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:581:6: t= STRING
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:653:6: t= STRING
                     {
                     t=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_lisp_atom1300); 
-                     value = new ObjectValueHandler( getString( t ) ); 
+                    match(input,STRING,FOLLOW_STRING_in_lisp_atom1363); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = new ObjectValueHandler( getString( t ) ); 
+                    }
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:582:7: t= NAME
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:654:7: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_lisp_atom1312); 
-                     value = new ObjectValueHandler( t.getText() ); 
+                    match(input,NAME,FOLLOW_NAME_in_lisp_atom1375); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = new ObjectValueHandler( t.getText() ); 
+                    }
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:583:6: t= FLOAT
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:655:6: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1327); 
-                     value = new DoubleValueHandler( t.getText() ); 
+                    match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1390); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = new DoubleValueHandler( t.getText() ); 
+                    }
 
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:584:6: t= INT
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:656:6: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_lisp_atom1339); 
-                     value = new LongValueHandler( t.getText() ); 
+                    match(input,INT,FOLLOW_INT_in_lisp_atom1402); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = new LongValueHandler( t.getText() ); 
+                    }
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:585:6: t= BOOL
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:657:6: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1355); 
-                     value = new BooleanValueHandler( t.getText() ); 
+                    match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1418); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = new BooleanValueHandler( t.getText() ); 
+                    }
 
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:586:6: t= NULL
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:658:6: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_lisp_atom1373); 
-                     value = ObjectValueHandler.NULL; 
+                    match(input,NULL,FOLLOW_NULL_in_lisp_atom1436); if (failed) return value;
+                    if ( backtracking==0 ) {
+                       value = ObjectValueHandler.NULL; 
+                    }
 
                     }
                     break;
@@ -1876,7 +2051,7 @@
 
 
     // $ANTLR start literal
-    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:590:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:662: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;
 
@@ -1886,101 +2061,114 @@
         		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
             {
-            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
-            int alt18=6;
+            // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            int alt19=6;
             switch ( input.LA(1) ) {
             case STRING:
                 {
-                alt18=1;
+                alt19=1;
                 }
                 break;
             case NAME:
                 {
-                alt18=2;
+                alt19=2;
                 }
                 break;
             case INT:
                 {
-                alt18=3;
+                alt19=3;
                 }
                 break;
             case FLOAT:
                 {
-                alt18=4;
+                alt19=4;
                 }
                 break;
             case BOOL:
                 {
-                alt18=5;
+                alt19=5;
                 }
                 break;
             case NULL:
                 {
-                alt18=6;
+                alt19=6;
                 }
                 break;
             default:
+                if (backtracking>0) {failed=true; return text;}
                 NoViableAltException nvae =
-                    new NoViableAltException("594:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 18, 0, input);
+                    new NoViableAltException("666:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 19, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt18) {
+            switch (alt19) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:594:8: t= STRING
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:666:8: t= STRING
                     {
                     t=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_literal1409); 
-                     text = getString( t ); 
+                    match(input,STRING,FOLLOW_STRING_in_literal1472); if (failed) return text;
+                    if ( backtracking==0 ) {
+                       text = getString( t ); 
+                    }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:595:7: t= NAME
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:667:7: t= NAME
                     {
                     t=(Token)input.LT(1);
-                    match(input,NAME,FOLLOW_NAME_in_literal1422); 
-                     text = t.getText(); 
+                    match(input,NAME,FOLLOW_NAME_in_literal1485); if (failed) return text;
+                    if ( backtracking==0 ) {
+                       text = t.getText(); 
+                    }
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:596:7: t= INT
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:668:7: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_literal1438); 
-                     text = t.getText(); 
+                    match(input,INT,FOLLOW_INT_in_literal1501); if (failed) return text;
+                    if ( backtracking==0 ) {
+                       text = t.getText(); 
+                    }
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:597:7: t= FLOAT
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:669:7: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_literal1453); 
-                     text = t.getText(); 
+                    match(input,FLOAT,FOLLOW_FLOAT_in_literal1516); if (failed) return text;
+                    if ( backtracking==0 ) {
+                       text = t.getText(); 
+                    }
 
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:598:7: t= BOOL
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:670:7: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_literal1466); 
-                     text = t.getText(); 
+                    match(input,BOOL,FOLLOW_BOOL_in_literal1529); if (failed) return text;
+                    if ( backtracking==0 ) {
+                       text = t.getText(); 
+                    }
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:599:7: t= NULL
+                    // C:\\dev\\jbossrules\\trunk07\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:671:7: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_literal1480); 
-                     text = null; 
+                    match(input,NULL,FOLLOW_NULL_in_literal1543); if (failed) return text;
+                    if ( backtracking==0 ) {
+                       text = null; 
+                    }
 
                     }
                     break;
@@ -2076,40 +2264,41 @@
     public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern848 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant879 = new BitSet(new long[]{0x0000000000000020L});
     public static final BitSet FOLLOW_NAME_in_field_constriant883 = new BitSet(new long[]{0x0000000007E01520L});
-    public static final BitSet FOLLOW_connected_constraint_in_field_constriant898 = new BitSet(new long[]{0x0000000000000040L});
+    public static final BitSet FOLLOW_or_restr_connective_in_field_constriant898 = new BitSet(new long[]{0x0000000000000040L});
     public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant904 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_restriction_in_connected_constraint920 = new BitSet(new long[]{0x0000000000180002L});
-    public static final BitSet FOLLOW_AMPERSAND_in_connected_constraint932 = new BitSet(new long[]{0x0000000007E01520L});
-    public static final BitSet FOLLOW_connected_constraint_in_connected_constraint941 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_PIPE_in_connected_constraint953 = new BitSet(new long[]{0x0000000007E01520L});
-    public static final BitSet FOLLOW_connected_constraint_in_connected_constraint962 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_TILDE_in_restriction988 = new BitSet(new long[]{0x0000000007C01520L});
-    public static final BitSet FOLLOW_predicate_constraint_in_restriction1004 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_return_value_restriction_in_restriction1020 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_variable_restriction_in_restriction1029 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_restriction_in_restriction1041 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_COLON_in_predicate_constraint1083 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_list_in_predicate_constraint1089 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1115 = new BitSet(new long[]{0x0000000000000010L});
-    public static final BitSet FOLLOW_lisp_list_in_return_value_restriction1122 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VAR_in_variable_restriction1143 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_literal_restriction1176 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1195 = new BitSet(new long[]{0x0000000007001570L});
-    public static final BitSet FOLLOW_lisp_atom_in_lisp_list1205 = new BitSet(new long[]{0x0000000007001570L});
-    public static final BitSet FOLLOW_lisp_list_in_lisp_list1221 = new BitSet(new long[]{0x0000000007001570L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1251 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VAR_in_lisp_atom1288 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_lisp_atom1300 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NAME_in_lisp_atom1312 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_lisp_atom1327 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_lisp_atom1339 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_lisp_atom1355 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_lisp_atom1373 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_literal1409 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NAME_in_literal1422 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_literal1438 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_literal1453 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_literal1466 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_literal1480 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective943 = new BitSet(new long[]{0x0000000000080002L});
+    public static final BitSet FOLLOW_PIPE_in_or_restr_connective967 = new BitSet(new long[]{0x0000000007E01520L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective977 = new BitSet(new long[]{0x0000000000080002L});
+    public static final BitSet FOLLOW_restriction_in_and_restr_connective1009 = new BitSet(new long[]{0x0000000000100002L});
+    public static final BitSet FOLLOW_AMPERSAND_in_and_restr_connective1017 = new BitSet(new long[]{0x0000000007E01520L});
+    public static final BitSet FOLLOW_restriction_in_and_restr_connective1019 = new BitSet(new long[]{0x0000000000100002L});
+    public static final BitSet FOLLOW_TILDE_in_restriction1052 = new BitSet(new long[]{0x0000000007C01520L});
+    public static final BitSet FOLLOW_predicate_constraint_in_restriction1068 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_return_value_restriction_in_restriction1084 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_variable_restriction_in_restriction1093 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_restriction_in_restriction1105 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_COLON_in_predicate_constraint1147 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_list_in_predicate_constraint1153 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1179 = new BitSet(new long[]{0x0000000000000010L});
+    public static final BitSet FOLLOW_lisp_list_in_return_value_restriction1186 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VAR_in_variable_restriction1206 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_literal_restriction1239 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1258 = new BitSet(new long[]{0x0000000007001570L});
+    public static final BitSet FOLLOW_lisp_atom_in_lisp_list1268 = new BitSet(new long[]{0x0000000007001570L});
+    public static final BitSet FOLLOW_lisp_list_in_lisp_list1284 = new BitSet(new long[]{0x0000000007001570L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1314 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VAR_in_lisp_atom1351 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_lisp_atom1363 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NAME_in_lisp_atom1375 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_lisp_atom1390 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_lisp_atom1402 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_lisp_atom1418 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_lisp_atom1436 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_literal1472 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NAME_in_literal1485 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_literal1501 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_literal1516 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_literal1529 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_literal1543 = new BitSet(new long[]{0x0000000000000002L});
 
 }
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g	2007-08-19 10:50:17 UTC (rev 14366)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLP.g	2007-08-19 11:54:38 UTC (rev 14367)
@@ -8,8 +8,11 @@
 	import java.util.ArrayList;
 	import java.util.Iterator;
 	import java.util.HashMap;	
+	import java.util.Set;	
+	import java.util.HashSet;			
 	import java.util.StringTokenizer;
 	import org.drools.lang.descr.*;
+	import org.drools.lang.Location;	
 }
 
 @parser::members {
@@ -20,6 +23,8 @@
 	private DescrFactory factory = new DescrFactory();
 	private boolean parserDebug = false;
 	private FunctionRegistry functionRegistry;	
+	private Set declarations = new HashSet();
+	private Location location = new Location( Location.LOCATION_UNKNOWN );	
 	
 	public void setFunctionRegistry(FunctionRegistry functionRegistry) {
 		this.functionRegistry = functionRegistry;
@@ -245,7 +250,7 @@
 
 deffunction returns[Deffunction function]
 	@init {
-			BuildContext context;  	
+			BuildContext context = null;  	
 	}
 	:	loc=LEFT_PAREN	 
 	  	DEFFUNCTION 
@@ -443,13 +448,16 @@
 normal_pattern[ConditionalElementDescr in_ce]
     @init {
         PatternDescr pattern = null;
+        ConditionalElementDescr top = null;
     }
 	:	LEFT_PAREN 
 		name=NAME {
 			pattern = new PatternDescr(name.getText());
 			in_ce.addDescr( pattern );
+			top = pattern.getConstraint();
+			
 		}
-		field_constriant[pattern]* 	  
+		field_constriant[top]* 	  
 		RIGHT_PAREN
 	;		
 	
@@ -459,6 +467,7 @@
     @init {
         PatternDescr pattern = null;
         String identifier = null;
+        ConditionalElementDescr top = null;        
     }
 	:	var=VAR {
 			identifier = var.getText();
@@ -467,17 +476,19 @@
 		{
 			pattern = new PatternDescr(name.getText());
 			pattern.setIdentifier( identifier );
-			in_ce.addDescr( pattern );	    
+			in_ce.addDescr( pattern );
+			top = pattern.getConstraint();				    
 		}
-		field_constriant[pattern]* 
+		field_constriant[top]* 
 		RIGHT_PAREN	
 	;			
 	
-field_constriant[PatternDescr pattern] 
+field_constriant[ConditionalElementDescr base] 
 	@init {
      	List list = new ArrayList();
 		FieldBindingDescr fbd = null;
 		FieldConstraintDescr fc = null;
+		RestrictionConnectiveDescr top = null;		
 		String op = "==";
 	}    
 	:	
@@ -486,41 +497,95 @@
 			fc = new FieldConstraintDescr(f.getText());
 			fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
 			fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
-			pattern.addConstraint( fc );			
+			base.addDescr( fc );	
+			top = fc.getRestriction();		
 		}	  
 		
-		connected_constraint[fc, pattern] 
+		or_restr_connective[top, base] 
 		RIGHT_PAREN		
 	;
-	
-connected_constraint[FieldConstraintDescr fc, PatternDescr pattern]
+/*	
+connected_constraint[RestrictionConnectiveDescr rc, ConditionalElementDescr base]
 	:
-	restriction[fc, pattern]
+	restriction[rc, base]
 	( 
-	    AMPERSAND { fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); }
-	    connected_constraint[fc, pattern]
+	    AMPERSAND { rc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); }
+	    connected_constraint[rc, base]
 	| 
-	    PIPE {fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); }
-	    connected_constraint[fc, pattern]
+	    PIPE {rc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); }
+	    connected_constraint[rc, base]
 	)?
 	;	
+*/
+
+
+or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase ]
+	options { 
+		backtrack=true;
+	}
+	@init {
+		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+	}
+	:
+		and_restr_connective[or, ceBase] 
+		( 
+			options {backtrack=true;}
+			: PIPE
+			{
+				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+			}
+			and_restr_connective[or, ceBase] 
+		)*
+	;
+	finally {
+	        if( or.getRestrictions().size() == 1 ) {
+	                $rcBase.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
+	        } else if ( or.getRestrictions().size() > 1 ) {
+	        	$rcBase.addRestriction( or );
+	        }
+	}
+
+and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase ]
+	@init {
+		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+	}
+	:
+		restriction[and, ceBase] 
+		( AMPERSAND restriction[and, ceBase] )*
+		/*
+		(	options {backtrack=true;}
+		:	t=AMPERSAND 
+			{
+				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+			}
+			restriction[and, ceBase] 
+		)*
+		*/
+	;
+	finally {
+	        if( and.getRestrictions().size() == 1) {
+	                $rcBase.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
+	        } else if ( and.getRestrictions().size() > 1 ) {
+	        	$rcBase.addRestriction( and );
+	        }
+	}
 	
-restriction[FieldConstraintDescr fc, PatternDescr pattern]
+restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base]
 	@init {
 			String op = "==";
 	}
 	:	(TILDE{op = "!=";})?	 	  	 
-		(	predicate_constraint[op, pattern]	  	  	
-	  	|	return_value_restriction[op, fc]
-	  	|	variable_restriction[op, fc]
+		(	predicate_constraint[op, base]	  	  	
+	  	|	return_value_restriction[op, rc]
+	  	|	variable_restriction[op, rc, base]
 	  	| 	lc=literal_restriction {
-     	    			fc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+     	    			rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
 		      		op = "==";
 		        } 	  	  	  
 		)		
 	;		
 
-predicate_constraint[String op, PatternDescr pattern]	
+predicate_constraint[String op, ConditionalElementDescr base]	
     @init {
    		ExecutionEngine engine = new CLPPredicate();
 		BuildContext context = new ExecutionBuildContext( engine, functionRegistry );    
@@ -528,13 +593,13 @@
 	:	COLON
 		fc=lisp_list[context, new LispForm(context)] {	
 		    engine.addFunction( (FunctionCaller) fc );
-			pattern.addConstraint( new PredicateDescr( engine ) );
+			base.addDescr( new PredicateDescr( engine ) );
 		}	
 		
 	;
 
 
-return_value_restriction[String op, FieldConstraintDescr fc]
+return_value_restriction[String op, RestrictionConnectiveDescr rc]
 	@init {
 		ExecutionEngine engine = new CLPReturnValue();
 		BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
@@ -542,13 +607,20 @@
 	:	EQUALS 
 		func=lisp_list[context, new LispForm(context)] {					
    		    engine.addFunction( (FunctionCaller) func );
-			fc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
+			rc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
 		}		
 	;
 		
-variable_restriction[String op, FieldConstraintDescr fc]
-	:	var=VAR {
-			fc.addRestriction( new VariableRestrictionDescr(op, var.getText()) );
+//will add a declaration field binding, if this is the first time the name  is used		
+variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase]
+	:	VAR {
+	        if ( declarations.contains( $VAR.text ) ) {
+				rc.addRestriction( new VariableRestrictionDescr(op, $VAR.text) );
+		 	} else {
+		 		FieldBindingDescr fbd = new FieldBindingDescr();
+		 		fbd.setIdentifier( $VAR.text );		 		
+		 		ceBase.addDescr( fbd );
+		 	}
 		}
 	;	
 

Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java	2007-08-19 10:50:17 UTC (rev 14366)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java	2007-08-19 11:54:38 UTC (rev 14367)
@@ -14,7 +14,7 @@
         
         shell.evalString( "(import org.drools.Person)" );
         
-        shell.evalString( "(defrule xxx (Person (name bob) )=> (printout t xx \" \" (eq 1 1) ) )" );
+        shell.evalString( "(defrule xxx (Person (name tim & bob) )=> (printout t xx \" \" (eq 1 1) ) )" );
         
         Package pkg = shell.getWorkingMemory().getRuleBase().getPackage( "MAIN" );
         Rule rule = pkg.getRule( "xxx" );




More information about the jboss-svn-commits mailing list