[jboss-svn-commits] JBL Code SVN: r12343 - in labs/jbossrules/trunk: drools-compiler/src/main/resources/org/drools/lang and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 5 16:37:18 EDT 2007


Author: tirelli
Date: 2007-06-05 16:37:17 -0400 (Tue, 05 Jun 2007)
New Revision: 12343

Modified:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
   labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g
   labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
   labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertions2.drl
   labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/eol_funny_business.drl
   labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/pattern_partial.drl
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/IncompleteParsingTest.java
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/LocationDeterminatorTest.java
Log:
JBRULES-908: fixing DRL.g and tests

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java	2007-06-05 20:37:17 UTC (rev 12343)
@@ -1,8 +1,8 @@
-// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-06-03 02:26:07
-
-	package org.drools.lang;
+// $ANTLR 3.0 /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-06-05 12:19:42
 
+	package org.drools.lang;
 
+
 import org.antlr.runtime.*;
 import java.util.Stack;
 import java.util.List;
@@ -10,117 +10,99 @@
 import java.util.Map;
 import java.util.HashMap;
 public class DRLLexer extends Lexer {
-    public static final int T75=75;
+    public static final int COMMA=12;
+    public static final int EXISTS=39;
+    public static final int T79=79;
+    public static final int AUTO_FOCUS=27;
+    public static final int END=15;
+    public static final int HexDigit=63;
+    public static final int FORALL=42;
+    public static final int TEMPLATE=16;
+    public static final int T70=70;
+    public static final int MISC=69;
+    public static final int FLOAT=53;
+    public static final int T74=74;
+    public static final int QUERY=14;
+    public static final int THEN=59;
+    public static final int RULE=17;
+    public static final int INIT=44;
+    public static final int IMPORT=6;
     public static final int PACKAGE=5;
+    public static final int DATE_EFFECTIVE=19;
+    public static final int OR=34;
+    public static final int DOT=9;
+    public static final int DOUBLE_PIPE=35;
+    public static final int AND=36;
     public static final int FUNCTION=7;
-    public static final int ACCUMULATE=32;
-    public static final int T76=76;
-    public static final int RIGHT_SQUARE=53;
-    public static final int T73=73;
-    public static final int T74=74;
-    public static final int T79=79;
-    public static final int ACTIVATION_GROUP=26;
+    public static final int GLOBAL=10;
+    public static final int EscapeSequence=62;
+    public static final int DIALECT=32;
+    public static final int INT=25;
+    public static final int LOCK_ON_ACTIVE=33;
+    public static final int DATE_EXPIRES=21;
+    public static final int LEFT_SQUARE=57;
+    public static final int CONTAINS=48;
+    public static final int SH_STYLE_SINGLE_LINE_COMMENT=66;
     public static final int T77=77;
     public static final int ATTRIBUTES=4;
-    public static final int RIGHT_CURLY=51;
+    public static final int LEFT_CURLY=55;
+    public static final int RESULT=46;
+    public static final int ID=8;
+    public static final int FROM=38;
+    public static final int LEFT_PAREN=11;
+    public static final int ACTIVATION_GROUP=28;
+    public static final int DOUBLE_AMPER=37;
+    public static final int RIGHT_CURLY=56;
+    public static final int BOOL=23;
+    public static final int EXCLUDES=49;
+    public static final int T73=73;
+    public static final int MEMBEROF=51;
+    public static final int WHEN=18;
     public static final int T78=78;
-    public static final int DIALECT=30;
-    public static final int CONTAINS=42;
-    public static final int NO_LOOP=24;
-    public static final int LOCK_ON_ACTIVE=31;
-    public static final int MEMBEROF=46;
-    public static final int AGENDA_GROUP=28;
-    public static final int FLOAT=48;
-    public static final int NOT=43;
-    public static final int SH_STYLE_SINGLE_LINE_COMMENT=65;
-    public static final int AND=54;
-    public static final int ID=11;
+    public static final int RULEFLOW_GROUP=29;
+    public static final int WS=61;
+    public static final int STRING=20;
+    public static final int ACTION=45;
+    public static final int T71=71;
+    public static final int T72=72;
+    public static final int COLLECT=47;
+    public static final int T76=76;
+    public static final int IN=52;
+    public static final int ACCUMULATE=43;
+    public static final int NO_LOOP=26;
+    public static final int UnicodeEscape=64;
+    public static final int T75=75;
+    public static final int DURATION=31;
+    public static final int EVAL=41;
+    public static final int MATCHES=50;
     public static final int EOF=-1;
-    public static final int HexDigit=62;
-    public static final int DATE_EFFECTIVE=17;
-    public static final int T72=72;
-    public static final int ACTION=35;
-    public static final int T71=71;
-    public static final int T70=70;
-    public static final int DOUBLE_PIPE=39;
-    public static final int RIGHT_PAREN=12;
-    public static final int IMPORT=6;
-    public static final int EOL=59;
-    public static final int DOUBLE_AMPER=40;
-    public static final int THEN=58;
-    public static final int IN=47;
-    public static final int T69=69;
-    public static final int MATCHES=45;
-    public static final int COMMA=33;
-    public static final int ENABLED=20;
-    public static final int EXISTS=56;
-    public static final int RULE=15;
-    public static final int EXCLUDES=44;
-    public static final int AUTO_FOCUS=25;
-    public static final int NULL=49;
-    public static final int BOOL=21;
-    public static final int FORALL=57;
-    public static final int SALIENCE=22;
-    public static final int RULEFLOW_GROUP=27;
-    public static final int RESULT=36;
-    public static final int INT=23;
+    public static final int AGENDA_GROUP=30;
+    public static final int NULL=54;
+    public static final int EOL=60;
     public static final int Tokens=80;
-    public static final int MULTI_LINE_COMMENT=67;
-    public static final int DURATION=29;
-    public static final int WS=60;
-    public static final int EVAL=41;
-    public static final int TEMPLATE=14;
-    public static final int WHEN=16;
-    public static final int UnicodeEscape=63;
-    public static final int LEFT_CURLY=50;
-    public static final int OR=38;
-    public static final int LEFT_PAREN=10;
-    public static final int QUERY=9;
-    public static final int GLOBAL=8;
-    public static final int END=13;
-    public static final int FROM=55;
-    public static final int MISC=68;
-    public static final int COLLECT=37;
-    public static final int INIT=34;
-    public static final int LEFT_SQUARE=52;
-    public static final int EscapeSequence=61;
-    public static final int OctalEscape=64;
-    public static final int C_STYLE_SINGLE_LINE_COMMENT=66;
-    public static final int STRING=18;
-    public static final int DATE_EXPIRES=19;
+    public static final int SALIENCE=24;
+    public static final int OctalEscape=65;
+    public static final int MULTI_LINE_COMMENT=68;
+    public static final int NOT=40;
+    public static final int RIGHT_PAREN=13;
+    public static final int ENABLED=22;
+    public static final int RIGHT_SQUARE=58;
+    public static final int C_STYLE_SINGLE_LINE_COMMENT=67;
     public DRLLexer() {;} 
     public DRLLexer(CharStream input) {
         super(input);
         ruleMemo = new HashMap[78+1];
      }
-    public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g"; }
+    public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g"; }
 
-    // $ANTLR start T69
-    public final void mT69() throws RecognitionException {
-        try {
-            int _type = T69;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:6:7: ( ';' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:6:7: ';'
-            {
-            match(';'); if (failed) return ;
-
-            }
-
-            this.type = _type;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end T69
-
     // $ANTLR start T70
     public final void mT70() throws RecognitionException {
         try {
             int _type = T70;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:7:7: ( ':' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:7:7: ':'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:6:7: ( ';' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:6:7: ';'
             {
-            match(':'); if (failed) return ;
+            match(';'); if (failed) return ;
 
             }
 
@@ -135,10 +117,10 @@
     public final void mT71() throws RecognitionException {
         try {
             int _type = T71;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:8:7: ( '.' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:8:7: '.'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:7:7: ( ':' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:7:7: ':'
             {
-            match('.'); if (failed) return ;
+            match(':'); if (failed) return ;
 
             }
 
@@ -153,8 +135,8 @@
     public final void mT72() throws RecognitionException {
         try {
             int _type = T72;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:9:7: ( '.*' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:9:7: '.*'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:8:7: ( '.*' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:8:7: '.*'
             {
             match(".*"); if (failed) return ;
 
@@ -172,8 +154,8 @@
     public final void mT73() throws RecognitionException {
         try {
             int _type = T73;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:10:7: ( '->' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:10:7: '->'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:9:7: ( '->' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:9:7: '->'
             {
             match("->"); if (failed) return ;
 
@@ -191,8 +173,8 @@
     public final void mT74() throws RecognitionException {
         try {
             int _type = T74;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:11:7: ( '==' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:11:7: '=='
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:10:7: ( '==' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:10:7: '=='
             {
             match("=="); if (failed) return ;
 
@@ -210,8 +192,8 @@
     public final void mT75() throws RecognitionException {
         try {
             int _type = T75;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:12:7: ( '>' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:12:7: '>'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:11:7: ( '>' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:11:7: '>'
             {
             match('>'); if (failed) return ;
 
@@ -228,8 +210,8 @@
     public final void mT76() throws RecognitionException {
         try {
             int _type = T76;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:13:7: ( '>=' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:13:7: '>='
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:12:7: ( '>=' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:12:7: '>='
             {
             match(">="); if (failed) return ;
 
@@ -247,8 +229,8 @@
     public final void mT77() throws RecognitionException {
         try {
             int _type = T77;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:14:7: ( '<' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:14:7: '<'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:13:7: ( '<' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:13:7: '<'
             {
             match('<'); if (failed) return ;
 
@@ -265,8 +247,8 @@
     public final void mT78() throws RecognitionException {
         try {
             int _type = T78;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:15:7: ( '<=' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:15:7: '<='
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:14:7: ( '<=' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:14:7: '<='
             {
             match("<="); if (failed) return ;
 
@@ -284,8 +266,8 @@
     public final void mT79() throws RecognitionException {
         try {
             int _type = T79;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:16:7: ( '!=' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:16:7: '!='
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:15:7: ( '!=' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:15:7: '!='
             {
             match("!="); if (failed) return ;
 
@@ -303,73 +285,79 @@
     public final void mWS() throws RecognitionException {
         try {
             int _type = WS;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1761:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1761:17: ( ' ' | '\\t' | '\\f' | EOL )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1735:17: ( ( ' ' | '\\t' | '\\f' | EOL )+ )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1735:17: ( ' ' | '\\t' | '\\f' | EOL )+
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1761:17: ( ' ' | '\\t' | '\\f' | EOL )
-            int alt1=4;
-            switch ( input.LA(1) ) {
-            case ' ':
-                {
-                alt1=1;
-                }
-                break;
-            case '\t':
-                {
-                alt1=2;
-                }
-                break;
-            case '\f':
-                {
-                alt1=3;
-                }
-                break;
-            case '\n':
-            case '\r':
-                {
-                alt1=4;
-                }
-                break;
-            default:
-                if (backtracking>0) {failed=true; return ;}
-                NoViableAltException nvae =
-                    new NoViableAltException("1761:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
-
-                throw nvae;
-            }
-
-            switch (alt1) {
-                case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1761:19: ' '
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1735:17: ( ' ' | '\\t' | '\\f' | EOL )+
+            int cnt1=0;
+            loop1:
+            do {
+                int alt1=5;
+                switch ( input.LA(1) ) {
+                case ' ':
                     {
-                    match(' '); if (failed) return ;
-
+                    alt1=1;
                     }
                     break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1762:19: '\\t'
+                case '\t':
                     {
-                    match('\t'); if (failed) return ;
-
+                    alt1=2;
                     }
                     break;
-                case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1763:19: '\\f'
+                case '\f':
                     {
-                    match('\f'); if (failed) return ;
-
+                    alt1=3;
                     }
                     break;
-                case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1764:19: EOL
+                case '\n':
+                case '\r':
                     {
-                    mEOL(); if (failed) return ;
-
+                    alt1=4;
                     }
                     break;
 
-            }
+                }
 
+                switch (alt1) {
+            	case 1 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1735:19: ' '
+            	    {
+            	    match(' '); if (failed) return ;
+
+            	    }
+            	    break;
+            	case 2 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1736:19: '\\t'
+            	    {
+            	    match('\t'); if (failed) return ;
+
+            	    }
+            	    break;
+            	case 3 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1737:19: '\\f'
+            	    {
+            	    match('\f'); if (failed) return ;
+
+            	    }
+            	    break;
+            	case 4 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1738:19: EOL
+            	    {
+            	    mEOL(); if (failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    if ( cnt1 >= 1 ) break loop1;
+            	    if (backtracking>0) {failed=true; return ;}
+                        EarlyExitException eee =
+                            new EarlyExitException(1, input);
+                        throw eee;
+                }
+                cnt1++;
+            } while (true);
+
             if ( backtracking==0 ) {
                channel=HIDDEN; 
             }
@@ -386,10 +374,10 @@
     // $ANTLR start EOL
     public final void mEOL() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1771:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1771:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1745:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1745:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1771:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1745:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             int alt2=3;
             int LA2_0 = input.LA(1);
 
@@ -408,13 +396,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1771:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+                    new NoViableAltException("1745:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
 
                 throw nvae;
             }
             switch (alt2) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1771:14: ( '\\r\\n' )=> '\\r\\n'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1745:14: ( '\\r\\n' )=> '\\r\\n'
                     {
                     match("\r\n"); if (failed) return ;
 
@@ -422,14 +410,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1772:25: '\\r'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1746:25: '\\r'
                     {
                     match('\r'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1773:25: '\\n'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1747:25: '\\n'
                     {
                     match('\n'); if (failed) return ;
 
@@ -451,10 +439,10 @@
     public final void mINT() throws RecognitionException {
         try {
             int _type = INT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1778:4: ( ( '-' )? ( '0' .. '9' )+ )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1778:4: ( '-' )? ( '0' .. '9' )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1752:4: ( ( '-' )? ( '0' .. '9' )+ )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1752:4: ( '-' )? ( '0' .. '9' )+
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1778:4: ( '-' )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1752:4: ( '-' )?
             int alt3=2;
             int LA3_0 = input.LA(1);
 
@@ -463,7 +451,7 @@
             }
             switch (alt3) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1778:5: '-'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1752:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -472,7 +460,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1778:10: ( '0' .. '9' )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1752:10: ( '0' .. '9' )+
             int cnt4=0;
             loop4:
             do {
@@ -486,7 +474,7 @@
 
                 switch (alt4) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1778:11: '0' .. '9'
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1752:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -517,10 +505,10 @@
     public final void mFLOAT() throws RecognitionException {
         try {
             int _type = FLOAT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:4: ( '-' )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:4: ( '-' )?
             int alt5=2;
             int LA5_0 = input.LA(1);
 
@@ -529,7 +517,7 @@
             }
             switch (alt5) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:5: '-'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:5: '-'
                     {
                     match('-'); if (failed) return ;
 
@@ -538,7 +526,7 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:10: ( '0' .. '9' )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:10: ( '0' .. '9' )+
             int cnt6=0;
             loop6:
             do {
@@ -552,7 +540,7 @@
 
                 switch (alt6) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:11: '0' .. '9'
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:11: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -570,7 +558,7 @@
             } while (true);
 
             match('.'); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:26: ( '0' .. '9' )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:26: ( '0' .. '9' )+
             int cnt7=0;
             loop7:
             do {
@@ -584,7 +572,7 @@
 
                 switch (alt7) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1782:27: '0' .. '9'
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1756:27: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
@@ -615,7 +603,7 @@
     public final void mSTRING() throws RecognitionException {
         try {
             int _type = STRING;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:8: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:8: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
             int alt10=2;
             int LA10_0 = input.LA(1);
 
@@ -628,19 +616,19 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1785:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+                    new NoViableAltException("1759:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
 
                 throw nvae;
             }
             switch (alt10) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
                     {
                     match('\"'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
                     loop8:
                     do {
                         int alt8=3;
@@ -656,14 +644,14 @@
 
                         switch (alt8) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:15: EscapeSequence
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:15: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1786:32: ~ ( '\\\\' | '\"' )
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1760:32: ~ ( '\\\\' | '\"' )
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -693,13 +681,13 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1787:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1761:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1787:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1787:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1761:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1761:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
                     {
                     match('\''); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1787:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1761:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
                     loop9:
                     do {
                         int alt9=3;
@@ -715,14 +703,14 @@
 
                         switch (alt9) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1787:16: EscapeSequence
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1761:16: EscapeSequence
                     	    {
                     	    mEscapeSequence(); if (failed) return ;
 
                     	    }
                     	    break;
                     	case 2 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1787:33: ~ ( '\\\\' | '\\'' )
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1761:33: ~ ( '\\\\' | '\\'' )
                     	    {
                     	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
                     	        input.consume();
@@ -763,8 +751,8 @@
     // $ANTLR start HexDigit
     public final void mHexDigit() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1791:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1791:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1765:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1765: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();
@@ -789,7 +777,7 @@
     // $ANTLR start EscapeSequence
     public final void mEscapeSequence() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1795:9: ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' ) | UnicodeEscape | OctalEscape )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1769:9: ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' ) | UnicodeEscape | OctalEscape )
             int alt11=3;
             int LA11_0 = input.LA(1);
 
@@ -861,7 +849,7 @@
                 default:
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("1793:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+                        new NoViableAltException("1767:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
 
                     throw nvae;
                 }
@@ -870,13 +858,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1793:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+                    new NoViableAltException("1767:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
 
                 throw nvae;
             }
             switch (alt11) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1795:9: '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1769:9: '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' )
                     {
                     match('\\'); if (failed) return ;
                     if ( input.LA(1)=='\"'||input.LA(1)=='$'||(input.LA(1)>='&' && input.LA(1)<='+')||(input.LA(1)>='-' && input.LA(1)<='.')||input.LA(1)=='?'||(input.LA(1)>='A' && input.LA(1)<='B')||(input.LA(1)>='D' && input.LA(1)<='E')||input.LA(1)=='G'||input.LA(1)=='Q'||input.LA(1)=='S'||input.LA(1)=='W'||(input.LA(1)>='Z' && input.LA(1)<='^')||(input.LA(1)>='a' && input.LA(1)<='f')||(input.LA(1)>='n' && input.LA(1)<='p')||(input.LA(1)>='r' && input.LA(1)<='t')||(input.LA(1)>='w' && input.LA(1)<='x')||(input.LA(1)>='z' && input.LA(1)<='}') ) {
@@ -894,14 +882,14 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1799:9: UnicodeEscape
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1773:9: UnicodeEscape
                     {
                     mUnicodeEscape(); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1800:9: OctalEscape
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1774:9: OctalEscape
                     {
                     mOctalEscape(); if (failed) return ;
 
@@ -918,7 +906,7 @@
     // $ANTLR start OctalEscape
     public final void mOctalEscape() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
             int alt12=3;
             int LA12_0 = input.LA(1);
 
@@ -929,9 +917,9 @@
                     int LA12_2 = input.LA(3);
 
                     if ( ((LA12_2>='0' && LA12_2<='7')) ) {
-                        int LA12_4 = input.LA(4);
+                        int LA12_5 = input.LA(4);
 
-                        if ( ((LA12_4>='0' && LA12_4<='7')) ) {
+                        if ( ((LA12_5>='0' && LA12_5<='7')) ) {
                             alt12=1;
                         }
                         else {
@@ -952,7 +940,7 @@
                 else {
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("1803:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+                        new NoViableAltException("1777:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
 
                     throw nvae;
                 }
@@ -960,31 +948,31 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1803:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+                    new NoViableAltException("1777:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
 
                 throw nvae;
             }
             switch (alt12) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:14: ( '0' .. '3' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:15: '0' .. '3'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:14: ( '0' .. '3' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:15: '0' .. '3'
                     {
                     matchRange('0','3'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:25: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:26: '0' .. '7'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:25: ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:36: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1805:37: '0' .. '7'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:36: ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1779:37: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -994,18 +982,18 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1806:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1780:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1806:14: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1806:15: '0' .. '7'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1780:14: ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1780:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
                     }
 
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1806:25: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1806:26: '0' .. '7'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1780:25: ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1780:26: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -1015,11 +1003,11 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1807:9: '\\\\' ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1781:9: '\\\\' ( '0' .. '7' )
                     {
                     match('\\'); if (failed) return ;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1807:14: ( '0' .. '7' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1807:15: '0' .. '7'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1781:14: ( '0' .. '7' )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1781:15: '0' .. '7'
                     {
                     matchRange('0','7'); if (failed) return ;
 
@@ -1039,8 +1027,8 @@
     // $ANTLR start UnicodeEscape
     public final void mUnicodeEscape() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1812:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1812:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1786:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1786:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
             {
             match('\\'); if (failed) return ;
             match('u'); if (failed) return ;
@@ -1061,10 +1049,10 @@
     public final void mBOOL() throws RecognitionException {
         try {
             int _type = BOOL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1816:4: ( ( 'true' | 'false' ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1816:4: ( 'true' | 'false' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1790:4: ( ( 'true' | 'false' ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1790:4: ( 'true' | 'false' )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1816:4: ( 'true' | 'false' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1790:4: ( 'true' | 'false' )
             int alt13=2;
             int LA13_0 = input.LA(1);
 
@@ -1077,13 +1065,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1816:4: ( 'true' | 'false' )", 13, 0, input);
+                    new NoViableAltException("1790:4: ( 'true' | 'false' )", 13, 0, input);
 
                 throw nvae;
             }
             switch (alt13) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1816:5: 'true'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1790:5: 'true'
                     {
                     match("true"); if (failed) return ;
 
@@ -1091,7 +1079,7 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1816:12: 'false'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1790:12: 'false'
                     {
                     match("false"); if (failed) return ;
 
@@ -1115,8 +1103,8 @@
     public final void mPACKAGE() throws RecognitionException {
         try {
             int _type = PACKAGE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1819:11: ( 'package' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1819:11: 'package'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1793:11: ( 'package' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1793:11: 'package'
             {
             match("package"); if (failed) return ;
 
@@ -1134,8 +1122,8 @@
     public final void mIMPORT() throws RecognitionException {
         try {
             int _type = IMPORT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1821:10: ( 'import' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1821:10: 'import'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1795:10: ( 'import' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1795:10: 'import'
             {
             match("import"); if (failed) return ;
 
@@ -1153,8 +1141,8 @@
     public final void mFUNCTION() throws RecognitionException {
         try {
             int _type = FUNCTION;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1823:12: ( 'function' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1823:12: 'function'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1797:12: ( 'function' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1797:12: 'function'
             {
             match("function"); if (failed) return ;
 
@@ -1172,8 +1160,8 @@
     public final void mGLOBAL() throws RecognitionException {
         try {
             int _type = GLOBAL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1825:10: ( 'global' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1825:10: 'global'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1799:10: ( 'global' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1799:10: 'global'
             {
             match("global"); if (failed) return ;
 
@@ -1191,8 +1179,8 @@
     public final void mRULE() throws RecognitionException {
         try {
             int _type = RULE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1827:11: ( 'rule' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1827:11: 'rule'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1801:11: ( 'rule' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1801:11: 'rule'
             {
             match("rule"); if (failed) return ;
 
@@ -1210,8 +1198,8 @@
     public final void mQUERY() throws RecognitionException {
         try {
             int _type = QUERY;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1829:9: ( 'query' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1829:9: 'query'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1803:9: ( 'query' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1803:9: 'query'
             {
             match("query"); if (failed) return ;
 
@@ -1229,8 +1217,8 @@
     public final void mTEMPLATE() throws RecognitionException {
         try {
             int _type = TEMPLATE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1831:12: ( 'template' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1831:12: 'template'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1805:12: ( 'template' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1805:12: 'template'
             {
             match("template"); if (failed) return ;
 
@@ -1248,8 +1236,8 @@
     public final void mATTRIBUTES() throws RecognitionException {
         try {
             int _type = ATTRIBUTES;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1833:14: ( 'attributes' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1833:14: 'attributes'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1807:14: ( 'attributes' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1807:14: 'attributes'
             {
             match("attributes"); if (failed) return ;
 
@@ -1267,8 +1255,8 @@
     public final void mDATE_EFFECTIVE() throws RecognitionException {
         try {
             int _type = DATE_EFFECTIVE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1836:4: ( 'date-effective' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1836:4: 'date-effective'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1810:4: ( 'date-effective' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1810:4: 'date-effective'
             {
             match("date-effective"); if (failed) return ;
 
@@ -1286,8 +1274,8 @@
     public final void mDATE_EXPIRES() throws RecognitionException {
         try {
             int _type = DATE_EXPIRES;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1839:4: ( 'date-expires' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1839:4: 'date-expires'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1813:4: ( 'date-expires' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1813:4: 'date-expires'
             {
             match("date-expires"); if (failed) return ;
 
@@ -1305,8 +1293,8 @@
     public final void mENABLED() throws RecognitionException {
         try {
             int _type = ENABLED;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1841:11: ( 'enabled' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1841:11: 'enabled'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1815:11: ( 'enabled' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1815:11: 'enabled'
             {
             match("enabled"); if (failed) return ;
 
@@ -1324,8 +1312,8 @@
     public final void mSALIENCE() throws RecognitionException {
         try {
             int _type = SALIENCE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1844:4: ( 'salience' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1844:4: 'salience'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1818:4: ( 'salience' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1818:4: 'salience'
             {
             match("salience"); if (failed) return ;
 
@@ -1343,8 +1331,8 @@
     public final void mNO_LOOP() throws RecognitionException {
         try {
             int _type = NO_LOOP;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1846:11: ( 'no-loop' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1846:11: 'no-loop'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1820:11: ( 'no-loop' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1820:11: 'no-loop'
             {
             match("no-loop"); if (failed) return ;
 
@@ -1362,8 +1350,8 @@
     public final void mAUTO_FOCUS() throws RecognitionException {
         try {
             int _type = AUTO_FOCUS;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1849:4: ( 'auto-focus' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1849:4: 'auto-focus'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1823:4: ( 'auto-focus' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1823:4: 'auto-focus'
             {
             match("auto-focus"); if (failed) return ;
 
@@ -1381,8 +1369,8 @@
     public final void mACTIVATION_GROUP() throws RecognitionException {
         try {
             int _type = ACTIVATION_GROUP;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1852:4: ( 'activation-group' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1852:4: 'activation-group'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1826:4: ( 'activation-group' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1826:4: 'activation-group'
             {
             match("activation-group"); if (failed) return ;
 
@@ -1400,8 +1388,8 @@
     public final void mAGENDA_GROUP() throws RecognitionException {
         try {
             int _type = AGENDA_GROUP;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1855:4: ( 'agenda-group' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1855:4: 'agenda-group'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1829:4: ( 'agenda-group' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1829:4: 'agenda-group'
             {
             match("agenda-group"); if (failed) return ;
 
@@ -1419,8 +1407,8 @@
     public final void mDIALECT() throws RecognitionException {
         try {
             int _type = DIALECT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1858:4: ( 'dialect' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1858:4: 'dialect'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1832:4: ( 'dialect' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1832:4: 'dialect'
             {
             match("dialect"); if (failed) return ;
 
@@ -1438,8 +1426,8 @@
     public final void mRULEFLOW_GROUP() throws RecognitionException {
         try {
             int _type = RULEFLOW_GROUP;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1861:4: ( 'ruleflow-group' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1861:4: 'ruleflow-group'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1835:4: ( 'ruleflow-group' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1835:4: 'ruleflow-group'
             {
             match("ruleflow-group"); if (failed) return ;
 
@@ -1457,8 +1445,8 @@
     public final void mDURATION() throws RecognitionException {
         try {
             int _type = DURATION;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1864:4: ( 'duration' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1864:4: 'duration'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1838:4: ( 'duration' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1838:4: 'duration'
             {
             match("duration"); if (failed) return ;
 
@@ -1476,8 +1464,8 @@
     public final void mLOCK_ON_ACTIVE() throws RecognitionException {
         try {
             int _type = LOCK_ON_ACTIVE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1867:4: ( 'lock-on-active' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1867:4: 'lock-on-active'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1841:4: ( 'lock-on-active' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1841:4: 'lock-on-active'
             {
             match("lock-on-active"); if (failed) return ;
 
@@ -1495,8 +1483,8 @@
     public final void mFROM() throws RecognitionException {
         try {
             int _type = FROM;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1869:8: ( 'from' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1869:8: 'from'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1843:8: ( 'from' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1843:8: 'from'
             {
             match("from"); if (failed) return ;
 
@@ -1514,8 +1502,8 @@
     public final void mACCUMULATE() throws RecognitionException {
         try {
             int _type = ACCUMULATE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1872:4: ( 'accumulate' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1872:4: 'accumulate'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1846:4: ( 'accumulate' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1846:4: 'accumulate'
             {
             match("accumulate"); if (failed) return ;
 
@@ -1533,8 +1521,8 @@
     public final void mINIT() throws RecognitionException {
         try {
             int _type = INIT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1874:8: ( 'init' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1874:8: 'init'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1848:8: ( 'init' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1848:8: 'init'
             {
             match("init"); if (failed) return ;
 
@@ -1552,8 +1540,8 @@
     public final void mACTION() throws RecognitionException {
         try {
             int _type = ACTION;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1876:10: ( 'action' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1876:10: 'action'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1850:10: ( 'action' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1850:10: 'action'
             {
             match("action"); if (failed) return ;
 
@@ -1571,8 +1559,8 @@
     public final void mRESULT() throws RecognitionException {
         try {
             int _type = RESULT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1878:10: ( 'result' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1878:10: 'result'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1852:10: ( 'result' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1852:10: 'result'
             {
             match("result"); if (failed) return ;
 
@@ -1590,8 +1578,8 @@
     public final void mCOLLECT() throws RecognitionException {
         try {
             int _type = COLLECT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1880:11: ( 'collect' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1880:11: 'collect'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1854:11: ( 'collect' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1854:11: 'collect'
             {
             match("collect"); if (failed) return ;
 
@@ -1609,8 +1597,8 @@
     public final void mOR() throws RecognitionException {
         try {
             int _type = OR;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1882:6: ( 'or' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1882:6: 'or'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1856:6: ( 'or' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1856:6: 'or'
             {
             match("or"); if (failed) return ;
 
@@ -1628,8 +1616,8 @@
     public final void mAND() throws RecognitionException {
         try {
             int _type = AND;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1884:7: ( 'and' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1884:7: 'and'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1858:7: ( 'and' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1858:7: 'and'
             {
             match("and"); if (failed) return ;
 
@@ -1647,8 +1635,8 @@
     public final void mCONTAINS() throws RecognitionException {
         try {
             int _type = CONTAINS;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1887:4: ( 'contains' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1887:4: 'contains'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1861:4: ( 'contains' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1861:4: 'contains'
             {
             match("contains"); if (failed) return ;
 
@@ -1666,8 +1654,8 @@
     public final void mEXCLUDES() throws RecognitionException {
         try {
             int _type = EXCLUDES;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1890:4: ( 'excludes' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1890:4: 'excludes'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1864:4: ( 'excludes' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1864:4: 'excludes'
             {
             match("excludes"); if (failed) return ;
 
@@ -1685,8 +1673,8 @@
     public final void mMEMBEROF() throws RecognitionException {
         try {
             int _type = MEMBEROF;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1893:4: ( 'memberOf' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1893:4: 'memberOf'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1867:4: ( 'memberOf' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1867:4: 'memberOf'
             {
             match("memberOf"); if (failed) return ;
 
@@ -1704,8 +1692,8 @@
     public final void mMATCHES() throws RecognitionException {
         try {
             int _type = MATCHES;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1895:11: ( 'matches' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1895:11: 'matches'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1869:11: ( 'matches' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1869:11: 'matches'
             {
             match("matches"); if (failed) return ;
 
@@ -1723,8 +1711,8 @@
     public final void mIN() throws RecognitionException {
         try {
             int _type = IN;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1897:6: ( 'in' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1897:6: 'in'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1871:6: ( 'in' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1871:6: 'in'
             {
             match("in"); if (failed) return ;
 
@@ -1742,8 +1730,8 @@
     public final void mNULL() throws RecognitionException {
         try {
             int _type = NULL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1899:8: ( 'null' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1899:8: 'null'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1873:8: ( 'null' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1873:8: 'null'
             {
             match("null"); if (failed) return ;
 
@@ -1761,8 +1749,8 @@
     public final void mEXISTS() throws RecognitionException {
         try {
             int _type = EXISTS;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1901:10: ( 'exists' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1901:10: 'exists'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1875:10: ( 'exists' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1875:10: 'exists'
             {
             match("exists"); if (failed) return ;
 
@@ -1780,8 +1768,8 @@
     public final void mNOT() throws RecognitionException {
         try {
             int _type = NOT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1903:7: ( 'not' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1903:7: 'not'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1877:7: ( 'not' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1877:7: 'not'
             {
             match("not"); if (failed) return ;
 
@@ -1799,8 +1787,8 @@
     public final void mEVAL() throws RecognitionException {
         try {
             int _type = EVAL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1905:8: ( 'eval' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1905:8: 'eval'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1879:8: ( 'eval' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1879:8: 'eval'
             {
             match("eval"); if (failed) return ;
 
@@ -1818,8 +1806,8 @@
     public final void mFORALL() throws RecognitionException {
         try {
             int _type = FORALL;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1907:10: ( 'forall' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1907:10: 'forall'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1881:10: ( 'forall' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1881:10: 'forall'
             {
             match("forall"); if (failed) return ;
 
@@ -1837,8 +1825,8 @@
     public final void mWHEN() throws RecognitionException {
         try {
             int _type = WHEN;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1909:11: ( 'when' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1909:11: 'when'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1883:11: ( 'when' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1883:11: 'when'
             {
             match("when"); if (failed) return ;
 
@@ -1856,8 +1844,8 @@
     public final void mTHEN() throws RecognitionException {
         try {
             int _type = THEN;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1911:12: ( 'then' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1911:12: 'then'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1885:12: ( 'then' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1885:12: 'then'
             {
             match("then"); if (failed) return ;
 
@@ -1875,8 +1863,8 @@
     public final void mEND() throws RecognitionException {
         try {
             int _type = END;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1913:11: ( 'end' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1913:11: 'end'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1887:11: ( 'end' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1887:11: 'end'
             {
             match("end"); if (failed) return ;
 
@@ -1894,8 +1882,8 @@
     public final void mID() throws RecognitionException {
         try {
             int _type = ID;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1916:4: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' | '\\u00c0' .. '\\u00ff' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1916:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' | '\\u00c0' .. '\\u00ff' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1890:4: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' | '\\u00c0' .. '\\u00ff' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1890:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '$' | '\\u00c0' .. '\\u00ff' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' )*
             {
             if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) {
                 input.consume();
@@ -1908,7 +1896,7 @@
                 recover(mse);    throw mse;
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1916:50: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1890:50: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' )*
             loop14:
             do {
                 int alt14=2;
@@ -1921,7 +1909,7 @@
 
                 switch (alt14) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:
             	    {
             	    if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) {
             	        input.consume();
@@ -1957,8 +1945,8 @@
     public final void mLEFT_PAREN() throws RecognitionException {
         try {
             int _type = LEFT_PAREN;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1920:11: ( '(' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1920:11: '('
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1894:11: ( '(' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1894:11: '('
             {
             match('('); if (failed) return ;
 
@@ -1975,8 +1963,8 @@
     public final void mRIGHT_PAREN() throws RecognitionException {
         try {
             int _type = RIGHT_PAREN;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1924:11: ( ')' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1924:11: ')'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1898:11: ( ')' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1898:11: ')'
             {
             match(')'); if (failed) return ;
 
@@ -1993,8 +1981,8 @@
     public final void mLEFT_SQUARE() throws RecognitionException {
         try {
             int _type = LEFT_SQUARE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1928:11: ( '[' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1928:11: '['
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1902:11: ( '[' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1902:11: '['
             {
             match('['); if (failed) return ;
 
@@ -2011,8 +1999,8 @@
     public final void mRIGHT_SQUARE() throws RecognitionException {
         try {
             int _type = RIGHT_SQUARE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1932:11: ( ']' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1932:11: ']'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1906:11: ( ']' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1906:11: ']'
             {
             match(']'); if (failed) return ;
 
@@ -2029,8 +2017,8 @@
     public final void mLEFT_CURLY() throws RecognitionException {
         try {
             int _type = LEFT_CURLY;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1936:11: ( '{' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1936:11: '{'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1910:11: ( '{' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1910:11: '{'
             {
             match('{'); if (failed) return ;
 
@@ -2047,8 +2035,8 @@
     public final void mRIGHT_CURLY() throws RecognitionException {
         try {
             int _type = RIGHT_CURLY;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1940:11: ( '}' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1940:11: '}'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1914:11: ( '}' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1914:11: '}'
             {
             match('}'); if (failed) return ;
 
@@ -2065,8 +2053,8 @@
     public final void mCOMMA() throws RecognitionException {
         try {
             int _type = COMMA;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1943:9: ( ',' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1943:9: ','
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1917:9: ( ',' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1917:9: ','
             {
             match(','); if (failed) return ;
 
@@ -2079,12 +2067,30 @@
     }
     // $ANTLR end COMMA
 
+    // $ANTLR start DOT
+    public final void mDOT() throws RecognitionException {
+        try {
+            int _type = DOT;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1920:7: ( '.' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1920:7: '.'
+            {
+            match('.'); if (failed) return ;
+
+            }
+
+            this.type = _type;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end DOT
+
     // $ANTLR start DOUBLE_AMPER
     public final void mDOUBLE_AMPER() throws RecognitionException {
         try {
             int _type = DOUBLE_AMPER;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1947:4: ( '&&' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1947:4: '&&'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1924:4: ( '&&' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1924:4: '&&'
             {
             match("&&"); if (failed) return ;
 
@@ -2102,8 +2108,8 @@
     public final void mDOUBLE_PIPE() throws RecognitionException {
         try {
             int _type = DOUBLE_PIPE;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1951:4: ( '||' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1951:4: '||'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1928:4: ( '||' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1928:4: '||'
             {
             match("||"); if (failed) return ;
 
@@ -2121,11 +2127,11 @@
     public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = SH_STYLE_SINGLE_LINE_COMMENT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1955:4: ( '#' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1955:4: '#' ( options {greedy=false; } : . )* EOL
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1932:4: ( '#' ( options {greedy=false; } : . )* EOL )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1932:4: '#' ( options {greedy=false; } : . )* EOL
             {
             match('#'); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1955:8: ( options {greedy=false; } : . )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1932:8: ( options {greedy=false; } : . )*
             loop15:
             do {
                 int alt15=2;
@@ -2144,7 +2150,7 @@
 
                 switch (alt15) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1955:35: .
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1932:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -2174,12 +2180,12 @@
     public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = C_STYLE_SINGLE_LINE_COMMENT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1961:4: ( '//' ( options {greedy=false; } : . )* EOL )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1961:4: '//' ( options {greedy=false; } : . )* EOL
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1938:4: ( '//' ( options {greedy=false; } : . )* EOL )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1938:4: '//' ( options {greedy=false; } : . )* EOL
             {
             match("//"); if (failed) return ;
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1961:9: ( options {greedy=false; } : . )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1938:9: ( options {greedy=false; } : . )*
             loop16:
             do {
                 int alt16=2;
@@ -2198,7 +2204,7 @@
 
                 switch (alt16) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1961:36: .
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1938:36: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -2228,12 +2234,12 @@
     public final void mMULTI_LINE_COMMENT() throws RecognitionException {
         try {
             int _type = MULTI_LINE_COMMENT;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1966:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1966:4: '/*' ( options {greedy=false; } : . )* '*/'
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1943:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1943:4: '/*' ( options {greedy=false; } : . )* '*/'
             {
             match("/*"); if (failed) return ;
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1966:9: ( options {greedy=false; } : . )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1943:9: ( options {greedy=false; } : . )*
             loop17:
             do {
                 int alt17=2;
@@ -2258,7 +2264,7 @@
 
                 switch (alt17) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1966:35: .
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1943:35: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -2289,8 +2295,8 @@
     public final void mMISC() throws RecognitionException {
         try {
             int _type = MISC;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1971:3: ( '!' | '@' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '?' | '=' | '/' | '\\'' | '\\\\' | '|' | '&' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1948:3: ( '!' | '@' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '?' | '=' | '/' | '\\'' | '\\\\' | '|' | '&' )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:
             {
             if ( input.LA(1)=='!'||(input.LA(1)>='$' && input.LA(1)<='\'')||(input.LA(1)>='*' && input.LA(1)<='+')||input.LA(1)=='-'||input.LA(1)=='/'||input.LA(1)=='='||(input.LA(1)>='?' && input.LA(1)<='@')||input.LA(1)=='\\'||(input.LA(1)>='^' && input.LA(1)<='_')||input.LA(1)=='|' ) {
                 input.consume();
@@ -2314,502 +2320,502 @@
     // $ANTLR end MISC
 
     public void mTokens() throws RecognitionException {
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:10: ( T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | WS | INT | FLOAT | STRING | BOOL | PACKAGE | IMPORT | FUNCTION | GLOBAL | RULE | QUERY | TEMPLATE | ATTRIBUTES | DATE_EFFECTIVE | DATE_EXPIRES | ENABLED | SALIENCE | NO_LOOP | AUTO_FOCUS | ACTIVATION_GROUP | AGENDA_GROUP | DIALECT | RULEFLOW_GROUP | DURATION | LOCK_ON_ACTIVE | FROM | ACCUMULATE | INIT | ACTION | RESULT | COLLECT | OR | AND | CONTAINS | EXCLUDES | MEMBEROF | MATCHES | IN | NULL | EXISTS | NOT | EVAL | FORALL | WHEN | THEN | END | ID | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | COMMA | DOUBLE_AMPER | DOUBLE_PIPE | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT | MISC )
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:10: ( T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | WS | INT | FLOAT | STRING | BOOL | PACKAGE | IMPORT | FUNCTION | GLOBAL | RULE | QUERY | TEMPLATE | ATTRIBUTES | DATE_EFFECTIVE | DATE_EXPIRES | ENABLED | SALIENCE | NO_LOOP | AUTO_FOCUS | ACTIVATION_GROUP | AGENDA_GROUP | DIALECT | RULEFLOW_GROUP | DURATION | LOCK_ON_ACTIVE | FROM | ACCUMULATE | INIT | ACTION | RESULT | COLLECT | OR | AND | CONTAINS | EXCLUDES | MEMBEROF | MATCHES | IN | NULL | EXISTS | NOT | EVAL | FORALL | WHEN | THEN | END | ID | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | COMMA | DOT | DOUBLE_AMPER | DOUBLE_PIPE | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT | MISC )
         int alt18=71;
         alt18 = dfa18.predict(input);
         switch (alt18) {
             case 1 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:10: T69
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:10: T70
                 {
-                mT69(); if (failed) return ;
+                mT70(); if (failed) return ;
 
                 }
                 break;
             case 2 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:14: T70
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:14: T71
                 {
-                mT70(); if (failed) return ;
+                mT71(); if (failed) return ;
 
                 }
                 break;
             case 3 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:18: T71
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:18: T72
                 {
-                mT71(); if (failed) return ;
+                mT72(); if (failed) return ;
 
                 }
                 break;
             case 4 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:22: T72
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:22: T73
                 {
-                mT72(); if (failed) return ;
+                mT73(); if (failed) return ;
 
                 }
                 break;
             case 5 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:26: T73
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:26: T74
                 {
-                mT73(); if (failed) return ;
+                mT74(); if (failed) return ;
 
                 }
                 break;
             case 6 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:30: T74
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:30: T75
                 {
-                mT74(); if (failed) return ;
+                mT75(); if (failed) return ;
 
                 }
                 break;
             case 7 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:34: T75
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:34: T76
                 {
-                mT75(); if (failed) return ;
+                mT76(); if (failed) return ;
 
                 }
                 break;
             case 8 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:38: T76
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:38: T77
                 {
-                mT76(); if (failed) return ;
+                mT77(); if (failed) return ;
 
                 }
                 break;
             case 9 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:42: T77
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:42: T78
                 {
-                mT77(); if (failed) return ;
+                mT78(); if (failed) return ;
 
                 }
                 break;
             case 10 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:46: T78
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:46: T79
                 {
-                mT78(); if (failed) return ;
+                mT79(); if (failed) return ;
 
                 }
                 break;
             case 11 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:50: T79
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:50: WS
                 {
-                mT79(); if (failed) return ;
+                mWS(); if (failed) return ;
 
                 }
                 break;
             case 12 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:54: WS
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:53: INT
                 {
-                mWS(); if (failed) return ;
+                mINT(); if (failed) return ;
 
                 }
                 break;
             case 13 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:57: INT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:57: FLOAT
                 {
-                mINT(); if (failed) return ;
+                mFLOAT(); if (failed) return ;
 
                 }
                 break;
             case 14 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:61: FLOAT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:63: STRING
                 {
-                mFLOAT(); if (failed) return ;
+                mSTRING(); if (failed) return ;
 
                 }
                 break;
             case 15 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:67: STRING
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:70: BOOL
                 {
-                mSTRING(); if (failed) return ;
+                mBOOL(); if (failed) return ;
 
                 }
                 break;
             case 16 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:74: BOOL
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:75: PACKAGE
                 {
-                mBOOL(); if (failed) return ;
+                mPACKAGE(); if (failed) return ;
 
                 }
                 break;
             case 17 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:79: PACKAGE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:83: IMPORT
                 {
-                mPACKAGE(); if (failed) return ;
+                mIMPORT(); if (failed) return ;
 
                 }
                 break;
             case 18 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:87: IMPORT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:90: FUNCTION
                 {
-                mIMPORT(); if (failed) return ;
+                mFUNCTION(); if (failed) return ;
 
                 }
                 break;
             case 19 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:94: FUNCTION
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:99: GLOBAL
                 {
-                mFUNCTION(); if (failed) return ;
+                mGLOBAL(); if (failed) return ;
 
                 }
                 break;
             case 20 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:103: GLOBAL
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:106: RULE
                 {
-                mGLOBAL(); if (failed) return ;
+                mRULE(); if (failed) return ;
 
                 }
                 break;
             case 21 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:110: RULE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:111: QUERY
                 {
-                mRULE(); if (failed) return ;
+                mQUERY(); if (failed) return ;
 
                 }
                 break;
             case 22 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:115: QUERY
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:117: TEMPLATE
                 {
-                mQUERY(); if (failed) return ;
+                mTEMPLATE(); if (failed) return ;
 
                 }
                 break;
             case 23 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:121: TEMPLATE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:126: ATTRIBUTES
                 {
-                mTEMPLATE(); if (failed) return ;
+                mATTRIBUTES(); if (failed) return ;
 
                 }
                 break;
             case 24 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:130: ATTRIBUTES
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:137: DATE_EFFECTIVE
                 {
-                mATTRIBUTES(); if (failed) return ;
+                mDATE_EFFECTIVE(); if (failed) return ;
 
                 }
                 break;
             case 25 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:141: DATE_EFFECTIVE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:152: DATE_EXPIRES
                 {
-                mDATE_EFFECTIVE(); if (failed) return ;
+                mDATE_EXPIRES(); if (failed) return ;
 
                 }
                 break;
             case 26 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:156: DATE_EXPIRES
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:165: ENABLED
                 {
-                mDATE_EXPIRES(); if (failed) return ;
+                mENABLED(); if (failed) return ;
 
                 }
                 break;
             case 27 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:169: ENABLED
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:173: SALIENCE
                 {
-                mENABLED(); if (failed) return ;
+                mSALIENCE(); if (failed) return ;
 
                 }
                 break;
             case 28 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:177: SALIENCE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:182: NO_LOOP
                 {
-                mSALIENCE(); if (failed) return ;
+                mNO_LOOP(); if (failed) return ;
 
                 }
                 break;
             case 29 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:186: NO_LOOP
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:190: AUTO_FOCUS
                 {
-                mNO_LOOP(); if (failed) return ;
+                mAUTO_FOCUS(); if (failed) return ;
 
                 }
                 break;
             case 30 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:194: AUTO_FOCUS
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:201: ACTIVATION_GROUP
                 {
-                mAUTO_FOCUS(); if (failed) return ;
+                mACTIVATION_GROUP(); if (failed) return ;
 
                 }
                 break;
             case 31 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:205: ACTIVATION_GROUP
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:218: AGENDA_GROUP
                 {
-                mACTIVATION_GROUP(); if (failed) return ;
+                mAGENDA_GROUP(); if (failed) return ;
 
                 }
                 break;
             case 32 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:222: AGENDA_GROUP
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:231: DIALECT
                 {
-                mAGENDA_GROUP(); if (failed) return ;
+                mDIALECT(); if (failed) return ;
 
                 }
                 break;
             case 33 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:235: DIALECT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:239: RULEFLOW_GROUP
                 {
-                mDIALECT(); if (failed) return ;
+                mRULEFLOW_GROUP(); if (failed) return ;
 
                 }
                 break;
             case 34 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:243: RULEFLOW_GROUP
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:254: DURATION
                 {
-                mRULEFLOW_GROUP(); if (failed) return ;
+                mDURATION(); if (failed) return ;
 
                 }
                 break;
             case 35 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:258: DURATION
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:263: LOCK_ON_ACTIVE
                 {
-                mDURATION(); if (failed) return ;
+                mLOCK_ON_ACTIVE(); if (failed) return ;
 
                 }
                 break;
             case 36 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:267: LOCK_ON_ACTIVE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:278: FROM
                 {
-                mLOCK_ON_ACTIVE(); if (failed) return ;
+                mFROM(); if (failed) return ;
 
                 }
                 break;
             case 37 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:282: FROM
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:283: ACCUMULATE
                 {
-                mFROM(); if (failed) return ;
+                mACCUMULATE(); if (failed) return ;
 
                 }
                 break;
             case 38 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:287: ACCUMULATE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:294: INIT
                 {
-                mACCUMULATE(); if (failed) return ;
+                mINIT(); if (failed) return ;
 
                 }
                 break;
             case 39 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:298: INIT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:299: ACTION
                 {
-                mINIT(); if (failed) return ;
+                mACTION(); if (failed) return ;
 
                 }
                 break;
             case 40 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:303: ACTION
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:306: RESULT
                 {
-                mACTION(); if (failed) return ;
+                mRESULT(); if (failed) return ;
 
                 }
                 break;
             case 41 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:310: RESULT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:313: COLLECT
                 {
-                mRESULT(); if (failed) return ;
+                mCOLLECT(); if (failed) return ;
 
                 }
                 break;
             case 42 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:317: COLLECT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:321: OR
                 {
-                mCOLLECT(); if (failed) return ;
+                mOR(); if (failed) return ;
 
                 }
                 break;
             case 43 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:325: OR
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:324: AND
                 {
-                mOR(); if (failed) return ;
+                mAND(); if (failed) return ;
 
                 }
                 break;
             case 44 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:328: AND
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:328: CONTAINS
                 {
-                mAND(); if (failed) return ;
+                mCONTAINS(); if (failed) return ;
 
                 }
                 break;
             case 45 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:332: CONTAINS
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:337: EXCLUDES
                 {
-                mCONTAINS(); if (failed) return ;
+                mEXCLUDES(); if (failed) return ;
 
                 }
                 break;
             case 46 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:341: EXCLUDES
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:346: MEMBEROF
                 {
-                mEXCLUDES(); if (failed) return ;
+                mMEMBEROF(); if (failed) return ;
 
                 }
                 break;
             case 47 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:350: MEMBEROF
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:355: MATCHES
                 {
-                mMEMBEROF(); if (failed) return ;
+                mMATCHES(); if (failed) return ;
 
                 }
                 break;
             case 48 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:359: MATCHES
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:363: IN
                 {
-                mMATCHES(); if (failed) return ;
+                mIN(); if (failed) return ;
 
                 }
                 break;
             case 49 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:367: IN
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:366: NULL
                 {
-                mIN(); if (failed) return ;
+                mNULL(); if (failed) return ;
 
                 }
                 break;
             case 50 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:370: NULL
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:371: EXISTS
                 {
-                mNULL(); if (failed) return ;
+                mEXISTS(); if (failed) return ;
 
                 }
                 break;
             case 51 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:375: EXISTS
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:378: NOT
                 {
-                mEXISTS(); if (failed) return ;
+                mNOT(); if (failed) return ;
 
                 }
                 break;
             case 52 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:382: NOT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:382: EVAL
                 {
-                mNOT(); if (failed) return ;
+                mEVAL(); if (failed) return ;
 
                 }
                 break;
             case 53 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:386: EVAL
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:387: FORALL
                 {
-                mEVAL(); if (failed) return ;
+                mFORALL(); if (failed) return ;
 
                 }
                 break;
             case 54 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:391: FORALL
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:394: WHEN
                 {
-                mFORALL(); if (failed) return ;
+                mWHEN(); if (failed) return ;
 
                 }
                 break;
             case 55 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:398: WHEN
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:399: THEN
                 {
-                mWHEN(); if (failed) return ;
+                mTHEN(); if (failed) return ;
 
                 }
                 break;
             case 56 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:403: THEN
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:404: END
                 {
-                mTHEN(); if (failed) return ;
+                mEND(); if (failed) return ;
 
                 }
                 break;
             case 57 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:408: END
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:408: ID
                 {
-                mEND(); if (failed) return ;
+                mID(); if (failed) return ;
 
                 }
                 break;
             case 58 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:412: ID
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:411: LEFT_PAREN
                 {
-                mID(); if (failed) return ;
+                mLEFT_PAREN(); if (failed) return ;
 
                 }
                 break;
             case 59 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:415: LEFT_PAREN
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:422: RIGHT_PAREN
                 {
-                mLEFT_PAREN(); if (failed) return ;
+                mRIGHT_PAREN(); if (failed) return ;
 
                 }
                 break;
             case 60 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:426: RIGHT_PAREN
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:434: LEFT_SQUARE
                 {
-                mRIGHT_PAREN(); if (failed) return ;
+                mLEFT_SQUARE(); if (failed) return ;
 
                 }
                 break;
             case 61 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:438: LEFT_SQUARE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:446: RIGHT_SQUARE
                 {
-                mLEFT_SQUARE(); if (failed) return ;
+                mRIGHT_SQUARE(); if (failed) return ;
 
                 }
                 break;
             case 62 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:450: RIGHT_SQUARE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:459: LEFT_CURLY
                 {
-                mRIGHT_SQUARE(); if (failed) return ;
+                mLEFT_CURLY(); if (failed) return ;
 
                 }
                 break;
             case 63 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:463: LEFT_CURLY
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:470: RIGHT_CURLY
                 {
-                mLEFT_CURLY(); if (failed) return ;
+                mRIGHT_CURLY(); if (failed) return ;
 
                 }
                 break;
             case 64 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:474: RIGHT_CURLY
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:482: COMMA
                 {
-                mRIGHT_CURLY(); if (failed) return ;
+                mCOMMA(); if (failed) return ;
 
                 }
                 break;
             case 65 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:486: COMMA
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:488: DOT
                 {
-                mCOMMA(); if (failed) return ;
+                mDOT(); if (failed) return ;
 
                 }
                 break;
             case 66 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:492: DOUBLE_AMPER
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:492: DOUBLE_AMPER
                 {
                 mDOUBLE_AMPER(); if (failed) return ;
 
                 }
                 break;
             case 67 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:505: DOUBLE_PIPE
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:505: DOUBLE_PIPE
                 {
                 mDOUBLE_PIPE(); if (failed) return ;
 
                 }
                 break;
             case 68 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:517: SH_STYLE_SINGLE_LINE_COMMENT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:517: SH_STYLE_SINGLE_LINE_COMMENT
                 {
                 mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
 
                 }
                 break;
             case 69 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:546: C_STYLE_SINGLE_LINE_COMMENT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:546: C_STYLE_SINGLE_LINE_COMMENT
                 {
                 mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
 
                 }
                 break;
             case 70 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:574: MULTI_LINE_COMMENT
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:574: MULTI_LINE_COMMENT
                 {
                 mMULTI_LINE_COMMENT(); if (failed) return ;
 
                 }
                 break;
             case 71 :
-                // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:593: MISC
+                // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:593: MISC
                 {
                 mMISC(); if (failed) return ;
 
@@ -2822,8 +2828,8 @@
 
     // $ANTLR start synpred1
     public final void synpred1_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1771:14: ( '\\r\\n' )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1771:16: '\\r\\n'
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1745:14: ( '\\r\\n' )
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1745:16: '\\r\\n'
         {
         match("\r\n"); if (failed) return ;
 
@@ -2852,78 +2858,80 @@
     static final String DFA18_eotS =
         "\3\uffff\1\55\2\53\1\61\1\63\1\53\1\uffff\1\65\1\uffff\1\53\21\52"+
         "\10\uffff\2\53\1\uffff\1\53\15\uffff\10\52\1\146\25\52\1\u0081\3"+
-        "\52\4\uffff\11\52\1\uffff\5\52\1\u0093\12\52\1\u009e\4\52\1\u00a3"+
-        "\1\uffff\3\52\1\uffff\3\52\1\u00aa\1\u00ab\4\52\1\u00b0\1\52\1\u00b2"+
-        "\3\52\1\u00b7\1\52\1\uffff\12\52\1\uffff\1\52\1\u00c5\1\52\1\u00c7"+
-        "\1\uffff\5\52\1\u00cd\2\uffff\3\52\1\u00ab\1\uffff\1\52\1\uffff"+
-        "\4\52\1\uffff\1\u00d6\3\52\1\uffff\2\52\1\uffff\5\52\1\uffff\1\52"+
-        "\2\uffff\4\52\1\uffff\2\52\1\u00e9\1\52\1\u00eb\1\u00ec\1\u00ed"+
-        "\1\52\1\uffff\1\52\1\u00f0\3\52\1\uffff\3\52\1\u00f9\10\52\1\uffff"+
-        "\1\u0102\3\uffff\2\52\1\uffff\2\52\3\uffff\1\52\1\u0108\1\52\1\uffff"+
-        "\1\u010a\1\52\1\u010c\2\52\1\u010f\1\u0110\1\u0111\1\uffff\4\52"+
-        "\1\u0116\1\uffff\1\u0117\1\uffff\1\u0118\1\uffff\1\u0119\1\u011a"+
-        "\4\uffff\3\52\5\uffff\1\52\1\u011f\1\u0120\3\uffff";
+        "\52\4\uffff\11\52\1\uffff\7\52\1\u0095\7\52\1\u009d\4\52\1\u00a2"+
+        "\1\uffff\4\52\1\uffff\4\52\1\u00ab\1\u00ac\3\52\1\u00b0\1\52\1\u00b2"+
+        "\2\52\1\u00b6\4\52\1\uffff\7\52\1\uffff\2\52\1\u00c5\1\52\1\uffff"+
+        "\1\u00c7\5\52\1\u00cd\1\52\2\uffff\2\52\1\u00ac\1\uffff\1\52\1\uffff"+
+        "\3\52\1\uffff\1\52\1\u00d6\4\52\1\uffff\2\52\1\uffff\4\52\1\uffff"+
+        "\1\52\2\uffff\4\52\1\uffff\1\52\1\u00e8\2\52\1\u00eb\1\u00ec\1\52"+
+        "\1\u00ee\1\uffff\1\u00ef\5\52\1\uffff\3\52\1\u00fa\6\52\1\uffff"+
+        "\1\52\1\u0102\2\uffff\1\52\2\uffff\3\52\1\uffff\1\u0107\2\uffff"+
+        "\1\52\1\u0109\1\52\1\uffff\2\52\1\u010d\1\u010e\1\52\1\u0110\1\u0111"+
+        "\1\uffff\4\52\1\uffff\1\u0116\1\uffff\1\u0117\1\u0118\1\u0119\2"+
+        "\uffff\1\u011a\3\uffff\3\52\5\uffff\1\52\1\u011f\1\u0120\3\uffff";
     static final String DFA18_eofS =
         "\u0121\uffff";
     static final String DFA18_minS =
         "\1\11\2\uffff\1\52\1\60\4\75\1\uffff\1\56\1\uffff\1\0\1\145\2\141"+
         "\1\155\1\154\1\145\1\165\1\143\1\141\1\156\1\141\3\157\1\162\1\141"+
-        "\1\150\10\uffff\1\46\1\174\1\uffff\1\52\15\uffff\1\145\1\165\1\155"+
-        "\1\156\1\162\1\154\1\157\1\143\1\60\1\160\1\157\1\163\1\154\1\145"+
-        "\1\144\1\143\2\164\1\145\1\164\1\162\1\141\1\143\2\141\2\154\1\55"+
-        "\1\143\1\154\1\60\1\155\1\164\1\145\4\uffff\1\156\1\145\1\160\1"+
-        "\143\1\141\1\163\1\155\1\153\1\164\1\uffff\1\157\1\142\1\165\1\145"+
-        "\1\162\1\60\1\151\1\165\1\157\1\162\1\156\1\145\1\141\2\154\1\163"+
-        "\1\60\1\142\1\154\1\151\1\154\1\60\1\uffff\1\153\1\154\1\164\1\uffff"+
-        "\1\142\1\143\1\156\2\60\1\154\1\164\1\154\1\145\1\60\1\141\1\60"+
-        "\1\162\1\141\1\154\1\60\1\171\1\uffff\1\157\1\155\1\55\1\151\1\144"+
-        "\1\55\1\164\1\145\1\165\1\164\1\uffff\1\154\1\60\1\145\1\60\1\uffff"+
-        "\1\55\1\145\1\141\1\145\1\150\1\60\2\uffff\1\141\1\151\1\154\1\60"+
-        "\1\uffff\1\147\1\uffff\1\164\1\154\1\164\1\154\1\uffff\1\60\1\141"+
-        "\1\156\1\165\1\uffff\1\142\1\141\1\145\1\151\1\143\1\144\1\163\1"+
-        "\145\1\uffff\1\156\2\uffff\1\143\1\151\1\162\1\145\1\uffff\1\164"+
-        "\1\157\1\60\1\145\3\60\1\157\1\uffff\1\164\1\60\1\154\1\165\1\55"+
-        "\1\146\1\157\1\164\1\145\1\60\1\144\1\143\1\164\1\156\1\117\1\163"+
-        "\1\145\1\156\1\uffff\1\60\3\uffff\1\167\1\151\1\uffff\1\141\1\164"+
-        "\3\uffff\1\156\1\60\1\163\1\uffff\1\60\1\145\1\60\1\163\1\146\3"+
-        "\60\1\uffff\1\55\1\157\1\164\1\145\1\60\1\uffff\1\60\1\uffff\1\60"+
-        "\1\uffff\2\60\4\uffff\1\156\1\145\1\163\5\uffff\1\55\2\60\3\uffff";
+        "\1\150\10\uffff\1\46\1\174\1\uffff\1\52\15\uffff\1\155\1\145\1\165"+
+        "\1\162\1\156\1\154\1\157\1\143\1\60\1\160\1\157\1\154\1\163\1\145"+
+        "\1\143\1\144\2\164\1\145\1\141\1\164\1\162\1\141\1\143\1\141\1\154"+
+        "\1\55\1\154\1\143\1\154\1\60\1\164\1\155\1\145\4\uffff\1\160\1\156"+
+        "\1\145\1\141\1\143\1\163\1\155\1\153\1\164\1\uffff\1\157\1\142\1"+
+        "\145\1\165\1\162\1\151\1\165\1\60\1\162\1\157\1\156\1\154\1\145"+
+        "\1\141\1\142\1\60\1\154\1\163\1\154\1\151\1\60\1\uffff\1\154\1\153"+
+        "\1\164\1\154\1\uffff\1\143\1\142\1\156\1\154\2\60\1\154\1\164\1"+
+        "\145\1\60\1\141\1\60\1\162\1\141\1\60\1\154\1\171\1\157\1\155\1"+
+        "\uffff\1\151\1\55\1\144\1\145\1\55\1\164\1\154\1\uffff\1\165\1\164"+
+        "\1\60\1\145\1\uffff\1\60\1\55\1\141\1\145\1\150\1\145\1\60\1\141"+
+        "\2\uffff\1\154\1\151\1\60\1\uffff\1\147\1\uffff\1\164\2\154\1\uffff"+
+        "\1\164\1\60\1\156\1\141\1\165\1\142\1\uffff\1\141\1\143\1\145\1"+
+        "\151\1\145\1\144\1\163\1\uffff\1\156\2\uffff\1\151\1\143\1\145\1"+
+        "\162\1\uffff\1\164\1\60\1\157\1\145\2\60\1\157\1\60\1\uffff\1\60"+
+        "\1\164\1\154\1\165\1\55\1\164\1\146\1\157\1\144\1\145\1\60\1\143"+
+        "\1\156\1\164\1\163\1\117\1\145\1\uffff\1\156\1\60\2\uffff\1\167"+
+        "\2\uffff\1\151\1\141\1\164\1\uffff\1\60\2\uffff\1\156\1\60\1\163"+
+        "\1\uffff\1\145\1\163\2\60\1\146\2\60\1\uffff\1\55\1\157\1\164\1"+
+        "\145\1\uffff\1\60\1\uffff\3\60\2\uffff\1\60\3\uffff\1\156\1\145"+
+        "\1\163\5\uffff\1\55\2\60\3\uffff";
     static final String DFA18_maxS =
         "\1\u00ff\2\uffff\1\52\1\76\4\75\1\uffff\1\71\1\uffff\1\ufffe\1\162"+
         "\1\165\1\141\1\156\1\154\4\165\1\170\1\141\1\165\2\157\1\162\1\145"+
-        "\1\150\10\uffff\1\46\1\174\1\uffff\1\57\15\uffff\1\145\1\165\1\155"+
-        "\1\156\1\162\1\154\1\157\1\143\1\u00ff\1\160\1\157\1\163\1\154\1"+
-        "\145\1\144\3\164\1\145\1\164\1\162\1\141\1\151\1\144\1\141\2\154"+
-        "\1\164\1\143\1\156\1\u00ff\1\155\1\164\1\145\4\uffff\1\156\1\145"+
-        "\1\160\1\143\1\141\1\163\1\155\1\153\1\164\1\uffff\1\157\1\142\1"+
-        "\165\1\145\1\162\1\u00ff\1\151\1\165\1\157\1\162\1\156\1\145\1\141"+
-        "\2\154\1\163\1\u00ff\1\142\1\154\1\151\1\154\1\u00ff\1\uffff\1\153"+
-        "\1\154\1\164\1\uffff\1\142\1\143\1\156\2\u00ff\1\154\1\164\1\154"+
-        "\1\145\1\u00ff\1\141\1\u00ff\1\162\1\141\1\154\1\u00ff\1\171\1\uffff"+
-        "\1\166\1\155\1\55\1\151\1\144\1\55\1\164\1\145\1\165\1\164\1\uffff"+
-        "\1\154\1\u00ff\1\145\1\u00ff\1\uffff\1\55\1\145\1\141\1\145\1\150"+
-        "\1\u00ff\2\uffff\1\141\1\151\1\154\1\u00ff\1\uffff\1\147\1\uffff"+
-        "\1\164\1\154\1\164\1\154\1\uffff\1\u00ff\1\141\1\156\1\165\1\uffff"+
-        "\1\142\1\141\1\145\1\151\1\143\1\144\1\163\1\145\1\uffff\1\156\2"+
-        "\uffff\1\143\1\151\1\162\1\145\1\uffff\1\164\1\157\1\u00ff\1\145"+
-        "\3\u00ff\1\157\1\uffff\1\164\1\u00ff\1\154\1\165\1\55\1\170\1\157"+
-        "\1\164\1\145\1\u00ff\1\144\1\143\1\164\1\156\1\117\1\163\1\145\1"+
-        "\156\1\uffff\1\u00ff\3\uffff\1\167\1\151\1\uffff\1\141\1\164\3\uffff"+
-        "\1\156\1\u00ff\1\163\1\uffff\1\u00ff\1\145\1\u00ff\1\163\1\146\3"+
-        "\u00ff\1\uffff\1\55\1\157\1\164\1\145\1\u00ff\1\uffff\1\u00ff\1"+
-        "\uffff\1\u00ff\1\uffff\2\u00ff\4\uffff\1\156\1\145\1\163\5\uffff"+
-        "\1\55\2\u00ff\3\uffff";
+        "\1\150\10\uffff\1\46\1\174\1\uffff\1\57\15\uffff\1\155\1\145\1\165"+
+        "\1\162\1\156\1\154\1\157\1\143\1\u00ff\1\160\1\157\1\154\1\163\1"+
+        "\145\1\164\1\144\2\164\1\145\1\141\1\164\1\162\1\144\1\151\1\141"+
+        "\1\154\1\164\1\154\1\143\1\156\1\u00ff\1\164\1\155\1\145\4\uffff"+
+        "\1\160\1\156\1\145\1\141\1\143\1\163\1\155\1\153\1\164\1\uffff\1"+
+        "\157\1\142\1\145\1\165\1\162\1\151\1\165\1\u00ff\1\162\1\157\1\156"+
+        "\1\154\1\145\1\141\1\142\1\u00ff\1\154\1\163\1\154\1\151\1\u00ff"+
+        "\1\uffff\1\154\1\153\1\164\1\154\1\uffff\1\143\1\142\1\156\1\154"+
+        "\2\u00ff\1\154\1\164\1\145\1\u00ff\1\141\1\u00ff\1\162\1\141\1\u00ff"+
+        "\1\154\1\171\1\166\1\155\1\uffff\1\151\1\55\1\144\1\145\1\55\1\164"+
+        "\1\154\1\uffff\1\165\1\164\1\u00ff\1\145\1\uffff\1\u00ff\1\55\1"+
+        "\141\1\145\1\150\1\145\1\u00ff\1\141\2\uffff\1\154\1\151\1\u00ff"+
+        "\1\uffff\1\147\1\uffff\1\164\2\154\1\uffff\1\164\1\u00ff\1\156\1"+
+        "\141\1\165\1\142\1\uffff\1\141\1\143\1\145\1\151\1\145\1\144\1\163"+
+        "\1\uffff\1\156\2\uffff\1\151\1\143\1\145\1\162\1\uffff\1\164\1\u00ff"+
+        "\1\157\1\145\2\u00ff\1\157\1\u00ff\1\uffff\1\u00ff\1\164\1\154\1"+
+        "\165\1\55\1\164\1\170\1\157\1\144\1\145\1\u00ff\1\143\1\156\1\164"+
+        "\1\163\1\117\1\145\1\uffff\1\156\1\u00ff\2\uffff\1\167\2\uffff\1"+
+        "\151\1\141\1\164\1\uffff\1\u00ff\2\uffff\1\156\1\u00ff\1\163\1\uffff"+
+        "\1\145\1\163\2\u00ff\1\146\2\u00ff\1\uffff\1\55\1\157\1\164\1\145"+
+        "\1\uffff\1\u00ff\1\uffff\3\u00ff\2\uffff\1\u00ff\3\uffff\1\156\1"+
+        "\145\1\163\5\uffff\1\55\2\u00ff\3\uffff";
     static final String DFA18_acceptS =
-        "\1\uffff\1\1\1\2\6\uffff\1\14\1\uffff\1\17\22\uffff\1\72\1\73\1"+
-        "\74\1\75\1\76\1\77\1\100\1\101\2\uffff\1\104\1\uffff\1\72\1\107"+
-        "\1\4\1\3\1\5\1\6\1\10\1\7\1\12\1\11\1\13\1\15\1\16\42\uffff\1\102"+
-        "\1\103\1\106\1\105\11\uffff\1\61\26\uffff\1\35\3\uffff\1\53\21\uffff"+
-        "\1\54\12\uffff\1\71\4\uffff\1\64\6\uffff\1\70\1\20\4\uffff\1\45"+
-        "\1\uffff\1\47\4\uffff\1\25\4\uffff\1\36\10\uffff\1\65\1\uffff\1"+
-        "\62\1\44\4\uffff\1\67\10\uffff\1\26\22\uffff\1\66\1\uffff\1\22\1"+
-        "\24\1\51\2\uffff\1\50\2\uffff\1\40\1\32\1\31\3\uffff\1\63\10\uffff"+
-        "\1\21\5\uffff\1\41\1\uffff\1\33\1\uffff\1\52\2\uffff\1\60\1\27\1"+
-        "\23\1\42\3\uffff\1\43\1\56\1\34\1\55\1\57\3\uffff\1\37\1\46\1\30";
+        "\1\uffff\1\1\1\2\6\uffff\1\13\1\uffff\1\16\22\uffff\1\71\1\72\1"+
+        "\73\1\74\1\75\1\76\1\77\1\100\2\uffff\1\104\1\uffff\1\71\1\107\1"+
+        "\3\1\101\1\4\1\5\1\7\1\6\1\11\1\10\1\12\1\14\1\15\42\uffff\1\102"+
+        "\1\103\1\106\1\105\11\uffff\1\60\25\uffff\1\34\4\uffff\1\52\23\uffff"+
+        "\1\53\7\uffff\1\70\4\uffff\1\63\10\uffff\1\67\1\17\3\uffff\1\44"+
+        "\1\uffff\1\46\3\uffff\1\24\6\uffff\1\35\7\uffff\1\64\1\uffff\1\61"+
+        "\1\43\4\uffff\1\66\10\uffff\1\25\21\uffff\1\65\2\uffff\1\21\1\23"+
+        "\1\uffff\1\50\1\47\3\uffff\1\37\1\uffff\1\30\1\31\3\uffff\1\62\7"+
+        "\uffff\1\20\4\uffff\1\40\1\uffff\1\32\3\uffff\1\51\1\57\1\uffff"+
+        "\1\26\1\22\1\41\3\uffff\1\42\1\55\1\33\1\54\1\56\3\uffff\1\36\1"+
+        "\45\1\27";
     static final String DFA18_specialS =
         "\u0121\uffff}>";
     static final String[] DFA18_transitionS = {
@@ -2945,22 +2953,22 @@
             "\1\66\1\uffff\12\12",
             "",
             "\uffff\13",
-            "\1\71\2\uffff\1\67\11\uffff\1\70",
-            "\1\74\15\uffff\1\73\2\uffff\1\75\2\uffff\1\72",
+            "\1\67\2\uffff\1\70\11\uffff\1\71",
+            "\1\74\15\uffff\1\72\2\uffff\1\75\2\uffff\1\73",
             "\1\76",
             "\1\100\1\77",
             "\1\101",
-            "\1\102\17\uffff\1\103",
+            "\1\103\17\uffff\1\102",
             "\1\104",
-            "\1\106\3\uffff\1\111\6\uffff\1\105\5\uffff\1\110\1\107",
-            "\1\112\7\uffff\1\114\13\uffff\1\113",
-            "\1\116\7\uffff\1\117\1\uffff\1\115",
+            "\1\105\3\uffff\1\111\6\uffff\1\106\5\uffff\1\107\1\110",
+            "\1\113\7\uffff\1\112\13\uffff\1\114",
+            "\1\115\7\uffff\1\117\1\uffff\1\116",
             "\1\120",
-            "\1\122\5\uffff\1\121",
+            "\1\121\5\uffff\1\122",
             "\1\123",
             "\1\124",
             "\1\125",
-            "\1\127\3\uffff\1\126",
+            "\1\126\3\uffff\1\127",
             "\1\130",
             "",
             "",
@@ -3002,22 +3010,22 @@
             "\1\151",
             "\1\152",
             "\1\153",
-            "\1\154",
-            "\1\156\20\uffff\1\155",
+            "\1\155\20\uffff\1\154",
+            "\1\156",
             "\1\157",
             "\1\160",
             "\1\161",
             "\1\162",
             "\1\163",
             "\1\164",
-            "\1\165\5\uffff\1\166",
-            "\1\170\2\uffff\1\167",
+            "\1\165\2\uffff\1\166",
+            "\1\167\5\uffff\1\170",
             "\1\171",
             "\1\172",
-            "\1\173",
-            "\1\175\106\uffff\1\174",
+            "\1\174\106\uffff\1\173",
+            "\1\175",
             "\1\176",
-            "\1\177\1\uffff\1\u0080",
+            "\1\u0080\1\uffff\1\177",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "\1\u0082",
@@ -3042,10 +3050,10 @@
             "\1\u0090",
             "\1\u0091",
             "\1\u0092",
+            "\1\u0093",
+            "\1\u0094",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "\1\u0094",
-            "\1\u0095",
             "\1\u0096",
             "\1\u0097",
             "\1\u0098",
@@ -3053,16 +3061,16 @@
             "\1\u009a",
             "\1\u009b",
             "\1\u009c",
-            "\1\u009d",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "\1\u009e",
             "\1\u009f",
             "\1\u00a0",
             "\1\u00a1",
-            "\1\u00a2",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "",
+            "\1\u00a3",
             "\1\u00a4",
             "\1\u00a5",
             "\1\u00a6",
@@ -3070,11 +3078,11 @@
             "\1\u00a7",
             "\1\u00a8",
             "\1\u00a9",
+            "\1\u00aa",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "\1\u00ac",
             "\1\u00ad",
             "\1\u00ae",
             "\1\u00af",
@@ -3085,13 +3093,13 @@
             "\52",
             "\1\u00b3",
             "\1\u00b4",
-            "\1\u00b5",
-            "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\5\52\1\u00b6\24\52"+
+            "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\5\52\1\u00b5\24\52"+
             "\105\uffff\100\52",
+            "\1\u00b7",
             "\1\u00b8",
+            "\1\u00b9\6\uffff\1\u00ba",
+            "\1\u00bb",
             "",
-            "\1\u00ba\6\uffff\1\u00b9",
-            "\1\u00bb",
             "\1\u00bc",
             "\1\u00bd",
             "\1\u00be",
@@ -3099,15 +3107,15 @@
             "\1\u00c0",
             "\1\u00c1",
             "\1\u00c2",
+            "",
             "\1\u00c3",
-            "",
             "\1\u00c4",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "\1\u00c6",
+            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "",
             "\1\u00c8",
             "\1\u00c9",
             "\1\u00ca",
@@ -3115,9 +3123,9 @@
             "\1\u00cc",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "\1\u00ce",
             "",
             "",
-            "\1\u00ce",
             "\1\u00cf",
             "\1\u00d0",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
@@ -3128,15 +3136,15 @@
             "\1\u00d2",
             "\1\u00d3",
             "\1\u00d4",
+            "",
             "\1\u00d5",
-            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "\1\u00d7",
             "\1\u00d8",
             "\1\u00d9",
+            "\1\u00da",
             "",
-            "\1\u00da",
             "\1\u00db",
             "\1\u00dc",
             "\1\u00dd",
@@ -3154,66 +3162,66 @@
             "\1\u00e6",
             "",
             "\1\u00e7",
-            "\1\u00e8",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "\1\u00e9",
             "\1\u00ea",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "\1\u00ed",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "\1\u00ee",
             "",
-            "\1\u00ef",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "\1\u00f0",
             "\1\u00f1",
             "\1\u00f2",
             "\1\u00f3",
-            "\1\u00f5\21\uffff\1\u00f4",
-            "\1\u00f6",
+            "\1\u00f4",
+            "\1\u00f5\21\uffff\1\u00f6",
             "\1\u00f7",
             "\1\u00f8",
+            "\1\u00f9",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "\1\u00fa",
             "\1\u00fb",
             "\1\u00fc",
             "\1\u00fd",
             "\1\u00fe",
             "\1\u00ff",
             "\1\u0100",
+            "",
             "\1\u0101",
-            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "",
             "",
+            "\1\u0103",
             "",
-            "\1\u0103",
+            "",
             "\1\u0104",
-            "",
             "\1\u0105",
             "\1\u0106",
             "",
+            "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
+            "\52",
             "",
             "",
-            "\1\u0107",
+            "\1\u0108",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "\1\u0109",
+            "\1\u010a",
             "",
-            "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
-            "\52",
             "\1\u010b",
+            "\1\u010c",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "\1\u010d",
-            "\1\u010e",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "\1\u010f",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
@@ -3223,23 +3231,23 @@
             "\1\u0113",
             "\1\u0114",
             "\1\u0115",
+            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
-            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
+            "",
+            "",
             "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100"+
             "\52",
             "",
             "",
             "",
-            "",
             "\1\u011b",
             "\1\u011c",
             "\1\u011d",
@@ -3288,7 +3296,7 @@
             this.transition = DFA18_transition;
         }
         public String getDescription() {
-            return "1:1: Tokens : ( T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | WS | INT | FLOAT | STRING | BOOL | PACKAGE | IMPORT | FUNCTION | GLOBAL | RULE | QUERY | TEMPLATE | ATTRIBUTES | DATE_EFFECTIVE | DATE_EXPIRES | ENABLED | SALIENCE | NO_LOOP | AUTO_FOCUS | ACTIVATION_GROUP | AGENDA_GROUP | DIALECT | RULEFLOW_GROUP | DURATION | LOCK_ON_ACTIVE | FROM | ACCUMULATE | INIT | ACTION | RESULT | COLLECT | OR | AND | CONTAINS | EXCLUDES | MEMBEROF | MATCHES | IN | NULL | EXISTS | NOT | EVAL | FORALL | WHEN | THEN | END | ID | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | COMMA | DOUBLE_AMPER | DOUBLE_PIPE | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT | MISC );";
+            return "1:1: Tokens : ( T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | WS | INT | FLOAT | STRING | BOOL | PACKAGE | IMPORT | FUNCTION | GLOBAL | RULE | QUERY | TEMPLATE | ATTRIBUTES | DATE_EFFECTIVE | DATE_EXPIRES | ENABLED | SALIENCE | NO_LOOP | AUTO_FOCUS | ACTIVATION_GROUP | AGENDA_GROUP | DIALECT | RULEFLOW_GROUP | DURATION | LOCK_ON_ACTIVE | FROM | ACCUMULATE | INIT | ACTION | RESULT | COLLECT | OR | AND | CONTAINS | EXCLUDES | MEMBEROF | MATCHES | IN | NULL | EXISTS | NOT | EVAL | FORALL | WHEN | THEN | END | ID | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | COMMA | DOT | DOUBLE_AMPER | DOUBLE_PIPE | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT | MISC );";
         }
     }
  

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java	2007-06-05 20:37:17 UTC (rev 12343)
@@ -1,15 +1,15 @@
-// $ANTLR 3.0 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-06-03 02:26:07
-
-	package org.drools.lang;
-	import java.util.List;
-	import java.util.ArrayList;
-	import java.util.Iterator;
-	import java.util.HashMap;	
-	import java.util.StringTokenizer;
-	import org.drools.lang.descr.*;
-	import org.drools.compiler.SwitchingCommonTokenStream;
+// $ANTLR 3.0 /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-06-05 12:19:41
 
+	package org.drools.lang;
+	import java.util.List;
+	import java.util.ArrayList;
+	import java.util.Iterator;
+	import java.util.HashMap;	
+	import java.util.StringTokenizer;
+	import org.drools.lang.descr.*;
+	import org.drools.compiler.SwitchingCommonTokenStream;
 
+
 import org.antlr.runtime.*;
 import java.util.Stack;
 import java.util.List;
@@ -18,262 +18,262 @@
 import java.util.HashMap;
 public class DRLParser extends Parser {
     public static final String[] tokenNames = new String[] {
-        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ATTRIBUTES", "PACKAGE", "IMPORT", "FUNCTION", "GLOBAL", "QUERY", "LEFT_PAREN", "ID", "RIGHT_PAREN", "END", "TEMPLATE", "RULE", "WHEN", "DATE_EFFECTIVE", "STRING", "DATE_EXPIRES", "ENABLED", "BOOL", "SALIENCE", "INT", "NO_LOOP", "AUTO_FOCUS", "ACTIVATION_GROUP", "RULEFLOW_GROUP", "AGENDA_GROUP", "DURATION", "DIALECT", "LOCK_ON_ACTIVE", "ACCUMULATE", "COMMA", "INIT", "ACTION", "RESULT", "COLLECT", "OR", "DOUBLE_PIPE", "DOUBLE_AMPER", "EVAL", "CONTAINS", "NOT", "EXCLUDES", "MATCHES", "MEMBEROF", "IN", "FLOAT", "NULL", "LEFT_CURLY", "RIGHT_CURLY", "LEFT_SQUARE", "RIGHT_SQUARE", "AND", "FROM", "EXISTS", "FORALL", "THEN", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "MULTI_LINE_COMMENT", "MISC", "';'", "':'", "'.'", "'.*'", "'->'", "'=='", "'>'", "'>='", "'<'", "'<='", "'!='"
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ATTRIBUTES", "PACKAGE", "IMPORT", "FUNCTION", "ID", "DOT", "GLOBAL", "LEFT_PAREN", "COMMA", "RIGHT_PAREN", "QUERY", "END", "TEMPLATE", "RULE", "WHEN", "DATE_EFFECTIVE", "STRING", "DATE_EXPIRES", "ENABLED", "BOOL", "SALIENCE", "INT", "NO_LOOP", "AUTO_FOCUS", "ACTIVATION_GROUP", "RULEFLOW_GROUP", "AGENDA_GROUP", "DURATION", "DIALECT", "LOCK_ON_ACTIVE", "OR", "DOUBLE_PIPE", "AND", "DOUBLE_AMPER", "FROM", "EXISTS", "NOT", "EVAL", "FORALL", "ACCUMULATE", "INIT", "ACTION", "RESULT", "COLLECT", "CONTAINS", "EXCLUDES", "MATCHES", "MEMBEROF", "IN", "FLOAT", "NULL", "LEFT_CURLY", "RIGHT_CURLY", "LEFT_SQUARE", "RIGHT_SQUARE", "THEN", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "MULTI_LINE_COMMENT", "MISC", "';'", "':'", "'.*'", "'->'", "'=='", "'>'", "'>='", "'<'", "'<='", "'!='"
     };
+    public static final int COMMA=12;
+    public static final int EXISTS=39;
+    public static final int AUTO_FOCUS=27;
+    public static final int END=15;
+    public static final int HexDigit=63;
+    public static final int FORALL=42;
+    public static final int TEMPLATE=16;
+    public static final int MISC=69;
+    public static final int FLOAT=53;
+    public static final int QUERY=14;
+    public static final int THEN=59;
+    public static final int RULE=17;
+    public static final int INIT=44;
+    public static final int IMPORT=6;
+    public static final int DATE_EFFECTIVE=19;
     public static final int PACKAGE=5;
+    public static final int OR=34;
+    public static final int DOT=9;
+    public static final int DOUBLE_PIPE=35;
+    public static final int AND=36;
     public static final int FUNCTION=7;
-    public static final int ACCUMULATE=32;
-    public static final int RIGHT_SQUARE=53;
-    public static final int ACTIVATION_GROUP=26;
-    public static final int RIGHT_CURLY=51;
+    public static final int GLOBAL=10;
+    public static final int EscapeSequence=62;
+    public static final int DIALECT=32;
+    public static final int INT=25;
+    public static final int LOCK_ON_ACTIVE=33;
+    public static final int DATE_EXPIRES=21;
+    public static final int LEFT_SQUARE=57;
+    public static final int CONTAINS=48;
+    public static final int SH_STYLE_SINGLE_LINE_COMMENT=66;
     public static final int ATTRIBUTES=4;
-    public static final int DIALECT=30;
-    public static final int CONTAINS=42;
-    public static final int NO_LOOP=24;
-    public static final int MEMBEROF=46;
-    public static final int LOCK_ON_ACTIVE=31;
-    public static final int AGENDA_GROUP=28;
-    public static final int FLOAT=48;
-    public static final int SH_STYLE_SINGLE_LINE_COMMENT=65;
-    public static final int NOT=43;
-    public static final int AND=54;
-    public static final int ID=11;
+    public static final int LEFT_CURLY=55;
+    public static final int RESULT=46;
+    public static final int ID=8;
+    public static final int FROM=38;
+    public static final int LEFT_PAREN=11;
+    public static final int ACTIVATION_GROUP=28;
+    public static final int DOUBLE_AMPER=37;
+    public static final int RIGHT_CURLY=56;
+    public static final int EXCLUDES=49;
+    public static final int BOOL=23;
+    public static final int MEMBEROF=51;
+    public static final int WHEN=18;
+    public static final int RULEFLOW_GROUP=29;
+    public static final int WS=61;
+    public static final int STRING=20;
+    public static final int ACTION=45;
+    public static final int COLLECT=47;
+    public static final int IN=52;
+    public static final int NO_LOOP=26;
+    public static final int ACCUMULATE=43;
+    public static final int UnicodeEscape=64;
+    public static final int DURATION=31;
+    public static final int EVAL=41;
+    public static final int MATCHES=50;
     public static final int EOF=-1;
-    public static final int HexDigit=62;
-    public static final int DATE_EFFECTIVE=17;
-    public static final int ACTION=35;
-    public static final int DOUBLE_PIPE=39;
-    public static final int RIGHT_PAREN=12;
-    public static final int IMPORT=6;
-    public static final int EOL=59;
-    public static final int DOUBLE_AMPER=40;
-    public static final int THEN=58;
-    public static final int IN=47;
-    public static final int MATCHES=45;
-    public static final int COMMA=33;
-    public static final int ENABLED=20;
-    public static final int EXISTS=56;
-    public static final int RULE=15;
-    public static final int EXCLUDES=44;
-    public static final int AUTO_FOCUS=25;
-    public static final int NULL=49;
-    public static final int BOOL=21;
-    public static final int FORALL=57;
-    public static final int SALIENCE=22;
-    public static final int RULEFLOW_GROUP=27;
-    public static final int RESULT=36;
-    public static final int INT=23;
-    public static final int MULTI_LINE_COMMENT=67;
-    public static final int DURATION=29;
-    public static final int WS=60;
-    public static final int TEMPLATE=14;
-    public static final int EVAL=41;
-    public static final int WHEN=16;
-    public static final int UnicodeEscape=63;
-    public static final int LEFT_CURLY=50;
-    public static final int OR=38;
-    public static final int LEFT_PAREN=10;
-    public static final int QUERY=9;
-    public static final int MISC=68;
-    public static final int FROM=55;
-    public static final int END=13;
-    public static final int GLOBAL=8;
-    public static final int COLLECT=37;
-    public static final int LEFT_SQUARE=52;
-    public static final int INIT=34;
-    public static final int OctalEscape=64;
-    public static final int EscapeSequence=61;
-    public static final int C_STYLE_SINGLE_LINE_COMMENT=66;
-    public static final int DATE_EXPIRES=19;
-    public static final int STRING=18;
+    public static final int EOL=60;
+    public static final int NULL=54;
+    public static final int AGENDA_GROUP=30;
+    public static final int OctalEscape=65;
+    public static final int SALIENCE=24;
+    public static final int MULTI_LINE_COMMENT=68;
+    public static final int RIGHT_PAREN=13;
+    public static final int NOT=40;
+    public static final int ENABLED=22;
+    public static final int RIGHT_SQUARE=58;
+    public static final int C_STYLE_SINGLE_LINE_COMMENT=67;
 
         public DRLParser(TokenStream input) {
             super(input);
-            ruleMemo = new HashMap[225+1];
+            ruleMemo = new HashMap[74+1];
          }
         
 
     public String[] getTokenNames() { return tokenNames; }
-    public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g"; }
+    public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g"; }
 
-    
-    	private PackageDescr packageDescr;
-    	private List errors = new ArrayList();
-    	private String source = "unknown";
-    	private int lineOffset = 0;
-    	private DescrFactory factory = new DescrFactory();
-    	private boolean parserDebug = false;
-    	private Location location = new Location( Location.LOCATION_UNKNOWN );
-    	
-    	// THE FOLLOWING LINES ARE DUMMY ATTRIBUTES TO WORK AROUND AN ANTLR BUG
-    	private BaseDescr from = null;
-    	private FieldConstraintDescr fc = null;
-    	private RestrictionConnectiveDescr and = null;
-    	private RestrictionConnectiveDescr or = null;
-    	private ConditionalElementDescr base = null;
-    	
-    	public void setParserDebug(boolean parserDebug) {
-    		this.parserDebug = parserDebug;
-    	}
-    	
-    	public void debug(String message) {
-    		if ( parserDebug ) 
-    			System.err.println( "drl parser: " + message );
-    	}
-    	
-    	public void setSource(String source) {
-    		this.source = source;
-    	}
-    	public DescrFactory getFactory() {
-    		return factory;
-    	}	
-    
-    	public String getSource() {
-    		return this.source;
-    	}
-    	
-    	public PackageDescr getPackageDescr() {
-    		return packageDescr;
-    	}
-    	
-    	private int offset(int line) {
-    		return line + lineOffset;
-    	}
-    	
-    	/**
-    	 * This will set the offset to record when reparsing. Normally is zero of course 
-    	 */
-    	public void setLineOffset(int i) {
-    	 	this.lineOffset = i;
-    	}
-    	
-    	private String getString(Token token) {
-    		String orig = token.getText();
-    		return orig.substring( 1, orig.length() -1 );
-    	}
-    	
-    	public void reportError(RecognitionException ex) {
-    	        // if we've already reported an error and have not matched a token
-                    // yet successfully, don't report any errors.
-                    if ( errorRecovery ) {
-                            return;
-                    }
-                    errorRecovery = true;
-    
-    		ex.line = offset(ex.line); //add the offset if there is one
-    		errors.add( ex ); 
-    	}
-         	
-         	/** return the raw RecognitionException errors */
-         	public List getErrors() {
-         		return errors;
-         	}
-         	
-         	/** Return a list of pretty strings summarising the errors */
-         	public List getErrorMessages() {
-         		List messages = new ArrayList();
-     		for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
-         	     		messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
-         	     	}
-         	     	return messages;
-         	}
-         	
-         	/** return true if any parser errors were accumulated */
-         	public boolean hasErrors() {
-      		return ! errors.isEmpty();
-         	}
-         	
-         	/** This will take a RecognitionException, and create a sensible error message out of it */
-         	public String createErrorMessage(RecognitionException e)
-            {
-    		StringBuffer message = new StringBuffer();		
-                    message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
-                    if ( e instanceof MismatchedTokenException ) {
-                            MismatchedTokenException mte = (MismatchedTokenException)e;
-                            message.append("mismatched token: "+
-                                                               e.token+
-                                                               "; expecting type "+
-                                                               tokenNames[mte.expecting]);
-                    }
-                    else if ( e instanceof MismatchedTreeNodeException ) {
-                            MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
-                            message.append("mismatched tree node: "+
-                                                               mtne.toString() +
-                                                               "; expecting type "+
-                                                               tokenNames[mtne.expecting]);
-                    }
-                    else if ( e instanceof NoViableAltException ) {
-                            NoViableAltException nvae = (NoViableAltException)e;
-    			message.append( "Unexpected token '" + e.token.getText() + "'" );
-                            /*
-                            message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
-                                                               " state "+nvae.stateNumber+
-                                                               " (decision="+nvae.decisionNumber+
-                                                               ") no viable alt; token="+
-                                                               e.token);
-                                                               */
-                    }
-                    else if ( e instanceof EarlyExitException ) {
-                            EarlyExitException eee = (EarlyExitException)e;
-                            message.append("required (...)+ loop (decision="+
-                                                               eee.decisionNumber+
-                                                               ") did not match anything; token="+
-                                                               e.token);
-                    }
-                    else if ( e instanceof MismatchedSetException ) {
-                            MismatchedSetException mse = (MismatchedSetException)e;
-                            message.append("mismatched token '"+
-                                                               e.token+
-                                                               "' expecting set "+mse.expecting);
-                    }
-                    else if ( e instanceof MismatchedNotSetException ) {
-                            MismatchedNotSetException mse = (MismatchedNotSetException)e;
-                            message.append("mismatched token '"+
-                                                               e.token+
-                                                               "' expecting set "+mse.expecting);
-                    }
-                    else if ( e instanceof FailedPredicateException ) {
-                            FailedPredicateException fpe = (FailedPredicateException)e;
-                            message.append("rule "+fpe.ruleName+" failed predicate: {"+
-                                                               fpe.predicateText+"}?");
-                    } else if (e instanceof GeneralParseException) {
-    			message.append(" " + e.getMessage());
-    		}
-                   	return message.toString();
-            }   
-            
-            void checkTrailingSemicolon(String text, int line) {
-            	if (text.trim().endsWith( ";" ) ) {
-            		this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
-            	}
-            }
-            
-            public Location getLocation() {
-                    return this.location;
-            }
-          
 
+    	private PackageDescr packageDescr;
+    	private List errors = new ArrayList();
+    	private String source = "unknown";
+    	private int lineOffset = 0;
+    	private DescrFactory factory = new DescrFactory();
+    	private boolean parserDebug = false;
+    	private Location location = new Location( Location.LOCATION_UNKNOWN );
+    	
+    	// THE FOLLOWING LINES ARE DUMMY ATTRIBUTES TO WORK AROUND AN ANTLR BUG
+    	private BaseDescr from = null;
+    	private FieldConstraintDescr fc = null;
+    	private RestrictionConnectiveDescr and = null;
+    	private RestrictionConnectiveDescr or = null;
+    	private ConditionalElementDescr base = null;
+    	
+    	public void setParserDebug(boolean parserDebug) {
+    		this.parserDebug = parserDebug;
+    	}
+    	
+    	public void debug(String message) {
+    		if ( parserDebug ) 
+    			System.err.println( "drl parser: " + message );
+    	}
+    	
+    	public void setSource(String source) {
+    		this.source = source;
+    	}
+    	public DescrFactory getFactory() {
+    		return factory;
+    	}	
 
+    	public String getSource() {
+    		return this.source;
+    	}
+    	
+    	public PackageDescr getPackageDescr() {
+    		return packageDescr;
+    	}
+    	
+    	private int offset(int line) {
+    		return line + lineOffset;
+    	}
+    	
+    	/**
+    	 * This will set the offset to record when reparsing. Normally is zero of course 
+    	 */
+    	public void setLineOffset(int i) {
+    	 	this.lineOffset = i;
+    	}
+    	
+    	private String getString(String token) {
+    		return token.substring( 1, token.length() -1 );
+    	}
+    	
+    	public void reportError(RecognitionException ex) {
+    	        // if we've already reported an error and have not matched a token
+                    // yet successfully, don't report any errors.
+                    if ( errorRecovery ) {
+                            return;
+                    }
+                    errorRecovery = true;
 
+    		ex.line = offset(ex.line); //add the offset if there is one
+    		errors.add( ex ); 
+    	}
+         	
+         	/** return the raw RecognitionException errors */
+         	public List getErrors() {
+         		return errors;
+         	}
+         	
+         	/** Return a list of pretty strings summarising the errors */
+         	public List getErrorMessages() {
+         		List messages = new ArrayList();
+     		for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+         	     		messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+         	     	}
+         	     	return messages;
+         	}
+         	
+         	/** return true if any parser errors were accumulated */
+         	public boolean hasErrors() {
+      		return ! errors.isEmpty();
+         	}
+         	
+         	/** This will take a RecognitionException, and create a sensible error message out of it */
+         	public String createErrorMessage(RecognitionException e)
+            {
+    		StringBuffer message = new StringBuffer();		
+                    message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+                    if ( e instanceof MismatchedTokenException ) {
+                            MismatchedTokenException mte = (MismatchedTokenException)e;
+                            message.append("mismatched token: "+
+                                                               e.token+
+                                                               "; expecting type "+
+                                                               tokenNames[mte.expecting]);
+                    }
+                    else if ( e instanceof MismatchedTreeNodeException ) {
+                            MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+                            message.append("mismatched tree node: "+
+                                                               mtne.toString() +
+                                                               "; expecting type "+
+                                                               tokenNames[mtne.expecting]);
+                    }
+                    else if ( e instanceof NoViableAltException ) {
+                            NoViableAltException nvae = (NoViableAltException)e;
+    			message.append( "Unexpected token '" + e.token.getText() + "'" );
+                            /*
+                            message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+                                                               " state "+nvae.stateNumber+
+                                                               " (decision="+nvae.decisionNumber+
+                                                               ") no viable alt; token="+
+                                                               e.token);
+                                                               */
+                    }
+                    else if ( e instanceof EarlyExitException ) {
+                            EarlyExitException eee = (EarlyExitException)e;
+                            message.append("required (...)+ loop (decision="+
+                                                               eee.decisionNumber+
+                                                               ") did not match anything; token="+
+                                                               e.token);
+                    }
+                    else if ( e instanceof MismatchedSetException ) {
+                            MismatchedSetException mse = (MismatchedSetException)e;
+                            message.append("mismatched token '"+
+                                                               e.token+
+                                                               "' expecting set "+mse.expecting);
+                    }
+                    else if ( e instanceof MismatchedNotSetException ) {
+                            MismatchedNotSetException mse = (MismatchedNotSetException)e;
+                            message.append("mismatched token '"+
+                                                               e.token+
+                                                               "' expecting set "+mse.expecting);
+                    }
+                    else if ( e instanceof FailedPredicateException ) {
+                            FailedPredicateException fpe = (FailedPredicateException)e;
+                            message.append("rule "+fpe.ruleName+" failed predicate: {"+
+                                                               fpe.predicateText+"}?");
+                    } else if (e instanceof GeneralParseException) {
+    			message.append(" " + e.getMessage());
+    		}
+                   	return message.toString();
+            }   
+            
+            void checkTrailingSemicolon(String text, int line) {
+            	if (text.trim().endsWith( ";" ) ) {
+            		this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+            	}
+            }
+            
+            public Location getLocation() {
+                    return this.location;
+            }
+          
+
+
+
     // $ANTLR start opt_semicolon
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:177:1: opt_semicolon : ( ';' )? ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:176:1: opt_semicolon : ( ';' )? ;
     public final void opt_semicolon() throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:178:4: ( ( ';' )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:178:4: ( ';' )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:177:4: ( ( ';' )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:177:4: ( ';' )?
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:178:4: ( ';' )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:177:4: ( ';' )?
             int alt1=2;
             int LA1_0 = input.LA(1);
 
-            if ( (LA1_0==69) ) {
+            if ( (LA1_0==70) ) {
                 alt1=1;
             }
             switch (alt1) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ';'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:177:4: ';'
                     {
-                    match(input,69,FOLLOW_69_in_opt_semicolon46); if (failed) return ;
+                    match(input,70,FOLLOW_70_in_opt_semicolon40); if (failed) return ;
 
                     }
                     break;
@@ -296,37 +296,37 @@
 
 
     // $ANTLR start compilation_unit
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:181:1: compilation_unit : prolog ( statement )+ ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:180:1: compilation_unit : prolog ( statement )+ ;
     public final void compilation_unit() throws RecognitionException {
-        
-        		// reset Location information
-        		this.location = new Location( Location.LOCATION_UNKNOWN );
+
+        		// reset Location information
+        		this.location = new Location( Location.LOCATION_UNKNOWN );
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:186:4: ( prolog ( statement )+ )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:186:4: prolog ( statement )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:185:4: ( prolog ( statement )+ )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:185:4: prolog ( statement )+
             {
-            pushFollow(FOLLOW_prolog_in_compilation_unit64);
+            pushFollow(FOLLOW_prolog_in_compilation_unit58);
             prolog();
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:187:3: ( statement )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:186:3: ( statement )+
             int cnt2=0;
             loop2:
             do {
                 int alt2=2;
                 int LA2_0 = input.LA(1);
 
-                if ( ((LA2_0>=IMPORT && LA2_0<=QUERY)||(LA2_0>=TEMPLATE && LA2_0<=RULE)) ) {
+                if ( ((LA2_0>=IMPORT && LA2_0<=FUNCTION)||LA2_0==GLOBAL||LA2_0==QUERY||(LA2_0>=TEMPLATE && LA2_0<=RULE)) ) {
                     alt2=1;
                 }
 
 
                 switch (alt2) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:187:5: statement
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:186:3: statement
             	    {
-            	    pushFollow(FOLLOW_statement_in_compilation_unit71);
+            	    pushFollow(FOLLOW_statement_in_compilation_unit63);
             	    statement();
             	    _fsp--;
             	    if (failed) return ;
@@ -360,21 +360,21 @@
 
 
     // $ANTLR start prolog
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:190:1: prolog : (n= package_statement )? ( ATTRIBUTES ':' )? ( ( ',' )? a= rule_attribute )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:189:1: prolog : (pkgstmt= package_statement )? ( ATTRIBUTES ':' )? (a= rule_attribute ( ( ',' )? a= rule_attribute )* )? ;
     public final void prolog() throws RecognitionException {
-        String n = null;
+        String pkgstmt = null;
 
         AttributeDescr a = null;
 
 
-        
-        		String packageName = "";
+
+        		String packageName = "";
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:194:4: ( (n= package_statement )? ( ATTRIBUTES ':' )? ( ( ',' )? a= rule_attribute )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:194:4: (n= package_statement )? ( ATTRIBUTES ':' )? ( ( ',' )? a= rule_attribute )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:193:4: ( (pkgstmt= package_statement )? ( ATTRIBUTES ':' )? (a= rule_attribute ( ( ',' )? a= rule_attribute )* )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:193:4: (pkgstmt= package_statement )? ( ATTRIBUTES ':' )? (a= rule_attribute ( ( ',' )? a= rule_attribute )* )?
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:194:4: (n= package_statement )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:193:4: (pkgstmt= package_statement )?
             int alt3=2;
             int LA3_0 = input.LA(1);
 
@@ -383,14 +383,14 @@
             }
             switch (alt3) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:194:6: n= package_statement
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:193:6: pkgstmt= package_statement
                     {
-                    pushFollow(FOLLOW_package_statement_in_prolog96);
-                    n=package_statement();
+                    pushFollow(FOLLOW_package_statement_in_prolog86);
+                    pkgstmt=package_statement();
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                       packageName = n; 
+                       packageName = pkgstmt; 
                     }
 
                     }
@@ -399,11 +399,11 @@
             }
 
             if ( backtracking==0 ) {
-               
-              			this.packageDescr = factory.createPackage( packageName ); 
+               
+              			this.packageDescr = factory.createPackage( packageName ); 
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:198:4: ( ATTRIBUTES ':' )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:197:3: ( ATTRIBUTES ':' )?
             int alt4=2;
             int LA4_0 = input.LA(1);
 
@@ -412,70 +412,96 @@
             }
             switch (alt4) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:198:5: ATTRIBUTES ':'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:197:4: ATTRIBUTES ':'
                     {
-                    match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_prolog111); if (failed) return ;
-                    match(input,70,FOLLOW_70_in_prolog113); if (failed) return ;
+                    match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_prolog100); if (failed) return ;
+                    match(input,71,FOLLOW_71_in_prolog102); if (failed) return ;
 
                     }
                     break;
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:4: ( ( ',' )? a= rule_attribute )*
-            loop6:
-            do {
-                int alt6=2;
-                int LA6_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:198:3: (a= rule_attribute ( ( ',' )? a= rule_attribute )* )?
+            int alt7=2;
+            int LA7_0 = input.LA(1);
 
-                if ( (LA6_0==DATE_EFFECTIVE||(LA6_0>=DATE_EXPIRES && LA6_0<=ENABLED)||LA6_0==SALIENCE||(LA6_0>=NO_LOOP && LA6_0<=LOCK_ON_ACTIVE)||LA6_0==COMMA) ) {
-                    alt6=1;
-                }
+            if ( (LA7_0==DATE_EFFECTIVE||(LA7_0>=DATE_EXPIRES && LA7_0<=ENABLED)||LA7_0==SALIENCE||(LA7_0>=NO_LOOP && LA7_0<=LOCK_ON_ACTIVE)) ) {
+                alt7=1;
+            }
+            switch (alt7) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:198:5: a= rule_attribute ( ( ',' )? a= rule_attribute )*
+                    {
+                    pushFollow(FOLLOW_rule_attribute_in_prolog112);
+                    a=rule_attribute();
+                    _fsp--;
+                    if (failed) return ;
+                    if ( backtracking==0 ) {
 
+                       	  	        	this.packageDescr.addAttribute( a );
+                      	                
+                    }
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:202:6: ( ( ',' )? a= rule_attribute )*
+                    loop6:
+                    do {
+                        int alt6=2;
+                        int LA6_0 = input.LA(1);
 
-                switch (alt6) {
-            	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:6: ( ',' )? a= rule_attribute
-            	    {
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:6: ( ',' )?
-            	    int alt5=2;
-            	    int LA5_0 = input.LA(1);
+                        if ( (LA6_0==COMMA||LA6_0==DATE_EFFECTIVE||(LA6_0>=DATE_EXPIRES && LA6_0<=ENABLED)||LA6_0==SALIENCE||(LA6_0>=NO_LOOP && LA6_0<=LOCK_ON_ACTIVE)) ) {
+                            alt6=1;
+                        }
 
-            	    if ( (LA5_0==COMMA) ) {
-            	        alt5=1;
-            	    }
-            	    switch (alt5) {
-            	        case 1 :
-            	            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ','
-            	            {
-            	            match(input,COMMA,FOLLOW_COMMA_in_prolog122); if (failed) return ;
 
-            	            }
-            	            break;
+                        switch (alt6) {
+                    	case 1 :
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:202:14: ( ',' )? a= rule_attribute
+                    	    {
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:202:14: ( ',' )?
+                    	    int alt5=2;
+                    	    int LA5_0 = input.LA(1);
 
-            	    }
+                    	    if ( (LA5_0==COMMA) ) {
+                    	        alt5=1;
+                    	    }
+                    	    switch (alt5) {
+                    	        case 1 :
+                    	            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:202:14: ','
+                    	            {
+                    	            match(input,COMMA,FOLLOW_COMMA_in_prolog135); if (failed) return ;
 
-            	    pushFollow(FOLLOW_rule_attribute_in_prolog127);
-            	    a=rule_attribute();
-            	    _fsp--;
-            	    if (failed) return ;
-            	    if ( backtracking==0 ) {
-            	      
-            	      					this.packageDescr.addAttribute( a );
-            	      				
-            	    }
+                    	            }
+                    	            break;
 
-            	    }
-            	    break;
+                    	    }
 
-            	default :
-            	    break loop6;
-                }
-            } while (true);
+                    	    pushFollow(FOLLOW_rule_attribute_in_prolog140);
+                    	    a=rule_attribute();
+                    	    _fsp--;
+                    	    if (failed) return ;
+                    	    if ( backtracking==0 ) {
 
+                    	       	  	        	this.packageDescr.addAttribute( a );
+                    	      	                
+                    	    }
 
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop6;
+                        }
+                    } while (true);
+
+
+                    }
+                    break;
+
             }
 
+
+            }
+
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -488,8 +514,52 @@
     // $ANTLR end prolog
 
 
+    // $ANTLR start package_statement
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:209:1: package_statement returns [String packageName] : PACKAGE n= dotted_name[null] opt_semicolon ;
+    public final String package_statement() throws RecognitionException {
+        String packageName = null;
+
+        String n = null;
+
+
+
+        		packageName = null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:214:3: ( PACKAGE n= dotted_name[null] opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:214:3: PACKAGE n= dotted_name[null] opt_semicolon
+            {
+            match(input,PACKAGE,FOLLOW_PACKAGE_in_package_statement184); if (failed) return packageName;
+            pushFollow(FOLLOW_dotted_name_in_package_statement188);
+            n=dotted_name(null);
+            _fsp--;
+            if (failed) return packageName;
+            pushFollow(FOLLOW_opt_semicolon_in_package_statement191);
+            opt_semicolon();
+            _fsp--;
+            if (failed) return packageName;
+            if ( backtracking==0 ) {
+
+              			packageName = n;
+              		
+            }
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return packageName;
+    }
+    // $ANTLR end package_statement
+
+
     // $ANTLR start statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:206:1: statement : ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:219:1: statement : ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query );
     public final void statement() throws RecognitionException {
         FactTemplateDescr t = null;
 
@@ -499,26 +569,23 @@
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:2: ( ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:2: ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query )
-            {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:2: ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query )
-            int alt7=7;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:220:4: ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query )
+            int alt8=7;
             switch ( input.LA(1) ) {
             case IMPORT:
                 {
-                int LA7_1 = input.LA(2);
+                int LA8_1 = input.LA(2);
 
-                if ( (synpred7()) ) {
-                    alt7=1;
+                if ( (LA8_1==FUNCTION) ) {
+                    alt8=1;
                 }
-                else if ( (synpred8()) ) {
-                    alt7=2;
+                else if ( (LA8_1==ID) ) {
+                    alt8=2;
                 }
                 else {
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("208:2: ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query )", 7, 1, input);
+                        new NoViableAltException("219:1: statement : ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query );", 8, 1, input);
 
                     throw nvae;
                 }
@@ -526,42 +593,42 @@
                 break;
             case GLOBAL:
                 {
-                alt7=3;
+                alt8=3;
                 }
                 break;
             case FUNCTION:
                 {
-                alt7=4;
+                alt8=4;
                 }
                 break;
             case TEMPLATE:
                 {
-                alt7=5;
+                alt8=5;
                 }
                 break;
             case RULE:
                 {
-                alt7=6;
+                alt8=6;
                 }
                 break;
             case QUERY:
                 {
-                alt7=7;
+                alt8=7;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("208:2: ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query )", 7, 0, input);
+                    new NoViableAltException("219:1: statement : ( function_import_statement | import_statement | global | function | t= template | r= rule | q= query );", 8, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt7) {
+            switch (alt8) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:4: function_import_statement
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:220:4: function_import_statement
                     {
-                    pushFollow(FOLLOW_function_import_statement_in_statement156);
+                    pushFollow(FOLLOW_function_import_statement_in_statement205);
                     function_import_statement();
                     _fsp--;
                     if (failed) return ;
@@ -569,9 +636,9 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:209:4: import_statement
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:221:4: import_statement
                     {
-                    pushFollow(FOLLOW_import_statement_in_statement162);
+                    pushFollow(FOLLOW_import_statement_in_statement211);
                     import_statement();
                     _fsp--;
                     if (failed) return ;
@@ -579,9 +646,9 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:210:4: global
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:222:4: global
                     {
-                    pushFollow(FOLLOW_global_in_statement168);
+                    pushFollow(FOLLOW_global_in_statement217);
                     global();
                     _fsp--;
                     if (failed) return ;
@@ -589,9 +656,9 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:211:4: function
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:223:4: function
                     {
-                    pushFollow(FOLLOW_function_in_statement174);
+                    pushFollow(FOLLOW_function_in_statement223);
                     function();
                     _fsp--;
                     if (failed) return ;
@@ -599,50 +666,46 @@
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:212:10: t= template
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:224:10: t= template
                     {
-                    pushFollow(FOLLOW_template_in_statement188);
+                    pushFollow(FOLLOW_template_in_statement237);
                     t=template();
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                      this.packageDescr.addFactTemplate( t ); 
+                       this.packageDescr.addFactTemplate( t ); 
                     }
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:213:4: r= rule
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:225:4: r= rule
                     {
-                    pushFollow(FOLLOW_rule_in_statement197);
+                    pushFollow(FOLLOW_rule_in_statement246);
                     r=rule();
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                       if( r != null ) this.packageDescr.addRule( r ); 
+                       this.packageDescr.addRule( r ); 
                     }
 
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:214:4: q= query
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:226:4: q= query
                     {
-                    pushFollow(FOLLOW_query_in_statement209);
+                    pushFollow(FOLLOW_query_in_statement258);
                     q=query();
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                       if( q != null ) this.packageDescr.addRule( q ); 
+                       this.packageDescr.addRule( q ); 
                     }
 
                     }
                     break;
 
             }
-
-
-            }
-
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -655,78 +718,34 @@
     // $ANTLR end statement
 
 
-    // $ANTLR start package_statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:218:1: package_statement returns [String packageName] : PACKAGE n= dotted_name[null] opt_semicolon ;
-    public final String package_statement() throws RecognitionException {
-        String packageName = null;
-
-        String n = null;
-
-
-        
-        		packageName = null;
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:223:3: ( PACKAGE n= dotted_name[null] opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:223:3: PACKAGE n= dotted_name[null] opt_semicolon
-            {
-            match(input,PACKAGE,FOLLOW_PACKAGE_in_package_statement238); if (failed) return packageName;
-            pushFollow(FOLLOW_dotted_name_in_package_statement242);
-            n=dotted_name(null);
-            _fsp--;
-            if (failed) return packageName;
-            pushFollow(FOLLOW_opt_semicolon_in_package_statement245);
-            opt_semicolon();
-            _fsp--;
-            if (failed) return packageName;
-            if ( backtracking==0 ) {
-              
-              			packageName = n;
-              		
-            }
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return packageName;
-    }
-    // $ANTLR end package_statement
-
-
     // $ANTLR start import_statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:230:1: import_statement : imp= IMPORT import_name[importDecl] opt_semicolon ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:231:1: import_statement : IMPORT import_name[importDecl] opt_semicolon ;
     public final void import_statement() throws RecognitionException {
-        Token imp=null;
+        Token IMPORT1=null;
 
-        
-                	ImportDescr importDecl = null;
+
+                	ImportDescr importDecl = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:234:4: (imp= IMPORT import_name[importDecl] opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:234:4: imp= IMPORT import_name[importDecl] opt_semicolon
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:235:4: ( IMPORT import_name[importDecl] opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:235:4: IMPORT import_name[importDecl] opt_semicolon
             {
-            imp=(Token)input.LT(1);
-            match(input,IMPORT,FOLLOW_IMPORT_in_import_statement277); if (failed) return ;
+            IMPORT1=(Token)input.LT(1);
+            match(input,IMPORT,FOLLOW_IMPORT_in_import_statement287); if (failed) return ;
             if ( backtracking==0 ) {
-              
-              	            importDecl = factory.createImport( );
-              	            importDecl.setStartCharacter( ((CommonToken)imp).getStartIndex() );
-              		    if (packageDescr != null) {
-              			packageDescr.addImport( importDecl );
-              		    }
+
+              	            importDecl = factory.createImport( );
+              	            importDecl.setStartCharacter( ((CommonToken)IMPORT1).getStartIndex() );
+              		    if (packageDescr != null) {
+              			packageDescr.addImport( importDecl );
+              		    }
               	        
             }
-            pushFollow(FOLLOW_import_name_in_import_statement300);
+            pushFollow(FOLLOW_import_name_in_import_statement310);
             import_name(importDecl);
             _fsp--;
             if (failed) return ;
-            pushFollow(FOLLOW_opt_semicolon_in_import_statement303);
+            pushFollow(FOLLOW_opt_semicolon_in_import_statement313);
             opt_semicolon();
             _fsp--;
             if (failed) return ;
@@ -746,34 +765,34 @@
 
 
     // $ANTLR start function_import_statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:245:1: function_import_statement : imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:246:1: function_import_statement : IMPORT FUNCTION import_name[importDecl] opt_semicolon ;
     public final void function_import_statement() throws RecognitionException {
-        Token imp=null;
+        Token IMPORT2=null;
 
-        
-                	FunctionImportDescr importDecl = null;
+
+                	FunctionImportDescr importDecl = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:249:4: (imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:249:4: imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:250:4: ( IMPORT FUNCTION import_name[importDecl] opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:250:4: IMPORT FUNCTION import_name[importDecl] opt_semicolon
             {
-            imp=(Token)input.LT(1);
-            match(input,IMPORT,FOLLOW_IMPORT_in_function_import_statement329); if (failed) return ;
-            match(input,FUNCTION,FOLLOW_FUNCTION_in_function_import_statement331); if (failed) return ;
+            IMPORT2=(Token)input.LT(1);
+            match(input,IMPORT,FOLLOW_IMPORT_in_function_import_statement337); if (failed) return ;
+            match(input,FUNCTION,FOLLOW_FUNCTION_in_function_import_statement339); if (failed) return ;
             if ( backtracking==0 ) {
-              
-              	            importDecl = factory.createFunctionImport();
-              	            importDecl.setStartCharacter( ((CommonToken)imp).getStartIndex() );
-              		    if (packageDescr != null) {
-              			packageDescr.addFunctionImport( importDecl );
-              		    }
+
+              	            importDecl = factory.createFunctionImport();
+              	            importDecl.setStartCharacter( ((CommonToken)IMPORT2).getStartIndex() );
+              		    if (packageDescr != null) {
+              			packageDescr.addFunctionImport( importDecl );
+              		    }
               	        
             }
-            pushFollow(FOLLOW_import_name_in_function_import_statement354);
+            pushFollow(FOLLOW_import_name_in_function_import_statement362);
             import_name(importDecl);
             _fsp--;
             if (failed) return ;
-            pushFollow(FOLLOW_opt_semicolon_in_function_import_statement357);
+            pushFollow(FOLLOW_opt_semicolon_in_function_import_statement365);
             opt_semicolon();
             _fsp--;
             if (failed) return ;
@@ -793,57 +812,58 @@
 
 
     // $ANTLR start import_name
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:261:1: import_name[ImportDescr importDecl] returns [String name] : id= identifier ( '.' id= identifier )* (star= '.*' )? ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:262:1: import_name[ImportDescr importDecl] returns [String name] : ID ( DOT id= identifier )* (star= '.*' )? ;
     public final String import_name(ImportDescr importDecl) throws RecognitionException {
         String name = null;
 
         Token star=null;
-        Token id = null;
+        Token ID3=null;
+        Token DOT4=null;
+        identifier_return id = null;
 
 
-        
-        		name = null;
+
+        		name = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:266:3: (id= identifier ( '.' id= identifier )* (star= '.*' )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:266:3: id= identifier ( '.' id= identifier )* (star= '.*' )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:267:3: ( ID ( DOT id= identifier )* (star= '.*' )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:267:3: ID ( DOT id= identifier )* (star= '.*' )?
             {
-            pushFollow(FOLLOW_identifier_in_import_name385);
-            id=identifier();
-            _fsp--;
-            if (failed) return name;
+            ID3=(Token)input.LT(1);
+            match(input,ID,FOLLOW_ID_in_import_name391); if (failed) return name;
             if ( backtracking==0 ) {
-               
-              		    name=id.getText(); 
-              		    importDecl.setTarget( name );
-              		    importDecl.setEndCharacter( ((CommonToken)id).getStopIndex() );
+               
+              		    name =ID3.getText(); 
+              		    importDecl.setTarget( name );
+              		    importDecl.setEndCharacter( ((CommonToken)ID3).getStopIndex() );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:272:3: ( '.' id= identifier )*
-            loop8:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:273:3: ( DOT id= identifier )*
+            loop9:
             do {
-                int alt8=2;
-                int LA8_0 = input.LA(1);
+                int alt9=2;
+                int LA9_0 = input.LA(1);
 
-                if ( (LA8_0==71) ) {
-                    alt8=1;
+                if ( (LA9_0==DOT) ) {
+                    alt9=1;
                 }
 
 
-                switch (alt8) {
+                switch (alt9) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:272:5: '.' id= identifier
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:273:5: DOT id= identifier
             	    {
-            	    match(input,71,FOLLOW_71_in_import_name397); if (failed) return name;
-            	    pushFollow(FOLLOW_identifier_in_import_name401);
+            	    DOT4=(Token)input.LT(1);
+            	    match(input,DOT,FOLLOW_DOT_in_import_name403); if (failed) return name;
+            	    pushFollow(FOLLOW_identifier_in_import_name407);
             	    id=identifier();
             	    _fsp--;
             	    if (failed) return name;
             	    if ( backtracking==0 ) {
-            	       
-            	      		        name = name + "." + id.getText(); 
-            	      			importDecl.setTarget( name );
-            	      		        importDecl.setEndCharacter( ((CommonToken)id).getStopIndex() );
+            	       
+            	      		        name = name + DOT4.getText() + input.toString(id.start,id.stop); 
+            	      			importDecl.setTarget( name );
+            	      		        importDecl.setEndCharacter( ((CommonToken)((Token)id.start)).getStopIndex() );
             	      		    
             	    }
 
@@ -851,28 +871,28 @@
             	    break;
 
             	default :
-            	    break loop8;
+            	    break loop9;
                 }
             } while (true);
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:279:3: (star= '.*' )?
-            int alt9=2;
-            int LA9_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:280:3: (star= '.*' )?
+            int alt10=2;
+            int LA10_0 = input.LA(1);
 
-            if ( (LA9_0==72) ) {
-                alt9=1;
+            if ( (LA10_0==72) ) {
+                alt10=1;
             }
-            switch (alt9) {
+            switch (alt10) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:279:5: star= '.*'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:280:5: star= '.*'
                     {
                     star=(Token)input.LT(1);
-                    match(input,72,FOLLOW_72_in_import_name425); if (failed) return name;
+                    match(input,72,FOLLOW_72_in_import_name431); if (failed) return name;
                     if ( backtracking==0 ) {
-                       
-                      		        name = name + star.getText(); 
-                      			importDecl.setTarget( name );
-                      		        importDecl.setEndCharacter( ((CommonToken)star).getStopIndex() );
+                       
+                      		        name = name + star.getText(); 
+                      			importDecl.setTarget( name );
+                      		        importDecl.setEndCharacter( ((CommonToken)star).getStopIndex() );
                       		    
                     }
 
@@ -897,51 +917,51 @@
 
 
     // $ANTLR start global
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:289:1: global : loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:290:1: global : GLOBAL type= dotted_name[null] id= identifier opt_semicolon ;
     public final void global() throws RecognitionException {
-        Token loc=null;
+        Token GLOBAL5=null;
         String type = null;
 
-        Token id = null;
+        identifier_return id = null;
 
 
-        
-        	    GlobalDescr global = null;
+
+        	    GlobalDescr global = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:294:3: (loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:294:3: loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:295:3: ( GLOBAL type= dotted_name[null] id= identifier opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:295:3: GLOBAL type= dotted_name[null] id= identifier opt_semicolon
             {
-            loc=(Token)input.LT(1);
-            match(input,GLOBAL,FOLLOW_GLOBAL_in_global461); if (failed) return ;
+            GLOBAL5=(Token)input.LT(1);
+            match(input,GLOBAL,FOLLOW_GLOBAL_in_global465); if (failed) return ;
             if ( backtracking==0 ) {
-              
-              		    global = factory.createGlobal();
-              	            global.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              		    packageDescr.addGlobal( global );
+
+              		    global = factory.createGlobal();
+              	            global.setStartCharacter( ((CommonToken)GLOBAL5).getStartIndex() );
+              		    packageDescr.addGlobal( global );
               		
             }
-            pushFollow(FOLLOW_dotted_name_in_global472);
+            pushFollow(FOLLOW_dotted_name_in_global476);
             type=dotted_name(null);
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              		    global.setType( type );
+
+              		    global.setType( type );
               		
             }
-            pushFollow(FOLLOW_identifier_in_global484);
+            pushFollow(FOLLOW_identifier_in_global488);
             id=identifier();
             _fsp--;
             if (failed) return ;
-            pushFollow(FOLLOW_opt_semicolon_in_global486);
+            pushFollow(FOLLOW_opt_semicolon_in_global490);
             opt_semicolon();
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              		    global.setIdentifier( id.getText() );
-              		    global.setEndCharacter( ((CommonToken)id).getStopIndex() );
+
+              		    global.setIdentifier( input.toString(id.start,id.stop) );
+              		    global.setEndCharacter( ((CommonToken)((Token)id.start)).getStopIndex() );
               		
             }
 
@@ -960,12 +980,12 @@
 
 
     // $ANTLR start function
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:312:1: function : loc= FUNCTION (retType= dotted_name[null] )? n= identifier '(' ( (paramType= dotted_name[null] )? paramName= argument ( ',' (paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:313:1: function : FUNCTION (retType= dotted_name[null] )? id= identifier LEFT_PAREN ( (paramType= dotted_name[null] )? paramName= argument ( COMMA (paramType= dotted_name[null] )? paramName= argument )* )? RIGHT_PAREN body= curly_chunk[f] ;
     public final void function() throws RecognitionException {
-        Token loc=null;
+        Token FUNCTION6=null;
         String retType = null;
 
-        Token n = null;
+        identifier_return id = null;
 
         String paramType = null;
 
@@ -974,31 +994,31 @@
         String body = null;
 
 
-        
-        		FunctionDescr f = null;
+
+        		FunctionDescr f = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:317:3: (loc= FUNCTION (retType= dotted_name[null] )? n= identifier '(' ( (paramType= dotted_name[null] )? paramName= argument ( ',' (paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:317:3: loc= FUNCTION (retType= dotted_name[null] )? n= identifier '(' ( (paramType= dotted_name[null] )? paramName= argument ( ',' (paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:318:3: ( FUNCTION (retType= dotted_name[null] )? id= identifier LEFT_PAREN ( (paramType= dotted_name[null] )? paramName= argument ( COMMA (paramType= dotted_name[null] )? paramName= argument )* )? RIGHT_PAREN body= curly_chunk[f] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:318:3: FUNCTION (retType= dotted_name[null] )? id= identifier LEFT_PAREN ( (paramType= dotted_name[null] )? paramName= argument ( COMMA (paramType= dotted_name[null] )? paramName= argument )* )? RIGHT_PAREN body= curly_chunk[f]
             {
-            loc=(Token)input.LT(1);
-            match(input,FUNCTION,FOLLOW_FUNCTION_in_function513); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:317:16: (retType= dotted_name[null] )?
-            int alt10=2;
-            int LA10_0 = input.LA(1);
+            FUNCTION6=(Token)input.LT(1);
+            match(input,FUNCTION,FOLLOW_FUNCTION_in_function515); if (failed) return ;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:318:19: (retType= dotted_name[null] )?
+            int alt11=2;
+            int LA11_0 = input.LA(1);
 
-            if ( (LA10_0==ID) ) {
-                int LA10_1 = input.LA(2);
+            if ( ((LA11_0>=ATTRIBUTES && LA11_0<=ID)||LA11_0==GLOBAL||(LA11_0>=QUERY && LA11_0<=WHEN)||LA11_0==ENABLED||LA11_0==SALIENCE||LA11_0==DURATION||LA11_0==FROM||(LA11_0>=INIT && LA11_0<=RESULT)||(LA11_0>=CONTAINS && LA11_0<=IN)||LA11_0==NULL||LA11_0==THEN) ) {
+                int LA11_1 = input.LA(2);
 
-                if ( ((LA10_1>=ATTRIBUTES && LA10_1<=QUERY)||LA10_1==ID||(LA10_1>=END && LA10_1<=WHEN)||LA10_1==ENABLED||LA10_1==SALIENCE||LA10_1==DURATION||LA10_1==ACCUMULATE||(LA10_1>=INIT && LA10_1<=OR)||(LA10_1>=EVAL && LA10_1<=IN)||LA10_1==NULL||LA10_1==LEFT_SQUARE||(LA10_1>=AND && LA10_1<=THEN)||LA10_1==71) ) {
-                    alt10=1;
+                if ( ((LA11_1>=ATTRIBUTES && LA11_1<=GLOBAL)||(LA11_1>=QUERY && LA11_1<=WHEN)||LA11_1==ENABLED||LA11_1==SALIENCE||LA11_1==DURATION||LA11_1==FROM||(LA11_1>=INIT && LA11_1<=RESULT)||(LA11_1>=CONTAINS && LA11_1<=IN)||LA11_1==NULL||LA11_1==LEFT_SQUARE||LA11_1==THEN) ) {
+                    alt11=1;
                 }
             }
-            switch (alt10) {
+            switch (alt11) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:317:17: retType= dotted_name[null]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:318:19: retType= dotted_name[null]
                     {
-                    pushFollow(FOLLOW_dotted_name_in_function518);
+                    pushFollow(FOLLOW_dotted_name_in_function519);
                     retType=dotted_name(null);
                     _fsp--;
                     if (failed) return ;
@@ -1009,38 +1029,38 @@
             }
 
             pushFollow(FOLLOW_identifier_in_function525);
-            n=identifier();
+            id=identifier();
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              			//System.err.println( "function :: " + n.getText() );
-              			f = factory.createFunction( n.getText(), retType );
-              			f.setLocation(offset(loc.getLine()), loc.getCharPositionInLine());
-              	        	f.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			packageDescr.addFunction( f );
+
+              			//System.err.println( "function :: " + n.getText() );
+              			f = factory.createFunction( input.toString(id.start,id.stop), retType );
+              			f.setLocation(offset(FUNCTION6.getLine()), FUNCTION6.getCharPositionInLine());
+              	        	f.setStartCharacter( ((CommonToken)FUNCTION6).getStartIndex() );
+              			packageDescr.addFunction( f );
               		
             }
             match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_function534); if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:326:4: ( (paramType= dotted_name[null] )? paramName= argument ( ',' (paramType= dotted_name[null] )? paramName= argument )* )?
-            int alt14=2;
-            int LA14_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:327:4: ( (paramType= dotted_name[null] )? paramName= argument ( COMMA (paramType= dotted_name[null] )? paramName= argument )* )?
+            int alt15=2;
+            int LA15_0 = input.LA(1);
 
-            if ( ((LA14_0>=ATTRIBUTES && LA14_0<=QUERY)||LA14_0==ID||(LA14_0>=END && LA14_0<=WHEN)||LA14_0==ENABLED||LA14_0==SALIENCE||LA14_0==DURATION||LA14_0==ACCUMULATE||(LA14_0>=INIT && LA14_0<=OR)||(LA14_0>=EVAL && LA14_0<=IN)||LA14_0==NULL||(LA14_0>=AND && LA14_0<=THEN)) ) {
-                alt14=1;
+            if ( ((LA15_0>=ATTRIBUTES && LA15_0<=ID)||LA15_0==GLOBAL||(LA15_0>=QUERY && LA15_0<=WHEN)||LA15_0==ENABLED||LA15_0==SALIENCE||LA15_0==DURATION||LA15_0==FROM||(LA15_0>=INIT && LA15_0<=RESULT)||(LA15_0>=CONTAINS && LA15_0<=IN)||LA15_0==NULL||LA15_0==THEN) ) {
+                alt15=1;
             }
-            switch (alt14) {
+            switch (alt15) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:326:6: (paramType= dotted_name[null] )? paramName= argument ( ',' (paramType= dotted_name[null] )? paramName= argument )*
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:327:6: (paramType= dotted_name[null] )? paramName= argument ( COMMA (paramType= dotted_name[null] )? paramName= argument )*
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:326:6: (paramType= dotted_name[null] )?
-                    int alt11=2;
-                    alt11 = dfa11.predict(input);
-                    switch (alt11) {
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:327:15: (paramType= dotted_name[null] )?
+                    int alt12=2;
+                    alt12 = dfa12.predict(input);
+                    switch (alt12) {
                         case 1 :
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:326:7: paramType= dotted_name[null]
+                            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:327:15: paramType= dotted_name[null]
                             {
-                            pushFollow(FOLLOW_dotted_name_in_function544);
+                            pushFollow(FOLLOW_dotted_name_in_function543);
                             paramType=dotted_name(null);
                             _fsp--;
                             if (failed) return ;
@@ -1050,39 +1070,39 @@
 
                     }
 
-                    pushFollow(FOLLOW_argument_in_function551);
+                    pushFollow(FOLLOW_argument_in_function549);
                     paramName=argument();
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      					f.addParameter( paramType, paramName );
+
+                      					f.addParameter( paramType, paramName );
                       				
                     }
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:330:5: ( ',' (paramType= dotted_name[null] )? paramName= argument )*
-                    loop13:
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:331:5: ( COMMA (paramType= dotted_name[null] )? paramName= argument )*
+                    loop14:
                     do {
-                        int alt13=2;
-                        int LA13_0 = input.LA(1);
+                        int alt14=2;
+                        int LA14_0 = input.LA(1);
 
-                        if ( (LA13_0==COMMA) ) {
-                            alt13=1;
+                        if ( (LA14_0==COMMA) ) {
+                            alt14=1;
                         }
 
 
-                        switch (alt13) {
+                        switch (alt14) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:330:7: ',' (paramType= dotted_name[null] )? paramName= argument
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:331:7: COMMA (paramType= dotted_name[null] )? paramName= argument
                     	    {
-                    	    match(input,COMMA,FOLLOW_COMMA_in_function565); if (failed) return ;
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:330:11: (paramType= dotted_name[null] )?
-                    	    int alt12=2;
-                    	    alt12 = dfa12.predict(input);
-                    	    switch (alt12) {
+                    	    match(input,COMMA,FOLLOW_COMMA_in_function563); if (failed) return ;
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:331:22: (paramType= dotted_name[null] )?
+                    	    int alt13=2;
+                    	    alt13 = dfa13.predict(input);
+                    	    switch (alt13) {
                     	        case 1 :
-                    	            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:330:12: paramType= dotted_name[null]
+                    	            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:331:22: paramType= dotted_name[null]
                     	            {
-                    	            pushFollow(FOLLOW_dotted_name_in_function570);
+                    	            pushFollow(FOLLOW_dotted_name_in_function567);
                     	            paramType=dotted_name(null);
                     	            _fsp--;
                     	            if (failed) return ;
@@ -1092,13 +1112,13 @@
 
                     	    }
 
-                    	    pushFollow(FOLLOW_argument_in_function577);
+                    	    pushFollow(FOLLOW_argument_in_function573);
                     	    paramName=argument();
                     	    _fsp--;
                     	    if (failed) return ;
                     	    if ( backtracking==0 ) {
-                    	      
-                    	      						f.addParameter( paramType, paramName );
+
+                    	      						f.addParameter( paramType, paramName );
                     	      					
                     	    }
 
@@ -1106,7 +1126,7 @@
                     	    break;
 
                     	default :
-                    	    break loop13;
+                    	    break loop14;
                         }
                     } while (true);
 
@@ -1116,15 +1136,15 @@
 
             }
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_function601); if (failed) return ;
-            pushFollow(FOLLOW_curly_chunk_in_function607);
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_function597); if (failed) return ;
+            pushFollow(FOLLOW_curly_chunk_in_function603);
             body=curly_chunk(f);
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              			//strip out '{','}'
-              			f.setText( body.substring( 1, body.length()-1 ) );
+
+              			//strip out '{','}'
+              			f.setText( body.substring( 1, body.length()-1 ) );
               		
             }
 
@@ -1142,100 +1162,167 @@
     // $ANTLR end function
 
 
+    // $ANTLR start argument
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:345:1: argument returns [String name] : id= identifier ( '[' ']' )* ;
+    public final String argument() throws RecognitionException {
+        String name = null;
+
+        identifier_return id = null;
+
+
+
+        		name = null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:349:4: (id= identifier ( '[' ']' )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:349:4: id= identifier ( '[' ']' )*
+            {
+            pushFollow(FOLLOW_identifier_in_argument631);
+            id=identifier();
+            _fsp--;
+            if (failed) return name;
+            if ( backtracking==0 ) {
+               name =input.toString(id.start,id.stop); 
+            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:349:38: ( '[' ']' )*
+            loop16:
+            do {
+                int alt16=2;
+                int LA16_0 = input.LA(1);
+
+                if ( (LA16_0==LEFT_SQUARE) ) {
+                    alt16=1;
+                }
+
+
+                switch (alt16) {
+            	case 1 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:349:40: '[' ']'
+            	    {
+            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_argument637); if (failed) return name;
+            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_argument639); if (failed) return name;
+            	    if ( backtracking==0 ) {
+            	       name += "[]";
+            	    }
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop16;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return name;
+    }
+    // $ANTLR end argument
+
+
     // $ANTLR start query
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:346:1: query returns [QueryDescr query] : loc= QUERY queryName= name ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )? ( normal_lhs_block[lhs] ) loc= END ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:354:1: query returns [QueryDescr query] : QUERY queryName= name ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )? normal_lhs_block[lhs] END ;
     public final QueryDescr query() throws RecognitionException {
         QueryDescr query = null;
 
-        Token loc=null;
         Token paramName=null;
+        Token QUERY7=null;
+        Token END8=null;
         String queryName = null;
 
 
-        
-        		query = null;
-        		AndDescr lhs = null;
-        		List params = null;
+
+        		query = null;
+        		AndDescr lhs = null;
+        		List params = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:353:3: (loc= QUERY queryName= name ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )? ( normal_lhs_block[lhs] ) loc= END )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:353:3: loc= QUERY queryName= name ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )? ( normal_lhs_block[lhs] ) loc= END
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:361:3: ( QUERY queryName= name ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )? normal_lhs_block[lhs] END )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:361:3: QUERY queryName= name ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )? normal_lhs_block[lhs] END
             {
-            loc=(Token)input.LT(1);
-            match(input,QUERY,FOLLOW_QUERY_in_query639); if (failed) return query;
-            pushFollow(FOLLOW_name_in_query643);
+            QUERY7=(Token)input.LT(1);
+            match(input,QUERY,FOLLOW_QUERY_in_query669); if (failed) return query;
+            pushFollow(FOLLOW_name_in_query673);
             queryName=name();
             _fsp--;
             if (failed) return query;
             if ( backtracking==0 ) {
-               
-              			query = factory.createQuery( queryName ); 
-              			query.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			query.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			lhs = new AndDescr(); query.setLhs( lhs ); 
-              			lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+               
+              			query = factory.createQuery( queryName ); 
+              			query.setLocation( offset(QUERY7.getLine()), QUERY7.getCharPositionInLine() );
+              			query.setStartCharacter( ((CommonToken)QUERY7).getStartIndex() );
+              			lhs = new AndDescr(); query.setLhs( lhs ); 
+              			lhs.setLocation( offset(QUERY7.getLine()), QUERY7.getCharPositionInLine() );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:361:3: ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )?
-            int alt17=2;
-            int LA17_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:369:3: ( LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN )?
+            int alt19=2;
+            int LA19_0 = input.LA(1);
 
-            if ( (LA17_0==LEFT_PAREN) ) {
-                int LA17_1 = input.LA(2);
+            if ( (LA19_0==LEFT_PAREN) ) {
+                int LA19_1 = input.LA(2);
 
-                if ( (LA17_1==ID) ) {
-                    int LA17_3 = input.LA(3);
+                if ( (LA19_1==ID) ) {
+                    int LA19_3 = input.LA(3);
 
-                    if ( (LA17_3==RIGHT_PAREN||LA17_3==COMMA) ) {
-                        alt17=1;
+                    if ( ((LA19_3>=COMMA && LA19_3<=RIGHT_PAREN)) ) {
+                        alt19=1;
                     }
                 }
-                else if ( (LA17_1==RIGHT_PAREN) ) {
-                    alt17=1;
+                else if ( (LA19_1==RIGHT_PAREN) ) {
+                    alt19=1;
                 }
             }
-            switch (alt17) {
+            switch (alt19) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:362:4: LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:369:5: LEFT_PAREN (paramName= ID ( ',' paramName= ID )* )? RIGHT_PAREN
                     {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_query656); if (failed) return query;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:363:4: (paramName= ID ( ',' paramName= ID )* )?
-                    int alt16=2;
-                    int LA16_0 = input.LA(1);
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_query683); if (failed) return query;
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:370:11: (paramName= ID ( ',' paramName= ID )* )?
+                    int alt18=2;
+                    int LA18_0 = input.LA(1);
 
-                    if ( (LA16_0==ID) ) {
-                        alt16=1;
+                    if ( (LA18_0==ID) ) {
+                        alt18=1;
                     }
-                    switch (alt16) {
+                    switch (alt18) {
                         case 1 :
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:364:5: paramName= ID ( ',' paramName= ID )*
+                            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:370:13: paramName= ID ( ',' paramName= ID )*
                             {
                             if ( backtracking==0 ) {
                                params = new ArrayList(); 
                             }
                             paramName=(Token)input.LT(1);
-                            match(input,ID,FOLLOW_ID_in_query680); if (failed) return query;
+                            match(input,ID,FOLLOW_ID_in_query715); if (failed) return query;
                             if ( backtracking==0 ) {
                                params.add( paramName.getText() ); 
                             }
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:367:5: ( ',' paramName= ID )*
-                            loop15:
+                            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:372:15: ( ',' paramName= ID )*
+                            loop17:
                             do {
-                                int alt15=2;
-                                int LA15_0 = input.LA(1);
+                                int alt17=2;
+                                int LA17_0 = input.LA(1);
 
-                                if ( (LA15_0==COMMA) ) {
-                                    alt15=1;
+                                if ( (LA17_0==COMMA) ) {
+                                    alt17=1;
                                 }
 
 
-                                switch (alt15) {
+                                switch (alt17) {
                             	case 1 :
-                            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:367:6: ',' paramName= ID
+                            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:372:16: ',' paramName= ID
                             	    {
-                            	    match(input,COMMA,FOLLOW_COMMA_in_query693); if (failed) return query;
+                            	    match(input,COMMA,FOLLOW_COMMA_in_query763); if (failed) return query;
                             	    paramName=(Token)input.LT(1);
-                            	    match(input,ID,FOLLOW_ID_in_query697); if (failed) return query;
+                            	    match(input,ID,FOLLOW_ID_in_query767); if (failed) return query;
                             	    if ( backtracking==0 ) {
                             	       params.add( paramName.getText() ); 
                             	    }
@@ -1244,7 +1331,7 @@
                             	    break;
 
                             	default :
-                            	    break loop15;
+                            	    break loop17;
                                 }
                             } while (true);
 
@@ -1257,28 +1344,22 @@
 
                     }
 
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_query734); if (failed) return query;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_query815); if (failed) return query;
 
                     }
                     break;
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:373:3: ( normal_lhs_block[lhs] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:374:4: normal_lhs_block[lhs]
-            {
-            pushFollow(FOLLOW_normal_lhs_block_in_query751);
+            pushFollow(FOLLOW_normal_lhs_block_in_query833);
             normal_lhs_block(lhs);
             _fsp--;
             if (failed) return query;
+            END8=(Token)input.LT(1);
+            match(input,END,FOLLOW_END_in_query838); if (failed) return query;
+            if ( backtracking==0 ) {
 
-            }
-
-            loc=(Token)input.LT(1);
-            match(input,END,FOLLOW_END_in_query768); if (failed) return query;
-            if ( backtracking==0 ) {
-              
-              			query.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+              			query.setEndCharacter( ((CommonToken)END8).getStopIndex() );
               		
             }
 
@@ -1297,63 +1378,64 @@
 
 
     // $ANTLR start template
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:384:1: template returns [FactTemplateDescr template] : loc= TEMPLATE templateName= identifier opt_semicolon (slot= template_slot )+ loc= END opt_semicolon ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:385:1: template returns [FactTemplateDescr template] : TEMPLATE templateName= identifier opt_semicolon (slot= template_slot )+ END opt_semicolon ;
     public final FactTemplateDescr template() throws RecognitionException {
         FactTemplateDescr template = null;
 
-        Token loc=null;
-        Token templateName = null;
+        Token TEMPLATE9=null;
+        Token END10=null;
+        identifier_return templateName = null;
 
         FieldTemplateDescr slot = null;
 
 
-        
-        		template = null;		
+
+        		template = null;		
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:389:3: (loc= TEMPLATE templateName= identifier opt_semicolon (slot= template_slot )+ loc= END opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:389:3: loc= TEMPLATE templateName= identifier opt_semicolon (slot= template_slot )+ loc= END opt_semicolon
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:390:3: ( TEMPLATE templateName= identifier opt_semicolon (slot= template_slot )+ END opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:390:3: TEMPLATE templateName= identifier opt_semicolon (slot= template_slot )+ END opt_semicolon
             {
-            loc=(Token)input.LT(1);
-            match(input,TEMPLATE,FOLLOW_TEMPLATE_in_template798); if (failed) return template;
-            pushFollow(FOLLOW_identifier_in_template802);
+            TEMPLATE9=(Token)input.LT(1);
+            match(input,TEMPLATE,FOLLOW_TEMPLATE_in_template866); if (failed) return template;
+            pushFollow(FOLLOW_identifier_in_template870);
             templateName=identifier();
             _fsp--;
             if (failed) return template;
-            pushFollow(FOLLOW_opt_semicolon_in_template804);
+            pushFollow(FOLLOW_opt_semicolon_in_template872);
             opt_semicolon();
             _fsp--;
             if (failed) return template;
             if ( backtracking==0 ) {
-              
-              			template = new FactTemplateDescr(templateName.getText());
-              			template.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );			
-              			template.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+              			template = new FactTemplateDescr(input.toString(templateName.start,templateName.stop));
+              			template.setLocation( offset(TEMPLATE9.getLine()), TEMPLATE9.getCharPositionInLine() );			
+              			template.setStartCharacter( ((CommonToken)TEMPLATE9).getStartIndex() );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:395:3: (slot= template_slot )+
-            int cnt18=0;
-            loop18:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:396:3: (slot= template_slot )+
+            int cnt20=0;
+            loop20:
             do {
-                int alt18=2;
-                int LA18_0 = input.LA(1);
+                int alt20=2;
+                int LA20_0 = input.LA(1);
 
-                if ( (LA18_0==ID) ) {
-                    alt18=1;
+                if ( (LA20_0==ID) ) {
+                    alt20=1;
                 }
 
 
-                switch (alt18) {
+                switch (alt20) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:396:4: slot= template_slot
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:397:4: slot= template_slot
             	    {
-            	    pushFollow(FOLLOW_template_slot_in_template819);
+            	    pushFollow(FOLLOW_template_slot_in_template887);
             	    slot=template_slot();
             	    _fsp--;
             	    if (failed) return template;
             	    if ( backtracking==0 ) {
-            	      
-            	      				template.addFieldTemplate(slot);
+
+            	      				template.addFieldTemplate( slot );
             	      			
             	    }
 
@@ -1361,24 +1443,24 @@
             	    break;
 
             	default :
-            	    if ( cnt18 >= 1 ) break loop18;
+            	    if ( cnt20 >= 1 ) break loop20;
             	    if (backtracking>0) {failed=true; return template;}
                         EarlyExitException eee =
-                            new EarlyExitException(18, input);
+                            new EarlyExitException(20, input);
                         throw eee;
                 }
-                cnt18++;
+                cnt20++;
             } while (true);
 
-            loc=(Token)input.LT(1);
-            match(input,END,FOLLOW_END_in_template836); if (failed) return template;
-            pushFollow(FOLLOW_opt_semicolon_in_template838);
+            END10=(Token)input.LT(1);
+            match(input,END,FOLLOW_END_in_template902); if (failed) return template;
+            pushFollow(FOLLOW_opt_semicolon_in_template904);
             opt_semicolon();
             _fsp--;
             if (failed) return template;
             if ( backtracking==0 ) {
-              
-              			template.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+
+              			template.setEndCharacter( ((CommonToken)END10).getStopIndex() );
               		
             }
 
@@ -1397,49 +1479,49 @@
 
 
     // $ANTLR start template_slot
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:407:1: template_slot returns [FieldTemplateDescr field] : fieldType= dotted_name[field] n= identifier opt_semicolon ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:408:1: template_slot returns [FieldTemplateDescr field] : fieldType= qualified_id[$field] id= identifier opt_semicolon ;
     public final FieldTemplateDescr template_slot() throws RecognitionException {
         FieldTemplateDescr field = null;
 
         String fieldType = null;
 
-        Token n = null;
+        identifier_return id = null;
 
 
-        
-        		field = null;
+
+        		field = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:412:11: (fieldType= dotted_name[field] n= identifier opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:412:11: fieldType= dotted_name[field] n= identifier opt_semicolon
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:413:11: (fieldType= qualified_id[$field] id= identifier opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:413:11: fieldType= qualified_id[$field] id= identifier opt_semicolon
             {
             if ( backtracking==0 ) {
-              
-              			field = factory.createFieldTemplate();
+
+              			field = factory.createFieldTemplate();
               	         
             }
-            pushFollow(FOLLOW_dotted_name_in_template_slot884);
-            fieldType=dotted_name(field);
+            pushFollow(FOLLOW_qualified_id_in_template_slot950);
+            fieldType=qualified_id(field);
             _fsp--;
             if (failed) return field;
             if ( backtracking==0 ) {
-              
-              		        field.setClassType( fieldType );
+
+              		        field.setClassType( fieldType );
               		 
             }
-            pushFollow(FOLLOW_identifier_in_template_slot902);
-            n=identifier();
+            pushFollow(FOLLOW_identifier_in_template_slot968);
+            id=identifier();
             _fsp--;
             if (failed) return field;
-            pushFollow(FOLLOW_opt_semicolon_in_template_slot904);
+            pushFollow(FOLLOW_opt_semicolon_in_template_slot970);
             opt_semicolon();
             _fsp--;
             if (failed) return field;
             if ( backtracking==0 ) {
-              
-              		        field.setName( n.getText() );
-              			field.setLocation( offset(n.getLine()), n.getCharPositionInLine() );
-              			field.setEndCharacter( ((CommonToken)n).getStopIndex() );
+
+              		        field.setName( input.toString(id.start,id.stop) );
+              			field.setLocation( offset(((Token)id.start).getLine()), ((Token)id.start).getCharPositionInLine() );
+              			field.setEndCharacter( ((CommonToken)((Token)id.start)).getStopIndex() );
               		 
             }
 
@@ -1458,67 +1540,84 @@
 
 
     // $ANTLR start rule
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:428:1: rule returns [RuleDescr rule] : loc= RULE ruleName= name rule_attributes[rule] (loc= WHEN ( ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:429:1: rule returns [RuleDescr rule] : RULE ruleName= name ( rule_attributes[$rule] )? ( WHEN ( ':' )? normal_lhs_block[lhs] )? rhs_chunk[$rule] ;
     public final RuleDescr rule() throws RecognitionException {
         RuleDescr rule = null;
 
-        Token loc=null;
+        Token RULE11=null;
+        Token WHEN12=null;
         String ruleName = null;
 
 
-        
-        		rule = null;
-        		String consequence = "";
-        		AndDescr lhs = null;
+
+        		rule = null;
+        		AndDescr lhs = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:435:3: (loc= RULE ruleName= name rule_attributes[rule] (loc= WHEN ( ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:435:3: loc= RULE ruleName= name rule_attributes[rule] (loc= WHEN ( ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:435:3: ( RULE ruleName= name ( rule_attributes[$rule] )? ( WHEN ( ':' )? normal_lhs_block[lhs] )? rhs_chunk[$rule] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:435:3: RULE ruleName= name ( rule_attributes[$rule] )? ( WHEN ( ':' )? normal_lhs_block[lhs] )? rhs_chunk[$rule]
             {
-            loc=(Token)input.LT(1);
-            match(input,RULE,FOLLOW_RULE_in_rule937); if (failed) return rule;
-            pushFollow(FOLLOW_name_in_rule941);
+            RULE11=(Token)input.LT(1);
+            match(input,RULE,FOLLOW_RULE_in_rule1001); if (failed) return rule;
+            pushFollow(FOLLOW_name_in_rule1005);
             ruleName=name();
             _fsp--;
             if (failed) return rule;
             if ( backtracking==0 ) {
-               
-              			location.setType( Location.LOCATION_RULE_HEADER );
-              			debug( "start rule: " + ruleName );
-              			rule = new RuleDescr( ruleName, null ); 
-              			rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+               
+              			location.setType( Location.LOCATION_RULE_HEADER );
+              			debug( "start rule: " + ruleName );
+              			rule = new RuleDescr( ruleName, null ); 
+              			rule.setLocation( offset(RULE11.getLine()), RULE11.getCharPositionInLine() );
+              			rule.setStartCharacter( ((CommonToken)RULE11).getStartIndex() );
               		
             }
-            pushFollow(FOLLOW_rule_attributes_in_rule950);
-            rule_attributes(rule);
-            _fsp--;
-            if (failed) return rule;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:444:3: (loc= WHEN ( ':' )? ( normal_lhs_block[lhs] ) )?
-            int alt20=2;
-            int LA20_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:443:3: ( rule_attributes[$rule] )?
+            int alt21=2;
+            int LA21_0 = input.LA(1);
 
-            if ( (LA20_0==WHEN) ) {
-                alt20=1;
+            if ( (LA21_0==ATTRIBUTES||LA21_0==DATE_EFFECTIVE||(LA21_0>=DATE_EXPIRES && LA21_0<=ENABLED)||LA21_0==SALIENCE||(LA21_0>=NO_LOOP && LA21_0<=LOCK_ON_ACTIVE)) ) {
+                alt21=1;
             }
-            switch (alt20) {
+            switch (alt21) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:444:5: loc= WHEN ( ':' )? ( normal_lhs_block[lhs] )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:443:3: rule_attributes[$rule]
                     {
-                    loc=(Token)input.LT(1);
-                    match(input,WHEN,FOLLOW_WHEN_in_rule959); if (failed) return rule;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:444:14: ( ':' )?
-                    int alt19=2;
-                    int LA19_0 = input.LA(1);
+                    pushFollow(FOLLOW_rule_attributes_in_rule1014);
+                    rule_attributes(rule);
+                    _fsp--;
+                    if (failed) return rule;
 
-                    if ( (LA19_0==70) ) {
-                        alt19=1;
                     }
-                    switch (alt19) {
+                    break;
+
+            }
+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:444:3: ( WHEN ( ':' )? normal_lhs_block[lhs] )?
+            int alt23=2;
+            int LA23_0 = input.LA(1);
+
+            if ( (LA23_0==WHEN) ) {
+                alt23=1;
+            }
+            switch (alt23) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:445:4: WHEN ( ':' )? normal_lhs_block[lhs]
+                    {
+                    WHEN12=(Token)input.LT(1);
+                    match(input,WHEN,FOLLOW_WHEN_in_rule1026); if (failed) return rule;
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:445:9: ( ':' )?
+                    int alt22=2;
+                    int LA22_0 = input.LA(1);
+
+                    if ( (LA22_0==71) ) {
+                        alt22=1;
+                    }
+                    switch (alt22) {
                         case 1 :
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ':'
+                            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:445:9: ':'
                             {
-                            match(input,70,FOLLOW_70_in_rule961); if (failed) return rule;
+                            match(input,71,FOLLOW_71_in_rule1028); if (failed) return rule;
 
                             }
                             break;
@@ -1526,30 +1625,24 @@
                     }
 
                     if ( backtracking==0 ) {
-                       
-                      				this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-                      				lhs = new AndDescr(); rule.setLhs( lhs ); 
-                      				lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+                       
+                      				this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+                      				lhs = new AndDescr(); rule.setLhs( lhs ); 
+                      				lhs.setLocation( offset(WHEN12.getLine()), WHEN12.getCharPositionInLine() );
+                      				lhs.setStartCharacter( ((CommonToken)WHEN12).getStartIndex() );
                       			
                     }
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:451:4: ( normal_lhs_block[lhs] )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:453:5: normal_lhs_block[lhs]
-                    {
-                    pushFollow(FOLLOW_normal_lhs_block_in_rule979);
+                    pushFollow(FOLLOW_normal_lhs_block_in_rule1039);
                     normal_lhs_block(lhs);
                     _fsp--;
                     if (failed) return rule;
 
                     }
-
-
-                    }
                     break;
 
             }
 
-            pushFollow(FOLLOW_rhs_chunk_in_rule1000);
+            pushFollow(FOLLOW_rhs_chunk_in_rule1049);
             rhs_chunk(rule);
             _fsp--;
             if (failed) return rule;
@@ -1569,82 +1662,87 @@
 
 
     // $ANTLR start rule_attributes
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:462:1: rule_attributes[RuleDescr rule] : ( ATTRIBUTES ':' )? ( ( ',' )? a= rule_attribute )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:459:1: rule_attributes[RuleDescr rule] : ( ATTRIBUTES ':' )? attr= rule_attribute ( ( ',' )? attr= rule_attribute )* ;
     public final void rule_attributes(RuleDescr rule) throws RecognitionException {
-        AttributeDescr a = null;
+        AttributeDescr attr = null;
 
 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:464:4: ( ( ATTRIBUTES ':' )? ( ( ',' )? a= rule_attribute )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:464:4: ( ATTRIBUTES ':' )? ( ( ',' )? a= rule_attribute )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:461:2: ( ( ATTRIBUTES ':' )? attr= rule_attribute ( ( ',' )? attr= rule_attribute )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:461:2: ( ATTRIBUTES ':' )? attr= rule_attribute ( ( ',' )? attr= rule_attribute )*
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:464:4: ( ATTRIBUTES ':' )?
-            int alt21=2;
-            int LA21_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:461:2: ( ATTRIBUTES ':' )?
+            int alt24=2;
+            int LA24_0 = input.LA(1);
 
-            if ( (LA21_0==ATTRIBUTES) ) {
-                alt21=1;
+            if ( (LA24_0==ATTRIBUTES) ) {
+                alt24=1;
             }
-            switch (alt21) {
+            switch (alt24) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:464:5: ATTRIBUTES ':'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:461:4: ATTRIBUTES ':'
                     {
-                    match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_rule_attributes1021); if (failed) return ;
-                    match(input,70,FOLLOW_70_in_rule_attributes1023); if (failed) return ;
+                    match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_rule_attributes1069); if (failed) return ;
+                    match(input,71,FOLLOW_71_in_rule_attributes1071); if (failed) return ;
 
                     }
                     break;
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:465:4: ( ( ',' )? a= rule_attribute )*
-            loop23:
+            pushFollow(FOLLOW_rule_attribute_in_rule_attributes1079);
+            attr=rule_attribute();
+            _fsp--;
+            if (failed) return ;
+            if ( backtracking==0 ) {
+               rule.addAttribute( attr ); 
+            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:463:2: ( ( ',' )? attr= rule_attribute )*
+            loop26:
             do {
-                int alt23=2;
-                int LA23_0 = input.LA(1);
+                int alt26=2;
+                int LA26_0 = input.LA(1);
 
-                if ( (LA23_0==DATE_EFFECTIVE||(LA23_0>=DATE_EXPIRES && LA23_0<=ENABLED)||LA23_0==SALIENCE||(LA23_0>=NO_LOOP && LA23_0<=LOCK_ON_ACTIVE)||LA23_0==COMMA) ) {
-                    alt23=1;
+                if ( (LA26_0==COMMA||LA26_0==DATE_EFFECTIVE||(LA26_0>=DATE_EXPIRES && LA26_0<=ENABLED)||LA26_0==SALIENCE||(LA26_0>=NO_LOOP && LA26_0<=LOCK_ON_ACTIVE)) ) {
+                    alt26=1;
                 }
 
 
-                switch (alt23) {
+                switch (alt26) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:465:6: ( ',' )? a= rule_attribute
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:463:4: ( ',' )? attr= rule_attribute
             	    {
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:465:6: ( ',' )?
-            	    int alt22=2;
-            	    int LA22_0 = input.LA(1);
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:463:4: ( ',' )?
+            	    int alt25=2;
+            	    int LA25_0 = input.LA(1);
 
-            	    if ( (LA22_0==COMMA) ) {
-            	        alt22=1;
+            	    if ( (LA25_0==COMMA) ) {
+            	        alt25=1;
             	    }
-            	    switch (alt22) {
+            	    switch (alt25) {
             	        case 1 :
-            	            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ','
+            	            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:463:4: ','
             	            {
-            	            match(input,COMMA,FOLLOW_COMMA_in_rule_attributes1032); if (failed) return ;
+            	            match(input,COMMA,FOLLOW_COMMA_in_rule_attributes1086); if (failed) return ;
 
             	            }
             	            break;
 
             	    }
 
-            	    pushFollow(FOLLOW_rule_attribute_in_rule_attributes1037);
-            	    a=rule_attribute();
+            	    pushFollow(FOLLOW_rule_attribute_in_rule_attributes1091);
+            	    attr=rule_attribute();
             	    _fsp--;
             	    if (failed) return ;
             	    if ( backtracking==0 ) {
-            	      
-            	      					rule.addAttribute( a );
-            	      				
+            	       rule.addAttribute( attr ); 
             	    }
 
             	    }
             	    break;
 
             	default :
-            	    break loop23;
+            	    break loop26;
                 }
             } while (true);
 
@@ -1664,247 +1762,216 @@
 
 
     // $ANTLR start rule_attribute
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:474:1: rule_attribute returns [AttributeDescr d] : (a= salience | a= no_loop | a= agenda_group | a= duration | a= activation_group | a= auto_focus | a= date_effective | a= date_expires | a= enabled | a= ruleflow_group | a= lock_on_active | a= dialect );
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:468:1: rule_attribute returns [AttributeDescr attr] : (a= salience | a= no_loop | a= agenda_group | a= duration | a= activation_group | a= auto_focus | a= date_effective | a= date_expires | a= enabled | a= ruleflow_group | a= lock_on_active | a= dialect );
     public final AttributeDescr rule_attribute() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr attr = null;
 
         AttributeDescr a = null;
 
 
-        
-        		d = null;
+
+        		attr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:479:4: (a= salience | a= no_loop | a= agenda_group | a= duration | a= activation_group | a= auto_focus | a= date_effective | a= date_expires | a= enabled | a= ruleflow_group | a= lock_on_active | a= dialect )
-            int alt24=12;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:475:4: (a= salience | a= no_loop | a= agenda_group | a= duration | a= activation_group | a= auto_focus | a= date_effective | a= date_expires | a= enabled | a= ruleflow_group | a= lock_on_active | a= dialect )
+            int alt27=12;
             switch ( input.LA(1) ) {
             case SALIENCE:
                 {
-                alt24=1;
+                alt27=1;
                 }
                 break;
             case NO_LOOP:
                 {
-                alt24=2;
+                alt27=2;
                 }
                 break;
             case AGENDA_GROUP:
                 {
-                alt24=3;
+                alt27=3;
                 }
                 break;
             case DURATION:
                 {
-                alt24=4;
+                alt27=4;
                 }
                 break;
             case ACTIVATION_GROUP:
                 {
-                alt24=5;
+                alt27=5;
                 }
                 break;
             case AUTO_FOCUS:
                 {
-                alt24=6;
+                alt27=6;
                 }
                 break;
             case DATE_EFFECTIVE:
                 {
-                alt24=7;
+                alt27=7;
                 }
                 break;
             case DATE_EXPIRES:
                 {
-                alt24=8;
+                alt27=8;
                 }
                 break;
             case ENABLED:
                 {
-                alt24=9;
+                alt27=9;
                 }
                 break;
             case RULEFLOW_GROUP:
                 {
-                alt24=10;
+                alt27=10;
                 }
                 break;
             case LOCK_ON_ACTIVE:
                 {
-                alt24=11;
+                alt27=11;
                 }
                 break;
             case DIALECT:
                 {
-                alt24=12;
+                alt27=12;
                 }
                 break;
             default:
-                if (backtracking>0) {failed=true; return d;}
+                if (backtracking>0) {failed=true; return attr;}
                 NoViableAltException nvae =
-                    new NoViableAltException("474:1: rule_attribute returns [AttributeDescr d] : (a= salience | a= no_loop | a= agenda_group | a= duration | a= activation_group | a= auto_focus | a= date_effective | a= date_expires | a= enabled | a= ruleflow_group | a= lock_on_active | a= dialect );", 24, 0, input);
+                    new NoViableAltException("468:1: rule_attribute returns [AttributeDescr attr] : (a= salience | a= no_loop | a= agenda_group | a= duration | a= activation_group | a= auto_focus | a= date_effective | a= date_expires | a= enabled | a= ruleflow_group | a= lock_on_active | a= dialect );", 27, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt24) {
+            switch (alt27) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:479:4: a= salience
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:475:4: a= salience
                     {
-                    pushFollow(FOLLOW_salience_in_rule_attribute1078);
+                    pushFollow(FOLLOW_salience_in_rule_attribute1128);
                     a=salience();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:480:5: a= no_loop
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:476:4: a= no_loop
                     {
-                    pushFollow(FOLLOW_no_loop_in_rule_attribute1088);
+                    pushFollow(FOLLOW_no_loop_in_rule_attribute1136);
                     a=no_loop();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:481:5: a= agenda_group
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:477:4: a= agenda_group
                     {
-                    pushFollow(FOLLOW_agenda_group_in_rule_attribute1099);
+                    pushFollow(FOLLOW_agenda_group_in_rule_attribute1145);
                     a=agenda_group();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:482:5: a= duration
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:478:4: a= duration
                     {
-                    pushFollow(FOLLOW_duration_in_rule_attribute1112);
+                    pushFollow(FOLLOW_duration_in_rule_attribute1154);
                     a=duration();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:483:5: a= activation_group
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:479:4: a= activation_group
                     {
-                    pushFollow(FOLLOW_activation_group_in_rule_attribute1126);
+                    pushFollow(FOLLOW_activation_group_in_rule_attribute1163);
                     a=activation_group();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:484:5: a= auto_focus
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:480:4: a= auto_focus
                     {
-                    pushFollow(FOLLOW_auto_focus_in_rule_attribute1137);
+                    pushFollow(FOLLOW_auto_focus_in_rule_attribute1171);
                     a=auto_focus();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:485:5: a= date_effective
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:481:4: a= date_effective
                     {
-                    pushFollow(FOLLOW_date_effective_in_rule_attribute1148);
+                    pushFollow(FOLLOW_date_effective_in_rule_attribute1179);
                     a=date_effective();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                      d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 8 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:486:5: a= date_expires
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:482:4: a= date_expires
                     {
-                    pushFollow(FOLLOW_date_expires_in_rule_attribute1158);
+                    pushFollow(FOLLOW_date_expires_in_rule_attribute1187);
                     a=date_expires();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                      d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 9 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:487:5: a= enabled
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:483:4: a= enabled
                     {
-                    pushFollow(FOLLOW_enabled_in_rule_attribute1168);
+                    pushFollow(FOLLOW_enabled_in_rule_attribute1195);
                     a=enabled();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                      d=a;
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 10 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:488:5: a= ruleflow_group
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:484:4: a= ruleflow_group
                     {
-                    pushFollow(FOLLOW_ruleflow_group_in_rule_attribute1178);
+                    pushFollow(FOLLOW_ruleflow_group_in_rule_attribute1203);
                     a=ruleflow_group();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 11 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:489:5: a= lock_on_active
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:485:4: a= lock_on_active
                     {
-                    pushFollow(FOLLOW_lock_on_active_in_rule_attribute1188);
+                    pushFollow(FOLLOW_lock_on_active_in_rule_attribute1211);
                     a=lock_on_active();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
                 case 12 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:490:5: a= dialect
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:486:4: a= dialect
                     {
-                    pushFollow(FOLLOW_dialect_in_rule_attribute1197);
+                    pushFollow(FOLLOW_dialect_in_rule_attribute1218);
                     a=dialect();
                     _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                      d = a; 
-                    }
+                    if (failed) return attr;
 
                     }
                     break;
 
             }
+            if ( backtracking==0 ) {
+
+              		attr = a;
+              	
+            }
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -1912,36 +1979,36 @@
         }
         finally {
         }
-        return d;
+        return attr;
     }
     // $ANTLR end rule_attribute
 
 
     // $ANTLR start date_effective
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:494:1: date_effective returns [AttributeDescr d] : loc= DATE_EFFECTIVE val= STRING ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:489:1: date_effective returns [AttributeDescr descr] : DATE_EFFECTIVE STRING ;
     public final AttributeDescr date_effective() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token val=null;
+        Token STRING13=null;
+        Token DATE_EFFECTIVE14=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:499:3: (loc= DATE_EFFECTIVE val= STRING )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:499:3: loc= DATE_EFFECTIVE val= STRING
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:494:3: ( DATE_EFFECTIVE STRING )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:494:3: DATE_EFFECTIVE STRING
             {
-            loc=(Token)input.LT(1);
-            match(input,DATE_EFFECTIVE,FOLLOW_DATE_EFFECTIVE_in_date_effective1229); if (failed) return d;
-            val=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_date_effective1233); if (failed) return d;
+            DATE_EFFECTIVE14=(Token)input.LT(1);
+            match(input,DATE_EFFECTIVE,FOLLOW_DATE_EFFECTIVE_in_date_effective1244); if (failed) return descr;
+            STRING13=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_date_effective1246); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "date-effective", getString( val ) );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)val).getStopIndex() );
+
+              			descr = new AttributeDescr( "date-effective", getString( STRING13.getText() ) );
+              			descr.setLocation( offset( DATE_EFFECTIVE14.getLine() ), DATE_EFFECTIVE14.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)DATE_EFFECTIVE14).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)STRING13).getStopIndex() );
               		
             }
 
@@ -1954,36 +2021,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end date_effective
 
 
     // $ANTLR start date_expires
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:509:1: date_expires returns [AttributeDescr d] : loc= DATE_EXPIRES val= STRING ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:504:1: date_expires returns [AttributeDescr descr] : DATE_EXPIRES STRING ;
     public final AttributeDescr date_expires() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token val=null;
+        Token STRING15=null;
+        Token DATE_EXPIRES16=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:514:3: (loc= DATE_EXPIRES val= STRING )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:514:3: loc= DATE_EXPIRES val= STRING
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:508:4: ( DATE_EXPIRES STRING )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:508:4: DATE_EXPIRES STRING
             {
-            loc=(Token)input.LT(1);
-            match(input,DATE_EXPIRES,FOLLOW_DATE_EXPIRES_in_date_expires1266); if (failed) return d;
-            val=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_date_expires1270); if (failed) return d;
+            DATE_EXPIRES16=(Token)input.LT(1);
+            match(input,DATE_EXPIRES,FOLLOW_DATE_EXPIRES_in_date_expires1275); if (failed) return descr;
+            STRING15=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_date_expires1277); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "date-expires", getString( val ) );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)val).getStopIndex() );
+
+              			descr = new AttributeDescr( "date-expires", getString( STRING15.getText() ) );
+              			descr.setLocation( offset(DATE_EXPIRES16.getLine()), DATE_EXPIRES16.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)DATE_EXPIRES16).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)STRING15).getStopIndex() );
               		
             }
 
@@ -1996,36 +2063,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end date_expires
 
 
     // $ANTLR start enabled
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:525:1: enabled returns [AttributeDescr d] : loc= ENABLED t= BOOL ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:517:1: enabled returns [AttributeDescr descr] : ENABLED BOOL ;
     public final AttributeDescr enabled() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token t=null;
+        Token BOOL17=null;
+        Token ENABLED18=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:530:4: (loc= ENABLED t= BOOL )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:530:4: loc= ENABLED t= BOOL
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:521:5: ( ENABLED BOOL )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:521:5: ENABLED BOOL
             {
-            loc=(Token)input.LT(1);
-            match(input,ENABLED,FOLLOW_ENABLED_in_enabled1305); if (failed) return d;
-            t=(Token)input.LT(1);
-            match(input,BOOL,FOLLOW_BOOL_in_enabled1309); if (failed) return d;
+            ENABLED18=(Token)input.LT(1);
+            match(input,ENABLED,FOLLOW_ENABLED_in_enabled1306); if (failed) return descr;
+            BOOL17=(Token)input.LT(1);
+            match(input,BOOL,FOLLOW_BOOL_in_enabled1308); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              				d = new AttributeDescr( "enabled", t.getText() );
-              				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
+
+              				descr = new AttributeDescr( "enabled", BOOL17.getText() );
+              				descr.setLocation( offset(ENABLED18.getLine()), ENABLED18.getCharPositionInLine() );
+              				descr.setStartCharacter( ((CommonToken)ENABLED18).getStartIndex() );
+              				descr.setEndCharacter( ((CommonToken)BOOL17).getStopIndex() );
               			
             }
 
@@ -2038,79 +2105,79 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end enabled
 
 
     // $ANTLR start salience
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:543:1: salience returns [AttributeDescr d ] : loc= SALIENCE (i= INT | txt= paren_chunk[d] ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:530:1: salience returns [AttributeDescr descr] : SALIENCE ( INT | txt= paren_chunk[$descr] ) ;
     public final AttributeDescr salience() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token i=null;
+        Token SALIENCE19=null;
+        Token INT20=null;
         String txt = null;
 
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:548:3: (loc= SALIENCE (i= INT | txt= paren_chunk[d] ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:548:3: loc= SALIENCE (i= INT | txt= paren_chunk[d] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:535:3: ( SALIENCE ( INT | txt= paren_chunk[$descr] ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:535:3: SALIENCE ( INT | txt= paren_chunk[$descr] )
             {
-            loc=(Token)input.LT(1);
-            match(input,SALIENCE,FOLLOW_SALIENCE_in_salience1354); if (failed) return d;
+            SALIENCE19=(Token)input.LT(1);
+            match(input,SALIENCE,FOLLOW_SALIENCE_in_salience1341); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "salience" );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+              			descr = new AttributeDescr( "salience" );
+              			descr.setLocation( offset(SALIENCE19.getLine()), SALIENCE19.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)SALIENCE19).getStartIndex() );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:554:3: (i= INT | txt= paren_chunk[d] )
-            int alt25=2;
-            int LA25_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:541:3: ( INT | txt= paren_chunk[$descr] )
+            int alt28=2;
+            int LA28_0 = input.LA(1);
 
-            if ( (LA25_0==INT) ) {
-                alt25=1;
+            if ( (LA28_0==INT) ) {
+                alt28=1;
             }
-            else if ( (LA25_0==LEFT_PAREN) ) {
-                alt25=2;
+            else if ( (LA28_0==LEFT_PAREN) ) {
+                alt28=2;
             }
             else {
-                if (backtracking>0) {failed=true; return d;}
+                if (backtracking>0) {failed=true; return descr;}
                 NoViableAltException nvae =
-                    new NoViableAltException("554:3: (i= INT | txt= paren_chunk[d] )", 25, 0, input);
+                    new NoViableAltException("541:3: ( INT | txt= paren_chunk[$descr] )", 28, 0, input);
 
                 throw nvae;
             }
-            switch (alt25) {
+            switch (alt28) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:554:5: i= INT
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:541:5: INT
                     {
-                    i=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_salience1367); if (failed) return d;
+                    INT20=(Token)input.LT(1);
+                    match(input,INT,FOLLOW_INT_in_salience1352); if (failed) return descr;
                     if ( backtracking==0 ) {
-                      
-                      			d.setValue( i.getText() );
-                      			d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+
+                      			descr.setValue( INT20.getText() );
+                      			descr.setEndCharacter( ((CommonToken)INT20).getStopIndex() );
                       		
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:559:5: txt= paren_chunk[d]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:546:5: txt= paren_chunk[$descr]
                     {
-                    pushFollow(FOLLOW_paren_chunk_in_salience1382);
-                    txt=paren_chunk(d);
+                    pushFollow(FOLLOW_paren_chunk_in_salience1367);
+                    txt=paren_chunk(descr);
                     _fsp--;
-                    if (failed) return d;
+                    if (failed) return descr;
                     if ( backtracking==0 ) {
-                      
-                      			d.setValue( txt );
+
+                      			descr.setValue( txt );
                       		
                     }
 
@@ -2129,100 +2196,64 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end salience
 
 
     // $ANTLR start no_loop
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:566:1: no_loop returns [AttributeDescr d] : ( (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:553:1: no_loop returns [AttributeDescr descr] : NO_LOOP ( BOOL )? ;
     public final AttributeDescr no_loop() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token t=null;
+        Token NO_LOOP21=null;
+        Token BOOL22=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: ( (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) )
-            int alt26=2;
-            int LA26_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:557:4: ( NO_LOOP ( BOOL )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:557:4: NO_LOOP ( BOOL )?
+            {
+            NO_LOOP21=(Token)input.LT(1);
+            match(input,NO_LOOP,FOLLOW_NO_LOOP_in_no_loop1398); if (failed) return descr;
+            if ( backtracking==0 ) {
 
-            if ( (LA26_0==NO_LOOP) ) {
-                int LA26_1 = input.LA(2);
-
-                if ( (LA26_1==BOOL) ) {
-                    alt26=2;
-                }
-                else if ( (LA26_1==EOF||(LA26_1>=IMPORT && LA26_1<=QUERY)||(LA26_1>=TEMPLATE && LA26_1<=DATE_EFFECTIVE)||(LA26_1>=DATE_EXPIRES && LA26_1<=ENABLED)||LA26_1==SALIENCE||(LA26_1>=NO_LOOP && LA26_1<=LOCK_ON_ACTIVE)||LA26_1==COMMA||LA26_1==THEN) ) {
-                    alt26=1;
-                }
-                else {
-                    if (backtracking>0) {failed=true; return d;}
-                    NoViableAltException nvae =
-                        new NoViableAltException("566:1: no_loop returns [AttributeDescr d] : ( (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );", 26, 1, input);
-
-                    throw nvae;
-                }
+              			descr = new AttributeDescr( "no-loop", "true" );
+              			descr.setLocation( offset(NO_LOOP21.getLine()), NO_LOOP21.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)NO_LOOP21).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)NO_LOOP21).getStopIndex() );
+              		
             }
-            else {
-                if (backtracking>0) {failed=true; return d;}
-                NoViableAltException nvae =
-                    new NoViableAltException("566:1: no_loop returns [AttributeDescr d] : ( (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );", 26, 0, input);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:564:3: ( BOOL )?
+            int alt29=2;
+            int LA29_0 = input.LA(1);
 
-                throw nvae;
+            if ( (LA29_0==BOOL) ) {
+                alt29=1;
             }
-            switch (alt26) {
+            switch (alt29) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: (loc= NO_LOOP )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:564:5: BOOL
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: (loc= NO_LOOP )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:572:4: loc= NO_LOOP
-                    {
-                    loc=(Token)input.LT(1);
-                    match(input,NO_LOOP,FOLLOW_NO_LOOP_in_no_loop1422); if (failed) return d;
+                    BOOL22=(Token)input.LT(1);
+                    match(input,BOOL,FOLLOW_BOOL_in_no_loop1411); if (failed) return descr;
                     if ( backtracking==0 ) {
-                      
-                      				d = new AttributeDescr( "no-loop", "true" );
-                      				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-                      				d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+
+                      				descr.setValue( BOOL22.getText() );
+                      				descr.setEndCharacter( ((CommonToken)BOOL22).getStopIndex() );
                       			
                     }
 
                     }
-
-
-                    }
                     break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:581:3: (loc= NO_LOOP t= BOOL )
-                    {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:581:3: (loc= NO_LOOP t= BOOL )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:582:4: loc= NO_LOOP t= BOOL
-                    {
-                    loc=(Token)input.LT(1);
-                    match(input,NO_LOOP,FOLLOW_NO_LOOP_in_no_loop1450); if (failed) return d;
-                    t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_no_loop1454); if (failed) return d;
-                    if ( backtracking==0 ) {
-                      
-                      				d = new AttributeDescr( "no-loop", t.getText() );
-                      				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-                      				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-                      			
-                    }
 
-                    }
+            }
 
 
-                    }
-                    break;
+            }
 
-            }
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -2230,100 +2261,64 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end no_loop
 
 
     // $ANTLR start auto_focus
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:594:1: auto_focus returns [AttributeDescr d] : ( (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:572:1: auto_focus returns [AttributeDescr descr] : AUTO_FOCUS ( BOOL )? ;
     public final AttributeDescr auto_focus() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token t=null;
+        Token AUTO_FOCUS23=null;
+        Token BOOL24=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:599:3: ( (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) )
-            int alt27=2;
-            int LA27_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:576:4: ( AUTO_FOCUS ( BOOL )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:576:4: AUTO_FOCUS ( BOOL )?
+            {
+            AUTO_FOCUS23=(Token)input.LT(1);
+            match(input,AUTO_FOCUS,FOLLOW_AUTO_FOCUS_in_auto_focus1446); if (failed) return descr;
+            if ( backtracking==0 ) {
 
-            if ( (LA27_0==AUTO_FOCUS) ) {
-                int LA27_1 = input.LA(2);
-
-                if ( (LA27_1==BOOL) ) {
-                    alt27=2;
-                }
-                else if ( (LA27_1==EOF||(LA27_1>=IMPORT && LA27_1<=QUERY)||(LA27_1>=TEMPLATE && LA27_1<=DATE_EFFECTIVE)||(LA27_1>=DATE_EXPIRES && LA27_1<=ENABLED)||LA27_1==SALIENCE||(LA27_1>=NO_LOOP && LA27_1<=LOCK_ON_ACTIVE)||LA27_1==COMMA||LA27_1==THEN) ) {
-                    alt27=1;
-                }
-                else {
-                    if (backtracking>0) {failed=true; return d;}
-                    NoViableAltException nvae =
-                        new NoViableAltException("594:1: auto_focus returns [AttributeDescr d] : ( (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );", 27, 1, input);
-
-                    throw nvae;
-                }
+              			descr = new AttributeDescr( "auto-focus", "true" );
+              			descr.setLocation( offset(AUTO_FOCUS23.getLine()), AUTO_FOCUS23.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)AUTO_FOCUS23).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)AUTO_FOCUS23).getStopIndex() );
+              		
             }
-            else {
-                if (backtracking>0) {failed=true; return d;}
-                NoViableAltException nvae =
-                    new NoViableAltException("594:1: auto_focus returns [AttributeDescr d] : ( (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );", 27, 0, input);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:583:3: ( BOOL )?
+            int alt30=2;
+            int LA30_0 = input.LA(1);
 
-                throw nvae;
+            if ( (LA30_0==BOOL) ) {
+                alt30=1;
             }
-            switch (alt27) {
+            switch (alt30) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:599:3: (loc= AUTO_FOCUS )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:583:5: BOOL
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:599:3: (loc= AUTO_FOCUS )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:600:4: loc= AUTO_FOCUS
-                    {
-                    loc=(Token)input.LT(1);
-                    match(input,AUTO_FOCUS,FOLLOW_AUTO_FOCUS_in_auto_focus1503); if (failed) return d;
+                    BOOL24=(Token)input.LT(1);
+                    match(input,BOOL,FOLLOW_BOOL_in_auto_focus1459); if (failed) return descr;
                     if ( backtracking==0 ) {
-                      
-                      				d = new AttributeDescr( "auto-focus", "true" );
-                      				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-                      				d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+
+                      				descr.setValue( BOOL24.getText() );
+                      				descr.setEndCharacter( ((CommonToken)BOOL24).getStopIndex() );
                       			
                     }
 
                     }
-
-
-                    }
                     break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:609:3: (loc= AUTO_FOCUS t= BOOL )
-                    {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:609:3: (loc= AUTO_FOCUS t= BOOL )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:610:4: loc= AUTO_FOCUS t= BOOL
-                    {
-                    loc=(Token)input.LT(1);
-                    match(input,AUTO_FOCUS,FOLLOW_AUTO_FOCUS_in_auto_focus1531); if (failed) return d;
-                    t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_auto_focus1535); if (failed) return d;
-                    if ( backtracking==0 ) {
-                      
-                      				d = new AttributeDescr( "auto-focus", t.getText() );
-                      				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-                      				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-                      			
-                    }
 
-                    }
+            }
 
 
-                    }
-                    break;
+            }
 
-            }
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -2331,36 +2326,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end auto_focus
 
 
     // $ANTLR start activation_group
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:622:1: activation_group returns [AttributeDescr d] : loc= ACTIVATION_GROUP n= STRING ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:591:1: activation_group returns [AttributeDescr descr] : ACTIVATION_GROUP STRING ;
     public final AttributeDescr activation_group() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token n=null;
+        Token STRING25=null;
+        Token ACTIVATION_GROUP26=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:627:3: (loc= ACTIVATION_GROUP n= STRING )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:627:3: loc= ACTIVATION_GROUP n= STRING
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:595:4: ( ACTIVATION_GROUP STRING )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:595:4: ACTIVATION_GROUP STRING
             {
-            loc=(Token)input.LT(1);
-            match(input,ACTIVATION_GROUP,FOLLOW_ACTIVATION_GROUP_in_activation_group1580); if (failed) return d;
-            n=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_activation_group1584); if (failed) return d;
+            ACTIVATION_GROUP26=(Token)input.LT(1);
+            match(input,ACTIVATION_GROUP,FOLLOW_ACTIVATION_GROUP_in_activation_group1495); if (failed) return descr;
+            STRING25=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_activation_group1497); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "activation-group", getString( n ) );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
+
+              			descr = new AttributeDescr( "activation-group", getString( STRING25.getText() ) );
+              			descr.setLocation( offset(ACTIVATION_GROUP26.getLine()), ACTIVATION_GROUP26.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)ACTIVATION_GROUP26).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)STRING25).getStopIndex() );
               		
             }
 
@@ -2373,36 +2368,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end activation_group
 
 
     // $ANTLR start ruleflow_group
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:636:1: ruleflow_group returns [AttributeDescr d] : loc= RULEFLOW_GROUP n= STRING ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:604:1: ruleflow_group returns [AttributeDescr descr] : RULEFLOW_GROUP STRING ;
     public final AttributeDescr ruleflow_group() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token n=null;
+        Token STRING27=null;
+        Token RULEFLOW_GROUP28=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:641:3: (loc= RULEFLOW_GROUP n= STRING )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:641:3: loc= RULEFLOW_GROUP n= STRING
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:608:4: ( RULEFLOW_GROUP STRING )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:608:4: RULEFLOW_GROUP STRING
             {
-            loc=(Token)input.LT(1);
-            match(input,RULEFLOW_GROUP,FOLLOW_RULEFLOW_GROUP_in_ruleflow_group1616); if (failed) return d;
-            n=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_ruleflow_group1620); if (failed) return d;
+            RULEFLOW_GROUP28=(Token)input.LT(1);
+            match(input,RULEFLOW_GROUP,FOLLOW_RULEFLOW_GROUP_in_ruleflow_group1525); if (failed) return descr;
+            STRING27=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_ruleflow_group1527); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "ruleflow-group", getString( n ) );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
+
+              			descr = new AttributeDescr( "ruleflow-group", getString( STRING27.getText() ) );
+              			descr.setLocation( offset(RULEFLOW_GROUP28.getLine()), RULEFLOW_GROUP28.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)RULEFLOW_GROUP28).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)STRING27).getStopIndex() );
               		
             }
 
@@ -2415,36 +2410,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end ruleflow_group
 
 
     // $ANTLR start agenda_group
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:650:1: agenda_group returns [AttributeDescr d] : loc= AGENDA_GROUP n= STRING ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:617:1: agenda_group returns [AttributeDescr descr] : AGENDA_GROUP STRING ;
     public final AttributeDescr agenda_group() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token n=null;
+        Token STRING29=null;
+        Token AGENDA_GROUP30=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:655:3: (loc= AGENDA_GROUP n= STRING )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:655:3: loc= AGENDA_GROUP n= STRING
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:621:4: ( AGENDA_GROUP STRING )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:621:4: AGENDA_GROUP STRING
             {
-            loc=(Token)input.LT(1);
-            match(input,AGENDA_GROUP,FOLLOW_AGENDA_GROUP_in_agenda_group1652); if (failed) return d;
-            n=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_agenda_group1656); if (failed) return d;
+            AGENDA_GROUP30=(Token)input.LT(1);
+            match(input,AGENDA_GROUP,FOLLOW_AGENDA_GROUP_in_agenda_group1555); if (failed) return descr;
+            STRING29=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_agenda_group1557); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "agenda-group", getString( n ) );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
+
+              			descr = new AttributeDescr( "agenda-group", getString( STRING29.getText() ) );
+              			descr.setLocation( offset(AGENDA_GROUP30.getLine()), AGENDA_GROUP30.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)AGENDA_GROUP30).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)STRING29).getStopIndex() );
               		
             }
 
@@ -2457,36 +2452,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end agenda_group
 
 
     // $ANTLR start duration
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:665:1: duration returns [AttributeDescr d] : loc= DURATION i= INT ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:630:1: duration returns [AttributeDescr descr] : DURATION INT ;
     public final AttributeDescr duration() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token i=null;
+        Token INT31=null;
+        Token DURATION32=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:670:3: (loc= DURATION i= INT )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:670:3: loc= DURATION i= INT
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:634:4: ( DURATION INT )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:634:4: DURATION INT
             {
-            loc=(Token)input.LT(1);
-            match(input,DURATION,FOLLOW_DURATION_in_duration1690); if (failed) return d;
-            i=(Token)input.LT(1);
-            match(input,INT,FOLLOW_INT_in_duration1694); if (failed) return d;
+            DURATION32=(Token)input.LT(1);
+            match(input,DURATION,FOLLOW_DURATION_in_duration1585); if (failed) return descr;
+            INT31=(Token)input.LT(1);
+            match(input,INT,FOLLOW_INT_in_duration1587); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "duration", i.getText() );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+
+              			descr = new AttributeDescr( "duration", INT31.getText() );
+              			descr.setLocation( offset(DURATION32.getLine()), DURATION32.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)DURATION32).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)INT31).getStopIndex() );
               		
             }
 
@@ -2499,36 +2494,36 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end duration
 
 
     // $ANTLR start dialect
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:679:1: dialect returns [AttributeDescr d] : loc= DIALECT n= STRING ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:643:1: dialect returns [AttributeDescr descr] : DIALECT STRING ;
     public final AttributeDescr dialect() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token n=null;
+        Token STRING33=null;
+        Token DIALECT34=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:684:3: (loc= DIALECT n= STRING )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:684:3: loc= DIALECT n= STRING
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:647:4: ( DIALECT STRING )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:647:4: DIALECT STRING
             {
-            loc=(Token)input.LT(1);
-            match(input,DIALECT,FOLLOW_DIALECT_in_dialect1726); if (failed) return d;
-            n=(Token)input.LT(1);
-            match(input,STRING,FOLLOW_STRING_in_dialect1730); if (failed) return d;
+            DIALECT34=(Token)input.LT(1);
+            match(input,DIALECT,FOLLOW_DIALECT_in_dialect1615); if (failed) return descr;
+            STRING33=(Token)input.LT(1);
+            match(input,STRING,FOLLOW_STRING_in_dialect1617); if (failed) return descr;
             if ( backtracking==0 ) {
-              
-              			d = new AttributeDescr( "dialect", getString( n ) );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
+
+              			descr = new AttributeDescr( "dialect", getString( STRING33.getText() ) );
+              			descr.setLocation( offset(DIALECT34.getLine()), DIALECT34.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)DIALECT34).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)STRING33).getStopIndex() );
               		
             }
 
@@ -2541,100 +2536,829 @@
         }
         finally {
         }
-        return d;
+        return descr;
     }
     // $ANTLR end dialect
 
 
     // $ANTLR start lock_on_active
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:698:1: lock_on_active returns [AttributeDescr d] : ( (loc= LOCK_ON_ACTIVE ) | (loc= LOCK_ON_ACTIVE t= BOOL ) );
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:656:1: lock_on_active returns [AttributeDescr descr] : LOCK_ON_ACTIVE ( BOOL )? ;
     public final AttributeDescr lock_on_active() throws RecognitionException {
-        AttributeDescr d = null;
+        AttributeDescr descr = null;
 
-        Token loc=null;
-        Token t=null;
+        Token LOCK_ON_ACTIVE35=null;
+        Token BOOL36=null;
 
-        
-        		d = null;
+
+        		descr = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:703:3: ( (loc= LOCK_ON_ACTIVE ) | (loc= LOCK_ON_ACTIVE t= BOOL ) )
-            int alt28=2;
-            int LA28_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:660:4: ( LOCK_ON_ACTIVE ( BOOL )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:660:4: LOCK_ON_ACTIVE ( BOOL )?
+            {
+            LOCK_ON_ACTIVE35=(Token)input.LT(1);
+            match(input,LOCK_ON_ACTIVE,FOLLOW_LOCK_ON_ACTIVE_in_lock_on_active1649); if (failed) return descr;
+            if ( backtracking==0 ) {
 
-            if ( (LA28_0==LOCK_ON_ACTIVE) ) {
-                int LA28_1 = input.LA(2);
+              			descr = new AttributeDescr( "lock-on-active", "true" );
+              			descr.setLocation( offset(LOCK_ON_ACTIVE35.getLine()), LOCK_ON_ACTIVE35.getCharPositionInLine() );
+              			descr.setStartCharacter( ((CommonToken)LOCK_ON_ACTIVE35).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)LOCK_ON_ACTIVE35).getStopIndex() );
+              		
+            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:667:3: ( BOOL )?
+            int alt31=2;
+            int LA31_0 = input.LA(1);
 
-                if ( (LA28_1==BOOL) ) {
-                    alt28=2;
+            if ( (LA31_0==BOOL) ) {
+                alt31=1;
+            }
+            switch (alt31) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:667:5: BOOL
+                    {
+                    BOOL36=(Token)input.LT(1);
+                    match(input,BOOL,FOLLOW_BOOL_in_lock_on_active1662); if (failed) return descr;
+                    if ( backtracking==0 ) {
+
+                      				descr.setValue( BOOL36.getText() );
+                      				descr.setEndCharacter( ((CommonToken)BOOL36).getStopIndex() );
+                      			
+                    }
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return descr;
+    }
+    // $ANTLR end lock_on_active
+
+
+    // $ANTLR start normal_lhs_block
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:675:1: normal_lhs_block[AndDescr descr] : (d= lhs[$descr] )* ;
+    public final void normal_lhs_block(AndDescr descr) throws RecognitionException {
+        BaseDescr d = null;
+
+
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:677:3: ( (d= lhs[$descr] )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:677:3: (d= lhs[$descr] )*
+            {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:677:3: (d= lhs[$descr] )*
+            loop32:
+            do {
+                int alt32=2;
+                int LA32_0 = input.LA(1);
+
+                if ( (LA32_0==ID||LA32_0==LEFT_PAREN||(LA32_0>=EXISTS && LA32_0<=FORALL)) ) {
+                    alt32=1;
                 }
-                else if ( (LA28_1==EOF||(LA28_1>=IMPORT && LA28_1<=QUERY)||(LA28_1>=TEMPLATE && LA28_1<=DATE_EFFECTIVE)||(LA28_1>=DATE_EXPIRES && LA28_1<=ENABLED)||LA28_1==SALIENCE||(LA28_1>=NO_LOOP && LA28_1<=LOCK_ON_ACTIVE)||LA28_1==COMMA||LA28_1==THEN) ) {
-                    alt28=1;
+
+
+                switch (alt32) {
+            	case 1 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:677:5: d= lhs[$descr]
+            	    {
+            	    pushFollow(FOLLOW_lhs_in_normal_lhs_block1695);
+            	    d=lhs(descr);
+            	    _fsp--;
+            	    if (failed) return ;
+            	    if ( backtracking==0 ) {
+            	       if( d != null) descr.addDescr( d ); 
+            	    }
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop32;
                 }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return ;
+    }
+    // $ANTLR end normal_lhs_block
+
+
+    // $ANTLR start lhs
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:683:1: lhs[ConditionalElementDescr ce] returns [BaseDescr d] : l= lhs_or ;
+    public final BaseDescr lhs(ConditionalElementDescr ce) throws RecognitionException {
+        BaseDescr d = null;
+
+        BaseDescr l = null;
+
+
+
+        		d =null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:687:4: (l= lhs_or )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:687:4: l= lhs_or
+            {
+            pushFollow(FOLLOW_lhs_or_in_lhs1732);
+            l=lhs_or();
+            _fsp--;
+            if (failed) return d;
+            if ( backtracking==0 ) {
+               d = l; 
+            }
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return d;
+    }
+    // $ANTLR end lhs
+
+
+    // $ANTLR start lhs_or
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:691:1: lhs_or returns [BaseDescr d] : ( LEFT_PAREN OR (lhsand= lhs_and )+ RIGHT_PAREN | left= lhs_and ( ( OR | DOUBLE_PIPE ) right= lhs_and )* );
+    public final BaseDescr lhs_or() throws RecognitionException {
+        BaseDescr d = null;
+
+        BaseDescr lhsand = null;
+
+        BaseDescr left = null;
+
+        BaseDescr right = null;
+
+
+
+        		d = null;
+        		OrDescr or = null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:696:4: ( LEFT_PAREN OR (lhsand= lhs_and )+ RIGHT_PAREN | left= lhs_and ( ( OR | DOUBLE_PIPE ) right= lhs_and )* )
+            int alt35=2;
+            int LA35_0 = input.LA(1);
+
+            if ( (LA35_0==LEFT_PAREN) ) {
+                int LA35_1 = input.LA(2);
+
+                if ( (LA35_1==ID||LA35_1==LEFT_PAREN||LA35_1==AND||(LA35_1>=EXISTS && LA35_1<=FORALL)) ) {
+                    alt35=2;
+                }
+                else if ( (LA35_1==OR) ) {
+                    alt35=1;
+                }
                 else {
                     if (backtracking>0) {failed=true; return d;}
                     NoViableAltException nvae =
-                        new NoViableAltException("698:1: lock_on_active returns [AttributeDescr d] : ( (loc= LOCK_ON_ACTIVE ) | (loc= LOCK_ON_ACTIVE t= BOOL ) );", 28, 1, input);
+                        new NoViableAltException("691:1: lhs_or returns [BaseDescr d] : ( LEFT_PAREN OR (lhsand= lhs_and )+ RIGHT_PAREN | left= lhs_and ( ( OR | DOUBLE_PIPE ) right= lhs_and )* );", 35, 1, input);
 
                     throw nvae;
                 }
             }
+            else if ( (LA35_0==ID||(LA35_0>=EXISTS && LA35_0<=FORALL)) ) {
+                alt35=2;
+            }
             else {
                 if (backtracking>0) {failed=true; return d;}
                 NoViableAltException nvae =
-                    new NoViableAltException("698:1: lock_on_active returns [AttributeDescr d] : ( (loc= LOCK_ON_ACTIVE ) | (loc= LOCK_ON_ACTIVE t= BOOL ) );", 28, 0, input);
+                    new NoViableAltException("691:1: lhs_or returns [BaseDescr d] : ( LEFT_PAREN OR (lhsand= lhs_and )+ RIGHT_PAREN | left= lhs_and ( ( OR | DOUBLE_PIPE ) right= lhs_and )* );", 35, 0, input);
 
                 throw nvae;
             }
-            switch (alt28) {
+            switch (alt35) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:703:3: (loc= LOCK_ON_ACTIVE )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:696:4: LEFT_PAREN OR (lhsand= lhs_and )+ RIGHT_PAREN
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:703:3: (loc= LOCK_ON_ACTIVE )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:704:4: loc= LOCK_ON_ACTIVE
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_or1757); if (failed) return d;
+                    match(input,OR,FOLLOW_OR_in_lhs_or1759); if (failed) return d;
+                    if ( backtracking==0 ) {
+
+                      			or = new OrDescr();
+                      			d = or;
+                      			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+                      		
+                    }
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:702:9: (lhsand= lhs_and )+
+                    int cnt33=0;
+                    loop33:
+                    do {
+                        int alt33=2;
+                        int LA33_0 = input.LA(1);
+
+                        if ( (LA33_0==ID||LA33_0==LEFT_PAREN||(LA33_0>=EXISTS && LA33_0<=FORALL)) ) {
+                            alt33=1;
+                        }
+
+
+                        switch (alt33) {
+                    	case 1 :
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:702:9: lhsand= lhs_and
+                    	    {
+                    	    pushFollow(FOLLOW_lhs_and_in_lhs_or1770);
+                    	    lhsand=lhs_and();
+                    	    _fsp--;
+                    	    if (failed) return d;
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    if ( cnt33 >= 1 ) break loop33;
+                    	    if (backtracking>0) {failed=true; return d;}
+                                EarlyExitException eee =
+                                    new EarlyExitException(33, input);
+                                throw eee;
+                        }
+                        cnt33++;
+                    } while (true);
+
+                    if ( backtracking==0 ) {
+
+                      			or.addDescr( lhsand );
+                      		
+                    }
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_or1780); if (failed) return d;
+
+                    }
+                    break;
+                case 2 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:708:10: left= lhs_and ( ( OR | DOUBLE_PIPE ) right= lhs_and )*
                     {
-                    loc=(Token)input.LT(1);
-                    match(input,LOCK_ON_ACTIVE,FOLLOW_LOCK_ON_ACTIVE_in_lock_on_active1779); if (failed) return d;
+                    pushFollow(FOLLOW_lhs_and_in_lhs_or1798);
+                    left=lhs_and();
+                    _fsp--;
+                    if (failed) return d;
                     if ( backtracking==0 ) {
-                      
-                      				d = new AttributeDescr( "lock-on-active", "true" );
-                      				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-                      				d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-                      			
+                       d = left; 
                     }
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:709:3: ( ( OR | DOUBLE_PIPE ) right= lhs_and )*
+                    loop34:
+                    do {
+                        int alt34=2;
+                        int LA34_0 = input.LA(1);
 
+                        if ( ((LA34_0>=OR && LA34_0<=DOUBLE_PIPE)) ) {
+                            alt34=1;
+                        }
+
+
+                        switch (alt34) {
+                    	case 1 :
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:709:5: ( OR | DOUBLE_PIPE ) right= lhs_and
+                    	    {
+                    	    if ( (input.LA(1)>=OR && input.LA(1)<=DOUBLE_PIPE) ) {
+                    	        input.consume();
+                    	        errorRecovery=false;failed=false;
+                    	    }
+                    	    else {
+                    	        if (backtracking>0) {failed=true; return d;}
+                    	        MismatchedSetException mse =
+                    	            new MismatchedSetException(null,input);
+                    	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_or1806);    throw mse;
+                    	    }
+
+                    	    if ( backtracking==0 ) {
+
+                    	      				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+                    	      			
+                    	    }
+                    	    pushFollow(FOLLOW_lhs_and_in_lhs_or1822);
+                    	    right=lhs_and();
+                    	    _fsp--;
+                    	    if (failed) return d;
+                    	    if ( backtracking==0 ) {
+
+                    	      				if ( or == null ) {
+                    	      					or = new OrDescr();
+                    	      					or.addDescr( left );
+                    	      					d = or;
+                    	      				}
+                    	      				
+                    	      				or.addDescr( right );
+                    	      			
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop34;
+                        }
+                    } while (true);
+
+
                     }
+                    break;
 
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return d;
+    }
+    // $ANTLR end lhs_or
 
+
+    // $ANTLR start lhs_and
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:726:1: lhs_and returns [BaseDescr d] : ( LEFT_PAREN AND (lhsunary= lhs_unary )+ RIGHT_PAREN | left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )* );
+    public final BaseDescr lhs_and() throws RecognitionException {
+        BaseDescr d = null;
+
+        BaseDescr lhsunary = null;
+
+        BaseDescr left = null;
+
+        BaseDescr right = null;
+
+
+
+        		d = null;
+        		AndDescr and = null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:731:4: ( LEFT_PAREN AND (lhsunary= lhs_unary )+ RIGHT_PAREN | left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )* )
+            int alt38=2;
+            int LA38_0 = input.LA(1);
+
+            if ( (LA38_0==LEFT_PAREN) ) {
+                int LA38_1 = input.LA(2);
+
+                if ( (LA38_1==AND) ) {
+                    alt38=1;
+                }
+                else if ( (LA38_1==ID||LA38_1==LEFT_PAREN||(LA38_1>=EXISTS && LA38_1<=FORALL)) ) {
+                    alt38=2;
+                }
+                else {
+                    if (backtracking>0) {failed=true; return d;}
+                    NoViableAltException nvae =
+                        new NoViableAltException("726:1: lhs_and returns [BaseDescr d] : ( LEFT_PAREN AND (lhsunary= lhs_unary )+ RIGHT_PAREN | left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )* );", 38, 1, input);
+
+                    throw nvae;
+                }
+            }
+            else if ( (LA38_0==ID||(LA38_0>=EXISTS && LA38_0<=FORALL)) ) {
+                alt38=2;
+            }
+            else {
+                if (backtracking>0) {failed=true; return d;}
+                NoViableAltException nvae =
+                    new NoViableAltException("726:1: lhs_and returns [BaseDescr d] : ( LEFT_PAREN AND (lhsunary= lhs_unary )+ RIGHT_PAREN | left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )* );", 38, 0, input);
+
+                throw nvae;
+            }
+            switch (alt38) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:731:4: LEFT_PAREN AND (lhsunary= lhs_unary )+ RIGHT_PAREN
+                    {
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_and1853); if (failed) return d;
+                    match(input,AND,FOLLOW_AND_in_lhs_and1855); if (failed) return d;
+                    if ( backtracking==0 ) {
+
+                      			and = new AndDescr();
+                      			d = and;
+                      			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+                      		
                     }
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:737:11: (lhsunary= lhs_unary )+
+                    int cnt36=0;
+                    loop36:
+                    do {
+                        int alt36=2;
+                        int LA36_0 = input.LA(1);
+
+                        if ( (LA36_0==ID||LA36_0==LEFT_PAREN||(LA36_0>=EXISTS && LA36_0<=FORALL)) ) {
+                            alt36=1;
+                        }
+
+
+                        switch (alt36) {
+                    	case 1 :
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:737:11: lhsunary= lhs_unary
+                    	    {
+                    	    pushFollow(FOLLOW_lhs_unary_in_lhs_and1866);
+                    	    lhsunary=lhs_unary();
+                    	    _fsp--;
+                    	    if (failed) return d;
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    if ( cnt36 >= 1 ) break loop36;
+                    	    if (backtracking>0) {failed=true; return d;}
+                                EarlyExitException eee =
+                                    new EarlyExitException(36, input);
+                                throw eee;
+                        }
+                        cnt36++;
+                    } while (true);
+
+                    if ( backtracking==0 ) {
+
+                      			and.addDescr( lhsunary );
+                      		
+                    }
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_and1876); if (failed) return d;
+
+                    }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:713:3: (loc= LOCK_ON_ACTIVE t= BOOL )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:743:10: left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )*
                     {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:713:3: (loc= LOCK_ON_ACTIVE t= BOOL )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:714:4: loc= LOCK_ON_ACTIVE t= BOOL
+                    pushFollow(FOLLOW_lhs_unary_in_lhs_and1894);
+                    left=lhs_unary();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d = left; 
+                    }
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:744:3: ( ( AND | DOUBLE_AMPER ) right= lhs_unary )*
+                    loop37:
+                    do {
+                        int alt37=2;
+                        int LA37_0 = input.LA(1);
+
+                        if ( ((LA37_0>=AND && LA37_0<=DOUBLE_AMPER)) ) {
+                            alt37=1;
+                        }
+
+
+                        switch (alt37) {
+                    	case 1 :
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:744:5: ( AND | DOUBLE_AMPER ) right= lhs_unary
+                    	    {
+                    	    if ( (input.LA(1)>=AND && input.LA(1)<=DOUBLE_AMPER) ) {
+                    	        input.consume();
+                    	        errorRecovery=false;failed=false;
+                    	    }
+                    	    else {
+                    	        if (backtracking>0) {failed=true; return d;}
+                    	        MismatchedSetException mse =
+                    	            new MismatchedSetException(null,input);
+                    	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_and1902);    throw mse;
+                    	    }
+
+                    	    if ( backtracking==0 ) {
+
+                    	      				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+                    	      			
+                    	    }
+                    	    pushFollow(FOLLOW_lhs_unary_in_lhs_and1918);
+                    	    right=lhs_unary();
+                    	    _fsp--;
+                    	    if (failed) return d;
+                    	    if ( backtracking==0 ) {
+
+                    	      				if ( and == null ) {
+                    	      					and = new AndDescr();
+                    	      					and.addDescr( left );
+                    	      					d = and;
+                    	      				}
+                    	      				
+                    	      				and.addDescr( right );
+                    	      			
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop37;
+                        }
+                    } while (true);
+
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return d;
+    }
+    // $ANTLR end lhs_and
+
+
+    // $ANTLR start lhs_unary
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:761:1: lhs_unary returns [BaseDescr d] : (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )? | u= lhs_forall | LEFT_PAREN u= lhs_or RIGHT_PAREN ) opt_semicolon ;
+    public final BaseDescr lhs_unary() throws RecognitionException {
+        BaseDescr d = null;
+
+        BaseDescr u = null;
+
+        AccumulateDescr ac = null;
+
+        CollectDescr cs = null;
+
+        FromDescr fm = null;
+
+
+
+        		d = null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:765:4: ( (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )? | u= lhs_forall | LEFT_PAREN u= lhs_or RIGHT_PAREN ) opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:765:4: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )? | u= lhs_forall | LEFT_PAREN u= lhs_or RIGHT_PAREN ) opt_semicolon
+            {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:765:4: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )? | u= lhs_forall | LEFT_PAREN u= lhs_or RIGHT_PAREN )
+            int alt41=6;
+            switch ( input.LA(1) ) {
+            case EXISTS:
+                {
+                alt41=1;
+                }
+                break;
+            case NOT:
+                {
+                alt41=2;
+                }
+                break;
+            case EVAL:
+                {
+                alt41=3;
+                }
+                break;
+            case ID:
+                {
+                alt41=4;
+                }
+                break;
+            case FORALL:
+                {
+                alt41=5;
+                }
+                break;
+            case LEFT_PAREN:
+                {
+                alt41=6;
+                }
+                break;
+            default:
+                if (backtracking>0) {failed=true; return d;}
+                NoViableAltException nvae =
+                    new NoViableAltException("765:4: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )? | u= lhs_forall | LEFT_PAREN u= lhs_or RIGHT_PAREN )", 41, 0, input);
+
+                throw nvae;
+            }
+
+            switch (alt41) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:765:6: u= lhs_exist
                     {
-                    loc=(Token)input.LT(1);
-                    match(input,LOCK_ON_ACTIVE,FOLLOW_LOCK_ON_ACTIVE_in_lock_on_active1807); if (failed) return d;
-                    t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_lock_on_active1811); if (failed) return d;
+                    pushFollow(FOLLOW_lhs_exist_in_lhs_unary1955);
+                    u=lhs_exist();
+                    _fsp--;
+                    if (failed) return d;
                     if ( backtracking==0 ) {
-                      
-                      				d = new AttributeDescr( "lock-on-active", t.getText() );
-                      				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-                      				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-                      				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-                      			
+                       d = u; 
                     }
 
                     }
+                    break;
+                case 2 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:766:5: u= lhs_not
+                    {
+                    pushFollow(FOLLOW_lhs_not_in_lhs_unary1965);
+                    u=lhs_not();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d = u; 
+                    }
 
+                    }
+                    break;
+                case 3 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:767:5: u= lhs_eval
+                    {
+                    pushFollow(FOLLOW_lhs_eval_in_lhs_unary1975);
+                    u=lhs_eval();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d = u; 
+                    }
 
                     }
                     break;
+                case 4 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:768:5: u= lhs_pattern ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )?
+                    {
+                    pushFollow(FOLLOW_lhs_pattern_in_lhs_unary1985);
+                    u=lhs_pattern();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d = u; 
+                    }
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:768:34: ( FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) ) )?
+                    int alt40=2;
+                    int LA40_0 = input.LA(1);
 
+                    if ( (LA40_0==FROM) ) {
+                        alt40=1;
+                    }
+                    switch (alt40) {
+                        case 1 :
+                            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:769:13: FROM ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) )
+                            {
+                            match(input,FROM,FOLLOW_FROM_in_lhs_unary2003); if (failed) return d;
+                            if ( backtracking==0 ) {
+
+                              				location.setType(Location.LOCATION_LHS_FROM);
+                              				location.setProperty(Location.LOCATION_FROM_CONTENT, "");
+                              		          
+                            }
+                            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:774:13: ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) )
+                            int alt39=3;
+                            switch ( input.LA(1) ) {
+                            case ACCUMULATE:
+                                {
+                                alt39=1;
+                                }
+                                break;
+                            case COLLECT:
+                                {
+                                alt39=2;
+                                }
+                                break;
+                            case ATTRIBUTES:
+                            case PACKAGE:
+                            case IMPORT:
+                            case FUNCTION:
+                            case ID:
+                            case GLOBAL:
+                            case QUERY:
+                            case END:
+                            case TEMPLATE:
+                            case RULE:
+                            case WHEN:
+                            case ENABLED:
+                            case SALIENCE:
+                            case DURATION:
+                            case FROM:
+                            case INIT:
+                            case ACTION:
+                            case RESULT:
+                            case CONTAINS:
+                            case EXCLUDES:
+                            case MATCHES:
+                            case MEMBEROF:
+                            case IN:
+                            case NULL:
+                            case THEN:
+                                {
+                                alt39=3;
+                                }
+                                break;
+                            default:
+                                if (backtracking>0) {failed=true; return d;}
+                                NoViableAltException nvae =
+                                    new NoViableAltException("774:13: ( options {k=1; } : (ac= accumulate_statement ) | (cs= collect_statement ) | (fm= from_statement ) )", 39, 0, input);
+
+                                throw nvae;
+                            }
+
+                            switch (alt39) {
+                                case 1 :
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:775:15: (ac= accumulate_statement )
+                                    {
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:775:15: (ac= accumulate_statement )
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:775:17: ac= accumulate_statement
+                                    {
+                                    pushFollow(FOLLOW_accumulate_statement_in_lhs_unary2063);
+                                    ac=accumulate_statement();
+                                    _fsp--;
+                                    if (failed) return d;
+                                    if ( backtracking==0 ) {
+                                       ac.setResultPattern((PatternDescr) u); d =ac; 
+                                    }
+
+                                    }
+
+
+                                    }
+                                    break;
+                                case 2 :
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:776:15: (cs= collect_statement )
+                                    {
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:776:15: (cs= collect_statement )
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:776:17: cs= collect_statement
+                                    {
+                                    pushFollow(FOLLOW_collect_statement_in_lhs_unary2086);
+                                    cs=collect_statement();
+                                    _fsp--;
+                                    if (failed) return d;
+                                    if ( backtracking==0 ) {
+                                       cs.setResultPattern((PatternDescr) u); d =cs; 
+                                    }
+
+                                    }
+
+
+                                    }
+                                    break;
+                                case 3 :
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:777:15: (fm= from_statement )
+                                    {
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:777:15: (fm= from_statement )
+                                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:777:17: fm= from_statement
+                                    {
+                                    pushFollow(FOLLOW_from_statement_in_lhs_unary2110);
+                                    fm=from_statement();
+                                    _fsp--;
+                                    if (failed) return d;
+                                    if ( backtracking==0 ) {
+                                      fm.setPattern((PatternDescr) u); d =fm; 
+                                    }
+
+                                    }
+
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+                case 5 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:780:5: u= lhs_forall
+                    {
+                    pushFollow(FOLLOW_lhs_forall_in_lhs_unary2149);
+                    u=lhs_forall();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d = u; 
+                    }
+
+                    }
+                    break;
+                case 6 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:781:5: LEFT_PAREN u= lhs_or RIGHT_PAREN
+                    {
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_unary2158); if (failed) return d;
+                    pushFollow(FOLLOW_lhs_or_in_lhs_unary2162);
+                    u=lhs_or();
+                    _fsp--;
+                    if (failed) return d;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_unary2164); if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d = u; 
+                    }
+
+                    }
+                    break;
+
             }
+
+            pushFollow(FOLLOW_opt_semicolon_in_lhs_unary2175);
+            opt_semicolon();
+            _fsp--;
+            if (failed) return d;
+
+            }
+
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -2644,53 +3368,103 @@
         }
         return d;
     }
-    // $ANTLR end lock_on_active
+    // $ANTLR end lhs_unary
 
 
-    // $ANTLR start normal_lhs_block
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:726:1: normal_lhs_block[AndDescr descr] : (d= lhs[descr] )* ;
-    public final void normal_lhs_block(AndDescr descr) throws RecognitionException {
+    // $ANTLR start lhs_exist
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:786:1: lhs_exist returns [BaseDescr d] : EXISTS ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern ) ;
+    public final BaseDescr lhs_exist() throws RecognitionException {
         BaseDescr d = null;
 
+        Token EXISTS37=null;
+        Token RIGHT_PAREN38=null;
+        BaseDescr pattern = null;
 
+
+
+        		d = null;
+        	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:728:3: ( (d= lhs[descr] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:728:3: (d= lhs[descr] )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:790:4: ( EXISTS ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:790:4: EXISTS ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:728:3: (d= lhs[descr] )*
-            loop29:
-            do {
-                int alt29=2;
-                int LA29_0 = input.LA(1);
+            EXISTS37=(Token)input.LT(1);
+            match(input,EXISTS,FOLLOW_EXISTS_in_lhs_exist2197); if (failed) return d;
+            if ( backtracking==0 ) {
 
-                if ( ((LA29_0>=LEFT_PAREN && LA29_0<=ID)||LA29_0==EVAL||LA29_0==NOT||(LA29_0>=EXISTS && LA29_0<=FORALL)) ) {
-                    alt29=1;
-                }
+              			d = new ExistsDescr( ); 
+              			d.setLocation( offset(EXISTS37.getLine()), EXISTS37.getCharPositionInLine() );
+              			d.setStartCharacter( ((CommonToken)EXISTS37).getStartIndex() );
+              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS );
+              		
+            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:797:10: ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern )
+            int alt42=2;
+            int LA42_0 = input.LA(1);
 
+            if ( (LA42_0==LEFT_PAREN) ) {
+                alt42=1;
+            }
+            else if ( (LA42_0==ID) ) {
+                alt42=2;
+            }
+            else {
+                if (backtracking>0) {failed=true; return d;}
+                NoViableAltException nvae =
+                    new NoViableAltException("797:10: ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern )", 42, 0, input);
 
-                switch (alt29) {
-            	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:728:5: d= lhs[descr]
-            	    {
-            	    pushFollow(FOLLOW_lhs_in_normal_lhs_block1849);
-            	    d=lhs(descr);
-            	    _fsp--;
-            	    if (failed) return ;
-            	    if ( backtracking==0 ) {
-            	       if(d != null) descr.addDescr( d ); 
-            	    }
+                throw nvae;
+            }
+            switch (alt42) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:797:12: ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN )
+                    {
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:797:12: ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:797:14: LEFT_PAREN pattern= lhs_or RIGHT_PAREN
+                    {
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_exist2217); if (failed) return d;
+                    pushFollow(FOLLOW_lhs_or_in_lhs_exist2221);
+                    pattern=lhs_or();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       if ( pattern != null ) ((ExistsDescr)d).addDescr( pattern ); 
+                    }
+                    RIGHT_PAREN38=(Token)input.LT(1);
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_exist2251); if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d.setEndCharacter( ((CommonToken)RIGHT_PAREN38).getStopIndex() ); 
+                    }
 
-            	    }
-            	    break;
+                    }
 
-            	default :
-            	    break loop29;
-                }
-            } while (true);
 
+                    }
+                    break;
+                case 2 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:802:12: pattern= lhs_pattern
+                    {
+                    pushFollow(FOLLOW_lhs_pattern_in_lhs_exist2301);
+                    pattern=lhs_pattern();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
 
+                      	                	if ( pattern != null ) {
+                      	                		((ExistsDescr)d).addDescr( pattern );
+                      	                		d.setEndCharacter( pattern.getEndCharacter() );
+                      	                	}
+                      	                
+                    }
+
+                    }
+                    break;
+
             }
 
+
+            }
+
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -2698,32 +3472,155 @@
         }
         finally {
         }
-        return ;
+        return d;
     }
-    // $ANTLR end normal_lhs_block
+    // $ANTLR end lhs_exist
 
 
-    // $ANTLR start lhs
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:734:1: lhs[ConditionalElementDescr ce] returns [BaseDescr d] : l= lhs_or ;
-    public final BaseDescr lhs(ConditionalElementDescr ce) throws RecognitionException {
+    // $ANTLR start lhs_not
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:812:1: lhs_not returns [NotDescr d] : NOT ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern ) ;
+    public final NotDescr lhs_not() throws RecognitionException {
+        NotDescr d = null;
+
+        Token NOT39=null;
+        Token RIGHT_PAREN40=null;
+        BaseDescr pattern = null;
+
+
+
+        		d = null;
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:816:4: ( NOT ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:816:4: NOT ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern )
+            {
+            NOT39=(Token)input.LT(1);
+            match(input,NOT,FOLLOW_NOT_in_lhs_not2353); if (failed) return d;
+            if ( backtracking==0 ) {
+
+              			d = new NotDescr( ); 
+              			d.setLocation( offset(NOT39.getLine()), NOT39.getCharPositionInLine() );
+              			d.setStartCharacter( ((CommonToken)NOT39).getStartIndex() );
+              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_NOT );
+              		
+            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:823:3: ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern )
+            int alt43=2;
+            int LA43_0 = input.LA(1);
+
+            if ( (LA43_0==LEFT_PAREN) ) {
+                alt43=1;
+            }
+            else if ( (LA43_0==ID) ) {
+                alt43=2;
+            }
+            else {
+                if (backtracking>0) {failed=true; return d;}
+                NoViableAltException nvae =
+                    new NoViableAltException("823:3: ( ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN ) | pattern= lhs_pattern )", 43, 0, input);
+
+                throw nvae;
+            }
+            switch (alt43) {
+                case 1 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:823:5: ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN )
+                    {
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:823:5: ( LEFT_PAREN pattern= lhs_or RIGHT_PAREN )
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:823:7: LEFT_PAREN pattern= lhs_or RIGHT_PAREN
+                    {
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not2366); if (failed) return d;
+                    pushFollow(FOLLOW_lhs_or_in_lhs_not2370);
+                    pattern=lhs_or();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+                       if ( pattern != null ) d.addDescr( pattern ); 
+                    }
+                    RIGHT_PAREN40=(Token)input.LT(1);
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_not2401); if (failed) return d;
+                    if ( backtracking==0 ) {
+                       d.setEndCharacter( ((CommonToken)RIGHT_PAREN40).getStopIndex() ); 
+                    }
+
+                    }
+
+
+                    }
+                    break;
+                case 2 :
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:829:3: pattern= lhs_pattern
+                    {
+                    pushFollow(FOLLOW_lhs_pattern_in_lhs_not2438);
+                    pattern=lhs_pattern();
+                    _fsp--;
+                    if (failed) return d;
+                    if ( backtracking==0 ) {
+
+                      	                	if ( pattern != null ) {
+                      	                		d.addDescr( pattern );
+                      	                		d.setEndCharacter( pattern.getEndCharacter() );
+                      	                	}
+                      	                
+                    }
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return d;
+    }
+    // $ANTLR end lhs_not
+
+
+    // $ANTLR start lhs_eval
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:839:1: lhs_eval returns [BaseDescr d] : EVAL c= paren_chunk[$d] ;
+    public final BaseDescr lhs_eval() throws RecognitionException {
         BaseDescr d = null;
 
-        BaseDescr l = null;
+        Token EVAL41=null;
+        String c = null;
 
 
-        
-        		d=null;
+
+        		d = new EvalDescr( );
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:738:4: (l= lhs_or )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:738:4: l= lhs_or
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:844:3: ( EVAL c= paren_chunk[$d] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:844:3: EVAL c= paren_chunk[$d]
             {
-            pushFollow(FOLLOW_lhs_or_in_lhs1886);
-            l=lhs_or();
+            EVAL41=(Token)input.LT(1);
+            match(input,EVAL,FOLLOW_EVAL_in_lhs_eval2484); if (failed) return d;
+            if ( backtracking==0 ) {
+
+              			location.setType( Location.LOCATION_LHS_INSIDE_EVAL );
+              		
+            }
+            pushFollow(FOLLOW_paren_chunk_in_lhs_eval2495);
+            c=paren_chunk(d);
             _fsp--;
             if (failed) return d;
             if ( backtracking==0 ) {
-               d = l; 
+               
+              			d.setStartCharacter( ((CommonToken)EVAL41).getStartIndex() );
+              		        if( c != null ) {
+              	  		    this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+              		            String body = c.length() > 1 ? c.substring(1, c.length()-1) : "";
+              			    checkTrailingSemicolon( body, offset(EVAL41.getLine()) );
+              			    ((EvalDescr) d).setContent( body );
+              			    location.setProperty(Location.LOCATION_EVAL_CONTENT, body);
+              			}
+              		
             }
 
             }
@@ -2737,38 +3634,152 @@
         }
         return d;
     }
-    // $ANTLR end lhs
+    // $ANTLR end lhs_eval
 
 
+    // $ANTLR start lhs_forall
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:861:1: lhs_forall returns [ForallDescr d] : FORALL LEFT_PAREN base= lhs_pattern ( ( COMMA )? pattern= lhs_pattern )+ RIGHT_PAREN ;
+    public final ForallDescr lhs_forall() throws RecognitionException {
+        ForallDescr d = null;
+
+        Token FORALL42=null;
+        Token RIGHT_PAREN43=null;
+        BaseDescr base = null;
+
+        BaseDescr pattern = null;
+
+
+
+        		d = factory.createForall();
+        	
+        try {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:865:4: ( FORALL LEFT_PAREN base= lhs_pattern ( ( COMMA )? pattern= lhs_pattern )+ RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:865:4: FORALL LEFT_PAREN base= lhs_pattern ( ( COMMA )? pattern= lhs_pattern )+ RIGHT_PAREN
+            {
+            FORALL42=(Token)input.LT(1);
+            match(input,FORALL,FOLLOW_FORALL_in_lhs_forall2522); if (failed) return d;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_forall2524); if (failed) return d;
+            pushFollow(FOLLOW_lhs_pattern_in_lhs_forall2528);
+            base=lhs_pattern();
+            _fsp--;
+            if (failed) return d;
+            if ( backtracking==0 ) {
+
+              			d.setStartCharacter( ((CommonToken)FORALL42).getStartIndex() );
+              		        // adding the base pattern
+              		        d.addDescr( base );
+              			d.setLocation( offset(FORALL42.getLine()), FORALL42.getCharPositionInLine() );
+              		
+            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:872:3: ( ( COMMA )? pattern= lhs_pattern )+
+            int cnt45=0;
+            loop45:
+            do {
+                int alt45=2;
+                int LA45_0 = input.LA(1);
+
+                if ( (LA45_0==ID||LA45_0==COMMA) ) {
+                    alt45=1;
+                }
+
+
+                switch (alt45) {
+            	case 1 :
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:872:5: ( COMMA )? pattern= lhs_pattern
+            	    {
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:872:5: ( COMMA )?
+            	    int alt44=2;
+            	    int LA44_0 = input.LA(1);
+
+            	    if ( (LA44_0==COMMA) ) {
+            	        alt44=1;
+            	    }
+            	    switch (alt44) {
+            	        case 1 :
+            	            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:872:6: COMMA
+            	            {
+            	            match(input,COMMA,FOLLOW_COMMA_in_lhs_forall2542); if (failed) return d;
+
+            	            }
+            	            break;
+
+            	    }
+
+            	    pushFollow(FOLLOW_lhs_pattern_in_lhs_forall2548);
+            	    pattern=lhs_pattern();
+            	    _fsp--;
+            	    if (failed) return d;
+            	    if ( backtracking==0 ) {
+
+            	      		        // adding additional patterns
+            	      			d.addDescr( pattern );
+            	      		
+            	    }
+
+            	    }
+            	    break;
+
+            	default :
+            	    if ( cnt45 >= 1 ) break loop45;
+            	    if (backtracking>0) {failed=true; return d;}
+                        EarlyExitException eee =
+                            new EarlyExitException(45, input);
+                        throw eee;
+                }
+                cnt45++;
+            } while (true);
+
+            RIGHT_PAREN43=(Token)input.LT(1);
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_forall2561); if (failed) return d;
+            if ( backtracking==0 ) {
+
+              		        d.setEndCharacter( ((CommonToken)RIGHT_PAREN43).getStopIndex() );
+              		
+            }
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+        }
+        return d;
+    }
+    // $ANTLR end lhs_forall
+
+
     // $ANTLR start lhs_pattern
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:742:1: lhs_pattern returns [BaseDescr d] : (f= fact_binding | f= fact );
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:884:1: lhs_pattern returns [BaseDescr d] : (f= fact_binding | f= fact[null] );
     public final BaseDescr lhs_pattern() throws RecognitionException {
         BaseDescr d = null;
 
         BaseDescr f = null;
 
 
-        
-        		d=null;
+
+        		d =null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:746:4: (f= fact_binding | f= fact )
-            int alt30=2;
-            int LA30_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:891:4: (f= fact_binding | f= fact[null] )
+            int alt46=2;
+            int LA46_0 = input.LA(1);
 
-            if ( (LA30_0==ID) ) {
-                int LA30_1 = input.LA(2);
+            if ( (LA46_0==ID) ) {
+                int LA46_1 = input.LA(2);
 
-                if ( (LA30_1==70) ) {
-                    alt30=1;
+                if ( (LA46_1==71) ) {
+                    alt46=1;
                 }
-                else if ( (LA30_1==LEFT_PAREN||LA30_1==LEFT_SQUARE||LA30_1==71) ) {
-                    alt30=2;
+                else if ( (LA46_1==DOT||LA46_1==LEFT_PAREN||LA46_1==LEFT_SQUARE) ) {
+                    alt46=2;
                 }
                 else {
                     if (backtracking>0) {failed=true; return d;}
                     NoViableAltException nvae =
-                        new NoViableAltException("742:1: lhs_pattern returns [BaseDescr d] : (f= fact_binding | f= fact );", 30, 1, input);
+                        new NoViableAltException("884:1: lhs_pattern returns [BaseDescr d] : (f= fact_binding | f= fact[null] );", 46, 1, input);
 
                     throw nvae;
                 }
@@ -2776,39 +3787,38 @@
             else {
                 if (backtracking>0) {failed=true; return d;}
                 NoViableAltException nvae =
-                    new NoViableAltException("742:1: lhs_pattern returns [BaseDescr d] : (f= fact_binding | f= fact );", 30, 0, input);
+                    new NoViableAltException("884:1: lhs_pattern returns [BaseDescr d] : (f= fact_binding | f= fact[null] );", 46, 0, input);
 
                 throw nvae;
             }
-            switch (alt30) {
+            switch (alt46) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:746:4: f= fact_binding
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:891:4: f= fact_binding
                     {
-                    pushFollow(FOLLOW_fact_binding_in_lhs_pattern1914);
+                    pushFollow(FOLLOW_fact_binding_in_lhs_pattern2594);
                     f=fact_binding();
                     _fsp--;
                     if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = f; 
-                    }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:747:4: f= fact
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:892:4: f= fact[null]
                     {
-                    pushFollow(FOLLOW_fact_in_lhs_pattern1923);
-                    f=fact();
+                    pushFollow(FOLLOW_fact_in_lhs_pattern2602);
+                    f=fact(null);
                     _fsp--;
                     if (failed) return d;
-                    if ( backtracking==0 ) {
-                       d = f; 
-                    }
 
                     }
                     break;
 
             }
+            if ( backtracking==0 ) {
+
+              		d =f;
+              	
+            }
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -2822,29 +3832,28 @@
 
 
     // $ANTLR start from_statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:750:1: from_statement returns [FromDescr d] : ds= from_source[d] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:895:1: from_statement returns [FromDescr d] : ds= from_source[$d] ;
     public final FromDescr from_statement() throws RecognitionException {
         FromDescr d = null;
 
         DeclarativeInvokerDescr ds = null;
 
 
-        
-        		d=factory.createFrom();
+
+        		d =factory.createFrom();
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:755:2: (ds= from_source[d] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:755:2: ds= from_source[d]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:900:2: (ds= from_source[$d] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:900:2: ds= from_source[$d]
             {
-            pushFollow(FOLLOW_from_source_in_from_statement1950);
+            pushFollow(FOLLOW_from_source_in_from_statement2629);
             ds=from_source(d);
             _fsp--;
             if (failed) return d;
             if ( backtracking==0 ) {
-              
-              			d.setDataSource(ds);
-              		
-              		
+
+              		d.setDataSource( ds );
+              	
             }
 
             }
@@ -2862,68 +3871,64 @@
 
 
     // $ANTLR start from_source
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:765:1: from_source[FromDescr from] returns [DeclarativeInvokerDescr ds] : ident= identifier (args= paren_chunk[from] )? ( expression_chain[from, ad] )? ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:906:1: from_source[FromDescr from] returns [DeclarativeInvokerDescr ds] : ident= identifier ( options {k=1; } : args= paren_chunk[$from] )? ( expression_chain[$from, ad] )? ;
     public final DeclarativeInvokerDescr from_source(FromDescr from) throws RecognitionException {
         DeclarativeInvokerDescr ds = null;
 
-        Token ident = null;
+        identifier_return ident = null;
 
         String args = null;
 
 
-        
-        		ds = null;
-        		AccessorDescr ad = null;
+
+        		ds = null;
+        		AccessorDescr ad = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:771:3: (ident= identifier (args= paren_chunk[from] )? ( expression_chain[from, ad] )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:771:3: ident= identifier (args= paren_chunk[from] )? ( expression_chain[from, ad] )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:911:4: (ident= identifier ( options {k=1; } : args= paren_chunk[$from] )? ( expression_chain[$from, ad] )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:911:4: ident= identifier ( options {k=1; } : args= paren_chunk[$from] )? ( expression_chain[$from, ad] )?
             {
-            pushFollow(FOLLOW_identifier_in_from_source1992);
+            pushFollow(FOLLOW_identifier_in_from_source2658);
             ident=identifier();
             _fsp--;
             if (failed) return ds;
             if ( backtracking==0 ) {
-              
-              			ad = new AccessorDescr(ident.getText());	
-              			ad.setLocation( offset(ident.getLine()), ident.getCharPositionInLine() );
-              			ad.setStartCharacter( ((CommonToken)ident).getStartIndex() );
-              			ad.setEndCharacter( ((CommonToken)ident).getStopIndex() );
-              			ds = ad;
-              			location.setProperty(Location.LOCATION_FROM_CONTENT, ident.getText());
+
+              			ad = new AccessorDescr(ident.start.getText());	
+              			ad.setLocation( offset(ident.start.getLine()), ident.start.getCharPositionInLine() );
+              			ad.setStartCharacter( ((CommonToken)ident.start).getStartIndex() );
+              			ad.setEndCharacter( ((CommonToken)ident.start).getStopIndex() );
+              			ds = ad;
+              			location.setProperty(Location.LOCATION_FROM_CONTENT, ident.start.getText());
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:780:3: (args= paren_chunk[from] )?
-            int alt31=2;
-            int LA31_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:920:3: ( options {k=1; } : args= paren_chunk[$from] )?
+            int alt47=2;
+            int LA47_0 = input.LA(1);
 
-            if ( (LA31_0==LEFT_PAREN) ) {
-                int LA31_1 = input.LA(2);
-
-                if ( (synpred46()) ) {
-                    alt31=1;
-                }
+            if ( (LA47_0==LEFT_PAREN) ) {
+                alt47=1;
             }
-            switch (alt31) {
+            switch (alt47) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:780:4: args= paren_chunk[from]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:927:5: args= paren_chunk[$from]
                     {
-                    pushFollow(FOLLOW_paren_chunk_in_from_source2003);
+                    pushFollow(FOLLOW_paren_chunk_in_from_source2686);
                     args=paren_chunk(from);
                     _fsp--;
                     if (failed) return ds;
                     if ( backtracking==0 ) {
-                      
-                      			if( args != null ) {
-                      				ad.setVariableName( null );
-                      				FunctionCallDescr fc = new FunctionCallDescr(ident.getText());
-                      				fc.setLocation( offset(ident.getLine()), ident.getCharPositionInLine() );			
-                      				fc.setArguments(args);
-                      				fc.setStartCharacter( ((CommonToken)ident).getStartIndex() );
-                      				fc.setEndCharacter( ((CommonToken)ident).getStopIndex() );
-                      				ad.addInvoker(fc);
-                      				location.setProperty(Location.LOCATION_FROM_CONTENT, args);
-                      			}
+
+                      			if( args != null ) {
+                      				ad.setVariableName( null );
+                      				FunctionCallDescr fc = new FunctionCallDescr(((Token)ident.start).getText());
+                      				fc.setLocation( offset(((Token)ident.start).getLine()), ((Token)ident.start).getCharPositionInLine() );			
+                      				fc.setArguments(args);
+                      				fc.setStartCharacter( ((CommonToken)((Token)ident.start)).getStartIndex() );
+                      				fc.setEndCharacter( ((CommonToken)((Token)ident.start)).getStopIndex() );
+                      				ad.addInvoker(fc);
+                      				location.setProperty(Location.LOCATION_FROM_CONTENT, args);
+                      			}
                       		
                     }
 
@@ -2932,18 +3937,18 @@
 
             }
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:794:3: ( expression_chain[from, ad] )?
-            int alt32=2;
-            int LA32_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:941:3: ( expression_chain[$from, ad] )?
+            int alt48=2;
+            int LA48_0 = input.LA(1);
 
-            if ( (LA32_0==71) ) {
-                alt32=1;
+            if ( (LA48_0==DOT) ) {
+                alt48=1;
             }
-            switch (alt32) {
+            switch (alt48) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: expression_chain[from, ad]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:941:3: expression_chain[$from, ad]
                     {
-                    pushFollow(FOLLOW_expression_chain_in_from_source2017);
+                    pushFollow(FOLLOW_expression_chain_in_from_source2700);
                     expression_chain(from,  ad);
                     _fsp--;
                     if (failed) return ds;
@@ -2954,10 +3959,10 @@
             }
 
             if ( backtracking==0 ) {
-              
-              			if( ad != null ) {
-              				location.setProperty(Location.LOCATION_FROM_CONTENT, ad.toString() );
-              			}
+
+              			if( ad != null ) {
+              				location.setProperty(Location.LOCATION_FROM_CONTENT, ad.toString() );
+              			}
               		
             }
 
@@ -2976,81 +3981,70 @@
 
 
     // $ANTLR start expression_chain
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:802:1: expression_chain[FromDescr from, AccessorDescr as] : ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( expression_chain[from, as] )? ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:949:1: expression_chain[FromDescr from, AccessorDescr as] : ( DOT field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )? ( expression_chain[from, as] )? ) ;
     public final void expression_chain(FromDescr from, AccessorDescr as) throws RecognitionException {
-        Token field = null;
+        identifier_return field = null;
 
         String sqarg = null;
 
         String paarg = null;
 
 
-        
-          		FieldAccessDescr fa = null;
-        	    	MethodAccessDescr ma = null;	
+
+          		FieldAccessDescr fa = null;
+        	    	MethodAccessDescr ma = null;	
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:808:2: ( ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( expression_chain[from, as] )? ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:808:2: ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( expression_chain[from, as] )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:955:2: ( ( DOT field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )? ( expression_chain[from, as] )? ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:955:2: ( DOT field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )? ( expression_chain[from, as] )? )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:808:2: ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( expression_chain[from, as] )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:808:4: '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( expression_chain[from, as] )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:955:2: ( DOT field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )? ( expression_chain[from, as] )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:955:4: DOT field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )? ( expression_chain[from, as] )?
             {
-            match(input,71,FOLLOW_71_in_expression_chain2046); if (failed) return ;
-            pushFollow(FOLLOW_identifier_in_expression_chain2050);
+            match(input,DOT,FOLLOW_DOT_in_expression_chain2729); if (failed) return ;
+            pushFollow(FOLLOW_identifier_in_expression_chain2733);
             field=identifier();
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              	        fa = new FieldAccessDescr(field.getText());	
-              		fa.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
-              		fa.setStartCharacter( ((CommonToken)field).getStartIndex() );
-              		fa.setEndCharacter( ((CommonToken)field).getStopIndex() );
+
+              	        fa = new FieldAccessDescr(((Token)field.start).getText());	
+              		fa.setLocation( offset(((Token)field.start).getLine()), ((Token)field.start).getCharPositionInLine() );
+              		fa.setStartCharacter( ((CommonToken)((Token)field.start)).getStartIndex() );
+              		fa.setEndCharacter( ((CommonToken)((Token)field.start)).getStopIndex() );
               	    
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:815:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )?
-            int alt33=3;
-            int LA33_0 = input.LA(1);
-
-            if ( (LA33_0==LEFT_SQUARE) && (synpred48())) {
-                alt33=1;
-            }
-            else if ( (LA33_0==LEFT_PAREN) ) {
-                int LA33_2 = input.LA(2);
-
-                if ( (synpred49()) ) {
-                    alt33=2;
-                }
-            }
-            switch (alt33) {
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:962:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )?
+            int alt49=3;
+            alt49 = dfa49.predict(input);
+            switch (alt49) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:816:6: ( LEFT_SQUARE )=>sqarg= square_chunk[from]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:963:6: ( LEFT_SQUARE )=>sqarg= square_chunk[$from]
                     {
-                    pushFollow(FOLLOW_square_chunk_in_expression_chain2081);
+                    pushFollow(FOLLOW_square_chunk_in_expression_chain2764);
                     sqarg=square_chunk(from);
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      	          fa.setArgument( sqarg );	
+
+                      	          fa.setArgument( sqarg );	
                       	      
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:821:6: ( LEFT_PAREN )=>paarg= paren_chunk[from]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:968:6: ( LEFT_PAREN )=>paarg= paren_chunk[$from]
                     {
-                    pushFollow(FOLLOW_paren_chunk_in_expression_chain2115);
+                    pushFollow(FOLLOW_paren_chunk_in_expression_chain2798);
                     paarg=paren_chunk(from);
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      	    	  ma = new MethodAccessDescr( field.getText(), paarg );	
-                      		  ma.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
-                      		  ma.setStartCharacter( ((CommonToken)field).getStartIndex() );
+
+                      	    	  ma = new MethodAccessDescr( ((Token)field.start).getText(), paarg );	
+                      		  ma.setLocation( offset(((Token)field.start).getLine()), ((Token)field.start).getCharPositionInLine() );
+                      		  ma.setStartCharacter( ((CommonToken)((Token)field.start)).getStartIndex() );
                       		
                     }
 
@@ -3060,26 +4054,26 @@
             }
 
             if ( backtracking==0 ) {
-              
-              	      if( ma != null ) {
-              	          as.addInvoker( ma );
-              	      } else {
-              	          as.addInvoker( fa );
-              	      }
+
+              	      if( ma != null ) {
+              	          as.addInvoker( ma );
+              	      } else {
+              	          as.addInvoker( fa );
+              	      }
               	  
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:835:4: ( expression_chain[from, as] )?
-            int alt34=2;
-            int LA34_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:982:4: ( expression_chain[from, as] )?
+            int alt50=2;
+            int LA50_0 = input.LA(1);
 
-            if ( (LA34_0==71) ) {
-                alt34=1;
+            if ( (LA50_0==DOT) ) {
+                alt50=1;
             }
-            switch (alt34) {
+            switch (alt50) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: expression_chain[from, as]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:982:4: expression_chain[from, as]
                     {
-                    pushFollow(FOLLOW_expression_chain_in_expression_chain2136);
+                    pushFollow(FOLLOW_expression_chain_in_expression_chain2819);
                     expression_chain(from,  as);
                     _fsp--;
                     if (failed) return ;
@@ -3108,49 +4102,50 @@
 
 
     // $ANTLR start accumulate_statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:839:1: accumulate_statement returns [AccumulateDescr d] : loc= ACCUMULATE LEFT_PAREN pattern= lhs_pattern ( COMMA )? INIT text= paren_chunk[null] ( COMMA )? ACTION text= paren_chunk[null] ( COMMA )? RESULT text= paren_chunk[null] loc= RIGHT_PAREN ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:986:1: accumulate_statement returns [AccumulateDescr d] : ACCUMULATE LEFT_PAREN pattern= lhs_pattern ( COMMA )? INIT text= paren_chunk[null] ( COMMA )? ACTION text= paren_chunk[null] ( COMMA )? RESULT text= paren_chunk[null] RIGHT_PAREN ;
     public final AccumulateDescr accumulate_statement() throws RecognitionException {
         AccumulateDescr d = null;
 
-        Token loc=null;
+        Token ACCUMULATE44=null;
+        Token RIGHT_PAREN45=null;
         BaseDescr pattern = null;
 
         String text = null;
 
 
-        
-        		d = factory.createAccumulate();
+
+        		d = factory.createAccumulate();
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:844:10: (loc= ACCUMULATE LEFT_PAREN pattern= lhs_pattern ( COMMA )? INIT text= paren_chunk[null] ( COMMA )? ACTION text= paren_chunk[null] ( COMMA )? RESULT text= paren_chunk[null] loc= RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:844:10: loc= ACCUMULATE LEFT_PAREN pattern= lhs_pattern ( COMMA )? INIT text= paren_chunk[null] ( COMMA )? ACTION text= paren_chunk[null] ( COMMA )? RESULT text= paren_chunk[null] loc= RIGHT_PAREN
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:991:10: ( ACCUMULATE LEFT_PAREN pattern= lhs_pattern ( COMMA )? INIT text= paren_chunk[null] ( COMMA )? ACTION text= paren_chunk[null] ( COMMA )? RESULT text= paren_chunk[null] RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:991:10: ACCUMULATE LEFT_PAREN pattern= lhs_pattern ( COMMA )? INIT text= paren_chunk[null] ( COMMA )? ACTION text= paren_chunk[null] ( COMMA )? RESULT text= paren_chunk[null] RIGHT_PAREN
             {
-            loc=(Token)input.LT(1);
-            match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_accumulate_statement2177); if (failed) return d;
+            ACCUMULATE44=(Token)input.LT(1);
+            match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_accumulate_statement2858); if (failed) return d;
             if ( backtracking==0 ) {
-               
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE );
+               
+              			d.setLocation( offset(ACCUMULATE44.getLine()), ACCUMULATE44.getCharPositionInLine() );
+              			d.setStartCharacter( ((CommonToken)ACCUMULATE44).getStartIndex() );
+              			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE );
               		
             }
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_accumulate_statement2187); if (failed) return d;
-            pushFollow(FOLLOW_lhs_pattern_in_accumulate_statement2191);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_accumulate_statement2868); if (failed) return d;
+            pushFollow(FOLLOW_lhs_pattern_in_accumulate_statement2872);
             pattern=lhs_pattern();
             _fsp--;
             if (failed) return d;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:850:34: ( COMMA )?
-            int alt35=2;
-            int LA35_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:997:34: ( COMMA )?
+            int alt51=2;
+            int LA51_0 = input.LA(1);
 
-            if ( (LA35_0==COMMA) ) {
-                alt35=1;
+            if ( (LA51_0==COMMA) ) {
+                alt51=1;
             }
-            switch (alt35) {
+            switch (alt51) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: COMMA
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:997:34: COMMA
                     {
-                    match(input,COMMA,FOLLOW_COMMA_in_accumulate_statement2193); if (failed) return d;
+                    match(input,COMMA,FOLLOW_COMMA_in_accumulate_statement2874); if (failed) return d;
 
                     }
                     break;
@@ -3158,32 +4153,32 @@
             }
 
             if ( backtracking==0 ) {
-              
-              		        d.setSourcePattern( (PatternDescr)pattern );
+
+              		        d.setSourcePattern( (PatternDescr) pattern );
               		
             }
-            match(input,INIT,FOLLOW_INIT_in_accumulate_statement2203); if (failed) return d;
+            match(input,INIT,FOLLOW_INIT_in_accumulate_statement2884); if (failed) return d;
             if ( backtracking==0 ) {
-              
-              			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_INIT );
+
+              			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_INIT );
               		
             }
-            pushFollow(FOLLOW_paren_chunk_in_accumulate_statement2214);
+            pushFollow(FOLLOW_paren_chunk_in_accumulate_statement2895);
             text=paren_chunk(null);
             _fsp--;
             if (failed) return d;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:858:26: ( COMMA )?
-            int alt36=2;
-            int LA36_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1005:26: ( COMMA )?
+            int alt52=2;
+            int LA52_0 = input.LA(1);
 
-            if ( (LA36_0==COMMA) ) {
-                alt36=1;
+            if ( (LA52_0==COMMA) ) {
+                alt52=1;
             }
-            switch (alt36) {
+            switch (alt52) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: COMMA
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1005:26: COMMA
                     {
-                    match(input,COMMA,FOLLOW_COMMA_in_accumulate_statement2217); if (failed) return d;
+                    match(input,COMMA,FOLLOW_COMMA_in_accumulate_statement2898); if (failed) return d;
 
                     }
                     break;
@@ -3191,31 +4186,31 @@
             }
 
             if ( backtracking==0 ) {
-              
-              			if( text != null ) {
-              			        d.setInitCode( text.substring(1, text.length()-1) );
-              				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_INIT_CONTENT, d.getInitCode());
-              				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_ACTION );
-              			}
+
+              			if( text != null ) {
+              			        d.setInitCode( text.substring(1, text.length()-1) );
+              				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_INIT_CONTENT, d.getInitCode());
+              				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_ACTION );
+              			}
               		
             }
-            match(input,ACTION,FOLLOW_ACTION_in_accumulate_statement2226); if (failed) return d;
-            pushFollow(FOLLOW_paren_chunk_in_accumulate_statement2230);
+            match(input,ACTION,FOLLOW_ACTION_in_accumulate_statement2907); if (failed) return d;
+            pushFollow(FOLLOW_paren_chunk_in_accumulate_statement2911);
             text=paren_chunk(null);
             _fsp--;
             if (failed) return d;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:866:33: ( COMMA )?
-            int alt37=2;
-            int LA37_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1013:33: ( COMMA )?
+            int alt53=2;
+            int LA53_0 = input.LA(1);
 
-            if ( (LA37_0==COMMA) ) {
-                alt37=1;
+            if ( (LA53_0==COMMA) ) {
+                alt53=1;
             }
-            switch (alt37) {
+            switch (alt53) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: COMMA
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1013:33: COMMA
                     {
-                    match(input,COMMA,FOLLOW_COMMA_in_accumulate_statement2233); if (failed) return d;
+                    match(input,COMMA,FOLLOW_COMMA_in_accumulate_statement2914); if (failed) return d;
 
                     }
                     break;
@@ -3223,33 +4218,33 @@
             }
 
             if ( backtracking==0 ) {
-              
-              			if( text != null ) {
-              			        d.setActionCode( text.substring(1, text.length()-1) );
-              	       			location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_ACTION_CONTENT, d.getActionCode());
-              				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_RESULT );
-              			}
+
+              			if( text != null ) {
+              			        d.setActionCode( text.substring(1, text.length()-1) );
+              	       			location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_ACTION_CONTENT, d.getActionCode());
+              				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_RESULT );
+              			}
               		
             }
-            match(input,RESULT,FOLLOW_RESULT_in_accumulate_statement2242); if (failed) return d;
-            pushFollow(FOLLOW_paren_chunk_in_accumulate_statement2246);
+            match(input,RESULT,FOLLOW_RESULT_in_accumulate_statement2923); if (failed) return d;
+            pushFollow(FOLLOW_paren_chunk_in_accumulate_statement2927);
             text=paren_chunk(null);
             _fsp--;
             if (failed) return d;
             if ( backtracking==0 ) {
-              
-              			if( text != null ) {
-              			        d.setResultCode( text.substring(1, text.length()-1) );
-              				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_RESULT_CONTENT, d.getResultCode());
-              			}
+
+              			if( text != null ) {
+              			        d.setResultCode( text.substring(1, text.length()-1) );
+              				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_RESULT_CONTENT, d.getResultCode());
+              			}
               		
             }
-            loc=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_accumulate_statement2258); if (failed) return d;
+            RIGHT_PAREN45=(Token)input.LT(1);
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_accumulate_statement2937); if (failed) return d;
             if ( backtracking==0 ) {
-              
-              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-              			d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+
+              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+              			d.setEndCharacter( ((CommonToken)RIGHT_PAREN45).getStopIndex() );
               		
             }
 
@@ -3268,42 +4263,43 @@
 
 
     // $ANTLR start collect_statement
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:888:1: collect_statement returns [CollectDescr d] : loc= COLLECT LEFT_PAREN pattern= lhs_pattern loc= RIGHT_PAREN ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1035:1: collect_statement returns [CollectDescr d] : COLLECT LEFT_PAREN pattern= lhs_pattern RIGHT_PAREN ;
     public final CollectDescr collect_statement() throws RecognitionException {
         CollectDescr d = null;
 
-        Token loc=null;
+        Token COLLECT46=null;
+        Token RIGHT_PAREN47=null;
         BaseDescr pattern = null;
 
 
-        
-        		d = factory.createCollect();
+
+        		d = factory.createCollect();
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:893:10: (loc= COLLECT LEFT_PAREN pattern= lhs_pattern loc= RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:893:10: loc= COLLECT LEFT_PAREN pattern= lhs_pattern loc= RIGHT_PAREN
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1040:10: ( COLLECT LEFT_PAREN pattern= lhs_pattern RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1040:10: COLLECT LEFT_PAREN pattern= lhs_pattern RIGHT_PAREN
             {
-            loc=(Token)input.LT(1);
-            match(input,COLLECT,FOLLOW_COLLECT_in_collect_statement2301); if (failed) return d;
+            COLLECT46=(Token)input.LT(1);
+            match(input,COLLECT,FOLLOW_COLLECT_in_collect_statement2978); if (failed) return d;
             if ( backtracking==0 ) {
-               
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			location.setType( Location.LOCATION_LHS_FROM_COLLECT );
+               
+              			d.setLocation( offset(COLLECT46.getLine()), COLLECT46.getCharPositionInLine() );
+              			d.setStartCharacter( ((CommonToken)COLLECT46).getStartIndex() );
+              			location.setType( Location.LOCATION_LHS_FROM_COLLECT );
               		
             }
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_collect_statement2311); if (failed) return d;
-            pushFollow(FOLLOW_lhs_pattern_in_collect_statement2315);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_collect_statement2988); if (failed) return d;
+            pushFollow(FOLLOW_lhs_pattern_in_collect_statement2992);
             pattern=lhs_pattern();
             _fsp--;
             if (failed) return d;
-            loc=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_collect_statement2319); if (failed) return d;
+            RIGHT_PAREN47=(Token)input.LT(1);
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_collect_statement2994); if (failed) return d;
             if ( backtracking==0 ) {
-              
-              		        d.setSourcePattern( (PatternDescr)pattern );
-              			d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+
+              		        d.setSourcePattern( (PatternDescr)pattern );
+              			d.setEndCharacter( ((CommonToken)RIGHT_PAREN47).getStopIndex() );
+              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
               		
             }
 
@@ -3322,170 +4318,128 @@
 
 
     // $ANTLR start fact_binding
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:907:1: fact_binding returns [BaseDescr d] : id= ID ':' fe= fact_expression[id.getText()] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1054:1: fact_binding returns [BaseDescr d] : ID ':' (fe= fact[$ID.text] | LEFT_PAREN left= fact[$ID.text] ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )* RIGHT_PAREN ) ;
     public final BaseDescr fact_binding() throws RecognitionException {
         BaseDescr d = null;
 
-        Token id=null;
+        Token ID48=null;
         BaseDescr fe = null;
 
+        BaseDescr left = null;
 
-        
-        		d=null;
-        		boolean multi=false;
+        BaseDescr right = null;
+
+
+
+        		d =null;
+        		OrDescr or = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:913:4: (id= ID ':' fe= fact_expression[id.getText()] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:913:4: id= ID ':' fe= fact_expression[id.getText()]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1060:4: ( ID ':' (fe= fact[$ID.text] | LEFT_PAREN left= fact[$ID.text] ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )* RIGHT_PAREN ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1060:4: ID ':' (fe= fact[$ID.text] | LEFT_PAREN left= fact[$ID.text] ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )* RIGHT_PAREN )
             {
-            id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_fact_binding2353); if (failed) return d;
-            match(input,70,FOLLOW_70_in_fact_binding2355); if (failed) return d;
+            ID48=(Token)input.LT(1);
+            match(input,ID,FOLLOW_ID_in_fact_binding3026); if (failed) return d;
+            match(input,71,FOLLOW_71_in_fact_binding3028); if (failed) return d;
             if ( backtracking==0 ) {
-              
-               		        // handling incomplete parsing
-               		        d = new PatternDescr( );
-               		        ((PatternDescr) d).setIdentifier( id.getText() );
+
+               		        // handling incomplete parsing
+               		        d = new PatternDescr( );
+               		        ((PatternDescr) d).setIdentifier( ID48.getText() );
                		
             }
-            pushFollow(FOLLOW_fact_expression_in_fact_binding2368);
-            fe=fact_expression(id.getText());
-            _fsp--;
-            if (failed) return d;
-            if ( backtracking==0 ) {
-              
-               		        // override previously instantiated pattern
-               			d=fe;
-               			if( d != null ) {
-                 			    d.setStartCharacter( ((CommonToken)id).getStartIndex() );
-                 			}
-               		
-            }
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1066:3: (fe= fact[$ID.text] | LEFT_PAREN left= fact[$ID.text] ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )* RIGHT_PAREN )
+            int alt55=2;
+            int LA55_0 = input.LA(1);
 
+            if ( (LA55_0==ID) ) {
+                alt55=1;
             }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end fact_binding
-
-
-    // $ANTLR start fact_expression
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:929:2: fact_expression[String id] returns [BaseDescr pd] : ( LEFT_PAREN fe= fact_expression[id] RIGHT_PAREN | f= fact ( ( OR | DOUBLE_PIPE ) f= fact )* );
-    public final BaseDescr fact_expression(String id) throws RecognitionException {
-        BaseDescr pd = null;
-
-        BaseDescr fe = null;
-
-        BaseDescr f = null;
-
-
-        
-         		pd = null;
-         		boolean multi = false;
-         	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:934:5: ( LEFT_PAREN fe= fact_expression[id] RIGHT_PAREN | f= fact ( ( OR | DOUBLE_PIPE ) f= fact )* )
-            int alt39=2;
-            int LA39_0 = input.LA(1);
-
-            if ( (LA39_0==LEFT_PAREN) ) {
-                alt39=1;
+            else if ( (LA55_0==LEFT_PAREN) ) {
+                alt55=2;
             }
-            else if ( (LA39_0==ID) ) {
-                alt39=2;
-            }
             else {
-                if (backtracking>0) {failed=true; return pd;}
+                if (backtracking>0) {failed=true; return d;}
                 NoViableAltException nvae =
-                    new NoViableAltException("929:2: fact_expression[String id] returns [BaseDescr pd] : ( LEFT_PAREN fe= fact_expression[id] RIGHT_PAREN | f= fact ( ( OR | DOUBLE_PIPE ) f= fact )* );", 39, 0, input);
+                    new NoViableAltException("1066:3: (fe= fact[$ID.text] | LEFT_PAREN left= fact[$ID.text] ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )* RIGHT_PAREN )", 55, 0, input);
 
                 throw nvae;
             }
-            switch (alt39) {
+            switch (alt55) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:934:5: LEFT_PAREN fe= fact_expression[id] RIGHT_PAREN
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1066:5: fe= fact[$ID.text]
                     {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression2400); if (failed) return pd;
-                    pushFollow(FOLLOW_fact_expression_in_fact_expression2404);
-                    fe=fact_expression(id);
+                    pushFollow(FOLLOW_fact_in_fact_binding3042);
+                    fe=fact(ID48.getText());
                     _fsp--;
-                    if (failed) return pd;
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_expression2407); if (failed) return pd;
+                    if (failed) return d;
                     if ( backtracking==0 ) {
-                       pd=fe; 
+
+                       		        // override previously instantiated pattern
+                       			d =fe;
+                       			if( d != null ) {
+                         			    d.setStartCharacter( ((CommonToken)ID48).getStartIndex() );
+                         			}
+                       		
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:935:6: f= fact ( ( OR | DOUBLE_PIPE ) f= fact )*
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1075:4: LEFT_PAREN left= fact[$ID.text] ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )* RIGHT_PAREN
                     {
-                    pushFollow(FOLLOW_fact_in_fact_expression2418);
-                    f=fact();
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_binding3058); if (failed) return d;
+                    pushFollow(FOLLOW_fact_in_fact_binding3062);
+                    left=fact(ID48.getText());
                     _fsp--;
-                    if (failed) return pd;
+                    if (failed) return d;
                     if ( backtracking==0 ) {
-                      
-                       			((PatternDescr)f).setIdentifier( id );
-                       			pd = f;
+
+                       		        // override previously instantiated pattern
+                       			d =left;
+                       			if( d != null ) {
+                         			    d.setStartCharacter( ((CommonToken)ID48).getStartIndex() );
+                         			}
                        		
                     }
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:940:4: ( ( OR | DOUBLE_PIPE ) f= fact )*
-                    loop38:
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1083:4: ( ( OR | DOUBLE_PIPE ) right= fact[$ID.text] )*
+                    loop54:
                     do {
-                        int alt38=2;
-                        int LA38_0 = input.LA(1);
+                        int alt54=2;
+                        int LA54_0 = input.LA(1);
 
-                        if ( ((LA38_0>=OR && LA38_0<=DOUBLE_PIPE)) ) {
-                            int LA38_7 = input.LA(2);
-
-                            if ( (synpred56()) ) {
-                                alt38=1;
-                            }
-
-
+                        if ( ((LA54_0>=OR && LA54_0<=DOUBLE_PIPE)) ) {
+                            alt54=1;
                         }
 
 
-                        switch (alt38) {
+                        switch (alt54) {
                     	case 1 :
-                    	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:940:6: ( OR | DOUBLE_PIPE ) f= fact
+                    	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1083:6: ( OR | DOUBLE_PIPE ) right= fact[$ID.text]
                     	    {
                     	    if ( (input.LA(1)>=OR && input.LA(1)<=DOUBLE_PIPE) ) {
                     	        input.consume();
                     	        errorRecovery=false;failed=false;
                     	    }
                     	    else {
-                    	        if (backtracking>0) {failed=true; return pd;}
+                    	        if (backtracking>0) {failed=true; return d;}
                     	        MismatchedSetException mse =
                     	            new MismatchedSetException(null,input);
-                    	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_fact_expression2430);    throw mse;
+                    	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_fact_binding3075);    throw mse;
                     	    }
 
-                    	    if ( backtracking==0 ) {
-                    	      	if ( ! multi ) {
-                    	       					BaseDescr first = pd;
-                    	       					pd = new OrDescr();
-                    	       					((OrDescr)pd).addDescr( first );
-                    	       					multi=true;
-                    	       				}
-                    	       			
-                    	    }
-                    	    pushFollow(FOLLOW_fact_in_fact_expression2448);
-                    	    f=fact();
+                    	    pushFollow(FOLLOW_fact_in_fact_binding3087);
+                    	    right=fact(ID48.getText());
                     	    _fsp--;
-                    	    if (failed) return pd;
+                    	    if (failed) return d;
                     	    if ( backtracking==0 ) {
-                    	      
-                    	       				((PatternDescr)f).setIdentifier( id );
-                    	       				((OrDescr)pd).addDescr( f );
+
+                    	      				if ( or == null ) {
+                    	      					or = new OrDescr();
+                    	      					or.addDescr( left );
+                    	      					d = or;
+                    	      				}
+                    	      				or.addDescr( right );
                     	       			
                     	    }
 
@@ -3493,15 +4447,20 @@
                     	    break;
 
                     	default :
-                    	    break loop38;
+                    	    break loop54;
                         }
                     } while (true);
 
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_binding3105); if (failed) return d;
 
                     }
                     break;
 
             }
+
+
+            }
+
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -3509,68 +4468,71 @@
         }
         finally {
         }
-        return pd;
+        return d;
     }
-    // $ANTLR end fact_expression
+    // $ANTLR end fact_binding
 
 
     // $ANTLR start fact
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:956:1: fact returns [BaseDescr d] : id= dotted_name[d] loc= LEFT_PAREN ( constraints[pattern] )? endLoc= RIGHT_PAREN ;
-    public final BaseDescr fact() throws RecognitionException {
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1098:1: fact[String ident] returns [BaseDescr d] : id= qualified_id[$d] LEFT_PAREN ( constraints[pattern] )? RIGHT_PAREN ;
+    public final BaseDescr fact(String ident) throws RecognitionException {
         BaseDescr d = null;
 
-        Token loc=null;
-        Token endLoc=null;
+        Token LEFT_PAREN49=null;
+        Token RIGHT_PAREN50=null;
         String id = null;
 
 
-        
-        		d=null;
-        		PatternDescr pattern = null;
+
+        		d =null;
+        		PatternDescr pattern = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:962:11: (id= dotted_name[d] loc= LEFT_PAREN ( constraints[pattern] )? endLoc= RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:962:11: id= dotted_name[d] loc= LEFT_PAREN ( constraints[pattern] )? endLoc= RIGHT_PAREN
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1104:11: (id= qualified_id[$d] LEFT_PAREN ( constraints[pattern] )? RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1104:11: id= qualified_id[$d] LEFT_PAREN ( constraints[pattern] )? RIGHT_PAREN
             {
             if ( backtracking==0 ) {
-              
-               			pattern = new PatternDescr( );
-               			d = pattern; 
+
+               			pattern = new PatternDescr( );
+               			if( ident != null ) {
+               				pattern.setIdentifier( ident );
+               			}
+               			d = pattern; 
                	        
             }
-            pushFollow(FOLLOW_dotted_name_in_fact2509);
-            id=dotted_name(d);
+            pushFollow(FOLLOW_qualified_id_in_fact3160);
+            id=qualified_id(d);
             _fsp--;
             if (failed) return d;
             if ( backtracking==0 ) {
-               
-               		        pattern.setObjectType( id );
-               		        pattern.setEndCharacter( -1 );
+               
+               		        pattern.setObjectType( id );
+               		        pattern.setEndCharacter( -1 );
                		
             }
-            loc=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact2523); if (failed) return d;
+            LEFT_PAREN49=(Token)input.LT(1);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact3172); if (failed) return d;
             if ( backtracking==0 ) {
-              
-              		                location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START );
-                          			location.setProperty( Location.LOCATION_PROPERTY_CLASS_NAME, id );
-               				
-               				pattern.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-               			        pattern.setLeftParentCharacter( ((CommonToken)loc).getStartIndex() );
-               			
+
+              		        location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START );
+                          		location.setProperty( Location.LOCATION_PROPERTY_CLASS_NAME, id );
+               				
+               			pattern.setLocation( offset(LEFT_PAREN49.getLine()), LEFT_PAREN49.getCharPositionInLine() );
+               			pattern.setLeftParentCharacter( ((CommonToken)LEFT_PAREN49).getStartIndex() );
+               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:978:4: ( constraints[pattern] )?
-            int alt40=2;
-            int LA40_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1124:4: ( constraints[pattern] )?
+            int alt56=2;
+            int LA56_0 = input.LA(1);
 
-            if ( ((LA40_0>=ATTRIBUTES && LA40_0<=ID)||(LA40_0>=END && LA40_0<=WHEN)||LA40_0==ENABLED||LA40_0==SALIENCE||LA40_0==DURATION||LA40_0==ACCUMULATE||(LA40_0>=INIT && LA40_0<=OR)||(LA40_0>=EVAL && LA40_0<=IN)||LA40_0==NULL||(LA40_0>=AND && LA40_0<=THEN)) ) {
-                alt40=1;
+            if ( ((LA56_0>=ATTRIBUTES && LA56_0<=ID)||(LA56_0>=GLOBAL && LA56_0<=LEFT_PAREN)||(LA56_0>=QUERY && LA56_0<=WHEN)||LA56_0==ENABLED||LA56_0==SALIENCE||LA56_0==DURATION||LA56_0==FROM||LA56_0==EVAL||(LA56_0>=INIT && LA56_0<=RESULT)||(LA56_0>=CONTAINS && LA56_0<=IN)||LA56_0==NULL||LA56_0==THEN) ) {
+                alt56=1;
             }
-            switch (alt40) {
+            switch (alt56) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:978:6: constraints[pattern]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1124:6: constraints[pattern]
                     {
-                    pushFollow(FOLLOW_constraints_in_fact2533);
+                    pushFollow(FOLLOW_constraints_in_fact3186);
                     constraints(pattern);
                     _fsp--;
                     if (failed) return d;
@@ -3580,16 +4542,14 @@
 
             }
 
-            endLoc=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact2546); if (failed) return d;
+            RIGHT_PAREN50=(Token)input.LT(1);
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact3197); if (failed) return d;
             if ( backtracking==0 ) {
-              
-              		        if( endLoc.getType() == RIGHT_PAREN ) {
-              				this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-              				pattern.setEndLocation( offset(endLoc.getLine()), endLoc.getCharPositionInLine() );	
-              				pattern.setEndCharacter( ((CommonToken)endLoc).getStopIndex() );
-               			        pattern.setRightParentCharacter( ((CommonToken)endLoc).getStartIndex() );
-              			}
+
+              			this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+              			pattern.setEndLocation( offset(RIGHT_PAREN50.getLine()), RIGHT_PAREN50.getCharPositionInLine() );	
+              			pattern.setEndCharacter( ((CommonToken)RIGHT_PAREN50).getStopIndex() );
+              		        pattern.setRightParentCharacter( ((CommonToken)RIGHT_PAREN50).getStartIndex() );
                		
             }
 
@@ -3608,36 +4568,36 @@
 
 
     // $ANTLR start constraints
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:991:1: constraints[PatternDescr pattern] : constraint[pattern] ( ',' constraint[pattern] )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1135:1: constraints[PatternDescr pattern] : constraint[$pattern] ( COMMA constraint[$pattern] )* ;
     public final void constraints(PatternDescr pattern) throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:992:4: ( constraint[pattern] ( ',' constraint[pattern] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:992:4: constraint[pattern] ( ',' constraint[pattern] )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1136:4: ( constraint[$pattern] ( COMMA constraint[$pattern] )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1136:4: constraint[$pattern] ( COMMA constraint[$pattern] )*
             {
-            pushFollow(FOLLOW_constraint_in_constraints2566);
+            pushFollow(FOLLOW_constraint_in_constraints3217);
             constraint(pattern);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:993:3: ( ',' constraint[pattern] )*
-            loop41:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1137:3: ( COMMA constraint[$pattern] )*
+            loop57:
             do {
-                int alt41=2;
-                int LA41_0 = input.LA(1);
+                int alt57=2;
+                int LA57_0 = input.LA(1);
 
-                if ( (LA41_0==COMMA) ) {
-                    alt41=1;
+                if ( (LA57_0==COMMA) ) {
+                    alt57=1;
                 }
 
 
-                switch (alt41) {
+                switch (alt57) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:993:5: ',' constraint[pattern]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1137:5: COMMA constraint[$pattern]
             	    {
-            	    match(input,COMMA,FOLLOW_COMMA_in_constraints2573); if (failed) return ;
+            	    match(input,COMMA,FOLLOW_COMMA_in_constraints3224); if (failed) return ;
             	    if ( backtracking==0 ) {
             	       location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START ); 
             	    }
-            	    pushFollow(FOLLOW_constraint_in_constraints2582);
+            	    pushFollow(FOLLOW_constraint_in_constraints3233);
             	    constraint(pattern);
             	    _fsp--;
             	    if (failed) return ;
@@ -3646,7 +4606,7 @@
             	    break;
 
             	default :
-            	    break loop41;
+            	    break loop57;
                 }
             } while (true);
 
@@ -3666,21 +4626,21 @@
 
 
     // $ANTLR start constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:998:1: constraint[PatternDescr pattern] : or_constr[top] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1142:1: constraint[PatternDescr pattern] : or_constr[top] ;
     public final void constraint(PatternDescr pattern) throws RecognitionException {
-        
-        		ConditionalElementDescr top = null;
+
+        		ConditionalElementDescr top = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1003:3: ( or_constr[top] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1003:3: or_constr[top]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1147:3: ( or_constr[top] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1147:3: or_constr[top]
             {
             if ( backtracking==0 ) {
-              
-              			top = pattern.getConstraint();
+
+              			top = pattern.getConstraint();
               		
             }
-            pushFollow(FOLLOW_or_constr_in_constraint2615);
+            pushFollow(FOLLOW_or_constr_in_constraint3266);
             or_constr(top);
             _fsp--;
             if (failed) return ;
@@ -3700,44 +4660,41 @@
 
 
     // $ANTLR start or_constr
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1009:1: or_constr[ConditionalElementDescr base] : and_constr[or] (t= DOUBLE_PIPE and_constr[or] )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1153:1: or_constr[ConditionalElementDescr base] : and_constr[or] ( DOUBLE_PIPE and_constr[or] )* ;
     public final void or_constr(ConditionalElementDescr base) throws RecognitionException {
-        Token t=null;
 
-        
-        		OrDescr or = new OrDescr();
+        		OrDescr or = new OrDescr();
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1014:3: ( and_constr[or] (t= DOUBLE_PIPE and_constr[or] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1014:3: and_constr[or] (t= DOUBLE_PIPE and_constr[or] )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1158:3: ( and_constr[or] ( DOUBLE_PIPE and_constr[or] )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1158:3: and_constr[or] ( DOUBLE_PIPE and_constr[or] )*
             {
-            pushFollow(FOLLOW_and_constr_in_or_constr2638);
+            pushFollow(FOLLOW_and_constr_in_or_constr3289);
             and_constr(or);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1015:3: (t= DOUBLE_PIPE and_constr[or] )*
-            loop42:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1159:3: ( DOUBLE_PIPE and_constr[or] )*
+            loop58:
             do {
-                int alt42=2;
-                int LA42_0 = input.LA(1);
+                int alt58=2;
+                int LA58_0 = input.LA(1);
 
-                if ( (LA42_0==DOUBLE_PIPE) ) {
-                    alt42=1;
+                if ( (LA58_0==DOUBLE_PIPE) ) {
+                    alt58=1;
                 }
 
 
-                switch (alt42) {
+                switch (alt58) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1015:5: t= DOUBLE_PIPE and_constr[or]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1159:5: DOUBLE_PIPE and_constr[or]
             	    {
-            	    t=(Token)input.LT(1);
-            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_constr2648); if (failed) return ;
+            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_constr3297); if (failed) return ;
             	    if ( backtracking==0 ) {
-            	      
-            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
-            	      			
+
+            	      			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
+            	      		
             	    }
-            	    pushFollow(FOLLOW_and_constr_in_or_constr2658);
+            	    pushFollow(FOLLOW_and_constr_in_or_constr3306);
             	    and_constr(or);
             	    _fsp--;
             	    if (failed) return ;
@@ -3746,17 +4703,17 @@
             	    break;
 
             	default :
-            	    break loop42;
+            	    break loop58;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		        if( or.getDescrs().size() == 1 ) {
-              		                base.addOrMerge( (BaseDescr) or.getDescrs().get(0) );
-              		        } else if ( or.getDescrs().size() > 1 ) {
-              		        	base.addDescr( or );
-              		        }
+
+              		        if( or.getDescrs().size() == 1 ) {
+              		                base.addOrMerge( (BaseDescr) or.getDescrs().get(0) );
+              		        } else if ( or.getDescrs().size() > 1 ) {
+              		        	base.addDescr( or );
+              		        }
               		
             }
 
@@ -3775,44 +4732,41 @@
 
 
     // $ANTLR start and_constr
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1030:1: and_constr[ConditionalElementDescr base] : unary_constr[and] (t= DOUBLE_AMPER unary_constr[and] )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1174:1: and_constr[ConditionalElementDescr base] : unary_constr[and] ( DOUBLE_AMPER unary_constr[and] )* ;
     public final void and_constr(ConditionalElementDescr base) throws RecognitionException {
-        Token t=null;
 
-        
-        		AndDescr and = new AndDescr();
+        		AndDescr and = new AndDescr();
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1035:3: ( unary_constr[and] (t= DOUBLE_AMPER unary_constr[and] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1035:3: unary_constr[and] (t= DOUBLE_AMPER unary_constr[and] )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1179:3: ( unary_constr[and] ( DOUBLE_AMPER unary_constr[and] )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1179:3: unary_constr[and] ( DOUBLE_AMPER unary_constr[and] )*
             {
-            pushFollow(FOLLOW_unary_constr_in_and_constr2690);
+            pushFollow(FOLLOW_unary_constr_in_and_constr3338);
             unary_constr(and);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1036:3: (t= DOUBLE_AMPER unary_constr[and] )*
-            loop43:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1180:3: ( DOUBLE_AMPER unary_constr[and] )*
+            loop59:
             do {
-                int alt43=2;
-                int LA43_0 = input.LA(1);
+                int alt59=2;
+                int LA59_0 = input.LA(1);
 
-                if ( (LA43_0==DOUBLE_AMPER) ) {
-                    alt43=1;
+                if ( (LA59_0==DOUBLE_AMPER) ) {
+                    alt59=1;
                 }
 
 
-                switch (alt43) {
+                switch (alt59) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1036:5: t= DOUBLE_AMPER unary_constr[and]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1180:5: DOUBLE_AMPER unary_constr[and]
             	    {
-            	    t=(Token)input.LT(1);
-            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_constr2700); if (failed) return ;
+            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_constr3346); if (failed) return ;
             	    if ( backtracking==0 ) {
-            	      
-            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
-            	      			
+
+            	      			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
+            	      		
             	    }
-            	    pushFollow(FOLLOW_unary_constr_in_and_constr2710);
+            	    pushFollow(FOLLOW_unary_constr_in_and_constr3355);
             	    unary_constr(and);
             	    _fsp--;
             	    if (failed) return ;
@@ -3821,17 +4775,17 @@
             	    break;
 
             	default :
-            	    break loop43;
+            	    break loop59;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		        if( and.getDescrs().size() == 1) {
-              		                base.addOrMerge( (BaseDescr) and.getDescrs().get(0) );
-              		        } else if( and.getDescrs().size() > 1) {
-              		        	base.addDescr( and );
-              		        }
+
+              		        if( and.getDescrs().size() == 1) {
+              		                base.addOrMerge( (BaseDescr) and.getDescrs().get(0) );
+              		        } else if( and.getDescrs().size() > 1) {
+              		        	base.addDescr( and );
+              		        }
               		
             }
 
@@ -3850,22 +4804,22 @@
 
 
     // $ANTLR start unary_constr
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1051:1: unary_constr[ConditionalElementDescr base] : ( field_constraint[base] | LEFT_PAREN or_constr[base] RIGHT_PAREN | EVAL predicate[base] ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1195:1: unary_constr[ConditionalElementDescr base] : ( field_constraint[$base] | LEFT_PAREN or_constr[$base] RIGHT_PAREN | EVAL predicate[$base] ) ;
     public final void unary_constr(ConditionalElementDescr base) throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1053:3: ( ( field_constraint[base] | LEFT_PAREN or_constr[base] RIGHT_PAREN | EVAL predicate[base] ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1053:3: ( field_constraint[base] | LEFT_PAREN or_constr[base] RIGHT_PAREN | EVAL predicate[base] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1197:3: ( ( field_constraint[$base] | LEFT_PAREN or_constr[$base] RIGHT_PAREN | EVAL predicate[$base] ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1197:3: ( field_constraint[$base] | LEFT_PAREN or_constr[$base] RIGHT_PAREN | EVAL predicate[$base] )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1053:3: ( field_constraint[base] | LEFT_PAREN or_constr[base] RIGHT_PAREN | EVAL predicate[base] )
-            int alt44=3;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1197:3: ( field_constraint[$base] | LEFT_PAREN or_constr[$base] RIGHT_PAREN | EVAL predicate[$base] )
+            int alt60=3;
             switch ( input.LA(1) ) {
             case ATTRIBUTES:
             case PACKAGE:
             case IMPORT:
             case FUNCTION:
+            case ID:
             case GLOBAL:
             case QUERY:
-            case ID:
             case END:
             case TEMPLATE:
             case RULE:
@@ -3873,65 +4827,44 @@
             case ENABLED:
             case SALIENCE:
             case DURATION:
-            case ACCUMULATE:
+            case FROM:
             case INIT:
             case ACTION:
             case RESULT:
-            case COLLECT:
-            case OR:
             case CONTAINS:
-            case NOT:
             case EXCLUDES:
             case MATCHES:
             case MEMBEROF:
             case IN:
             case NULL:
-            case AND:
-            case FROM:
-            case EXISTS:
-            case FORALL:
             case THEN:
                 {
-                alt44=1;
+                alt60=1;
                 }
                 break;
-            case EVAL:
+            case LEFT_PAREN:
                 {
-                int LA44_28 = input.LA(2);
-
-                if ( (synpred61()) ) {
-                    alt44=1;
+                alt60=2;
                 }
-                else if ( (true) ) {
-                    alt44=3;
-                }
-                else {
-                    if (backtracking>0) {failed=true; return ;}
-                    NoViableAltException nvae =
-                        new NoViableAltException("1053:3: ( field_constraint[base] | LEFT_PAREN or_constr[base] RIGHT_PAREN | EVAL predicate[base] )", 44, 28, input);
-
-                    throw nvae;
-                }
-                }
                 break;
-            case LEFT_PAREN:
+            case EVAL:
                 {
-                alt44=2;
+                alt60=3;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1053:3: ( field_constraint[base] | LEFT_PAREN or_constr[base] RIGHT_PAREN | EVAL predicate[base] )", 44, 0, input);
+                    new NoViableAltException("1197:3: ( field_constraint[$base] | LEFT_PAREN or_constr[$base] RIGHT_PAREN | EVAL predicate[$base] )", 60, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt44) {
+            switch (alt60) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1053:5: field_constraint[base]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1197:5: field_constraint[$base]
                     {
-                    pushFollow(FOLLOW_field_constraint_in_unary_constr2738);
+                    pushFollow(FOLLOW_field_constraint_in_unary_constr3383);
                     field_constraint(base);
                     _fsp--;
                     if (failed) return ;
@@ -3939,22 +4872,22 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1054:5: LEFT_PAREN or_constr[base] RIGHT_PAREN
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1198:5: LEFT_PAREN or_constr[$base] RIGHT_PAREN
                     {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_unary_constr2746); if (failed) return ;
-                    pushFollow(FOLLOW_or_constr_in_unary_constr2748);
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_unary_constr3391); if (failed) return ;
+                    pushFollow(FOLLOW_or_constr_in_unary_constr3393);
                     or_constr(base);
                     _fsp--;
                     if (failed) return ;
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_unary_constr2751); if (failed) return ;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_unary_constr3396); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1055:5: EVAL predicate[base]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1199:5: EVAL predicate[$base]
                     {
-                    match(input,EVAL,FOLLOW_EVAL_in_unary_constr2757); if (failed) return ;
-                    pushFollow(FOLLOW_predicate_in_unary_constr2759);
+                    match(input,EVAL,FOLLOW_EVAL_in_unary_constr3402); if (failed) return ;
+                    pushFollow(FOLLOW_predicate_in_unary_constr3404);
                     predicate(base);
                     _fsp--;
                     if (failed) return ;
@@ -3980,47 +4913,47 @@
 
 
     // $ANTLR start field_constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1059:1: field_constraint[ConditionalElementDescr base] : (fb= ID ':' )? f= identifier ( or_restr_connective[top] | '->' predicate[base] )? ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1203:1: field_constraint[ConditionalElementDescr base] : ( ID ':' )? f= identifier ( or_restr_connective[top] | '->' predicate[$base] )? ;
     public final void field_constraint(ConditionalElementDescr base) throws RecognitionException {
-        Token fb=null;
-        Token f = null;
+        Token ID51=null;
+        identifier_return f = null;
 
 
-        
-        		FieldBindingDescr fbd = null;
-        		FieldConstraintDescr fc = null;
-        		RestrictionConnectiveDescr top = null;
+
+        		FieldBindingDescr fbd = null;
+        		FieldConstraintDescr fc = null;
+        		RestrictionConnectiveDescr top = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1066:3: ( (fb= ID ':' )? f= identifier ( or_restr_connective[top] | '->' predicate[base] )? )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1066:3: (fb= ID ':' )? f= identifier ( or_restr_connective[top] | '->' predicate[base] )?
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1210:3: ( ( ID ':' )? f= identifier ( or_restr_connective[top] | '->' predicate[$base] )? )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1210:3: ( ID ':' )? f= identifier ( or_restr_connective[top] | '->' predicate[$base] )?
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1066:3: (fb= ID ':' )?
-            int alt45=2;
-            int LA45_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1210:3: ( ID ':' )?
+            int alt61=2;
+            int LA61_0 = input.LA(1);
 
-            if ( (LA45_0==ID) ) {
-                int LA45_1 = input.LA(2);
+            if ( (LA61_0==ID) ) {
+                int LA61_1 = input.LA(2);
 
-                if ( (LA45_1==70) ) {
-                    alt45=1;
+                if ( (LA61_1==71) ) {
+                    alt61=1;
                 }
             }
-            switch (alt45) {
+            switch (alt61) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1066:5: fb= ID ':'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1210:5: ID ':'
                     {
-                    fb=(Token)input.LT(1);
-                    match(input,ID,FOLLOW_ID_in_field_constraint2791); if (failed) return ;
-                    match(input,70,FOLLOW_70_in_field_constraint2793); if (failed) return ;
+                    ID51=(Token)input.LT(1);
+                    match(input,ID,FOLLOW_ID_in_field_constraint3434); if (failed) return ;
+                    match(input,71,FOLLOW_71_in_field_constraint3436); if (failed) return ;
                     if ( backtracking==0 ) {
-                       
-                      			fbd = new FieldBindingDescr();
-                      			fbd.setIdentifier( fb.getText() );
-                      			fbd.setLocation( offset(fb.getLine()), fb.getCharPositionInLine() );
-                      			fbd.setStartCharacter( ((CommonToken)fb).getStartIndex() );
-                      			base.addDescr( fbd );
-                      
+                       
+                      			fbd = new FieldBindingDescr();
+                      			fbd.setIdentifier( ID51.getText() );
+                      			fbd.setLocation( offset(ID51.getLine()), ID51.getCharPositionInLine() );
+                      			fbd.setStartCharacter( ((CommonToken)ID51).getStartIndex() );
+                      			base.addDescr( fbd );
+
                       		    
                     }
 
@@ -4029,66 +4962,68 @@
 
             }
 
-            pushFollow(FOLLOW_identifier_in_field_constraint2814);
+            pushFollow(FOLLOW_identifier_in_field_constraint3457);
             f=identifier();
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              		    if( f != null ) {
-              			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
-              			location.setProperty(Location.LOCATION_PROPERTY_PROPERTY_NAME, f.getText());
-              		    
-              			if ( fbd != null ) {
-              			    fbd.setFieldName( f.getText() );
-               			    fbd.setEndCharacter( ((CommonToken)f).getStopIndex() );
-              			} 
-              			fc = new FieldConstraintDescr(f.getText());
-              			fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
-              			fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
-              			top = fc.getRestriction();
-              			
-              			// it must be a field constraint, as it is not a binding
-              			if( fb == null ) {
-              			    base.addDescr( fc );
-              			}
-              		    }
+
+              		    // use ((Token)f.start) to get token matched in identifier
+              		    // or use input.toString(f.start,f.stop) to get text.
+              		    if( input.toString(f.start,f.stop) != null ) {
+              			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+              			location.setProperty(Location.LOCATION_PROPERTY_PROPERTY_NAME, input.toString(f.start,f.stop));
+              		    
+              			if ( fbd != null ) {
+              			    fbd.setFieldName( input.toString(f.start,f.stop) );
+               			    fbd.setEndCharacter( ((CommonToken)((Token)f.start)).getStopIndex() );
+              			} 
+              			fc = new FieldConstraintDescr(input.toString(f.start,f.stop));
+              			fc.setLocation( offset(((Token)f.start).getLine()), ((Token)f.start).getCharPositionInLine() );
+              			fc.setStartCharacter( ((CommonToken)((Token)f.start)).getStartIndex() );
+              			top = fc.getRestriction();
+              			
+              			// it must be a field constraint, as it is not a binding
+              			if( ID51 == null ) {
+              			    base.addDescr( fc );
+              			}
+              		    }
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1097:3: ( or_restr_connective[top] | '->' predicate[base] )?
-            int alt46=3;
-            int LA46_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1243:3: ( or_restr_connective[top] | '->' predicate[$base] )?
+            int alt62=3;
+            int LA62_0 = input.LA(1);
 
-            if ( (LA46_0==LEFT_PAREN||(LA46_0>=CONTAINS && LA46_0<=IN)||(LA46_0>=74 && LA46_0<=79)) ) {
-                alt46=1;
+            if ( (LA62_0==LEFT_PAREN||LA62_0==NOT||(LA62_0>=CONTAINS && LA62_0<=IN)||(LA62_0>=74 && LA62_0<=79)) ) {
+                alt62=1;
             }
-            else if ( (LA46_0==73) ) {
-                alt46=2;
+            else if ( (LA62_0==73) ) {
+                alt62=2;
             }
-            switch (alt46) {
+            switch (alt62) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1098:4: or_restr_connective[top]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1244:4: or_restr_connective[top]
                     {
-                    pushFollow(FOLLOW_or_restr_connective_in_field_constraint2828);
+                    pushFollow(FOLLOW_or_restr_connective_in_field_constraint3471);
                     or_restr_connective(top);
                     _fsp--;
                     if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      				// we must add now as we didn't before
-                      				if( fb != null) {
-                      				    base.addDescr( fc );
-                      				}
+
+                      				// we must add now as we didn't before
+                      				if( ID51 != null) {
+                      				    base.addDescr( fc );
+                      				}
                       			
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1106:4: '->' predicate[base]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1252:4: '->' predicate[$base]
                     {
-                    match(input,73,FOLLOW_73_in_field_constraint2843); if (failed) return ;
-                    pushFollow(FOLLOW_predicate_in_field_constraint2845);
+                    match(input,73,FOLLOW_73_in_field_constraint3486); if (failed) return ;
+                    pushFollow(FOLLOW_predicate_in_field_constraint3488);
                     predicate(base);
                     _fsp--;
                     if (failed) return ;
@@ -4114,50 +5049,35 @@
 
 
     // $ANTLR start or_restr_connective
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1111:1: or_restr_connective[ RestrictionConnectiveDescr base ] : and_restr_connective[or] (t= DOUBLE_PIPE and_restr_connective[or] )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1257:1: or_restr_connective[ RestrictionConnectiveDescr base ] : and_restr_connective[or] ( options {backtrack=true; } : DOUBLE_PIPE and_restr_connective[or] )* ;
     public final void or_restr_connective(RestrictionConnectiveDescr base) throws RecognitionException {
-        Token t=null;
 
-        
-        		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+        		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1116:3: ( and_restr_connective[or] (t= DOUBLE_PIPE and_restr_connective[or] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1116:3: and_restr_connective[or] (t= DOUBLE_PIPE and_restr_connective[or] )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1262:3: ( and_restr_connective[or] ( options {backtrack=true; } : DOUBLE_PIPE and_restr_connective[or] )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1262:3: and_restr_connective[or] ( options {backtrack=true; } : DOUBLE_PIPE and_restr_connective[or] )*
             {
-            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective2874);
+            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective3517);
             and_restr_connective(or);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1117:3: (t= DOUBLE_PIPE and_restr_connective[or] )*
-            loop47:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1263:3: ( options {backtrack=true; } : DOUBLE_PIPE and_restr_connective[or] )*
+            loop63:
             do {
-                int alt47=2;
-                int LA47_0 = input.LA(1);
-
-                if ( (LA47_0==DOUBLE_PIPE) ) {
-                    int LA47_2 = input.LA(2);
-
-                    if ( (synpred66()) ) {
-                        alt47=1;
-                    }
-
-
-                }
-
-
-                switch (alt47) {
+                int alt63=2;
+                alt63 = dfa63.predict(input);
+                switch (alt63) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1117:5: t= DOUBLE_PIPE and_restr_connective[or]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1264:5: DOUBLE_PIPE and_restr_connective[or]
             	    {
-            	    t=(Token)input.LT(1);
-            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_restr_connective2884); if (failed) return ;
+            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_restr_connective3536); if (failed) return ;
             	    if ( backtracking==0 ) {
-            	      
-            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+
+            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
             	      			
             	    }
-            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective2896);
+            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective3548);
             	    and_restr_connective(or);
             	    _fsp--;
             	    if (failed) return ;
@@ -4166,17 +5086,17 @@
             	    break;
 
             	default :
-            	    break loop47;
+            	    break loop63;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		        if( or.getRestrictions().size() == 1 ) {
-              		                base.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
-              		        } else if ( or.getRestrictions().size() > 1 ) {
-              		        	base.addRestriction( or );
-              		        }
+
+              		        if( or.getRestrictions().size() == 1 ) {
+              		                base.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
+              		        } else if ( or.getRestrictions().size() > 1 ) {
+              		        	base.addRestriction( or );
+              		        }
               		
             }
 
@@ -4195,50 +5115,38 @@
 
 
     // $ANTLR start and_restr_connective
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1133:1: and_restr_connective[ RestrictionConnectiveDescr base ] : constraint_expression[and] (t= DOUBLE_AMPER constraint_expression[and] )* ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1279:1: and_restr_connective[ RestrictionConnectiveDescr base ] : constraint_expression[and] ( options {backtrack=true; } : t= DOUBLE_AMPER constraint_expression[and] )* ;
     public final void and_restr_connective(RestrictionConnectiveDescr base) throws RecognitionException {
         Token t=null;
 
-        
-        		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+
+        		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1138:3: ( constraint_expression[and] (t= DOUBLE_AMPER constraint_expression[and] )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1138:3: constraint_expression[and] (t= DOUBLE_AMPER constraint_expression[and] )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1284:3: ( constraint_expression[and] ( options {backtrack=true; } : t= DOUBLE_AMPER constraint_expression[and] )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1284:3: constraint_expression[and] ( options {backtrack=true; } : t= DOUBLE_AMPER constraint_expression[and] )*
             {
-            pushFollow(FOLLOW_constraint_expression_in_and_restr_connective2930);
+            pushFollow(FOLLOW_constraint_expression_in_and_restr_connective3580);
             constraint_expression(and);
             _fsp--;
             if (failed) return ;
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1139:3: (t= DOUBLE_AMPER constraint_expression[and] )*
-            loop48:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1285:3: ( options {backtrack=true; } : t= DOUBLE_AMPER constraint_expression[and] )*
+            loop64:
             do {
-                int alt48=2;
-                int LA48_0 = input.LA(1);
-
-                if ( (LA48_0==DOUBLE_AMPER) ) {
-                    int LA48_2 = input.LA(2);
-
-                    if ( (synpred67()) ) {
-                        alt48=1;
-                    }
-
-
-                }
-
-
-                switch (alt48) {
+                int alt64=2;
+                alt64 = dfa64.predict(input);
+                switch (alt64) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1139:5: t= DOUBLE_AMPER constraint_expression[and]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:5: t= DOUBLE_AMPER constraint_expression[and]
             	    {
             	    t=(Token)input.LT(1);
-            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_restr_connective2940); if (failed) return ;
+            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_restr_connective3601); if (failed) return ;
             	    if ( backtracking==0 ) {
-            	      
-            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+
+            	      				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
             	      			
             	    }
-            	    pushFollow(FOLLOW_constraint_expression_in_and_restr_connective2950);
+            	    pushFollow(FOLLOW_constraint_expression_in_and_restr_connective3612);
             	    constraint_expression(and);
             	    _fsp--;
             	    if (failed) return ;
@@ -4247,17 +5155,17 @@
             	    break;
 
             	default :
-            	    break loop48;
+            	    break loop64;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		        if( and.getRestrictions().size() == 1) {
-              		                base.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
-              		        } else if ( and.getRestrictions().size() > 1 ) {
-              		        	base.addRestriction( and );
-              		        }
+
+              		        if( and.getRestrictions().size() == 1) {
+              		                base.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
+              		        } else if ( and.getRestrictions().size() > 1 ) {
+              		        	base.addRestriction( and );
+              		        }
               		
             }
 
@@ -4276,34 +5184,34 @@
 
 
     // $ANTLR start constraint_expression
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1154:1: constraint_expression[RestrictionConnectiveDescr base] : ( compound_operator[base] | simple_operator[base] | LEFT_PAREN or_restr_connective[base] RIGHT_PAREN ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1301:1: constraint_expression[RestrictionConnectiveDescr base] : ( compound_operator[$base] | simple_operator[$base] | LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN ) ;
     public final void constraint_expression(RestrictionConnectiveDescr base) throws RecognitionException {
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1156:3: ( ( compound_operator[base] | simple_operator[base] | LEFT_PAREN or_restr_connective[base] RIGHT_PAREN ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1156:3: ( compound_operator[base] | simple_operator[base] | LEFT_PAREN or_restr_connective[base] RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:3: ( ( compound_operator[$base] | simple_operator[$base] | LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:3: ( compound_operator[$base] | simple_operator[$base] | LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1156:3: ( compound_operator[base] | simple_operator[base] | LEFT_PAREN or_restr_connective[base] RIGHT_PAREN )
-            int alt49=3;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:3: ( compound_operator[$base] | simple_operator[$base] | LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN )
+            int alt65=3;
             switch ( input.LA(1) ) {
             case IN:
                 {
-                alt49=1;
+                alt65=1;
                 }
                 break;
             case NOT:
                 {
-                int LA49_2 = input.LA(2);
+                int LA65_2 = input.LA(2);
 
-                if ( (LA49_2==CONTAINS||(LA49_2>=MATCHES && LA49_2<=MEMBEROF)) ) {
-                    alt49=2;
+                if ( (LA65_2==CONTAINS||(LA65_2>=MATCHES && LA65_2<=MEMBEROF)) ) {
+                    alt65=2;
                 }
-                else if ( (LA49_2==IN) ) {
-                    alt49=1;
+                else if ( (LA65_2==IN) ) {
+                    alt65=1;
                 }
                 else {
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("1156:3: ( compound_operator[base] | simple_operator[base] | LEFT_PAREN or_restr_connective[base] RIGHT_PAREN )", 49, 2, input);
+                        new NoViableAltException("1303:3: ( compound_operator[$base] | simple_operator[$base] | LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN )", 65, 2, input);
 
                     throw nvae;
                 }
@@ -4320,27 +5228,27 @@
             case 78:
             case 79:
                 {
-                alt49=2;
+                alt65=2;
                 }
                 break;
             case LEFT_PAREN:
                 {
-                alt49=3;
+                alt65=3;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1156:3: ( compound_operator[base] | simple_operator[base] | LEFT_PAREN or_restr_connective[base] RIGHT_PAREN )", 49, 0, input);
+                    new NoViableAltException("1303:3: ( compound_operator[$base] | simple_operator[$base] | LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN )", 65, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt49) {
+            switch (alt65) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1156:5: compound_operator[base]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:5: compound_operator[$base]
                     {
-                    pushFollow(FOLLOW_compound_operator_in_constraint_expression2985);
+                    pushFollow(FOLLOW_compound_operator_in_constraint_expression3648);
                     compound_operator(base);
                     _fsp--;
                     if (failed) return ;
@@ -4348,9 +5256,9 @@
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1157:5: simple_operator[base]
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1304:5: simple_operator[$base]
                     {
-                    pushFollow(FOLLOW_simple_operator_in_constraint_expression2992);
+                    pushFollow(FOLLOW_simple_operator_in_constraint_expression3655);
                     simple_operator(base);
                     _fsp--;
                     if (failed) return ;
@@ -4358,19 +5266,19 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1158:5: LEFT_PAREN or_restr_connective[base] RIGHT_PAREN
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1305:5: LEFT_PAREN or_restr_connective[$base] RIGHT_PAREN
                     {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_constraint_expression2999); if (failed) return ;
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_constraint_expression3662); if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+
+                      			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
                       		
                     }
-                    pushFollow(FOLLOW_or_restr_connective_in_constraint_expression3008);
+                    pushFollow(FOLLOW_or_restr_connective_in_constraint_expression3671);
                     or_restr_connective(base);
                     _fsp--;
                     if (failed) return ;
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_constraint_expression3014); if (failed) return ;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_constraint_expression3677); if (failed) return ;
 
                     }
                     break;
@@ -4393,56 +5301,54 @@
 
 
     // $ANTLR start simple_operator
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1167:1: simple_operator[RestrictionConnectiveDescr base] : (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF ) rd= expression_value[op] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1314:1: simple_operator[RestrictionConnectiveDescr base] : (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF ) rd= expression_value[$base, op] ;
     public final void simple_operator(RestrictionConnectiveDescr base) throws RecognitionException {
         Token t=null;
         Token n=null;
-        RestrictionDescr rd = null;
 
 
-        
-        		String op = null;
+        		String op = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1172:3: ( (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF ) rd= expression_value[op] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1172:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF ) rd= expression_value[op]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1319:3: ( (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF ) rd= expression_value[$base, op] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1319:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF ) rd= expression_value[$base, op]
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1172:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF )
-            int alt50=13;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1319:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF )
+            int alt66=13;
             switch ( input.LA(1) ) {
             case 74:
                 {
-                alt50=1;
+                alt66=1;
                 }
                 break;
             case 75:
                 {
-                alt50=2;
+                alt66=2;
                 }
                 break;
             case 76:
                 {
-                alt50=3;
+                alt66=3;
                 }
                 break;
             case 77:
                 {
-                alt50=4;
+                alt66=4;
                 }
                 break;
             case 78:
                 {
-                alt50=5;
+                alt66=5;
                 }
                 break;
             case 79:
                 {
-                alt50=6;
+                alt66=6;
                 }
                 break;
             case CONTAINS:
                 {
-                alt50=7;
+                alt66=7;
                 }
                 break;
             case NOT:
@@ -4450,23 +5356,23 @@
                 switch ( input.LA(2) ) {
                 case MEMBEROF:
                     {
-                    alt50=13;
+                    alt66=13;
                     }
                     break;
-                case MATCHES:
+                case CONTAINS:
                     {
-                    alt50=11;
+                    alt66=8;
                     }
                     break;
-                case CONTAINS:
+                case MATCHES:
                     {
-                    alt50=8;
+                    alt66=11;
                     }
                     break;
                 default:
                     if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("1172:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF )", 50, 8, input);
+                        new NoViableAltException("1319:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF )", 66, 8, input);
 
                     throw nvae;
                 }
@@ -4475,135 +5381,135 @@
                 break;
             case EXCLUDES:
                 {
-                alt50=9;
+                alt66=9;
                 }
                 break;
             case MATCHES:
                 {
-                alt50=10;
+                alt66=10;
                 }
                 break;
             case MEMBEROF:
                 {
-                alt50=12;
+                alt66=12;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1172:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF )", 50, 0, input);
+                    new NoViableAltException("1319:3: (t= '==' | t= '>' | t= '>=' | t= '<' | t= '<=' | t= '!=' | t= CONTAINS | n= NOT t= CONTAINS | t= EXCLUDES | t= MATCHES | n= NOT t= MATCHES | t= MEMBEROF | n= NOT t= MEMBEROF )", 66, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt50) {
+            switch (alt66) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1172:5: t= '=='
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1319:5: t= '=='
                     {
                     t=(Token)input.LT(1);
-                    match(input,74,FOLLOW_74_in_simple_operator3045); if (failed) return ;
+                    match(input,74,FOLLOW_74_in_simple_operator3708); if (failed) return ;
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1173:5: t= '>'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1320:5: t= '>'
                     {
                     t=(Token)input.LT(1);
-                    match(input,75,FOLLOW_75_in_simple_operator3053); if (failed) return ;
+                    match(input,75,FOLLOW_75_in_simple_operator3716); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1174:5: t= '>='
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1321:5: t= '>='
                     {
                     t=(Token)input.LT(1);
-                    match(input,76,FOLLOW_76_in_simple_operator3061); if (failed) return ;
+                    match(input,76,FOLLOW_76_in_simple_operator3724); if (failed) return ;
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1175:5: t= '<'
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1322:5: t= '<'
                     {
                     t=(Token)input.LT(1);
-                    match(input,77,FOLLOW_77_in_simple_operator3069); if (failed) return ;
+                    match(input,77,FOLLOW_77_in_simple_operator3732); if (failed) return ;
 
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1176:5: t= '<='
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1323:5: t= '<='
                     {
                     t=(Token)input.LT(1);
-                    match(input,78,FOLLOW_78_in_simple_operator3077); if (failed) return ;
+                    match(input,78,FOLLOW_78_in_simple_operator3740); if (failed) return ;
 
                     }
                     break;
                 case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:5: t= '!='
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1324:5: t= '!='
                     {
                     t=(Token)input.LT(1);
-                    match(input,79,FOLLOW_79_in_simple_operator3085); if (failed) return ;
+                    match(input,79,FOLLOW_79_in_simple_operator3748); if (failed) return ;
 
                     }
                     break;
                 case 7 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1178:5: t= CONTAINS
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1325:5: t= CONTAINS
                     {
                     t=(Token)input.LT(1);
-                    match(input,CONTAINS,FOLLOW_CONTAINS_in_simple_operator3093); if (failed) return ;
+                    match(input,CONTAINS,FOLLOW_CONTAINS_in_simple_operator3756); if (failed) return ;
 
                     }
                     break;
                 case 8 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1179:5: n= NOT t= CONTAINS
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1326:5: n= NOT t= CONTAINS
                     {
                     n=(Token)input.LT(1);
-                    match(input,NOT,FOLLOW_NOT_in_simple_operator3101); if (failed) return ;
+                    match(input,NOT,FOLLOW_NOT_in_simple_operator3764); if (failed) return ;
                     t=(Token)input.LT(1);
-                    match(input,CONTAINS,FOLLOW_CONTAINS_in_simple_operator3105); if (failed) return ;
+                    match(input,CONTAINS,FOLLOW_CONTAINS_in_simple_operator3768); if (failed) return ;
 
                     }
                     break;
                 case 9 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1180:5: t= EXCLUDES
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1327:5: t= EXCLUDES
                     {
                     t=(Token)input.LT(1);
-                    match(input,EXCLUDES,FOLLOW_EXCLUDES_in_simple_operator3113); if (failed) return ;
+                    match(input,EXCLUDES,FOLLOW_EXCLUDES_in_simple_operator3776); if (failed) return ;
 
                     }
                     break;
                 case 10 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1181:5: t= MATCHES
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1328:5: t= MATCHES
                     {
                     t=(Token)input.LT(1);
-                    match(input,MATCHES,FOLLOW_MATCHES_in_simple_operator3121); if (failed) return ;
+                    match(input,MATCHES,FOLLOW_MATCHES_in_simple_operator3784); if (failed) return ;
 
                     }
                     break;
                 case 11 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1182:5: n= NOT t= MATCHES
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1329:5: n= NOT t= MATCHES
                     {
                     n=(Token)input.LT(1);
-                    match(input,NOT,FOLLOW_NOT_in_simple_operator3129); if (failed) return ;
+                    match(input,NOT,FOLLOW_NOT_in_simple_operator3792); if (failed) return ;
                     t=(Token)input.LT(1);
-                    match(input,MATCHES,FOLLOW_MATCHES_in_simple_operator3133); if (failed) return ;
+                    match(input,MATCHES,FOLLOW_MATCHES_in_simple_operator3796); if (failed) return ;
 
                     }
                     break;
                 case 12 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1183:5: t= MEMBEROF
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1330:5: t= MEMBEROF
                     {
                     t=(Token)input.LT(1);
-                    match(input,MEMBEROF,FOLLOW_MEMBEROF_in_simple_operator3141); if (failed) return ;
+                    match(input,MEMBEROF,FOLLOW_MEMBEROF_in_simple_operator3804); if (failed) return ;
 
                     }
                     break;
                 case 13 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1184:5: n= NOT t= MEMBEROF
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1331:5: n= NOT t= MEMBEROF
                     {
                     n=(Token)input.LT(1);
-                    match(input,NOT,FOLLOW_NOT_in_simple_operator3149); if (failed) return ;
+                    match(input,NOT,FOLLOW_NOT_in_simple_operator3812); if (failed) return ;
                     t=(Token)input.LT(1);
-                    match(input,MEMBEROF,FOLLOW_MEMBEROF_in_simple_operator3153); if (failed) return ;
+                    match(input,MEMBEROF,FOLLOW_MEMBEROF_in_simple_operator3816); if (failed) return ;
 
                     }
                     break;
@@ -4611,30 +5517,20 @@
             }
 
             if ( backtracking==0 ) {
-              
-                		    location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
-                                  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, t.getText());
-              		    if( n != null ) {
-              		        op = "not "+t.getText();
-              		    } else {
-              		        op = t.getText();
-              		    }
+
+                		    location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
+                                  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, t.getText());
+              		    if( n != null ) {
+              		        op = "not "+t.getText();
+              		    } else {
+              		        op = t.getText();
+              		    }
               		
             }
-            pushFollow(FOLLOW_expression_value_in_simple_operator3167);
-            rd=expression_value(op);
+            pushFollow(FOLLOW_expression_value_in_simple_operator3830);
+            expression_value(base,  op);
             _fsp--;
             if (failed) return ;
-            if ( backtracking==0 ) {
-              
-              			    if( rd != null ) {
-              				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
-              			        base.addRestriction( rd );
-              			    } else if ( rd == null && op != null ) {
-              			        base.addRestriction( new LiteralRestrictionDescr(op, null) );
-              			    }
-              		
-            }
 
             }
 
@@ -4651,65 +5547,62 @@
 
 
     // $ANTLR start compound_operator
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1206:1: compound_operator[RestrictionConnectiveDescr base] : ( IN | NOT IN ) LEFT_PAREN rd= expression_value[op] ( COMMA rd= expression_value[op] )* RIGHT_PAREN ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1353:1: compound_operator[RestrictionConnectiveDescr base] : ( IN | NOT IN ) LEFT_PAREN rd= expression_value[group, op] ( COMMA rd= expression_value[group, op] )* RIGHT_PAREN ;
     public final void compound_operator(RestrictionConnectiveDescr base) throws RecognitionException {
-        RestrictionDescr rd = null;
 
-
-        
-        		String op = null;
-        		RestrictionConnectiveDescr group = null;
+        		String op = null;
+        		RestrictionConnectiveDescr group = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1212:3: ( ( IN | NOT IN ) LEFT_PAREN rd= expression_value[op] ( COMMA rd= expression_value[op] )* RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1212:3: ( IN | NOT IN ) LEFT_PAREN rd= expression_value[op] ( COMMA rd= expression_value[op] )* RIGHT_PAREN
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1359:3: ( ( IN | NOT IN ) LEFT_PAREN rd= expression_value[group, op] ( COMMA rd= expression_value[group, op] )* RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1359:3: ( IN | NOT IN ) LEFT_PAREN rd= expression_value[group, op] ( COMMA rd= expression_value[group, op] )* RIGHT_PAREN
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1212:3: ( IN | NOT IN )
-            int alt51=2;
-            int LA51_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1359:3: ( IN | NOT IN )
+            int alt67=2;
+            int LA67_0 = input.LA(1);
 
-            if ( (LA51_0==IN) ) {
-                alt51=1;
+            if ( (LA67_0==IN) ) {
+                alt67=1;
             }
-            else if ( (LA51_0==NOT) ) {
-                alt51=2;
+            else if ( (LA67_0==NOT) ) {
+                alt67=2;
             }
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1212:3: ( IN | NOT IN )", 51, 0, input);
+                    new NoViableAltException("1359:3: ( IN | NOT IN )", 67, 0, input);
 
                 throw nvae;
             }
-            switch (alt51) {
+            switch (alt67) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1212:5: IN
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1359:5: IN
                     {
-                    match(input,IN,FOLLOW_IN_in_compound_operator3196); if (failed) return ;
+                    match(input,IN,FOLLOW_IN_in_compound_operator3857); if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      			  op = "==";
-                      			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
-                      			  base.addRestriction( group );
-                        		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
-                                          	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
+
+                      			  op = "==";
+                      			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+                      			  base.addRestriction( group );
+                        		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
+                                          	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
                       			
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1220:5: NOT IN
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1367:5: NOT IN
                     {
-                    match(input,NOT,FOLLOW_NOT_in_compound_operator3208); if (failed) return ;
-                    match(input,IN,FOLLOW_IN_in_compound_operator3210); if (failed) return ;
+                    match(input,NOT,FOLLOW_NOT_in_compound_operator3869); if (failed) return ;
+                    match(input,IN,FOLLOW_IN_in_compound_operator3871); if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      			  op = "!=";
-                      			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
-                      			  base.addRestriction( group );
-                        		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
-                                          	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
+
+                      			  op = "!=";
+                      			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+                      			  base.addRestriction( group );
+                        		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
+                                          	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
                       			
                     }
 
@@ -4718,58 +5611,44 @@
 
             }
 
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_compound_operator3225); if (failed) return ;
-            pushFollow(FOLLOW_expression_value_in_compound_operator3229);
-            rd=expression_value(op);
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_compound_operator3886); if (failed) return ;
+            pushFollow(FOLLOW_expression_value_in_compound_operator3890);
+            expression_value(group,  op);
             _fsp--;
             if (failed) return ;
-            if ( backtracking==0 ) {
-              
-              			    if( rd != null ) {
-              			        group.addRestriction( rd );
-              			    }
-              			
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1235:3: ( COMMA rd= expression_value[op] )*
-            loop52:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1377:3: ( COMMA rd= expression_value[group, op] )*
+            loop68:
             do {
-                int alt52=2;
-                int LA52_0 = input.LA(1);
+                int alt68=2;
+                int LA68_0 = input.LA(1);
 
-                if ( (LA52_0==COMMA) ) {
-                    alt52=1;
+                if ( (LA68_0==COMMA) ) {
+                    alt68=1;
                 }
 
 
-                switch (alt52) {
+                switch (alt68) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1235:5: COMMA rd= expression_value[op]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1377:5: COMMA rd= expression_value[group, op]
             	    {
-            	    match(input,COMMA,FOLLOW_COMMA_in_compound_operator3241); if (failed) return ;
-            	    pushFollow(FOLLOW_expression_value_in_compound_operator3245);
-            	    rd=expression_value(op);
+            	    match(input,COMMA,FOLLOW_COMMA_in_compound_operator3897); if (failed) return ;
+            	    pushFollow(FOLLOW_expression_value_in_compound_operator3901);
+            	    expression_value(group,  op);
             	    _fsp--;
             	    if (failed) return ;
-            	    if ( backtracking==0 ) {
-            	      
-            	      			    if( rd != null ) {
-            	      		        	group.addRestriction( rd );
-            	      			    }
-            	      			
-            	    }
 
             	    }
             	    break;
 
             	default :
-            	    break loop52;
+            	    break loop68;
                 }
             } while (true);
 
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_compound_operator3261); if (failed) return ;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_compound_operator3910); if (failed) return ;
             if ( backtracking==0 ) {
-              
-              			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
+
+              			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
               		
             }
 
@@ -4788,37 +5667,38 @@
 
 
     // $ANTLR start expression_value
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1248:1: expression_value[String op] returns [RestrictionDescr rd] : (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) ;
-    public final RestrictionDescr expression_value(String op) throws RecognitionException {
-        RestrictionDescr rd = null;
-
-        Token bvc=null;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1384:1: expression_value[RestrictionConnectiveDescr base, String op] : ( ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) ;
+    public final void expression_value(RestrictionConnectiveDescr base, String op) throws RecognitionException {
+        Token ID52=null;
         String lc = null;
 
         String rvc = null;
 
 
+
+        		RestrictionDescr rd = null;
+        	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1250:3: ( (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1250:3: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1389:3: ( ( ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1389:3: ( ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1250:3: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )
-            int alt53=4;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1389:3: ( ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )
+            int alt69=4;
             switch ( input.LA(1) ) {
             case ID:
                 {
-                int LA53_1 = input.LA(2);
+                int LA69_1 = input.LA(2);
 
-                if ( (LA53_1==71) ) {
-                    alt53=2;
+                if ( (LA69_1==EOF||(LA69_1>=COMMA && LA69_1<=RIGHT_PAREN)||LA69_1==DOUBLE_PIPE||LA69_1==DOUBLE_AMPER) ) {
+                    alt69=1;
                 }
-                else if ( (LA53_1==EOF||LA53_1==RIGHT_PAREN||LA53_1==COMMA||(LA53_1>=DOUBLE_PIPE && LA53_1<=DOUBLE_AMPER)) ) {
-                    alt53=1;
+                else if ( (LA69_1==DOT) ) {
+                    alt69=2;
                 }
                 else {
-                    if (backtracking>0) {failed=true; return rd;}
+                    if (backtracking>0) {failed=true; return ;}
                     NoViableAltException nvae =
-                        new NoViableAltException("1250:3: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 53, 1, input);
+                        new NoViableAltException("1389:3: ( ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 69, 1, input);
 
                     throw nvae;
                 }
@@ -4830,76 +5710,76 @@
             case FLOAT:
             case NULL:
                 {
-                alt53=3;
+                alt69=3;
                 }
                 break;
             case LEFT_PAREN:
                 {
-                alt53=4;
+                alt69=4;
                 }
                 break;
             default:
-                if (backtracking>0) {failed=true; return rd;}
+                if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1250:3: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 53, 0, input);
+                    new NoViableAltException("1389:3: ( ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 69, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt53) {
+            switch (alt69) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1250:5: bvc= ID
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1389:5: ID
                     {
-                    bvc=(Token)input.LT(1);
-                    match(input,ID,FOLLOW_ID_in_expression_value3289); if (failed) return rd;
+                    ID52=(Token)input.LT(1);
+                    match(input,ID,FOLLOW_ID_in_expression_value3938); if (failed) return ;
                     if ( backtracking==0 ) {
-                      
-                      				rd = new VariableRestrictionDescr(op, bvc.getText());
+
+                      				rd = new VariableRestrictionDescr(op, ID52.getText());
                       			
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1254:5: lc= enum_constraint
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1393:5: lc= enum_constraint
                     {
-                    pushFollow(FOLLOW_enum_constraint_in_expression_value3302);
+                    pushFollow(FOLLOW_enum_constraint_in_expression_value3951);
                     lc=enum_constraint();
                     _fsp--;
-                    if (failed) return rd;
+                    if (failed) return ;
                     if ( backtracking==0 ) {
-                       
-                      				rd  = new QualifiedIdentifierRestrictionDescr(op, lc);
+                       
+                      				rd  = new QualifiedIdentifierRestrictionDescr(op, lc);
                       			
                     }
 
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1258:5: lc= literal_constraint
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1397:5: lc= literal_constraint
                     {
-                    pushFollow(FOLLOW_literal_constraint_in_expression_value3322);
+                    pushFollow(FOLLOW_literal_constraint_in_expression_value3971);
                     lc=literal_constraint();
                     _fsp--;
-                    if (failed) return rd;
+                    if (failed) return ;
                     if ( backtracking==0 ) {
-                       
-                      				rd  = new LiteralRestrictionDescr(op, lc);
+                       
+                      				rd  = new LiteralRestrictionDescr(op, lc);
                       			
                     }
 
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1262:5: rvc= retval_constraint
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1401:5: rvc= retval_constraint
                     {
-                    pushFollow(FOLLOW_retval_constraint_in_expression_value3336);
+                    pushFollow(FOLLOW_retval_constraint_in_expression_value3985);
                     rvc=retval_constraint();
                     _fsp--;
-                    if (failed) return rd;
+                    if (failed) return ;
                     if ( backtracking==0 ) {
-                       
-                      				rd = new ReturnValueRestrictionDescr(op, rvc);							
+                       
+                      				rd = new ReturnValueRestrictionDescr(op, rvc);							
                       			
                     }
 
@@ -4909,8 +5789,11 @@
             }
 
             if ( backtracking==0 ) {
-              
-              			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
+
+              			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
+              			if( rd != null ) {
+              				base.addRestriction( rd );
+              			}
               		
             }
 
@@ -4923,78 +5806,78 @@
         }
         finally {
         }
-        return rd;
+        return ;
     }
     // $ANTLR end expression_value
 
 
     // $ANTLR start literal_constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1272:1: literal_constraint returns [String text] : (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1414:1: literal_constraint returns [String text] : (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
     public final String literal_constraint() throws RecognitionException {
         String text = null;
 
         Token t=null;
 
-        
-        		text = null;
+
+        		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1276:4: ( (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1276:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1418:4: ( (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1418:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1276:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )
-            int alt54=5;
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1418:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )
+            int alt70=5;
             switch ( input.LA(1) ) {
             case STRING:
                 {
-                alt54=1;
+                alt70=1;
                 }
                 break;
             case INT:
                 {
-                alt54=2;
+                alt70=2;
                 }
                 break;
             case FLOAT:
                 {
-                alt54=3;
+                alt70=3;
                 }
                 break;
             case BOOL:
                 {
-                alt54=4;
+                alt70=4;
                 }
                 break;
             case NULL:
                 {
-                alt54=5;
+                alt70=5;
                 }
                 break;
             default:
                 if (backtracking>0) {failed=true; return text;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1276:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )", 54, 0, input);
+                    new NoViableAltException("1418:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )", 70, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt54) {
+            switch (alt70) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1276:6: t= STRING
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1418:6: t= STRING
                     {
                     t=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_literal_constraint3379); if (failed) return text;
+                    match(input,STRING,FOLLOW_STRING_in_literal_constraint4028); if (failed) return text;
                     if ( backtracking==0 ) {
-                       text = getString( t ); 
+                       text = getString( t.getText() ); 
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1277:5: t= INT
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1419:5: t= INT
                     {
                     t=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_literal_constraint3390); if (failed) return text;
+                    match(input,INT,FOLLOW_INT_in_literal_constraint4039); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -5002,10 +5885,10 @@
                     }
                     break;
                 case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1278:5: t= FLOAT
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1420:5: t= FLOAT
                     {
                     t=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint3403); if (failed) return text;
+                    match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint4052); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -5013,10 +5896,10 @@
                     }
                     break;
                 case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1279:5: t= BOOL
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1421:5: t= BOOL
                     {
                     t=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_literal_constraint3414); if (failed) return text;
+                    match(input,BOOL,FOLLOW_BOOL_in_literal_constraint4063); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = t.getText(); 
                     }
@@ -5024,10 +5907,10 @@
                     }
                     break;
                 case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1280:5: t= NULL
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1422:5: t= NULL
                     {
                     t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_literal_constraint3426); if (failed) return text;
+                    match(input,NULL,FOLLOW_NULL_in_literal_constraint4075); if (failed) return text;
                     if ( backtracking==0 ) {
                        text = null; 
                     }
@@ -5053,62 +5936,62 @@
 
 
     // $ANTLR start enum_constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1284:1: enum_constraint returns [String text] : id= ID ( '.' ident= identifier )+ ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1426:1: enum_constraint returns [String text] : ID ( '.' ident= identifier )+ ;
     public final String enum_constraint() throws RecognitionException {
         String text = null;
 
-        Token id=null;
-        Token ident = null;
+        Token ID53=null;
+        identifier_return ident = null;
 
 
-        
-        		text = null;
+
+        		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:3: (id= ID ( '.' ident= identifier )+ )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:3: id= ID ( '.' ident= identifier )+
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1431:3: ( ID ( '.' ident= identifier )+ )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1431:3: ID ( '.' ident= identifier )+
             {
-            id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_enum_constraint3461); if (failed) return text;
+            ID53=(Token)input.LT(1);
+            match(input,ID,FOLLOW_ID_in_enum_constraint4108); if (failed) return text;
             if ( backtracking==0 ) {
-               text=id.getText(); 
+               text=ID53.getText(); 
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:32: ( '.' ident= identifier )+
-            int cnt55=0;
-            loop55:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1431:25: ( '.' ident= identifier )+
+            int cnt71=0;
+            loop71:
             do {
-                int alt55=2;
-                int LA55_0 = input.LA(1);
+                int alt71=2;
+                int LA71_0 = input.LA(1);
 
-                if ( (LA55_0==71) ) {
-                    alt55=1;
+                if ( (LA71_0==DOT) ) {
+                    alt71=1;
                 }
 
 
-                switch (alt55) {
+                switch (alt71) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:34: '.' ident= identifier
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1431:27: '.' ident= identifier
             	    {
-            	    match(input,71,FOLLOW_71_in_enum_constraint3467); if (failed) return text;
-            	    pushFollow(FOLLOW_identifier_in_enum_constraint3471);
+            	    match(input,DOT,FOLLOW_DOT_in_enum_constraint4114); if (failed) return text;
+            	    pushFollow(FOLLOW_identifier_in_enum_constraint4118);
             	    ident=identifier();
             	    _fsp--;
             	    if (failed) return text;
             	    if ( backtracking==0 ) {
-            	       text += "." + ident.getText(); 
+            	       text += "." + ((Token)ident.start).getText(); 
             	    }
 
             	    }
             	    break;
 
             	default :
-            	    if ( cnt55 >= 1 ) break loop55;
+            	    if ( cnt71 >= 1 ) break loop71;
             	    if (backtracking>0) {failed=true; return text;}
                         EarlyExitException eee =
-                            new EarlyExitException(55, input);
+                            new EarlyExitException(71, input);
                         throw eee;
                 }
-                cnt55++;
+                cnt71++;
             } while (true);
 
 
@@ -5127,34 +6010,34 @@
 
 
     // $ANTLR start predicate
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1293:1: predicate[ConditionalElementDescr base] : text= paren_chunk[d] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1435:1: predicate[ConditionalElementDescr base] : text= paren_chunk[d] ;
     public final void predicate(ConditionalElementDescr base) throws RecognitionException {
         String text = null;
 
 
-        
-        		PredicateDescr d = null;
+
+        		PredicateDescr d = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1298:3: (text= paren_chunk[d] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1298:3: text= paren_chunk[d]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1440:3: (text= paren_chunk[d] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1440:3: text= paren_chunk[d]
             {
             if ( backtracking==0 ) {
-              
-              			d = new PredicateDescr( );
+
+              			d = new PredicateDescr( );
               		
             }
-            pushFollow(FOLLOW_paren_chunk_in_predicate3513);
+            pushFollow(FOLLOW_paren_chunk_in_predicate4160);
             text=paren_chunk(d);
             _fsp--;
             if (failed) return ;
             if ( backtracking==0 ) {
-              
-              		        if( text != null ) {
-              			        String body = text.substring(1, text.length()-1);
-              			        d.setContent( body );
-              				base.addDescr( d );
-              		        }
+
+              		        if( text != null ) {
+              			        String body = text.substring(1, text.length()-1);
+              			        d.setContent( body );
+              				base.addDescr( d );
+              		        }
               		
             }
 
@@ -5172,56 +6055,53 @@
     // $ANTLR end predicate
 
 
-    // $ANTLR start paren_chunk
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1311:1: paren_chunk[BaseDescr descr] returns [String text] : loc= LEFT_PAREN (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )* loc= RIGHT_PAREN ;
-    public final String paren_chunk(BaseDescr descr) throws RecognitionException {
+    // $ANTLR start curly_chunk
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1454:1: curly_chunk[BaseDescr descr] returns [String text] : loc= LEFT_CURLY (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )* loc= RIGHT_CURLY ;
+    public final String curly_chunk(BaseDescr descr) throws RecognitionException {
         String text = null;
 
         Token loc=null;
         String chunk = null;
 
 
-        
-                   StringBuffer buf = null;
-                   Integer channel = null;
+
+                   StringBuffer buf = null;
+                   Integer channel = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1317:10: (loc= LEFT_PAREN (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )* loc= RIGHT_PAREN )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1317:10: loc= LEFT_PAREN (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )* loc= RIGHT_PAREN
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1460:3: (loc= LEFT_CURLY (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )* loc= RIGHT_CURLY )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1460:3: loc= LEFT_CURLY (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )* loc= RIGHT_CURLY
             {
-            if ( backtracking==0 ) {
-              
-              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-              		    buf = new StringBuffer();
-              	        
-            }
             loc=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_paren_chunk3562); if (failed) return text;
+            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_curly_chunk4199); if (failed) return text;
             if ( backtracking==0 ) {
-              
-              		    buf.append( loc.getText());
+
+              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+              		    buf = new StringBuffer();
+              		    
+              		    buf.append( loc.getText() );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1326:3: (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )*
-            loop56:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1468:3: (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )*
+            loop72:
             do {
-                int alt56=3;
-                int LA56_0 = input.LA(1);
+                int alt72=3;
+                int LA72_0 = input.LA(1);
 
-                if ( ((LA56_0>=ATTRIBUTES && LA56_0<=QUERY)||LA56_0==ID||(LA56_0>=END && LA56_0<=79)) ) {
-                    alt56=1;
+                if ( ((LA72_0>=ATTRIBUTES && LA72_0<=NULL)||(LA72_0>=LEFT_SQUARE && LA72_0<=79)) ) {
+                    alt72=1;
                 }
-                else if ( (LA56_0==LEFT_PAREN) ) {
-                    alt56=2;
+                else if ( (LA72_0==LEFT_CURLY) ) {
+                    alt72=2;
                 }
 
 
-                switch (alt56) {
+                switch (alt72) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1327:4: ~ ( LEFT_PAREN | RIGHT_PAREN )
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1469:4: ~ ( LEFT_CURLY | RIGHT_CURLY )
             	    {
-            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=QUERY)||input.LA(1)==ID||(input.LA(1)>=END && input.LA(1)<=79) ) {
+            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=NULL)||(input.LA(1)>=LEFT_SQUARE && input.LA(1)<=79) ) {
             	        input.consume();
             	        errorRecovery=false;failed=false;
             	    }
@@ -5229,27 +6109,27 @@
             	        if (backtracking>0) {failed=true; return text;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_paren_chunk3578);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_curly_chunk4215);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( input.LT(-1).getText() );
+
+            	      			    buf.append( input.LT(-1).getText() );
             	      			  
             	    }
 
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1332:4: chunk= paren_chunk[null]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1474:4: chunk= curly_chunk[descr]
             	    {
-            	    pushFollow(FOLLOW_paren_chunk_in_paren_chunk3602);
-            	    chunk=paren_chunk(null);
+            	    pushFollow(FOLLOW_curly_chunk_in_curly_chunk4239);
+            	    chunk=curly_chunk(descr);
             	    _fsp--;
             	    if (failed) return text;
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( chunk );
+
+            	      			    buf.append( chunk );
             	      			  
             	    }
 
@@ -5257,28 +6137,28 @@
             	    break;
 
             	default :
-            	    break loop56;
+            	    break loop72;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		    if( channel != null ) {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-              		    } else {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-              		    }
+
+              		    if( channel != null ) {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+              		    } else {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+              		    }
               		
             }
             loc=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_paren_chunk3639); if (failed) return text;
+            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_curly_chunk4276); if (failed) return text;
             if ( backtracking==0 ) {
-              
-                                  buf.append( loc.getText() );
-              		    text = buf.toString();
-              		    if( descr != null ) {
-              		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-              		    }
+
+                                  buf.append( loc.getText() );
+              		    text = buf.toString();
+              		    if( descr != null ) {
+              		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+              		    }
                               
             }
 
@@ -5293,56 +6173,60 @@
         }
         return text;
     }
-    // $ANTLR end paren_chunk
+    // $ANTLR end curly_chunk
 
 
-    // $ANTLR start curly_chunk
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1354:1: curly_chunk[BaseDescr descr] returns [String text] : loc= LEFT_CURLY (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )* loc= RIGHT_CURLY ;
-    public final String curly_chunk(BaseDescr descr) throws RecognitionException {
+    // $ANTLR start paren_chunk
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1495:1: paren_chunk[BaseDescr descr] returns [String text] : loc= LEFT_PAREN (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )* end= RIGHT_PAREN ;
+    public final String paren_chunk(BaseDescr descr) throws RecognitionException {
         String text = null;
 
         Token loc=null;
+        Token end=null;
         String chunk = null;
 
 
-        
-                   StringBuffer buf = null;
-                   Integer channel = null;
+
+                   StringBuffer buf = null;
+                   Integer channel = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1360:3: (loc= LEFT_CURLY (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )* loc= RIGHT_CURLY )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1360:3: loc= LEFT_CURLY (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )* loc= RIGHT_CURLY
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1501:10: (loc= LEFT_PAREN (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )* end= RIGHT_PAREN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1501:10: loc= LEFT_PAREN (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )* end= RIGHT_PAREN
             {
+            if ( backtracking==0 ) {
+
+              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+              		    buf = new StringBuffer();
+              	        
+            }
             loc=(Token)input.LT(1);
-            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_curly_chunk3690); if (failed) return text;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_paren_chunk4337); if (failed) return text;
             if ( backtracking==0 ) {
-              
-              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-              		    buf = new StringBuffer();
-              		    
-              		    buf.append( loc.getText() );
+
+              		    buf.append( loc.getText() );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1368:3: (~ ( LEFT_CURLY | RIGHT_CURLY ) | chunk= curly_chunk[descr] )*
-            loop57:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1510:3: (~ ( LEFT_PAREN | RIGHT_PAREN ) | chunk= paren_chunk[null] )*
+            loop73:
             do {
-                int alt57=3;
-                int LA57_0 = input.LA(1);
+                int alt73=3;
+                int LA73_0 = input.LA(1);
 
-                if ( ((LA57_0>=ATTRIBUTES && LA57_0<=NULL)||(LA57_0>=LEFT_SQUARE && LA57_0<=79)) ) {
-                    alt57=1;
+                if ( ((LA73_0>=ATTRIBUTES && LA73_0<=GLOBAL)||LA73_0==COMMA||(LA73_0>=QUERY && LA73_0<=79)) ) {
+                    alt73=1;
                 }
-                else if ( (LA57_0==LEFT_CURLY) ) {
-                    alt57=2;
+                else if ( (LA73_0==LEFT_PAREN) ) {
+                    alt73=2;
                 }
 
 
-                switch (alt57) {
+                switch (alt73) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1369:4: ~ ( LEFT_CURLY | RIGHT_CURLY )
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1511:4: ~ ( LEFT_PAREN | RIGHT_PAREN )
             	    {
-            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=NULL)||(input.LA(1)>=LEFT_SQUARE && input.LA(1)<=79) ) {
+            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=GLOBAL)||input.LA(1)==COMMA||(input.LA(1)>=QUERY && input.LA(1)<=79) ) {
             	        input.consume();
             	        errorRecovery=false;failed=false;
             	    }
@@ -5350,27 +6234,27 @@
             	        if (backtracking>0) {failed=true; return text;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_curly_chunk3706);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_paren_chunk4353);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( input.LT(-1).getText() );
+
+            	      			    buf.append( input.LT(-1).getText() );
             	      			  
             	    }
 
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1374:4: chunk= curly_chunk[descr]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1516:4: chunk= paren_chunk[null]
             	    {
-            	    pushFollow(FOLLOW_curly_chunk_in_curly_chunk3730);
-            	    chunk=curly_chunk(descr);
+            	    pushFollow(FOLLOW_paren_chunk_in_paren_chunk4377);
+            	    chunk=paren_chunk(null);
             	    _fsp--;
             	    if (failed) return text;
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( chunk );
+
+            	      			    buf.append( chunk );
             	      			  
             	    }
 
@@ -5378,28 +6262,28 @@
             	    break;
 
             	default :
-            	    break loop57;
+            	    break loop73;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		    if( channel != null ) {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-              		    } else {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-              		    }
+
+              		    if( channel != null ) {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+              		    } else {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+              		    }
               		
             }
-            loc=(Token)input.LT(1);
-            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_curly_chunk3767); if (failed) return text;
+            end=(Token)input.LT(1);
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_paren_chunk4414); if (failed) return text;
             if ( backtracking==0 ) {
-              
-                                  buf.append( loc.getText() );
-              		    text = buf.toString();
-              		    if( descr != null ) {
-              		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-              		    }
+
+                                  buf.append( end.getText() );
+              		    text = buf.toString();
+              		    if( descr != null ) {
+              		        descr.setEndCharacter( ((CommonToken)end).getStopIndex() );
+              		    }
                               
             }
 
@@ -5414,11 +6298,11 @@
         }
         return text;
     }
-    // $ANTLR end curly_chunk
+    // $ANTLR end paren_chunk
 
 
     // $ANTLR start square_chunk
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1396:1: square_chunk[BaseDescr descr] returns [String text] : loc= LEFT_SQUARE (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )* loc= RIGHT_SQUARE ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1539:1: square_chunk[BaseDescr descr] returns [String text] : loc= LEFT_SQUARE (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )* loc= RIGHT_SQUARE ;
     public final String square_chunk(BaseDescr descr) throws RecognitionException {
         String text = null;
 
@@ -5426,48 +6310,48 @@
         String chunk = null;
 
 
-        
-                   StringBuffer buf = null;
-                   Integer channel = null;
+
+                   StringBuffer buf = null;
+                   Integer channel = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1402:10: (loc= LEFT_SQUARE (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )* loc= RIGHT_SQUARE )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1402:10: loc= LEFT_SQUARE (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )* loc= RIGHT_SQUARE
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1545:10: (loc= LEFT_SQUARE (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )* loc= RIGHT_SQUARE )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1545:10: loc= LEFT_SQUARE (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )* loc= RIGHT_SQUARE
             {
             if ( backtracking==0 ) {
-              
-              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-              		    buf = new StringBuffer();
+
+              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+              		    buf = new StringBuffer();
               	        
             }
             loc=(Token)input.LT(1);
-            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk3830); if (failed) return text;
+            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk4478); if (failed) return text;
             if ( backtracking==0 ) {
-              
-              		    buf.append( loc.getText());
-               
+
+              		    buf.append( loc.getText());
+               
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1412:3: (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )*
-            loop58:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1555:3: (~ ( LEFT_SQUARE | RIGHT_SQUARE ) | chunk= square_chunk[null] )*
+            loop74:
             do {
-                int alt58=3;
-                int LA58_0 = input.LA(1);
+                int alt74=3;
+                int LA74_0 = input.LA(1);
 
-                if ( ((LA58_0>=ATTRIBUTES && LA58_0<=RIGHT_CURLY)||(LA58_0>=AND && LA58_0<=79)) ) {
-                    alt58=1;
+                if ( ((LA74_0>=ATTRIBUTES && LA74_0<=RIGHT_CURLY)||(LA74_0>=THEN && LA74_0<=79)) ) {
+                    alt74=1;
                 }
-                else if ( (LA58_0==LEFT_SQUARE) ) {
-                    alt58=2;
+                else if ( (LA74_0==LEFT_SQUARE) ) {
+                    alt74=2;
                 }
 
 
-                switch (alt58) {
+                switch (alt74) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1413:4: ~ ( LEFT_SQUARE | RIGHT_SQUARE )
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1556:4: ~ ( LEFT_SQUARE | RIGHT_SQUARE )
             	    {
-            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=RIGHT_CURLY)||(input.LA(1)>=AND && input.LA(1)<=79) ) {
+            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=RIGHT_CURLY)||(input.LA(1)>=THEN && input.LA(1)<=79) ) {
             	        input.consume();
             	        errorRecovery=false;failed=false;
             	    }
@@ -5475,27 +6359,27 @@
             	        if (backtracking>0) {failed=true; return text;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk3846);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk4494);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( input.LT(-1).getText() );
+
+            	      			    buf.append( input.LT(-1).getText() );
             	      			  
             	    }
 
             	    }
             	    break;
             	case 2 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1418:4: chunk= square_chunk[null]
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1561:4: chunk= square_chunk[null]
             	    {
-            	    pushFollow(FOLLOW_square_chunk_in_square_chunk3870);
+            	    pushFollow(FOLLOW_square_chunk_in_square_chunk4518);
             	    chunk=square_chunk(null);
             	    _fsp--;
             	    if (failed) return text;
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( chunk );
+
+            	      			    buf.append( chunk );
             	      			  
             	    }
 
@@ -5503,28 +6387,28 @@
             	    break;
 
             	default :
-            	    break loop58;
+            	    break loop74;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		    if( channel != null ) {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-              		    } else {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-              		    }
+
+              		    if( channel != null ) {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+              		    } else {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+              		    }
               		
             }
             loc=(Token)input.LT(1);
-            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk3907); if (failed) return text;
+            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk4555); if (failed) return text;
             if ( backtracking==0 ) {
-              
-                                  buf.append( loc.getText() );
-              		    text = buf.toString();
-              		    if( descr != null ) {
-              		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-              		    }
+
+                                  buf.append( loc.getText() );
+              		    text = buf.toString();
+              		    if( descr != null ) {
+              		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+              		    }
                               
             }
 
@@ -5543,21 +6427,21 @@
 
 
     // $ANTLR start retval_constraint
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:1: retval_constraint returns [String text] : c= paren_chunk[null] ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1583:1: retval_constraint returns [String text] : c= paren_chunk[null] ;
     public final String retval_constraint() throws RecognitionException {
         String text = null;
 
         String c = null;
 
 
-        
-        		text = null;
+
+        		text = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:3: (c= paren_chunk[null] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:3: c= paren_chunk[null]
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1588:3: (c= paren_chunk[null] )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1588:3: c= paren_chunk[null]
             {
-            pushFollow(FOLLOW_paren_chunk_in_retval_constraint3952);
+            pushFollow(FOLLOW_paren_chunk_in_retval_constraint4600);
             c=paren_chunk(null);
             _fsp--;
             if (failed) return text;
@@ -5579,178 +6463,103 @@
     // $ANTLR end retval_constraint
 
 
-    // $ANTLR start lhs_or
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1448:1: lhs_or returns [BaseDescr d] : left= lhs_and ( ( OR | '||' ) right= lhs_and )* ;
-    public final BaseDescr lhs_or() throws RecognitionException {
-        BaseDescr d = null;
+    // $ANTLR start qualified_id
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1591:1: qualified_id[BaseDescr descr] returns [String name] : ID ( '.' ident= identifier )* ( '[' loc= ']' )* ;
+    public final String qualified_id(BaseDescr descr) throws RecognitionException {
+        String name = null;
 
-        BaseDescr left = null;
+        Token loc=null;
+        Token ID54=null;
+        identifier_return ident = null;
 
-        BaseDescr right = null;
 
 
-        
-        		d = null;
-        		OrDescr or = null;
+        		name = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:3: (left= lhs_and ( ( OR | '||' ) right= lhs_and )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:3: left= lhs_and ( ( OR | '||' ) right= lhs_and )*
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1596:3: ( ID ( '.' ident= identifier )* ( '[' loc= ']' )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1596:3: ID ( '.' ident= identifier )* ( '[' loc= ']' )*
             {
-            pushFollow(FOLLOW_lhs_and_in_lhs_or3980);
-            left=lhs_and();
-            _fsp--;
-            if (failed) return d;
+            ID54=(Token)input.LT(1);
+            match(input,ID,FOLLOW_ID_in_qualified_id4628); if (failed) return name;
             if ( backtracking==0 ) {
-              d = left; 
+               
+              		    name =ID54.getText(); 
+              		    if( descr != null ) {
+              			descr.setStartCharacter( ((CommonToken)ID54).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)ID54).getStopIndex() );
+              		    }
+              		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1455:3: ( ( OR | '||' ) right= lhs_and )*
-            loop59:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1604:3: ( '.' ident= identifier )*
+            loop75:
             do {
-                int alt59=2;
-                int LA59_0 = input.LA(1);
+                int alt75=2;
+                int LA75_0 = input.LA(1);
 
-                if ( ((LA59_0>=OR && LA59_0<=DOUBLE_PIPE)) ) {
-                    alt59=1;
+                if ( (LA75_0==DOT) ) {
+                    alt75=1;
                 }
 
 
-                switch (alt59) {
+                switch (alt75) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1455:5: ( OR | '||' ) right= lhs_and
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1604:5: '.' ident= identifier
             	    {
-            	    if ( (input.LA(1)>=OR && input.LA(1)<=DOUBLE_PIPE) ) {
-            	        input.consume();
-            	        errorRecovery=false;failed=false;
-            	    }
-            	    else {
-            	        if (backtracking>0) {failed=true; return d;}
-            	        MismatchedSetException mse =
-            	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_or3988);    throw mse;
-            	    }
-
-            	    if ( backtracking==0 ) {
-            	      
-            	      				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
-            	      			
-            	    }
-            	    pushFollow(FOLLOW_lhs_and_in_lhs_or4004);
-            	    right=lhs_and();
+            	    match(input,DOT,FOLLOW_DOT_in_qualified_id4639); if (failed) return name;
+            	    pushFollow(FOLLOW_identifier_in_qualified_id4643);
+            	    ident=identifier();
             	    _fsp--;
-            	    if (failed) return d;
+            	    if (failed) return name;
             	    if ( backtracking==0 ) {
-            	      
-            	      				if ( or == null ) {
-            	      					or = new OrDescr();
-            	      					or.addDescr( left );
-            	      					d = or;
-            	      				}
-            	      				
-            	      				or.addDescr( right );
-            	      			
+            	       
+            	      		        name += "." + ident.start.getText(); 
+            	          		        if( descr != null ) {
+            	      			    descr.setEndCharacter( ((CommonToken)((Token)ident.start)).getStopIndex() );
+            	      		        }
+            	      		    
             	    }
 
             	    }
             	    break;
 
             	default :
-            	    break loop59;
+            	    break loop75;
                 }
             } while (true);
 
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end lhs_or
-
-
-    // $ANTLR start lhs_and
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1472:1: lhs_and returns [BaseDescr d] : left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )* ;
-    public final BaseDescr lhs_and() throws RecognitionException {
-        BaseDescr d = null;
-
-        BaseDescr left = null;
-
-        BaseDescr right = null;
-
-
-        
-        		d = null;
-        		AndDescr and = null;
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:3: (left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:3: left= lhs_unary ( ( AND | DOUBLE_AMPER ) right= lhs_unary )*
-            {
-            pushFollow(FOLLOW_lhs_unary_in_lhs_and4040);
-            left=lhs_unary();
-            _fsp--;
-            if (failed) return d;
-            if ( backtracking==0 ) {
-               d = left; 
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:3: ( ( AND | DOUBLE_AMPER ) right= lhs_unary )*
-            loop60:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1612:3: ( '[' loc= ']' )*
+            loop76:
             do {
-                int alt60=2;
-                int LA60_0 = input.LA(1);
+                int alt76=2;
+                int LA76_0 = input.LA(1);
 
-                if ( (LA60_0==DOUBLE_AMPER||LA60_0==AND) ) {
-                    alt60=1;
+                if ( (LA76_0==LEFT_SQUARE) ) {
+                    alt76=1;
                 }
 
 
-                switch (alt60) {
+                switch (alt76) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:5: ( AND | DOUBLE_AMPER ) right= lhs_unary
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1612:5: '[' loc= ']'
             	    {
-            	    if ( input.LA(1)==DOUBLE_AMPER||input.LA(1)==AND ) {
-            	        input.consume();
-            	        errorRecovery=false;failed=false;
-            	    }
-            	    else {
-            	        if (backtracking>0) {failed=true; return d;}
-            	        MismatchedSetException mse =
-            	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_and4048);    throw mse;
-            	    }
-
+            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_qualified_id4665); if (failed) return name;
+            	    loc=(Token)input.LT(1);
+            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_qualified_id4669); if (failed) return name;
             	    if ( backtracking==0 ) {
-            	      
-            	      				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
-            	      			
+            	       
+            	      		        name += "[]";
+            	          		        if( descr != null ) {
+            	      			    descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+            	      		        }
+            	      		    
             	    }
-            	    pushFollow(FOLLOW_lhs_unary_in_lhs_and4064);
-            	    right=lhs_unary();
-            	    _fsp--;
-            	    if (failed) return d;
-            	    if ( backtracking==0 ) {
-            	      
-            	      				if ( and == null ) {
-            	      					and = new AndDescr();
-            	      					and.addDescr( left );
-            	      					d = and;
-            	      				}
-            	      				
-            	      				and.addDescr( right );
-            	      			
-            	    }
 
             	    }
             	    break;
 
             	default :
-            	    break loop60;
+            	    break loop76;
                 }
             } while (true);
 
@@ -5764,818 +6573,68 @@
         }
         finally {
         }
-        return d;
+        return name;
     }
-    // $ANTLR end lhs_and
+    // $ANTLR end qualified_id
 
 
-    // $ANTLR start lhs_unary
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:1: lhs_unary returns [BaseDescr d] : (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )? | u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon ;
-    public final BaseDescr lhs_unary() throws RecognitionException {
-        BaseDescr d = null;
+    // $ANTLR start dotted_name
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1622:1: dotted_name[BaseDescr descr] returns [String name] : id= identifier ( '.' ident= identifier )* ( '[' loc= ']' )* ;
+    public final String dotted_name(BaseDescr descr) throws RecognitionException {
+        String name = null;
 
-        BaseDescr u = null;
-
-        AccumulateDescr ac = null;
-
-        CollectDescr cs = null;
-
-        FromDescr fm = null;
-
-
-        
-        		d = null;
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1500:4: ( (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )? | u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1500:4: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )? | u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon
-            {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1500:4: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )? | u= lhs_forall | '(' u= lhs_or ')' )
-            int alt63=6;
-            switch ( input.LA(1) ) {
-            case EXISTS:
-                {
-                alt63=1;
-                }
-                break;
-            case NOT:
-                {
-                alt63=2;
-                }
-                break;
-            case EVAL:
-                {
-                alt63=3;
-                }
-                break;
-            case ID:
-                {
-                alt63=4;
-                }
-                break;
-            case FORALL:
-                {
-                alt63=5;
-                }
-                break;
-            case LEFT_PAREN:
-                {
-                alt63=6;
-                }
-                break;
-            default:
-                if (backtracking>0) {failed=true; return d;}
-                NoViableAltException nvae =
-                    new NoViableAltException("1500:4: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_pattern ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )? | u= lhs_forall | '(' u= lhs_or ')' )", 63, 0, input);
-
-                throw nvae;
-            }
-
-            switch (alt63) {
-                case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1500:6: u= lhs_exist
-                    {
-                    pushFollow(FOLLOW_lhs_exist_in_lhs_unary4101);
-                    u=lhs_exist();
-                    _fsp--;
-                    if (failed) return d;
-
-                    }
-                    break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:5: u= lhs_not
-                    {
-                    pushFollow(FOLLOW_lhs_not_in_lhs_unary4109);
-                    u=lhs_not();
-                    _fsp--;
-                    if (failed) return d;
-
-                    }
-                    break;
-                case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1502:5: u= lhs_eval
-                    {
-                    pushFollow(FOLLOW_lhs_eval_in_lhs_unary4117);
-                    u=lhs_eval();
-                    _fsp--;
-                    if (failed) return d;
-
-                    }
-                    break;
-                case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1503:5: u= lhs_pattern ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )?
-                    {
-                    pushFollow(FOLLOW_lhs_pattern_in_lhs_unary4125);
-                    u=lhs_pattern();
-                    _fsp--;
-                    if (failed) return d;
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1503:19: ( FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) ) )?
-                    int alt62=2;
-                    int LA62_0 = input.LA(1);
-
-                    if ( (LA62_0==FROM) ) {
-                        alt62=1;
-                    }
-                    switch (alt62) {
-                        case 1 :
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1504:13: FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) )
-                            {
-                            match(input,FROM,FOLLOW_FROM_in_lhs_unary4141); if (failed) return d;
-                            if ( backtracking==0 ) {
-                              
-                              				location.setType(Location.LOCATION_LHS_FROM);
-                              				location.setProperty(Location.LOCATION_FROM_CONTENT, "");
-                              		          
-                            }
-                            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1509:13: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) )
-                            int alt61=3;
-                            int LA61_0 = input.LA(1);
-
-                            if ( (LA61_0==ACCUMULATE) ) {
-                                int LA61_1 = input.LA(2);
-
-                                if ( (synpred108()) ) {
-                                    alt61=1;
-                                }
-                                else if ( (synpred111()) ) {
-                                    alt61=3;
-                                }
-                                else {
-                                    if (backtracking>0) {failed=true; return d;}
-                                    NoViableAltException nvae =
-                                        new NoViableAltException("1509:13: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) )", 61, 1, input);
-
-                                    throw nvae;
-                                }
-                            }
-                            else if ( (LA61_0==COLLECT) ) {
-                                int LA61_2 = input.LA(2);
-
-                                if ( (synpred109()) ) {
-                                    alt61=2;
-                                }
-                                else if ( (synpred111()) ) {
-                                    alt61=3;
-                                }
-                                else {
-                                    if (backtracking>0) {failed=true; return d;}
-                                    NoViableAltException nvae =
-                                        new NoViableAltException("1509:13: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) )", 61, 2, input);
-
-                                    throw nvae;
-                                }
-                            }
-                            else if ( (LA61_0==ID) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==PACKAGE) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==FUNCTION) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==GLOBAL) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==IMPORT) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==RULE) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==QUERY) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==TEMPLATE) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==ATTRIBUTES) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==ENABLED) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==SALIENCE) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==DURATION) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==FROM) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==INIT) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==ACTION) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==RESULT) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==OR) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==AND) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==CONTAINS) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==EXCLUDES) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==MEMBEROF) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==MATCHES) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==NULL) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==EXISTS) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==NOT) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==EVAL) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==FORALL) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==WHEN) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==THEN) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==END) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else if ( (LA61_0==IN) && (synpred111())) {
-                                alt61=3;
-                            }
-                            else {
-                                if (backtracking>0) {failed=true; return d;}
-                                NoViableAltException nvae =
-                                    new NoViableAltException("1509:13: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement ) )", 61, 0, input);
-
-                                throw nvae;
-                            }
-                            switch (alt61) {
-                                case 1 :
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:14: ( ACCUMULATE )=> (ac= accumulate_statement )
-                                    {
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:32: (ac= accumulate_statement )
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:33: ac= accumulate_statement
-                                    {
-                                    pushFollow(FOLLOW_accumulate_statement_in_lhs_unary4196);
-                                    ac=accumulate_statement();
-                                    _fsp--;
-                                    if (failed) return d;
-                                    if ( backtracking==0 ) {
-                                      ac.setResultPattern((PatternDescr) u); u=ac; 
-                                    }
-
-                                    }
-
-
-                                    }
-                                    break;
-                                case 2 :
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1511:14: ( COLLECT )=> (cs= collect_statement )
-                                    {
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1511:29: (cs= collect_statement )
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1511:30: cs= collect_statement
-                                    {
-                                    pushFollow(FOLLOW_collect_statement_in_lhs_unary4225);
-                                    cs=collect_statement();
-                                    _fsp--;
-                                    if (failed) return d;
-                                    if ( backtracking==0 ) {
-                                      cs.setResultPattern((PatternDescr) u); u=cs; 
-                                    }
-
-                                    }
-
-
-                                    }
-                                    break;
-                                case 3 :
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1512:14: (~ ( ACCUMULATE | COLLECT ) )=> (fm= from_statement )
-                                    {
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1512:43: (fm= from_statement )
-                                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1512:44: fm= from_statement
-                                    {
-                                    pushFollow(FOLLOW_from_statement_in_lhs_unary4260);
-                                    fm=from_statement();
-                                    _fsp--;
-                                    if (failed) return d;
-                                    if ( backtracking==0 ) {
-                                      fm.setPattern((PatternDescr) u); u=fm; 
-                                    }
-
-                                    }
-
-
-                                    }
-                                    break;
-
-                            }
-
-
-                            }
-                            break;
-
-                    }
-
-
-                    }
-                    break;
-                case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1515:5: u= lhs_forall
-                    {
-                    pushFollow(FOLLOW_lhs_forall_in_lhs_unary4299);
-                    u=lhs_forall();
-                    _fsp--;
-                    if (failed) return d;
-
-                    }
-                    break;
-                case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1516:5: '(' u= lhs_or ')'
-                    {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_unary4307); if (failed) return d;
-                    pushFollow(FOLLOW_lhs_or_in_lhs_unary4311);
-                    u=lhs_or();
-                    _fsp--;
-                    if (failed) return d;
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_unary4313); if (failed) return d;
-
-                    }
-                    break;
-
-            }
-
-            if ( backtracking==0 ) {
-               d = u; 
-            }
-            pushFollow(FOLLOW_opt_semicolon_in_lhs_unary4323);
-            opt_semicolon();
-            _fsp--;
-            if (failed) return d;
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end lhs_unary
-
-
-    // $ANTLR start lhs_exist
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1521:1: lhs_exist returns [BaseDescr d] : loc= EXISTS ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern ) ;
-    public final BaseDescr lhs_exist() throws RecognitionException {
-        BaseDescr d = null;
-
         Token loc=null;
-        Token end=null;
-        BaseDescr pattern = null;
+        identifier_return id = null;
 
+        identifier_return ident = null;
 
-        
-        		d = null;
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1525:4: (loc= EXISTS ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1525:4: loc= EXISTS ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern )
-            {
-            loc=(Token)input.LT(1);
-            match(input,EXISTS,FOLLOW_EXISTS_in_lhs_exist4347); if (failed) return d;
-            if ( backtracking==0 ) {
-              
-              			d = new ExistsDescr( ); 
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS );
-              		
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1532:10: ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern )
-            int alt64=2;
-            int LA64_0 = input.LA(1);
 
-            if ( (LA64_0==LEFT_PAREN) ) {
-                alt64=1;
-            }
-            else if ( (LA64_0==ID) ) {
-                alt64=2;
-            }
-            else {
-                if (backtracking>0) {failed=true; return d;}
-                NoViableAltException nvae =
-                    new NoViableAltException("1532:10: ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern )", 64, 0, input);
 
-                throw nvae;
-            }
-            switch (alt64) {
-                case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1532:12: ( '(' pattern= lhs_or end= ')' )
-                    {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1532:12: ( '(' pattern= lhs_or end= ')' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1532:14: '(' pattern= lhs_or end= ')'
-                    {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_exist4367); if (failed) return d;
-                    pushFollow(FOLLOW_lhs_or_in_lhs_exist4371);
-                    pattern=lhs_or();
-                    _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       if ( pattern != null ) ((ExistsDescr)d).addDescr( pattern ); 
-                    }
-                    end=(Token)input.LT(1);
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_exist4403); if (failed) return d;
-                    if ( backtracking==0 ) {
-                       if ( end != null ) d.setEndCharacter( ((CommonToken)end).getStopIndex() ); 
-                    }
-
-                    }
-
-
-                    }
-                    break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1537:12: pattern= lhs_pattern
-                    {
-                    pushFollow(FOLLOW_lhs_pattern_in_lhs_exist4453);
-                    pattern=lhs_pattern();
-                    _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                      
-                      	                	if ( pattern != null ) {
-                      	                		((ExistsDescr)d).addDescr( pattern );
-                      	                		d.setEndCharacter( pattern.getEndCharacter() );
-                      	                	}
-                      	                
-                    }
-
-                    }
-                    break;
-
-            }
-
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end lhs_exist
-
-
-    // $ANTLR start lhs_not
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1547:1: lhs_not returns [NotDescr d] : loc= NOT ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern ) ;
-    public final NotDescr lhs_not() throws RecognitionException {
-        NotDescr d = null;
-
-        Token loc=null;
-        Token end=null;
-        BaseDescr pattern = null;
-
-
-        
-        		d = null;
+        		name = null;
         	
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1551:4: (loc= NOT ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1551:4: loc= NOT ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1627:3: (id= identifier ( '.' ident= identifier )* ( '[' loc= ']' )* )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1627:3: id= identifier ( '.' ident= identifier )* ( '[' loc= ']' )*
             {
-            loc=(Token)input.LT(1);
-            match(input,NOT,FOLLOW_NOT_in_lhs_not4507); if (failed) return d;
-            if ( backtracking==0 ) {
-              
-              			d = new NotDescr( ); 
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_NOT );
-              		
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1558:3: ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern )
-            int alt65=2;
-            int LA65_0 = input.LA(1);
-
-            if ( (LA65_0==LEFT_PAREN) ) {
-                alt65=1;
-            }
-            else if ( (LA65_0==ID) ) {
-                alt65=2;
-            }
-            else {
-                if (backtracking>0) {failed=true; return d;}
-                NoViableAltException nvae =
-                    new NoViableAltException("1558:3: ( ( '(' pattern= lhs_or end= ')' ) | pattern= lhs_pattern )", 65, 0, input);
-
-                throw nvae;
-            }
-            switch (alt65) {
-                case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1558:5: ( '(' pattern= lhs_or end= ')' )
-                    {
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1558:5: ( '(' pattern= lhs_or end= ')' )
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1558:7: '(' pattern= lhs_or end= ')'
-                    {
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not4520); if (failed) return d;
-                    pushFollow(FOLLOW_lhs_or_in_lhs_not4524);
-                    pattern=lhs_or();
-                    _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                       if ( pattern != null ) d.addDescr( pattern ); 
-                    }
-                    end=(Token)input.LT(1);
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_not4557); if (failed) return d;
-                    if ( backtracking==0 ) {
-                       if ( end != null ) d.setEndCharacter( ((CommonToken)end).getStopIndex() ); 
-                    }
-
-                    }
-
-
-                    }
-                    break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1564:3: pattern= lhs_pattern
-                    {
-                    pushFollow(FOLLOW_lhs_pattern_in_lhs_not4594);
-                    pattern=lhs_pattern();
-                    _fsp--;
-                    if (failed) return d;
-                    if ( backtracking==0 ) {
-                      
-                      	                	if ( pattern != null ) {
-                      	                		d.addDescr( pattern );
-                      	                		d.setEndCharacter( pattern.getEndCharacter() );
-                      	                	}
-                      	                
-                    }
-
-                    }
-                    break;
-
-            }
-
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end lhs_not
-
-
-    // $ANTLR start lhs_eval
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1574:1: lhs_eval returns [BaseDescr d] : loc= EVAL c= paren_chunk[d] ;
-    public final BaseDescr lhs_eval() throws RecognitionException {
-        BaseDescr d = null;
-
-        Token loc=null;
-        String c = null;
-
-
-        
-        		d = new EvalDescr( );
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1579:3: (loc= EVAL c= paren_chunk[d] )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1579:3: loc= EVAL c= paren_chunk[d]
-            {
-            loc=(Token)input.LT(1);
-            match(input,EVAL,FOLLOW_EVAL_in_lhs_eval4642); if (failed) return d;
-            if ( backtracking==0 ) {
-              
-              			location.setType( Location.LOCATION_LHS_INSIDE_EVAL );
-              		
-            }
-            pushFollow(FOLLOW_paren_chunk_in_lhs_eval4653);
-            c=paren_chunk(d);
+            pushFollow(FOLLOW_identifier_in_dotted_name4710);
+            id=identifier();
             _fsp--;
-            if (failed) return d;
+            if (failed) return name;
             if ( backtracking==0 ) {
-               
-              			if ( loc != null ) d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              		        if( c != null ) {
-              	  		    this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-              		            String body = c.length() > 1 ? c.substring(1, c.length()-1) : "";
-              			    checkTrailingSemicolon( body, offset(loc.getLine()) );
-              			    ((EvalDescr) d).setContent( body );
-              			    location.setProperty(Location.LOCATION_EVAL_CONTENT, body);
-              			}
+               
+              		    name=input.toString(id.start,id.stop); 
+              		    if( descr != null ) {
+              			descr.setStartCharacter( ((CommonToken)((Token)id.start)).getStartIndex() );
+              			descr.setEndCharacter( ((CommonToken)((Token)id.start)).getStopIndex() );
+              		    }
               		
             }
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end lhs_eval
-
-
-    // $ANTLR start lhs_forall
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1596:1: lhs_forall returns [ForallDescr d] : loc= FORALL '(' base= lhs_pattern ( ( ',' )? pattern= lhs_pattern )+ end= ')' ;
-    public final ForallDescr lhs_forall() throws RecognitionException {
-        ForallDescr d = null;
-
-        Token loc=null;
-        Token end=null;
-        BaseDescr base = null;
-
-        BaseDescr pattern = null;
-
-
-        
-        		d = factory.createForall();
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1600:4: (loc= FORALL '(' base= lhs_pattern ( ( ',' )? pattern= lhs_pattern )+ end= ')' )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1600:4: loc= FORALL '(' base= lhs_pattern ( ( ',' )? pattern= lhs_pattern )+ end= ')'
-            {
-            loc=(Token)input.LT(1);
-            match(input,FORALL,FOLLOW_FORALL_in_lhs_forall4682); if (failed) return d;
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_forall4684); if (failed) return d;
-            pushFollow(FOLLOW_lhs_pattern_in_lhs_forall4688);
-            base=lhs_pattern();
-            _fsp--;
-            if (failed) return d;
-            if ( backtracking==0 ) {
-              
-              			if ( loc != null ) d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-              		        // adding the base pattern
-              		        d.addDescr( base );
-              			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-              		
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1607:3: ( ( ',' )? pattern= lhs_pattern )+
-            int cnt67=0;
-            loop67:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1635:3: ( '.' ident= identifier )*
+            loop77:
             do {
-                int alt67=2;
-                int LA67_0 = input.LA(1);
+                int alt77=2;
+                int LA77_0 = input.LA(1);
 
-                if ( (LA67_0==ID||LA67_0==COMMA) ) {
-                    alt67=1;
+                if ( (LA77_0==DOT) ) {
+                    alt77=1;
                 }
 
 
-                switch (alt67) {
+                switch (alt77) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1607:5: ( ',' )? pattern= lhs_pattern
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1635:5: '.' ident= identifier
             	    {
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1607:5: ( ',' )?
-            	    int alt66=2;
-            	    int LA66_0 = input.LA(1);
-
-            	    if ( (LA66_0==COMMA) ) {
-            	        alt66=1;
-            	    }
-            	    switch (alt66) {
-            	        case 1 :
-            	            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1607:6: ','
-            	            {
-            	            match(input,COMMA,FOLLOW_COMMA_in_lhs_forall4702); if (failed) return d;
-
-            	            }
-            	            break;
-
-            	    }
-
-            	    pushFollow(FOLLOW_lhs_pattern_in_lhs_forall4708);
-            	    pattern=lhs_pattern();
-            	    _fsp--;
-            	    if (failed) return d;
-            	    if ( backtracking==0 ) {
-            	      
-            	      		        // adding additional patterns
-            	      			d.addDescr( pattern );
-            	      		
-            	    }
-
-            	    }
-            	    break;
-
-            	default :
-            	    if ( cnt67 >= 1 ) break loop67;
-            	    if (backtracking>0) {failed=true; return d;}
-                        EarlyExitException eee =
-                            new EarlyExitException(67, input);
-                        throw eee;
-                }
-                cnt67++;
-            } while (true);
-
-            end=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_forall4723); if (failed) return d;
-            if ( backtracking==0 ) {
-              
-              		        if ( end != null ) d.setEndCharacter( ((CommonToken)end).getStopIndex() );
-              		
-            }
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return d;
-    }
-    // $ANTLR end lhs_forall
-
-
-    // $ANTLR start dotted_name
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1619:1: dotted_name[BaseDescr descr] returns [String name] : id= ID ( '.' ident= identifier )* ( '[' loc= ']' )* ;
-    public final String dotted_name(BaseDescr descr) throws RecognitionException {
-        String name = null;
-
-        Token id=null;
-        Token loc=null;
-        Token ident = null;
-
-
-        
-        		name = null;
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1624:3: (id= ID ( '.' ident= identifier )* ( '[' loc= ']' )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1624:3: id= ID ( '.' ident= identifier )* ( '[' loc= ']' )*
-            {
-            id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_dotted_name4754); if (failed) return name;
-            if ( backtracking==0 ) {
-               
-              		    name=id.getText(); 
-              		    if( descr != null ) {
-              			descr.setStartCharacter( ((CommonToken)id).getStartIndex() );
-              			descr.setEndCharacter( ((CommonToken)id).getStopIndex() );
-              		    }
-              		
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1632:3: ( '.' ident= identifier )*
-            loop68:
-            do {
-                int alt68=2;
-                int LA68_0 = input.LA(1);
-
-                if ( (LA68_0==71) ) {
-                    alt68=1;
-                }
-
-
-                switch (alt68) {
-            	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1632:5: '.' ident= identifier
-            	    {
-            	    match(input,71,FOLLOW_71_in_dotted_name4766); if (failed) return name;
-            	    pushFollow(FOLLOW_identifier_in_dotted_name4770);
+            	    match(input,DOT,FOLLOW_DOT_in_dotted_name4721); if (failed) return name;
+            	    pushFollow(FOLLOW_identifier_in_dotted_name4725);
             	    ident=identifier();
             	    _fsp--;
             	    if (failed) return name;
             	    if ( backtracking==0 ) {
-            	       
-            	      		        name = name + "." + ident.getText(); 
-            	          		        if( descr != null ) {
-            	      			    descr.setEndCharacter( ((CommonToken)ident).getStopIndex() );
-            	      		        }
+            	       
+            	      		        name += "." + input.toString(ident.start,ident.stop); 
+            	          		        if( descr != null ) {
+            	      			    descr.setEndCharacter( ((CommonToken)((Token)ident.start)).getStopIndex() );
+            	      		        }
             	      		    
             	    }
 
@@ -6583,34 +6642,34 @@
             	    break;
 
             	default :
-            	    break loop68;
+            	    break loop77;
                 }
             } while (true);
 
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1640:3: ( '[' loc= ']' )*
-            loop69:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1643:3: ( '[' loc= ']' )*
+            loop78:
             do {
-                int alt69=2;
-                int LA69_0 = input.LA(1);
+                int alt78=2;
+                int LA78_0 = input.LA(1);
 
-                if ( (LA69_0==LEFT_SQUARE) ) {
-                    alt69=1;
+                if ( (LA78_0==LEFT_SQUARE) ) {
+                    alt78=1;
                 }
 
 
-                switch (alt69) {
+                switch (alt78) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1640:5: '[' loc= ']'
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1643:5: '[' loc= ']'
             	    {
-            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dotted_name4792); if (failed) return name;
+            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dotted_name4747); if (failed) return name;
             	    loc=(Token)input.LT(1);
-            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dotted_name4796); if (failed) return name;
+            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dotted_name4751); if (failed) return name;
             	    if ( backtracking==0 ) {
-            	       
-            	      		        name = name + "[]";
-            	          		        if( descr != null ) {
-            	      			    descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-            	      		        }
+            	       
+            	      		        name += "[]";
+            	          		        if( descr != null ) {
+            	      			    descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+            	      		        }
             	      		    
             	    }
 
@@ -6618,7 +6677,7 @@
             	    break;
 
             	default :
-            	    break loop69;
+            	    break loop78;
                 }
             } while (true);
 
@@ -6637,116 +6696,50 @@
     // $ANTLR end dotted_name
 
 
-    // $ANTLR start argument
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1650:1: argument returns [String name] : id= identifier ( '[' ']' )* ;
-    public final String argument() throws RecognitionException {
-        String name = null;
-
-        Token id = null;
-
-
-        
-        		name = null;
-        	
-        try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1655:3: (id= identifier ( '[' ']' )* )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1655:3: id= identifier ( '[' ']' )*
-            {
-            pushFollow(FOLLOW_identifier_in_argument4835);
-            id=identifier();
-            _fsp--;
-            if (failed) return name;
-            if ( backtracking==0 ) {
-               name=id.getText(); 
-            }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1655:40: ( '[' ']' )*
-            loop70:
-            do {
-                int alt70=2;
-                int LA70_0 = input.LA(1);
-
-                if ( (LA70_0==LEFT_SQUARE) ) {
-                    alt70=1;
-                }
-
-
-                switch (alt70) {
-            	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1655:42: '[' ']'
-            	    {
-            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_argument4841); if (failed) return name;
-            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_argument4843); if (failed) return name;
-            	    if ( backtracking==0 ) {
-            	       name = name + "[]";
-            	    }
-
-            	    }
-            	    break;
-
-            	default :
-            	    break loop70;
-                }
-            } while (true);
-
-
-            }
-
-        }
-        catch (RecognitionException re) {
-            reportError(re);
-            recover(input,re);
-        }
-        finally {
-        }
-        return name;
-    }
-    // $ANTLR end argument
-
-
     // $ANTLR start rhs_chunk
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1658:1: rhs_chunk[RuleDescr rule] : start= THEN (~ END )* loc= END ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1653:1: rhs_chunk[RuleDescr rule] : THEN (~ END )* loc= END opt_semicolon ;
     public final void rhs_chunk(RuleDescr rule) throws RecognitionException {
-        Token start=null;
         Token loc=null;
+        Token THEN55=null;
 
-        
-                   StringBuffer buf = null;
-                   Integer channel = null;
+
+                   StringBuffer buf = null;
+                   Integer channel = null;
                 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1664:10: (start= THEN (~ END )* loc= END )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1664:10: start= THEN (~ END )* loc= END
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1659:10: ( THEN (~ END )* loc= END opt_semicolon )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1659:10: THEN (~ END )* loc= END opt_semicolon
             {
             if ( backtracking==0 ) {
-              
-              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-              		    buf = new StringBuffer();
+
+              	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+              		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+              		    buf = new StringBuffer();
               	        
             }
-            start=(Token)input.LT(1);
-            match(input,THEN,FOLLOW_THEN_in_rhs_chunk4887); if (failed) return ;
+            THEN55=(Token)input.LT(1);
+            match(input,THEN,FOLLOW_THEN_in_rhs_chunk4803); if (failed) return ;
             if ( backtracking==0 ) {
-              
-              			location.setType( Location.LOCATION_RHS );
+
+              			location.setType( Location.LOCATION_RHS );
               		
             }
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1673:3: (~ END )*
-            loop71:
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1668:3: (~ END )*
+            loop79:
             do {
-                int alt71=2;
-                int LA71_0 = input.LA(1);
+                int alt79=2;
+                int LA79_0 = input.LA(1);
 
-                if ( ((LA71_0>=ATTRIBUTES && LA71_0<=RIGHT_PAREN)||(LA71_0>=TEMPLATE && LA71_0<=79)) ) {
-                    alt71=1;
+                if ( ((LA79_0>=ATTRIBUTES && LA79_0<=QUERY)||(LA79_0>=TEMPLATE && LA79_0<=79)) ) {
+                    alt79=1;
                 }
 
 
-                switch (alt71) {
+                switch (alt79) {
             	case 1 :
-            	    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1674:6: ~ END
+            	    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1669:6: ~ END
             	    {
-            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=RIGHT_PAREN)||(input.LA(1)>=TEMPLATE && input.LA(1)<=79) ) {
+            	    if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=QUERY)||(input.LA(1)>=TEMPLATE && input.LA(1)<=79) ) {
             	        input.consume();
             	        errorRecovery=false;failed=false;
             	    }
@@ -6754,12 +6747,12 @@
             	        if (backtracking>0) {failed=true; return ;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_rhs_chunk4903);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_rhs_chunk4819);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
-            	      
-            	      			    buf.append( input.LT(-1).getText() );
+
+            	      			    buf.append( input.LT(-1).getText() );
             	      			  
             	    }
 
@@ -6767,37 +6760,41 @@
             	    break;
 
             	default :
-            	    break loop71;
+            	    break loop79;
                 }
             } while (true);
 
             if ( backtracking==0 ) {
-              
-              		    if( channel != null ) {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-              		    } else {
-              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-              		    }
+
+              		    if( channel != null ) {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+              		    } else {
+              			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+              		    }
               		
             }
             loc=(Token)input.LT(1);
-            match(input,END,FOLLOW_END_in_rhs_chunk4940); if (failed) return ;
+            match(input,END,FOLLOW_END_in_rhs_chunk4856); if (failed) return ;
+            pushFollow(FOLLOW_opt_semicolon_in_rhs_chunk4858);
+            opt_semicolon();
+            _fsp--;
+            if (failed) return ;
             if ( backtracking==0 ) {
-              
-                                  // ignoring first line in the consequence
-                                  int index = 0;
-                                  while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
-                                         (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
-                                             index++;
-                                  if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
-                                      index++;
-                                  if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
-                                      index++;
-                                  
-              		    rule.setConsequence( buf.substring( index ) );
-                   		    rule.setConsequenceLocation(offset(start.getLine()), start.getCharPositionInLine());
-               		    rule.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-               		    location.setProperty( Location.LOCATION_RHS_CONTENT, rule.getConsequence() );
+
+                                  // ignoring first line in the consequence
+                                  int index = 0;
+                                  while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
+                                         (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
+                                             index++;
+                                  if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
+                                      index++;
+                                  if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
+                                      index++;
+                                  
+              		    rule.setConsequence( buf.substring( index ) );
+                   		    rule.setConsequenceLocation(offset(THEN55.getLine()), THEN55.getCharPositionInLine());
+               		    rule.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+               		    location.setProperty( Location.LOCATION_RHS_CONTENT, rule.getConsequence() );
                               
             }
 
@@ -6816,67 +6813,56 @@
 
 
     // $ANTLR start name
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1705:1: name returns [String s] : (tok= ID | str= STRING ) ;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1700:1: name returns [String name] : ( ID | STRING );
     public final String name() throws RecognitionException {
-        String s = null;
+        String name = null;
 
-        Token tok=null;
-        Token str=null;
+        Token ID56=null;
+        Token STRING57=null;
 
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1707:2: ( (tok= ID | str= STRING ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1707:2: (tok= ID | str= STRING )
-            {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1707:2: (tok= ID | str= STRING )
-            int alt72=2;
-            int LA72_0 = input.LA(1);
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1701:5: ( ID | STRING )
+            int alt80=2;
+            int LA80_0 = input.LA(1);
 
-            if ( (LA72_0==ID) ) {
-                alt72=1;
+            if ( (LA80_0==ID) ) {
+                alt80=1;
             }
-            else if ( (LA72_0==STRING) ) {
-                alt72=2;
+            else if ( (LA80_0==STRING) ) {
+                alt80=2;
             }
             else {
-                if (backtracking>0) {failed=true; return s;}
+                if (backtracking>0) {failed=true; return name;}
                 NoViableAltException nvae =
-                    new NoViableAltException("1707:2: (tok= ID | str= STRING )", 72, 0, input);
+                    new NoViableAltException("1700:1: name returns [String name] : ( ID | STRING );", 80, 0, input);
 
                 throw nvae;
             }
-            switch (alt72) {
+            switch (alt80) {
                 case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1708:6: tok= ID
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1701:5: ID
                     {
-                    tok=(Token)input.LT(1);
-                    match(input,ID,FOLLOW_ID_in_name4984); if (failed) return s;
+                    ID56=(Token)input.LT(1);
+                    match(input,ID,FOLLOW_ID_in_name4892); if (failed) return name;
                     if ( backtracking==0 ) {
-                      
-                      	        s = tok.getText();
-                      	    
+                       name = ID56.getText(); 
                     }
 
                     }
                     break;
                 case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1713:6: str= STRING
+                    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1702:5: STRING
                     {
-                    str=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_name5003); if (failed) return s;
+                    STRING57=(Token)input.LT(1);
+                    match(input,STRING,FOLLOW_STRING_in_name4900); if (failed) return name;
                     if ( backtracking==0 ) {
-                      
-                      	       s = getString( str );
-                      	    
+                       name = getString( STRING57.getText() ); 
                     }
 
                     }
                     break;
 
             }
-
-
-            }
-
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -6884,474 +6870,39 @@
         }
         finally {
         }
-        return s;
+        return name;
     }
     // $ANTLR end name
 
+    public static class identifier_return extends ParserRuleReturnScope {
+    };
 
     // $ANTLR start identifier
-    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1720:1: identifier returns [Token tok] : (t= ID | t= PACKAGE | t= FUNCTION | t= GLOBAL | t= IMPORT | t= RULE | t= QUERY | t= TEMPLATE | t= ATTRIBUTES | t= ENABLED | t= SALIENCE | t= DURATION | t= FROM | t= ACCUMULATE | t= INIT | t= ACTION | t= RESULT | t= COLLECT | t= OR | t= AND | t= CONTAINS | t= EXCLUDES | t= MEMBEROF | t= MATCHES | t= NULL | t= EXISTS | t= NOT | t= EVAL | t= FORALL | t= WHEN | t= THEN | t= END | t= IN ) ;
-    public final Token identifier() throws RecognitionException {
-        Token tok = null;
+    // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1705:1: identifier : ( ID | PACKAGE | FUNCTION | GLOBAL | IMPORT | RULE | QUERY | TEMPLATE | ATTRIBUTES | ENABLED | SALIENCE | DURATION | FROM | INIT | ACTION | RESULT | CONTAINS | EXCLUDES | MEMBEROF | MATCHES | NULL | WHEN | THEN | END | IN );
+    public final identifier_return identifier() throws RecognitionException {
+        identifier_return retval = new identifier_return();
+        retval.start = input.LT(1);
 
-        Token t=null;
-
         try {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1722:2: ( (t= ID | t= PACKAGE | t= FUNCTION | t= GLOBAL | t= IMPORT | t= RULE | t= QUERY | t= TEMPLATE | t= ATTRIBUTES | t= ENABLED | t= SALIENCE | t= DURATION | t= FROM | t= ACCUMULATE | t= INIT | t= ACTION | t= RESULT | t= COLLECT | t= OR | t= AND | t= CONTAINS | t= EXCLUDES | t= MEMBEROF | t= MATCHES | t= NULL | t= EXISTS | t= NOT | t= EVAL | t= FORALL | t= WHEN | t= THEN | t= END | t= IN ) )
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1722:2: (t= ID | t= PACKAGE | t= FUNCTION | t= GLOBAL | t= IMPORT | t= RULE | t= QUERY | t= TEMPLATE | t= ATTRIBUTES | t= ENABLED | t= SALIENCE | t= DURATION | t= FROM | t= ACCUMULATE | t= INIT | t= ACTION | t= RESULT | t= COLLECT | t= OR | t= AND | t= CONTAINS | t= EXCLUDES | t= MEMBEROF | t= MATCHES | t= NULL | t= EXISTS | t= NOT | t= EVAL | t= FORALL | t= WHEN | t= THEN | t= END | t= IN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1706:10: ( ID | PACKAGE | FUNCTION | GLOBAL | IMPORT | RULE | QUERY | TEMPLATE | ATTRIBUTES | ENABLED | SALIENCE | DURATION | FROM | INIT | ACTION | RESULT | CONTAINS | EXCLUDES | MEMBEROF | MATCHES | NULL | WHEN | THEN | END | IN )
+            // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:
             {
-            // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1722:2: (t= ID | t= PACKAGE | t= FUNCTION | t= GLOBAL | t= IMPORT | t= RULE | t= QUERY | t= TEMPLATE | t= ATTRIBUTES | t= ENABLED | t= SALIENCE | t= DURATION | t= FROM | t= ACCUMULATE | t= INIT | t= ACTION | t= RESULT | t= COLLECT | t= OR | t= AND | t= CONTAINS | t= EXCLUDES | t= MEMBEROF | t= MATCHES | t= NULL | t= EXISTS | t= NOT | t= EVAL | t= FORALL | t= WHEN | t= THEN | t= END | t= IN )
-            int alt73=33;
-            switch ( input.LA(1) ) {
-            case ID:
-                {
-                alt73=1;
-                }
-                break;
-            case PACKAGE:
-                {
-                alt73=2;
-                }
-                break;
-            case FUNCTION:
-                {
-                alt73=3;
-                }
-                break;
-            case GLOBAL:
-                {
-                alt73=4;
-                }
-                break;
-            case IMPORT:
-                {
-                alt73=5;
-                }
-                break;
-            case RULE:
-                {
-                alt73=6;
-                }
-                break;
-            case QUERY:
-                {
-                alt73=7;
-                }
-                break;
-            case TEMPLATE:
-                {
-                alt73=8;
-                }
-                break;
-            case ATTRIBUTES:
-                {
-                alt73=9;
-                }
-                break;
-            case ENABLED:
-                {
-                alt73=10;
-                }
-                break;
-            case SALIENCE:
-                {
-                alt73=11;
-                }
-                break;
-            case DURATION:
-                {
-                alt73=12;
-                }
-                break;
-            case FROM:
-                {
-                alt73=13;
-                }
-                break;
-            case ACCUMULATE:
-                {
-                alt73=14;
-                }
-                break;
-            case INIT:
-                {
-                alt73=15;
-                }
-                break;
-            case ACTION:
-                {
-                alt73=16;
-                }
-                break;
-            case RESULT:
-                {
-                alt73=17;
-                }
-                break;
-            case COLLECT:
-                {
-                alt73=18;
-                }
-                break;
-            case OR:
-                {
-                alt73=19;
-                }
-                break;
-            case AND:
-                {
-                alt73=20;
-                }
-                break;
-            case CONTAINS:
-                {
-                alt73=21;
-                }
-                break;
-            case EXCLUDES:
-                {
-                alt73=22;
-                }
-                break;
-            case MEMBEROF:
-                {
-                alt73=23;
-                }
-                break;
-            case MATCHES:
-                {
-                alt73=24;
-                }
-                break;
-            case NULL:
-                {
-                alt73=25;
-                }
-                break;
-            case EXISTS:
-                {
-                alt73=26;
-                }
-                break;
-            case NOT:
-                {
-                alt73=27;
-                }
-                break;
-            case EVAL:
-                {
-                alt73=28;
-                }
-                break;
-            case FORALL:
-                {
-                alt73=29;
-                }
-                break;
-            case WHEN:
-                {
-                alt73=30;
-                }
-                break;
-            case THEN:
-                {
-                alt73=31;
-                }
-                break;
-            case END:
-                {
-                alt73=32;
-                }
-                break;
-            case IN:
-                {
-                alt73=33;
-                }
-                break;
-            default:
-                if (backtracking>0) {failed=true; return tok;}
-                NoViableAltException nvae =
-                    new NoViableAltException("1722:2: (t= ID | t= PACKAGE | t= FUNCTION | t= GLOBAL | t= IMPORT | t= RULE | t= QUERY | t= TEMPLATE | t= ATTRIBUTES | t= ENABLED | t= SALIENCE | t= DURATION | t= FROM | t= ACCUMULATE | t= INIT | t= ACTION | t= RESULT | t= COLLECT | t= OR | t= AND | t= CONTAINS | t= EXCLUDES | t= MEMBEROF | t= MATCHES | t= NULL | t= EXISTS | t= NOT | t= EVAL | t= FORALL | t= WHEN | t= THEN | t= END | t= IN )", 73, 0, input);
-
-                throw nvae;
+            if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=ID)||input.LA(1)==GLOBAL||(input.LA(1)>=QUERY && input.LA(1)<=WHEN)||input.LA(1)==ENABLED||input.LA(1)==SALIENCE||input.LA(1)==DURATION||input.LA(1)==FROM||(input.LA(1)>=INIT && input.LA(1)<=RESULT)||(input.LA(1)>=CONTAINS && input.LA(1)<=IN)||input.LA(1)==NULL||input.LA(1)==THEN ) {
+                input.consume();
+                errorRecovery=false;failed=false;
             }
+            else {
+                if (backtracking>0) {failed=true; return retval;}
+                MismatchedSetException mse =
+                    new MismatchedSetException(null,input);
+                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_identifier0);    throw mse;
+            }
 
-            switch (alt73) {
-                case 1 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1722:10: t= ID
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,ID,FOLLOW_ID_in_identifier5041); if (failed) return tok;
 
-                    }
-                    break;
-                case 2 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1723:4: t= PACKAGE
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,PACKAGE,FOLLOW_PACKAGE_in_identifier5054); if (failed) return tok;
-
-                    }
-                    break;
-                case 3 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1724:4: t= FUNCTION
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,FUNCTION,FOLLOW_FUNCTION_in_identifier5061); if (failed) return tok;
-
-                    }
-                    break;
-                case 4 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1725:4: t= GLOBAL
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,GLOBAL,FOLLOW_GLOBAL_in_identifier5068); if (failed) return tok;
-
-                    }
-                    break;
-                case 5 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1726:4: t= IMPORT
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,IMPORT,FOLLOW_IMPORT_in_identifier5075); if (failed) return tok;
-
-                    }
-                    break;
-                case 6 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1727:4: t= RULE
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,RULE,FOLLOW_RULE_in_identifier5084); if (failed) return tok;
-
-                    }
-                    break;
-                case 7 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1728:4: t= QUERY
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,QUERY,FOLLOW_QUERY_in_identifier5091); if (failed) return tok;
-
-                    }
-                    break;
-                case 8 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1729:17: t= TEMPLATE
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,TEMPLATE,FOLLOW_TEMPLATE_in_identifier5112); if (failed) return tok;
-
-                    }
-                    break;
-                case 9 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1730:17: t= ATTRIBUTES
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_identifier5140); if (failed) return tok;
-
-                    }
-                    break;
-                case 10 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1731:17: t= ENABLED
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,ENABLED,FOLLOW_ENABLED_in_identifier5166); if (failed) return tok;
-
-                    }
-                    break;
-                case 11 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1732:17: t= SALIENCE
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,SALIENCE,FOLLOW_SALIENCE_in_identifier5195); if (failed) return tok;
-
-                    }
-                    break;
-                case 12 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1733:17: t= DURATION
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,DURATION,FOLLOW_DURATION_in_identifier5217); if (failed) return tok;
-
-                    }
-                    break;
-                case 13 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1734:17: t= FROM
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,FROM,FOLLOW_FROM_in_identifier5239); if (failed) return tok;
-
-                    }
-                    break;
-                case 14 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1735:17: t= ACCUMULATE
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_identifier5268); if (failed) return tok;
-
-                    }
-                    break;
-                case 15 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1736:17: t= INIT
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,INIT,FOLLOW_INIT_in_identifier5290); if (failed) return tok;
-
-                    }
-                    break;
-                case 16 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1737:17: t= ACTION
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,ACTION,FOLLOW_ACTION_in_identifier5319); if (failed) return tok;
-
-                    }
-                    break;
-                case 17 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1738:17: t= RESULT
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,RESULT,FOLLOW_RESULT_in_identifier5348); if (failed) return tok;
-
-                    }
-                    break;
-                case 18 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1739:17: t= COLLECT
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,COLLECT,FOLLOW_COLLECT_in_identifier5377); if (failed) return tok;
-
-                    }
-                    break;
-                case 19 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1740:17: t= OR
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,OR,FOLLOW_OR_in_identifier5406); if (failed) return tok;
-
-                    }
-                    break;
-                case 20 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1741:17: t= AND
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,AND,FOLLOW_AND_in_identifier5435); if (failed) return tok;
-
-                    }
-                    break;
-                case 21 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1742:17: t= CONTAINS
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,CONTAINS,FOLLOW_CONTAINS_in_identifier5464); if (failed) return tok;
-
-                    }
-                    break;
-                case 22 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1743:17: t= EXCLUDES
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,EXCLUDES,FOLLOW_EXCLUDES_in_identifier5486); if (failed) return tok;
-
-                    }
-                    break;
-                case 23 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1744:17: t= MEMBEROF
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,MEMBEROF,FOLLOW_MEMBEROF_in_identifier5508); if (failed) return tok;
-
-                    }
-                    break;
-                case 24 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1745:17: t= MATCHES
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,MATCHES,FOLLOW_MATCHES_in_identifier5528); if (failed) return tok;
-
-                    }
-                    break;
-                case 25 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1746:17: t= NULL
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_identifier5557); if (failed) return tok;
-
-                    }
-                    break;
-                case 26 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1747:17: t= EXISTS
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,EXISTS,FOLLOW_EXISTS_in_identifier5586); if (failed) return tok;
-
-                    }
-                    break;
-                case 27 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1748:17: t= NOT
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,NOT,FOLLOW_NOT_in_identifier5615); if (failed) return tok;
-
-                    }
-                    break;
-                case 28 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1749:17: t= EVAL
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,EVAL,FOLLOW_EVAL_in_identifier5644); if (failed) return tok;
-
-                    }
-                    break;
-                case 29 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1750:17: t= FORALL
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,FORALL,FOLLOW_FORALL_in_identifier5673); if (failed) return tok;
-
-                    }
-                    break;
-                case 30 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1751:17: t= WHEN
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,WHEN,FOLLOW_WHEN_in_identifier5711); if (failed) return tok;
-
-                    }
-                    break;
-                case 31 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1752:17: t= THEN
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,THEN,FOLLOW_THEN_in_identifier5743); if (failed) return tok;
-
-                    }
-                    break;
-                case 32 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1753:17: t= END
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,END,FOLLOW_END_in_identifier5772); if (failed) return tok;
-
-                    }
-                    break;
-                case 33 :
-                    // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1754:11: t= IN
-                    {
-                    t=(Token)input.LT(1);
-                    match(input,IN,FOLLOW_IN_in_identifier5791); if (failed) return tok;
-
-                    }
-                    break;
-
             }
 
-            if ( backtracking==0 ) {
-              
-              	    tok = t;
-              	
-            }
+            retval.stop = input.LT(-1);
 
-            }
-
         }
         catch (RecognitionException re) {
             reportError(re);
@@ -7359,191 +6910,67 @@
         }
         finally {
         }
-        return tok;
+        return retval;
     }
     // $ANTLR end identifier
 
-    // $ANTLR start synpred7
-    public final void synpred7_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:4: ( function_import_statement )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:4: function_import_statement
+    // $ANTLR start synpred1
+    public final void synpred1_fragment() throws RecognitionException {   
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:963:6: ( LEFT_SQUARE )
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:963:8: LEFT_SQUARE
         {
-        pushFollow(FOLLOW_function_import_statement_in_synpred7156);
-        function_import_statement();
-        _fsp--;
-        if (failed) return ;
+        match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred12756); if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred7
+    // $ANTLR end synpred1
 
-    // $ANTLR start synpred8
-    public final void synpred8_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:209:4: ( import_statement )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:209:4: import_statement
+    // $ANTLR start synpred2
+    public final void synpred2_fragment() throws RecognitionException {   
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:968:6: ( LEFT_PAREN )
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:968:8: LEFT_PAREN
         {
-        pushFollow(FOLLOW_import_statement_in_synpred8162);
-        import_statement();
-        _fsp--;
-        if (failed) return ;
+        match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred22790); if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred8
+    // $ANTLR end synpred2
 
-    // $ANTLR start synpred46
-    public final void synpred46_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:780:4: ( paren_chunk[from] )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:780:4: paren_chunk[from]
+    // $ANTLR start synpred3
+    public final void synpred3_fragment() throws RecognitionException {   
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1264:5: ( DOUBLE_PIPE and_restr_connective[or] )
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1264:5: DOUBLE_PIPE and_restr_connective[or]
         {
-        pushFollow(FOLLOW_paren_chunk_in_synpred462003);
-        paren_chunk(from);
-        _fsp--;
-        if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred46
-
-    // $ANTLR start synpred48
-    public final void synpred48_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:816:6: ( LEFT_SQUARE )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:816:8: LEFT_SQUARE
-        {
-        match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred482073); if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred48
-
-    // $ANTLR start synpred49
-    public final void synpred49_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:821:6: ( LEFT_PAREN )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:821:8: LEFT_PAREN
-        {
-        match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred492107); if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred49
-
-    // $ANTLR start synpred56
-    public final void synpred56_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:940:6: ( ( OR | DOUBLE_PIPE ) fact )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:940:6: ( OR | DOUBLE_PIPE ) fact
-        {
-        if ( (input.LA(1)>=OR && input.LA(1)<=DOUBLE_PIPE) ) {
-            input.consume();
-            errorRecovery=false;failed=false;
-        }
-        else {
-            if (backtracking>0) {failed=true; return ;}
-            MismatchedSetException mse =
-                new MismatchedSetException(null,input);
-            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_synpred562430);    throw mse;
-        }
-
-        pushFollow(FOLLOW_fact_in_synpred562448);
-        fact();
-        _fsp--;
-        if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred56
-
-    // $ANTLR start synpred61
-    public final void synpred61_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1053:5: ( field_constraint[base] )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1053:5: field_constraint[base]
-        {
-        pushFollow(FOLLOW_field_constraint_in_synpred612738);
-        field_constraint(base);
-        _fsp--;
-        if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred61
-
-    // $ANTLR start synpred66
-    public final void synpred66_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1117:5: ( DOUBLE_PIPE and_restr_connective[or] )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1117:5: DOUBLE_PIPE and_restr_connective[or]
-        {
-        match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_synpred662884); if (failed) return ;
-        pushFollow(FOLLOW_and_restr_connective_in_synpred662896);
+        match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_synpred33536); if (failed) return ;
+        pushFollow(FOLLOW_and_restr_connective_in_synpred33548);
         and_restr_connective(or);
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred66
+    // $ANTLR end synpred3
 
-    // $ANTLR start synpred67
-    public final void synpred67_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1139:5: ( DOUBLE_AMPER constraint_expression[and] )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1139:5: DOUBLE_AMPER constraint_expression[and]
+    // $ANTLR start synpred4
+    public final void synpred4_fragment() throws RecognitionException {   
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:5: ( DOUBLE_AMPER constraint_expression[and] )
+        // /home/etirelli/workspace/jboss/jbossrules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:5: DOUBLE_AMPER constraint_expression[and]
         {
-        match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_synpred672940); if (failed) return ;
-        pushFollow(FOLLOW_constraint_expression_in_synpred672950);
+        match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_synpred43601); if (failed) return ;
+        pushFollow(FOLLOW_constraint_expression_in_synpred43612);
         constraint_expression(and);
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred67
+    // $ANTLR end synpred4
 
-    // $ANTLR start synpred108
-    public final void synpred108_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:14: ( ACCUMULATE )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:16: ACCUMULATE
-        {
-        match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_synpred1084187); if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred108
-
-    // $ANTLR start synpred109
-    public final void synpred109_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1511:14: ( COLLECT )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1511:16: COLLECT
-        {
-        match(input,COLLECT,FOLLOW_COLLECT_in_synpred1094216); if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred109
-
-    // $ANTLR start synpred111
-    public final void synpred111_fragment() throws RecognitionException {   
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1512:14: (~ ( ACCUMULATE | COLLECT ) )
-        // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1512:16: ~ ( ACCUMULATE | COLLECT )
-        {
-        if ( (input.LA(1)>=ATTRIBUTES && input.LA(1)<=LOCK_ON_ACTIVE)||(input.LA(1)>=COMMA && input.LA(1)<=RESULT)||(input.LA(1)>=OR && input.LA(1)<=79) ) {
-            input.consume();
-            errorRecovery=false;failed=false;
-        }
-        else {
-            if (backtracking>0) {failed=true; return ;}
-            MismatchedSetException mse =
-                new MismatchedSetException(null,input);
-            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_synpred1114246);    throw mse;
-        }
-
-
-        }
-    }
-    // $ANTLR end synpred111
-
-    public final boolean synpred108() {
+    public final boolean synpred4() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred108_fragment(); // can never throw exception
+            synpred4_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -7553,11 +6980,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred109() {
+    public final boolean synpred2() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred109_fragment(); // can never throw exception
+            synpred2_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -7567,11 +6994,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred46() {
+    public final boolean synpred3() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred46_fragment(); // can never throw exception
+            synpred3_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -7581,11 +7008,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred66() {
+    public final boolean synpred1() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred66_fragment(); // can never throw exception
+            synpred1_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -7595,207 +7022,38 @@
         failed=false;
         return success;
     }
-    public final boolean synpred48() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred48_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred56() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred56_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred111() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred111_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred67() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred67_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred49() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred49_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred61() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred61_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred7() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred7_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
-    public final boolean synpred8() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred8_fragment(); // can never throw exception
-        } catch (RecognitionException re) {
-            System.err.println("impossible: "+re);
-        }
-        boolean success = !failed;
-        input.rewind(start);
-        backtracking--;
-        failed=false;
-        return success;
-    }
 
 
-    protected DFA11 dfa11 = new DFA11(this);
     protected DFA12 dfa12 = new DFA12(this);
-    static final String DFA11_eotS =
-        "\6\uffff";
-    static final String DFA11_eofS =
-        "\6\uffff";
-    static final String DFA11_minS =
-        "\2\4\1\uffff\1\65\1\uffff\1\4";
-    static final String DFA11_maxS =
-        "\1\72\1\107\1\uffff\1\65\1\uffff\1\72";
-    static final String DFA11_acceptS =
-        "\2\uffff\1\2\1\uffff\1\1\1\uffff";
-    static final String DFA11_specialS =
-        "\6\uffff}>";
-    static final String[] DFA11_transitionS = {
-            "\6\2\1\uffff\1\1\1\uffff\4\2\3\uffff\1\2\1\uffff\1\2\6\uffff"+
-            "\1\2\2\uffff\1\2\1\uffff\5\2\2\uffff\7\2\1\uffff\1\2\4\uffff"+
-            "\5\2",
-            "\6\4\1\uffff\1\4\1\2\4\4\3\uffff\1\4\1\uffff\1\4\6\uffff\1\4"+
-            "\2\uffff\1\4\1\2\5\4\2\uffff\7\4\1\uffff\1\4\2\uffff\1\3\1\uffff"+
-            "\5\4\14\uffff\1\4",
-            "",
-            "\1\5",
-            "",
-            "\6\4\1\uffff\1\4\1\2\4\4\3\uffff\1\4\1\uffff\1\4\6\uffff\1\4"+
-            "\2\uffff\1\4\1\2\5\4\2\uffff\7\4\1\uffff\1\4\2\uffff\1\3\1\uffff"+
-            "\5\4"
-    };
-
-    static final short[] DFA11_eot = DFA.unpackEncodedString(DFA11_eotS);
-    static final short[] DFA11_eof = DFA.unpackEncodedString(DFA11_eofS);
-    static final char[] DFA11_min = DFA.unpackEncodedStringToUnsignedChars(DFA11_minS);
-    static final char[] DFA11_max = DFA.unpackEncodedStringToUnsignedChars(DFA11_maxS);
-    static final short[] DFA11_accept = DFA.unpackEncodedString(DFA11_acceptS);
-    static final short[] DFA11_special = DFA.unpackEncodedString(DFA11_specialS);
-    static final short[][] DFA11_transition;
-
-    static {
-        int numStates = DFA11_transitionS.length;
-        DFA11_transition = new short[numStates][];
-        for (int i=0; i<numStates; i++) {
-            DFA11_transition[i] = DFA.unpackEncodedString(DFA11_transitionS[i]);
-        }
-    }
-
-    class DFA11 extends DFA {
-
-        public DFA11(BaseRecognizer recognizer) {
-            this.recognizer = recognizer;
-            this.decisionNumber = 11;
-            this.eot = DFA11_eot;
-            this.eof = DFA11_eof;
-            this.min = DFA11_min;
-            this.max = DFA11_max;
-            this.accept = DFA11_accept;
-            this.special = DFA11_special;
-            this.transition = DFA11_transition;
-        }
-        public String getDescription() {
-            return "326:6: (paramType= dotted_name[null] )?";
-        }
-    }
+    protected DFA13 dfa13 = new DFA13(this);
+    protected DFA49 dfa49 = new DFA49(this);
+    protected DFA63 dfa63 = new DFA63(this);
+    protected DFA64 dfa64 = new DFA64(this);
     static final String DFA12_eotS =
         "\6\uffff";
     static final String DFA12_eofS =
         "\6\uffff";
     static final String DFA12_minS =
-        "\2\4\1\uffff\1\65\1\uffff\1\4";
+        "\2\4\1\72\2\uffff\1\4";
     static final String DFA12_maxS =
-        "\1\72\1\107\1\uffff\1\65\1\uffff\1\72";
+        "\2\73\1\72\2\uffff\1\73";
     static final String DFA12_acceptS =
-        "\2\uffff\1\2\1\uffff\1\1\1\uffff";
+        "\3\uffff\1\2\1\1\1\uffff";
     static final String DFA12_specialS =
         "\6\uffff}>";
     static final String[] DFA12_transitionS = {
-            "\6\2\1\uffff\1\1\1\uffff\4\2\3\uffff\1\2\1\uffff\1\2\6\uffff"+
-            "\1\2\2\uffff\1\2\1\uffff\5\2\2\uffff\7\2\1\uffff\1\2\4\uffff"+
-            "\5\2",
-            "\6\4\1\uffff\1\4\1\2\4\4\3\uffff\1\4\1\uffff\1\4\6\uffff\1\4"+
-            "\2\uffff\1\4\1\2\5\4\2\uffff\7\4\1\uffff\1\4\2\uffff\1\3\1\uffff"+
-            "\5\4\14\uffff\1\4",
-            "",
+            "\5\1\1\uffff\1\1\3\uffff\5\1\3\uffff\1\1\1\uffff\1\1\6\uffff"+
+            "\1\1\6\uffff\1\1\5\uffff\3\1\1\uffff\5\1\1\uffff\1\1\4\uffff"+
+            "\1\1",
+            "\7\4\1\uffff\2\3\5\4\3\uffff\1\4\1\uffff\1\4\6\uffff\1\4\6\uffff"+
+            "\1\4\5\uffff\3\4\1\uffff\5\4\1\uffff\1\4\2\uffff\1\2\1\uffff"+
+            "\1\4",
             "\1\5",
             "",
-            "\6\4\1\uffff\1\4\1\2\4\4\3\uffff\1\4\1\uffff\1\4\6\uffff\1\4"+
-            "\2\uffff\1\4\1\2\5\4\2\uffff\7\4\1\uffff\1\4\2\uffff\1\3\1\uffff"+
-            "\5\4"
+            "",
+            "\5\4\1\uffff\1\4\1\uffff\2\3\5\4\3\uffff\1\4\1\uffff\1\4\6\uffff"+
+            "\1\4\6\uffff\1\4\5\uffff\3\4\1\uffff\5\4\1\uffff\1\4\2\uffff"+
+            "\1\2\1\uffff\1\4"
     };
 
     static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
@@ -7828,348 +7086,1957 @@
             this.transition = DFA12_transition;
         }
         public String getDescription() {
-            return "330:11: (paramType= dotted_name[null] )?";
+            return "327:15: (paramType= dotted_name[null] )?";
         }
     }
+    static final String DFA13_eotS =
+        "\6\uffff";
+    static final String DFA13_eofS =
+        "\6\uffff";
+    static final String DFA13_minS =
+        "\2\4\1\uffff\1\72\1\uffff\1\4";
+    static final String DFA13_maxS =
+        "\2\73\1\uffff\1\72\1\uffff\1\73";
+    static final String DFA13_acceptS =
+        "\2\uffff\1\1\1\uffff\1\2\1\uffff";
+    static final String DFA13_specialS =
+        "\6\uffff}>";
+    static final String[] DFA13_transitionS = {
+            "\5\1\1\uffff\1\1\3\uffff\5\1\3\uffff\1\1\1\uffff\1\1\6\uffff"+
+            "\1\1\6\uffff\1\1\5\uffff\3\1\1\uffff\5\1\1\uffff\1\1\4\uffff"+
+            "\1\1",
+            "\7\2\1\uffff\2\4\5\2\3\uffff\1\2\1\uffff\1\2\6\uffff\1\2\6\uffff"+
+            "\1\2\5\uffff\3\2\1\uffff\5\2\1\uffff\1\2\2\uffff\1\3\1\uffff"+
+            "\1\2",
+            "",
+            "\1\5",
+            "",
+            "\5\2\1\uffff\1\2\1\uffff\2\4\5\2\3\uffff\1\2\1\uffff\1\2\6\uffff"+
+            "\1\2\6\uffff\1\2\5\uffff\3\2\1\uffff\5\2\1\uffff\1\2\2\uffff"+
+            "\1\3\1\uffff\1\2"
+    };
+
+    static final short[] DFA13_eot = DFA.unpackEncodedString(DFA13_eotS);
+    static final short[] DFA13_eof = DFA.unpackEncodedString(DFA13_eofS);
+    static final char[] DFA13_min = DFA.unpackEncodedStringToUnsignedChars(DFA13_minS);
+    static final char[] DFA13_max = DFA.unpackEncodedStringToUnsignedChars(DFA13_maxS);
+    static final short[] DFA13_accept = DFA.unpackEncodedString(DFA13_acceptS);
+    static final short[] DFA13_special = DFA.unpackEncodedString(DFA13_specialS);
+    static final short[][] DFA13_transition;
+
+    static {
+        int numStates = DFA13_transitionS.length;
+        DFA13_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA13_transition[i] = DFA.unpackEncodedString(DFA13_transitionS[i]);
+        }
+    }
+
+    class DFA13 extends DFA {
+
+        public DFA13(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 13;
+            this.eot = DFA13_eot;
+            this.eof = DFA13_eof;
+            this.min = DFA13_min;
+            this.max = DFA13_max;
+            this.accept = DFA13_accept;
+            this.special = DFA13_special;
+            this.transition = DFA13_transition;
+        }
+        public String getDescription() {
+            return "331:22: (paramType= dotted_name[null] )?";
+        }
+    }
+    static final String DFA49_eotS =
+        "\150\uffff";
+    static final String DFA49_eofS =
+        "\150\uffff";
+    static final String DFA49_minS =
+        "\1\10\1\uffff\1\4\1\uffff\3\4\1\0\1\uffff\4\4\1\uffff\1\0\12\4\2"+
+        "\0\1\4\1\0\1\4\1\0\3\4\3\0\1\4\1\0\1\4\1\0\3\4\3\0\1\4\1\0\1\4\1"+
+        "\0\3\4\2\0\3\4\1\0\3\4\1\0\1\4\1\0\1\4\1\uffff\44\0";
+    static final String DFA49_maxS =
+        "\1\106\1\uffff\1\117\1\uffff\3\117\1\0\1\uffff\4\117\1\uffff\1\0"+
+        "\12\117\2\0\1\117\1\0\1\117\1\0\3\117\3\0\1\117\1\0\1\117\1\0\3"+
+        "\117\3\0\1\117\1\0\1\117\1\0\3\117\2\0\3\117\1\0\3\117\1\0\1\117"+
+        "\1\0\1\117\1\uffff\44\0";
+    static final String DFA49_acceptS =
+        "\1\uffff\1\1\1\uffff\1\3\4\uffff\1\2\4\uffff\1\2\65\uffff\1\2\44"+
+        "\uffff";
+    static final String DFA49_specialS =
+        "\1\23\1\uffff\1\62\1\uffff\1\43\1\75\1\15\1\14\1\uffff\1\47\1\24"+
+        "\1\54\1\22\1\uffff\1\63\1\65\1\5\1\44\1\60\1\35\1\6\1\36\1\16\1"+
+        "\66\1\73\1\27\1\13\1\53\1\72\1\52\1\42\1\10\1\1\1\37\1\26\1\61\1"+
+        "\20\1\57\1\51\1\56\1\34\1\46\1\50\1\0\1\70\1\4\1\21\1\64\1\33\1"+
+        "\67\1\7\1\32\1\55\1\25\1\17\1\45\1\11\1\2\1\40\1\30\1\12\1\3\1\41"+
+        "\1\31\1\71\1\76\1\74\45\uffff}>";
+    static final String[] DFA49_transitionS = {
+            "\2\3\1\uffff\1\2\1\uffff\1\3\1\uffff\1\3\22\uffff\4\3\1\uffff"+
+            "\4\3\16\uffff\1\1\1\uffff\1\3\12\uffff\1\3",
+            "",
+            "\4\15\1\13\2\15\1\7\1\15\1\10\24\15\1\4\1\15\1\5\2\15\1\6\1"+
+            "\11\1\12\1\14\45\15",
+            "",
+            "\4\15\1\22\2\15\1\16\1\15\1\10\31\15\1\17\1\20\1\21\1\23\45"+
+            "\15",
+            "\4\15\1\27\2\15\1\31\1\15\1\10\31\15\1\24\1\25\1\26\1\30\45"+
+            "\15",
+            "\4\15\1\33\2\15\1\32\1\15\1\10\102\15",
+            "\1\uffff",
+            "",
+            "\4\15\1\35\2\15\1\34\1\15\1\10\102\15",
+            "\7\15\1\36\1\15\1\10\102\15",
+            "\5\15\1\40\1\15\1\42\1\15\1\10\53\15\1\41\15\15\1\37\10\15",
+            "\7\15\1\43\1\15\1\10\102\15",
+            "",
+            "\1\uffff",
+            "\4\15\1\45\2\15\1\44\1\15\1\10\102\15",
+            "\4\15\1\47\2\15\1\46\1\15\1\10\102\15",
+            "\7\15\1\50\1\15\1\10\102\15",
+            "\5\15\1\52\1\15\1\54\1\15\1\10\53\15\1\53\15\15\1\51\10\15",
+            "\7\15\1\55\1\15\1\10\102\15",
+            "\4\15\1\57\2\15\1\56\1\15\1\10\102\15",
+            "\4\15\1\61\2\15\1\60\1\15\1\10\102\15",
+            "\7\15\1\62\1\15\1\10\102\15",
+            "\5\15\1\64\1\15\1\66\1\15\1\10\53\15\1\65\15\15\1\63\10\15",
+            "\7\15\1\67\1\15\1\10\102\15",
+            "\1\uffff",
+            "\1\uffff",
+            "\5\15\1\71\1\15\1\73\1\15\1\10\53\15\1\72\15\15\1\70\10\15",
+            "\1\uffff",
+            "\5\15\1\75\1\15\1\77\1\15\1\10\53\15\1\76\15\15\1\74\10\15",
+            "\1\uffff",
+            "\4\15\1\100\2\15\1\101\1\15\1\10\102\15",
+            "\5\102\1\15\1\102\1\103\1\15\1\10\5\102\3\15\1\102\1\15\1\102"+
+            "\6\15\1\102\6\15\1\102\5\15\3\102\1\15\5\102\1\15\1\102\4\15"+
+            "\1\102\24\15",
+            "\7\15\1\103\1\15\1\10\54\15\1\104\25\15",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\5\15\1\106\1\15\1\110\1\15\1\10\53\15\1\107\15\15\1\105\10"+
+            "\15",
+            "\1\uffff",
+            "\5\15\1\112\1\15\1\114\1\15\1\10\53\15\1\113\15\15\1\111\10"+
+            "\15",
+            "\1\uffff",
+            "\4\15\1\115\2\15\1\116\1\15\1\10\102\15",
+            "\5\117\1\15\1\117\1\103\1\15\1\10\5\117\3\15\1\117\1\15\1\117"+
+            "\6\15\1\117\6\15\1\117\5\15\3\117\1\15\5\117\1\15\1\117\4\15"+
+            "\1\117\24\15",
+            "\7\15\1\103\1\15\1\10\54\15\1\120\25\15",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\5\15\1\122\1\15\1\124\1\15\1\10\53\15\1\123\15\15\1\121\10"+
+            "\15",
+            "\1\uffff",
+            "\5\15\1\126\1\15\1\130\1\15\1\10\53\15\1\127\15\15\1\125\10"+
+            "\15",
+            "\1\uffff",
+            "\4\15\1\131\2\15\1\132\1\15\1\10\102\15",
+            "\5\133\1\15\1\133\1\103\1\15\1\10\5\133\3\15\1\133\1\15\1\133"+
+            "\6\15\1\133\6\15\1\133\5\15\3\133\1\15\5\133\1\15\1\133\4\15"+
+            "\1\133\24\15",
+            "\7\15\1\103\1\15\1\10\54\15\1\134\25\15",
+            "\1\uffff",
+            "\1\uffff",
+            "\4\15\1\135\2\15\1\136\1\15\1\10\102\15",
+            "\5\137\1\15\1\137\1\103\1\15\1\10\5\137\3\15\1\137\1\15\1\137"+
+            "\6\15\1\137\6\15\1\137\5\15\3\137\1\15\5\137\1\15\1\137\4\15"+
+            "\1\137\24\15",
+            "\7\15\1\103\1\15\1\10\54\15\1\140\25\15",
+            "\1\uffff",
+            "\4\15\1\141\2\15\1\142\1\15\1\10\102\15",
+            "\5\143\1\15\1\143\1\103\1\15\1\10\5\143\3\15\1\143\1\15\1\143"+
+            "\6\15\1\143\6\15\1\143\5\15\3\143\1\15\5\143\1\15\1\143\4\15"+
+            "\1\143\24\15",
+            "\7\15\1\103\1\15\1\10\54\15\1\144\25\15",
+            "\1\uffff",
+            "\5\15\1\145\1\15\1\147\1\15\1\10\53\15\1\146\26\15",
+            "\1\uffff",
+            "\5\15\1\40\1\15\1\42\1\15\1\10\53\15\1\41\26\15",
+            "",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff"
+    };
+
+    static final short[] DFA49_eot = DFA.unpackEncodedString(DFA49_eotS);
+    static final short[] DFA49_eof = DFA.unpackEncodedString(DFA49_eofS);
+    static final char[] DFA49_min = DFA.unpackEncodedStringToUnsignedChars(DFA49_minS);
+    static final char[] DFA49_max = DFA.unpackEncodedStringToUnsignedChars(DFA49_maxS);
+    static final short[] DFA49_accept = DFA.unpackEncodedString(DFA49_acceptS);
+    static final short[] DFA49_special = DFA.unpackEncodedString(DFA49_specialS);
+    static final short[][] DFA49_transition;
+
+    static {
+        int numStates = DFA49_transitionS.length;
+        DFA49_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA49_transition[i] = DFA.unpackEncodedString(DFA49_transitionS[i]);
+        }
+    }
+
+    class DFA49 extends DFA {
+
+        public DFA49(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 49;
+            this.eot = DFA49_eot;
+            this.eof = DFA49_eof;
+            this.min = DFA49_min;
+            this.max = DFA49_max;
+            this.accept = DFA49_accept;
+            this.special = DFA49_special;
+            this.transition = DFA49_transition;
+        }
+        public String getDescription() {
+            return "962:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk[$from] | ( LEFT_PAREN )=>paarg= paren_chunk[$from] )?";
+        }
+        public int specialStateTransition(int s, IntStream input) throws NoViableAltException {
+        	int _s = s;
+            switch ( s ) {
+                    case 0 : 
+                        int LA49_43 = input.LA(1);
+
+                         
+                        int index49_43 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_43==RIGHT_SQUARE) ) {s = 80;}
+
+                        else if ( (LA49_43==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_43>=ATTRIBUTES && LA49_43<=GLOBAL)||LA49_43==COMMA||(LA49_43>=QUERY && LA49_43<=LEFT_SQUARE)||(LA49_43>=THEN && LA49_43<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_43==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_43);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 1 : 
+                        int LA49_32 = input.LA(1);
+
+                         
+                        int index49_32 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( ((LA49_32>=ATTRIBUTES && LA49_32<=ID)||LA49_32==GLOBAL||(LA49_32>=QUERY && LA49_32<=WHEN)||LA49_32==ENABLED||LA49_32==SALIENCE||LA49_32==DURATION||LA49_32==FROM||(LA49_32>=INIT && LA49_32<=RESULT)||(LA49_32>=CONTAINS && LA49_32<=IN)||LA49_32==NULL||LA49_32==THEN) ) {s = 66;}
+
+                        else if ( (LA49_32==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( (LA49_32==DOT||LA49_32==COMMA||(LA49_32>=DATE_EFFECTIVE && LA49_32<=DATE_EXPIRES)||LA49_32==BOOL||(LA49_32>=INT && LA49_32<=AGENDA_GROUP)||(LA49_32>=DIALECT && LA49_32<=DOUBLE_AMPER)||(LA49_32>=EXISTS && LA49_32<=ACCUMULATE)||LA49_32==COLLECT||LA49_32==FLOAT||(LA49_32>=LEFT_CURLY && LA49_32<=RIGHT_SQUARE)||(LA49_32>=EOL && LA49_32<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_32==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_32);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 2 : 
+                        int LA49_57 = input.LA(1);
+
+                         
+                        int index49_57 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( ((LA49_57>=ATTRIBUTES && LA49_57<=ID)||LA49_57==GLOBAL||(LA49_57>=QUERY && LA49_57<=WHEN)||LA49_57==ENABLED||LA49_57==SALIENCE||LA49_57==DURATION||LA49_57==FROM||(LA49_57>=INIT && LA49_57<=RESULT)||(LA49_57>=CONTAINS && LA49_57<=IN)||LA49_57==NULL||LA49_57==THEN) ) {s = 95;}
+
+                        else if ( (LA49_57==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( (LA49_57==DOT||LA49_57==COMMA||(LA49_57>=DATE_EFFECTIVE && LA49_57<=DATE_EXPIRES)||LA49_57==BOOL||(LA49_57>=INT && LA49_57<=AGENDA_GROUP)||(LA49_57>=DIALECT && LA49_57<=DOUBLE_AMPER)||(LA49_57>=EXISTS && LA49_57<=ACCUMULATE)||LA49_57==COLLECT||LA49_57==FLOAT||(LA49_57>=LEFT_CURLY && LA49_57<=RIGHT_SQUARE)||(LA49_57>=EOL && LA49_57<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_57==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_57);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 3 : 
+                        int LA49_61 = input.LA(1);
+
+                         
+                        int index49_61 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( ((LA49_61>=ATTRIBUTES && LA49_61<=ID)||LA49_61==GLOBAL||(LA49_61>=QUERY && LA49_61<=WHEN)||LA49_61==ENABLED||LA49_61==SALIENCE||LA49_61==DURATION||LA49_61==FROM||(LA49_61>=INIT && LA49_61<=RESULT)||(LA49_61>=CONTAINS && LA49_61<=IN)||LA49_61==NULL||LA49_61==THEN) ) {s = 99;}
+
+                        else if ( (LA49_61==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( (LA49_61==DOT||LA49_61==COMMA||(LA49_61>=DATE_EFFECTIVE && LA49_61<=DATE_EXPIRES)||LA49_61==BOOL||(LA49_61>=INT && LA49_61<=AGENDA_GROUP)||(LA49_61>=DIALECT && LA49_61<=DOUBLE_AMPER)||(LA49_61>=EXISTS && LA49_61<=ACCUMULATE)||LA49_61==COLLECT||LA49_61==FLOAT||(LA49_61>=LEFT_CURLY && LA49_61<=RIGHT_SQUARE)||(LA49_61>=EOL && LA49_61<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_61==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_61);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 4 : 
+                        int LA49_45 = input.LA(1);
+
+                         
+                        int index49_45 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_45);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 5 : 
+                        int LA49_16 = input.LA(1);
+
+                         
+                        int index49_16 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_16==LEFT_PAREN) ) {s = 38;}
+
+                        else if ( (LA49_16==ID) ) {s = 39;}
+
+                        else if ( (LA49_16==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_16>=ATTRIBUTES && LA49_16<=FUNCTION)||(LA49_16>=DOT && LA49_16<=GLOBAL)||LA49_16==COMMA||(LA49_16>=QUERY && LA49_16<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_16);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 6 : 
+                        int LA49_20 = input.LA(1);
+
+                         
+                        int index49_20 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_20==LEFT_PAREN) ) {s = 46;}
+
+                        else if ( (LA49_20==ID) ) {s = 47;}
+
+                        else if ( (LA49_20==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_20>=ATTRIBUTES && LA49_20<=FUNCTION)||(LA49_20>=DOT && LA49_20<=GLOBAL)||LA49_20==COMMA||(LA49_20>=QUERY && LA49_20<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_20);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 7 : 
+                        int LA49_50 = input.LA(1);
+
+                         
+                        int index49_50 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_50);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 8 : 
+                        int LA49_31 = input.LA(1);
+
+                         
+                        int index49_31 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_31==ID) ) {s = 64;}
+
+                        else if ( (LA49_31==LEFT_PAREN) ) {s = 65;}
+
+                        else if ( (LA49_31==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_31>=ATTRIBUTES && LA49_31<=FUNCTION)||(LA49_31>=DOT && LA49_31<=GLOBAL)||LA49_31==COMMA||(LA49_31>=QUERY && LA49_31<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_31);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 9 : 
+                        int LA49_56 = input.LA(1);
+
+                         
+                        int index49_56 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_56==ID) ) {s = 93;}
+
+                        else if ( (LA49_56==LEFT_PAREN) ) {s = 94;}
+
+                        else if ( (LA49_56==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_56>=ATTRIBUTES && LA49_56<=FUNCTION)||(LA49_56>=DOT && LA49_56<=GLOBAL)||LA49_56==COMMA||(LA49_56>=QUERY && LA49_56<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_56);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 10 : 
+                        int LA49_60 = input.LA(1);
+
+                         
+                        int index49_60 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_60==ID) ) {s = 97;}
+
+                        else if ( (LA49_60==LEFT_PAREN) ) {s = 98;}
+
+                        else if ( (LA49_60==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_60>=ATTRIBUTES && LA49_60<=FUNCTION)||(LA49_60>=DOT && LA49_60<=GLOBAL)||LA49_60==COMMA||(LA49_60>=QUERY && LA49_60<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_60);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 11 : 
+                        int LA49_26 = input.LA(1);
+
+                         
+                        int index49_26 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 13;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_26);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 12 : 
+                        int LA49_7 = input.LA(1);
+
+                         
+                        int index49_7 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 13;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_7);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 13 : 
+                        int LA49_6 = input.LA(1);
+
+                         
+                        int index49_6 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_6==LEFT_PAREN) ) {s = 26;}
+
+                        else if ( (LA49_6==ID) ) {s = 27;}
+
+                        else if ( (LA49_6==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_6>=ATTRIBUTES && LA49_6<=FUNCTION)||(LA49_6>=DOT && LA49_6<=GLOBAL)||LA49_6==COMMA||(LA49_6>=QUERY && LA49_6<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_6);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 14 : 
+                        int LA49_22 = input.LA(1);
+
+                         
+                        int index49_22 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_22==LEFT_PAREN) ) {s = 50;}
+
+                        else if ( (LA49_22==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_22>=ATTRIBUTES && LA49_22<=GLOBAL)||LA49_22==COMMA||(LA49_22>=QUERY && LA49_22<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_22);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 15 : 
+                        int LA49_54 = input.LA(1);
+
+                         
+                        int index49_54 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_54);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 16 : 
+                        int LA49_36 = input.LA(1);
+
+                         
+                        int index49_36 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_36);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 17 : 
+                        int LA49_46 = input.LA(1);
+
+                         
+                        int index49_46 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_46);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 18 : 
+                        int LA49_12 = input.LA(1);
+
+                         
+                        int index49_12 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_12==LEFT_PAREN) ) {s = 35;}
+
+                        else if ( (LA49_12==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_12>=ATTRIBUTES && LA49_12<=GLOBAL)||LA49_12==COMMA||(LA49_12>=QUERY && LA49_12<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_12);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 19 : 
+                        int LA49_0 = input.LA(1);
+
+                         
+                        int index49_0 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_0==LEFT_SQUARE) && (synpred1())) {s = 1;}
+
+                        else if ( (LA49_0==LEFT_PAREN) ) {s = 2;}
+
+                        else if ( ((LA49_0>=ID && LA49_0<=DOT)||LA49_0==RIGHT_PAREN||LA49_0==END||(LA49_0>=OR && LA49_0<=DOUBLE_AMPER)||(LA49_0>=EXISTS && LA49_0<=FORALL)||LA49_0==THEN||LA49_0==70) ) {s = 3;}
+
+                         
+                        input.seek(index49_0);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 20 : 
+                        int LA49_10 = input.LA(1);
+
+                         
+                        int index49_10 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_10==LEFT_PAREN) ) {s = 30;}
+
+                        else if ( (LA49_10==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_10>=ATTRIBUTES && LA49_10<=GLOBAL)||LA49_10==COMMA||(LA49_10>=QUERY && LA49_10<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_10);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 21 : 
+                        int LA49_53 = input.LA(1);
+
+                         
+                        int index49_53 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_53==RIGHT_SQUARE) ) {s = 92;}
+
+                        else if ( (LA49_53==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_53>=ATTRIBUTES && LA49_53<=GLOBAL)||LA49_53==COMMA||(LA49_53>=QUERY && LA49_53<=LEFT_SQUARE)||(LA49_53>=THEN && LA49_53<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_53==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_53);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 22 : 
+                        int LA49_34 = input.LA(1);
+
+                         
+                        int index49_34 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_34);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 23 : 
+                        int LA49_25 = input.LA(1);
+
+                         
+                        int index49_25 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 13;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_25);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 24 : 
+                        int LA49_59 = input.LA(1);
+
+                         
+                        int index49_59 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_59);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 25 : 
+                        int LA49_63 = input.LA(1);
+
+                         
+                        int index49_63 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_63);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 26 : 
+                        int LA49_51 = input.LA(1);
+
+                         
+                        int index49_51 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_51==ID) ) {s = 89;}
+
+                        else if ( (LA49_51==LEFT_PAREN) ) {s = 90;}
+
+                        else if ( (LA49_51==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_51>=ATTRIBUTES && LA49_51<=FUNCTION)||(LA49_51>=DOT && LA49_51<=GLOBAL)||LA49_51==COMMA||(LA49_51>=QUERY && LA49_51<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_51);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 27 : 
+                        int LA49_48 = input.LA(1);
+
+                         
+                        int index49_48 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_48);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 28 : 
+                        int LA49_40 = input.LA(1);
+
+                         
+                        int index49_40 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_40);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 29 : 
+                        int LA49_19 = input.LA(1);
+
+                         
+                        int index49_19 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_19==LEFT_PAREN) ) {s = 45;}
+
+                        else if ( (LA49_19==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_19>=ATTRIBUTES && LA49_19<=GLOBAL)||LA49_19==COMMA||(LA49_19>=QUERY && LA49_19<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_19);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 30 : 
+                        int LA49_21 = input.LA(1);
+
+                         
+                        int index49_21 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_21==LEFT_PAREN) ) {s = 48;}
+
+                        else if ( (LA49_21==ID) ) {s = 49;}
+
+                        else if ( (LA49_21==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_21>=ATTRIBUTES && LA49_21<=FUNCTION)||(LA49_21>=DOT && LA49_21<=GLOBAL)||LA49_21==COMMA||(LA49_21>=QUERY && LA49_21<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_21);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 31 : 
+                        int LA49_33 = input.LA(1);
+
+                         
+                        int index49_33 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_33==RIGHT_SQUARE) ) {s = 68;}
+
+                        else if ( (LA49_33==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_33>=ATTRIBUTES && LA49_33<=GLOBAL)||LA49_33==COMMA||(LA49_33>=QUERY && LA49_33<=LEFT_SQUARE)||(LA49_33>=THEN && LA49_33<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_33==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_33);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 32 : 
+                        int LA49_58 = input.LA(1);
+
+                         
+                        int index49_58 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_58==RIGHT_SQUARE) ) {s = 96;}
+
+                        else if ( (LA49_58==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_58>=ATTRIBUTES && LA49_58<=GLOBAL)||LA49_58==COMMA||(LA49_58>=QUERY && LA49_58<=LEFT_SQUARE)||(LA49_58>=THEN && LA49_58<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_58==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_58);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 33 : 
+                        int LA49_62 = input.LA(1);
+
+                         
+                        int index49_62 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_62==RIGHT_SQUARE) ) {s = 100;}
+
+                        else if ( (LA49_62==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_62>=ATTRIBUTES && LA49_62<=GLOBAL)||LA49_62==COMMA||(LA49_62>=QUERY && LA49_62<=LEFT_SQUARE)||(LA49_62>=THEN && LA49_62<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_62==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_62);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 34 : 
+                        int LA49_30 = input.LA(1);
+
+                         
+                        int index49_30 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 13;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_30);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 35 : 
+                        int LA49_4 = input.LA(1);
+
+                         
+                        int index49_4 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_4==LEFT_PAREN) ) {s = 14;}
+
+                        else if ( (LA49_4==EXISTS) ) {s = 15;}
+
+                        else if ( (LA49_4==NOT) ) {s = 16;}
+
+                        else if ( (LA49_4==EVAL) ) {s = 17;}
+
+                        else if ( (LA49_4==ID) ) {s = 18;}
+
+                        else if ( (LA49_4==FORALL) ) {s = 19;}
+
+                        else if ( (LA49_4==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_4>=ATTRIBUTES && LA49_4<=FUNCTION)||(LA49_4>=DOT && LA49_4<=GLOBAL)||LA49_4==COMMA||(LA49_4>=QUERY && LA49_4<=FROM)||(LA49_4>=ACCUMULATE && LA49_4<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_4);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 36 : 
+                        int LA49_17 = input.LA(1);
+
+                         
+                        int index49_17 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_17==LEFT_PAREN) ) {s = 40;}
+
+                        else if ( (LA49_17==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_17>=ATTRIBUTES && LA49_17<=GLOBAL)||LA49_17==COMMA||(LA49_17>=QUERY && LA49_17<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_17);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 37 : 
+                        int LA49_55 = input.LA(1);
+
+                         
+                        int index49_55 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_55);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 38 : 
+                        int LA49_41 = input.LA(1);
+
+                         
+                        int index49_41 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_41==ID) ) {s = 77;}
+
+                        else if ( (LA49_41==LEFT_PAREN) ) {s = 78;}
+
+                        else if ( (LA49_41==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_41>=ATTRIBUTES && LA49_41<=FUNCTION)||(LA49_41>=DOT && LA49_41<=GLOBAL)||LA49_41==COMMA||(LA49_41>=QUERY && LA49_41<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_41);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 39 : 
+                        int LA49_9 = input.LA(1);
+
+                         
+                        int index49_9 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_9==LEFT_PAREN) ) {s = 28;}
+
+                        else if ( (LA49_9==ID) ) {s = 29;}
+
+                        else if ( (LA49_9==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_9>=ATTRIBUTES && LA49_9<=FUNCTION)||(LA49_9>=DOT && LA49_9<=GLOBAL)||LA49_9==COMMA||(LA49_9>=QUERY && LA49_9<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_9);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 40 : 
+                        int LA49_42 = input.LA(1);
+
+                         
+                        int index49_42 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( ((LA49_42>=ATTRIBUTES && LA49_42<=ID)||LA49_42==GLOBAL||(LA49_42>=QUERY && LA49_42<=WHEN)||LA49_42==ENABLED||LA49_42==SALIENCE||LA49_42==DURATION||LA49_42==FROM||(LA49_42>=INIT && LA49_42<=RESULT)||(LA49_42>=CONTAINS && LA49_42<=IN)||LA49_42==NULL||LA49_42==THEN) ) {s = 79;}
+
+                        else if ( (LA49_42==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( (LA49_42==DOT||LA49_42==COMMA||(LA49_42>=DATE_EFFECTIVE && LA49_42<=DATE_EXPIRES)||LA49_42==BOOL||(LA49_42>=INT && LA49_42<=AGENDA_GROUP)||(LA49_42>=DIALECT && LA49_42<=DOUBLE_AMPER)||(LA49_42>=EXISTS && LA49_42<=ACCUMULATE)||LA49_42==COLLECT||LA49_42==FLOAT||(LA49_42>=LEFT_CURLY && LA49_42<=RIGHT_SQUARE)||(LA49_42>=EOL && LA49_42<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_42==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_42);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 41 : 
+                        int LA49_38 = input.LA(1);
+
+                         
+                        int index49_38 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_38);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 42 : 
+                        int LA49_29 = input.LA(1);
+
+                         
+                        int index49_29 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_29==71) ) {s = 60;}
+
+                        else if ( (LA49_29==DOT) ) {s = 61;}
+
+                        else if ( (LA49_29==LEFT_SQUARE) ) {s = 62;}
+
+                        else if ( (LA49_29==LEFT_PAREN) ) {s = 63;}
+
+                        else if ( (LA49_29==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_29>=ATTRIBUTES && LA49_29<=ID)||LA49_29==GLOBAL||LA49_29==COMMA||(LA49_29>=QUERY && LA49_29<=RIGHT_CURLY)||(LA49_29>=RIGHT_SQUARE && LA49_29<=70)||(LA49_29>=72 && LA49_29<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_29);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 43 : 
+                        int LA49_27 = input.LA(1);
+
+                         
+                        int index49_27 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_27==71) ) {s = 56;}
+
+                        else if ( (LA49_27==DOT) ) {s = 57;}
+
+                        else if ( (LA49_27==LEFT_SQUARE) ) {s = 58;}
+
+                        else if ( (LA49_27==LEFT_PAREN) ) {s = 59;}
+
+                        else if ( (LA49_27==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_27>=ATTRIBUTES && LA49_27<=ID)||LA49_27==GLOBAL||LA49_27==COMMA||(LA49_27>=QUERY && LA49_27<=RIGHT_CURLY)||(LA49_27>=RIGHT_SQUARE && LA49_27<=70)||(LA49_27>=72 && LA49_27<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_27);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 44 : 
+                        int LA49_11 = input.LA(1);
+
+                         
+                        int index49_11 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_11==71) ) {s = 31;}
+
+                        else if ( (LA49_11==DOT) ) {s = 32;}
+
+                        else if ( (LA49_11==LEFT_SQUARE) ) {s = 33;}
+
+                        else if ( (LA49_11==LEFT_PAREN) ) {s = 34;}
+
+                        else if ( (LA49_11==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_11>=ATTRIBUTES && LA49_11<=ID)||LA49_11==GLOBAL||LA49_11==COMMA||(LA49_11>=QUERY && LA49_11<=RIGHT_CURLY)||(LA49_11>=RIGHT_SQUARE && LA49_11<=70)||(LA49_11>=72 && LA49_11<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_11);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 45 : 
+                        int LA49_52 = input.LA(1);
+
+                         
+                        int index49_52 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( ((LA49_52>=ATTRIBUTES && LA49_52<=ID)||LA49_52==GLOBAL||(LA49_52>=QUERY && LA49_52<=WHEN)||LA49_52==ENABLED||LA49_52==SALIENCE||LA49_52==DURATION||LA49_52==FROM||(LA49_52>=INIT && LA49_52<=RESULT)||(LA49_52>=CONTAINS && LA49_52<=IN)||LA49_52==NULL||LA49_52==THEN) ) {s = 91;}
+
+                        else if ( (LA49_52==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( (LA49_52==DOT||LA49_52==COMMA||(LA49_52>=DATE_EFFECTIVE && LA49_52<=DATE_EXPIRES)||LA49_52==BOOL||(LA49_52>=INT && LA49_52<=AGENDA_GROUP)||(LA49_52>=DIALECT && LA49_52<=DOUBLE_AMPER)||(LA49_52>=EXISTS && LA49_52<=ACCUMULATE)||LA49_52==COLLECT||LA49_52==FLOAT||(LA49_52>=LEFT_CURLY && LA49_52<=RIGHT_SQUARE)||(LA49_52>=EOL && LA49_52<=79)) && (synpred2())) {s = 13;}
+
+                        else if ( (LA49_52==LEFT_PAREN) && (synpred2())) {s = 67;}
+
+                         
+                        input.seek(index49_52);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 46 : 
+                        int LA49_39 = input.LA(1);
+
+                         
+                        int index49_39 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_39==71) ) {s = 73;}
+
+                        else if ( (LA49_39==DOT) ) {s = 74;}
+
+                        else if ( (LA49_39==LEFT_SQUARE) ) {s = 75;}
+
+                        else if ( (LA49_39==LEFT_PAREN) ) {s = 76;}
+
+                        else if ( (LA49_39==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_39>=ATTRIBUTES && LA49_39<=ID)||LA49_39==GLOBAL||LA49_39==COMMA||(LA49_39>=QUERY && LA49_39<=RIGHT_CURLY)||(LA49_39>=RIGHT_SQUARE && LA49_39<=70)||(LA49_39>=72 && LA49_39<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_39);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 47 : 
+                        int LA49_37 = input.LA(1);
+
+                         
+                        int index49_37 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_37==71) ) {s = 69;}
+
+                        else if ( (LA49_37==DOT) ) {s = 70;}
+
+                        else if ( (LA49_37==LEFT_SQUARE) ) {s = 71;}
+
+                        else if ( (LA49_37==LEFT_PAREN) ) {s = 72;}
+
+                        else if ( (LA49_37==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_37>=ATTRIBUTES && LA49_37<=ID)||LA49_37==GLOBAL||LA49_37==COMMA||(LA49_37>=QUERY && LA49_37<=RIGHT_CURLY)||(LA49_37>=RIGHT_SQUARE && LA49_37<=70)||(LA49_37>=72 && LA49_37<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_37);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 48 : 
+                        int LA49_18 = input.LA(1);
+
+                         
+                        int index49_18 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_18==71) ) {s = 41;}
+
+                        else if ( (LA49_18==DOT) ) {s = 42;}
+
+                        else if ( (LA49_18==LEFT_SQUARE) ) {s = 43;}
+
+                        else if ( (LA49_18==LEFT_PAREN) ) {s = 44;}
+
+                        else if ( (LA49_18==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_18>=ATTRIBUTES && LA49_18<=ID)||LA49_18==GLOBAL||LA49_18==COMMA||(LA49_18>=QUERY && LA49_18<=RIGHT_CURLY)||(LA49_18>=RIGHT_SQUARE && LA49_18<=70)||(LA49_18>=72 && LA49_18<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_18);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 49 : 
+                        int LA49_35 = input.LA(1);
+
+                         
+                        int index49_35 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_35);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 50 : 
+                        int LA49_2 = input.LA(1);
+
+                         
+                        int index49_2 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_2==OR) ) {s = 4;}
+
+                        else if ( (LA49_2==AND) ) {s = 5;}
+
+                        else if ( (LA49_2==EXISTS) ) {s = 6;}
+
+                        else if ( (LA49_2==LEFT_PAREN) ) {s = 7;}
+
+                        else if ( (LA49_2==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( (LA49_2==NOT) ) {s = 9;}
+
+                        else if ( (LA49_2==EVAL) ) {s = 10;}
+
+                        else if ( (LA49_2==ID) ) {s = 11;}
+
+                        else if ( (LA49_2==FORALL) ) {s = 12;}
+
+                        else if ( ((LA49_2>=ATTRIBUTES && LA49_2<=FUNCTION)||(LA49_2>=DOT && LA49_2<=GLOBAL)||LA49_2==COMMA||(LA49_2>=QUERY && LA49_2<=LOCK_ON_ACTIVE)||LA49_2==DOUBLE_PIPE||(LA49_2>=DOUBLE_AMPER && LA49_2<=FROM)||(LA49_2>=ACCUMULATE && LA49_2<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_2);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 51 : 
+                        int LA49_14 = input.LA(1);
+
+                         
+                        int index49_14 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 13;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_14);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 52 : 
+                        int LA49_47 = input.LA(1);
+
+                         
+                        int index49_47 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_47==71) ) {s = 81;}
+
+                        else if ( (LA49_47==DOT) ) {s = 82;}
+
+                        else if ( (LA49_47==LEFT_SQUARE) ) {s = 83;}
+
+                        else if ( (LA49_47==LEFT_PAREN) ) {s = 84;}
+
+                        else if ( (LA49_47==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_47>=ATTRIBUTES && LA49_47<=ID)||LA49_47==GLOBAL||LA49_47==COMMA||(LA49_47>=QUERY && LA49_47<=RIGHT_CURLY)||(LA49_47>=RIGHT_SQUARE && LA49_47<=70)||(LA49_47>=72 && LA49_47<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_47);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 53 : 
+                        int LA49_15 = input.LA(1);
+
+                         
+                        int index49_15 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_15==LEFT_PAREN) ) {s = 36;}
+
+                        else if ( (LA49_15==ID) ) {s = 37;}
+
+                        else if ( (LA49_15==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_15>=ATTRIBUTES && LA49_15<=FUNCTION)||(LA49_15>=DOT && LA49_15<=GLOBAL)||LA49_15==COMMA||(LA49_15>=QUERY && LA49_15<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_15);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 54 : 
+                        int LA49_23 = input.LA(1);
+
+                         
+                        int index49_23 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_23==71) ) {s = 51;}
+
+                        else if ( (LA49_23==DOT) ) {s = 52;}
+
+                        else if ( (LA49_23==LEFT_SQUARE) ) {s = 53;}
+
+                        else if ( (LA49_23==LEFT_PAREN) ) {s = 54;}
+
+                        else if ( (LA49_23==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_23>=ATTRIBUTES && LA49_23<=ID)||LA49_23==GLOBAL||LA49_23==COMMA||(LA49_23>=QUERY && LA49_23<=RIGHT_CURLY)||(LA49_23>=RIGHT_SQUARE && LA49_23<=70)||(LA49_23>=72 && LA49_23<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_23);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 55 : 
+                        int LA49_49 = input.LA(1);
+
+                         
+                        int index49_49 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_49==71) ) {s = 85;}
+
+                        else if ( (LA49_49==DOT) ) {s = 86;}
+
+                        else if ( (LA49_49==LEFT_SQUARE) ) {s = 87;}
+
+                        else if ( (LA49_49==LEFT_PAREN) ) {s = 88;}
+
+                        else if ( (LA49_49==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_49>=ATTRIBUTES && LA49_49<=ID)||LA49_49==GLOBAL||LA49_49==COMMA||(LA49_49>=QUERY && LA49_49<=RIGHT_CURLY)||(LA49_49>=RIGHT_SQUARE && LA49_49<=70)||(LA49_49>=72 && LA49_49<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_49);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 56 : 
+                        int LA49_44 = input.LA(1);
+
+                         
+                        int index49_44 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_44);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 57 : 
+                        int LA49_64 = input.LA(1);
+
+                         
+                        int index49_64 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_64==DOT) ) {s = 101;}
+
+                        else if ( (LA49_64==LEFT_SQUARE) ) {s = 102;}
+
+                        else if ( (LA49_64==LEFT_PAREN) ) {s = 103;}
+
+                        else if ( (LA49_64==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_64>=ATTRIBUTES && LA49_64<=ID)||LA49_64==GLOBAL||LA49_64==COMMA||(LA49_64>=QUERY && LA49_64<=RIGHT_CURLY)||(LA49_64>=RIGHT_SQUARE && LA49_64<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_64);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 58 : 
+                        int LA49_28 = input.LA(1);
+
+                         
+                        int index49_28 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 13;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_28);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 59 : 
+                        int LA49_24 = input.LA(1);
+
+                         
+                        int index49_24 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_24==LEFT_PAREN) ) {s = 55;}
+
+                        else if ( (LA49_24==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_24>=ATTRIBUTES && LA49_24<=GLOBAL)||LA49_24==COMMA||(LA49_24>=QUERY && LA49_24<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_24);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 60 : 
+                        int LA49_66 = input.LA(1);
+
+                         
+                        int index49_66 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_66==LEFT_SQUARE) ) {s = 33;}
+
+                        else if ( (LA49_66==LEFT_PAREN) ) {s = 34;}
+
+                        else if ( (LA49_66==DOT) ) {s = 32;}
+
+                        else if ( (LA49_66==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_66>=ATTRIBUTES && LA49_66<=ID)||LA49_66==GLOBAL||LA49_66==COMMA||(LA49_66>=QUERY && LA49_66<=RIGHT_CURLY)||(LA49_66>=RIGHT_SQUARE && LA49_66<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_66);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 61 : 
+                        int LA49_5 = input.LA(1);
+
+                         
+                        int index49_5 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA49_5==EXISTS) ) {s = 20;}
+
+                        else if ( (LA49_5==NOT) ) {s = 21;}
+
+                        else if ( (LA49_5==EVAL) ) {s = 22;}
+
+                        else if ( (LA49_5==ID) ) {s = 23;}
+
+                        else if ( (LA49_5==FORALL) ) {s = 24;}
+
+                        else if ( (LA49_5==LEFT_PAREN) ) {s = 25;}
+
+                        else if ( (LA49_5==RIGHT_PAREN) && (synpred2())) {s = 8;}
+
+                        else if ( ((LA49_5>=ATTRIBUTES && LA49_5<=FUNCTION)||(LA49_5>=DOT && LA49_5<=GLOBAL)||LA49_5==COMMA||(LA49_5>=QUERY && LA49_5<=FROM)||(LA49_5>=ACCUMULATE && LA49_5<=79)) && (synpred2())) {s = 13;}
+
+                         
+                        input.seek(index49_5);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 62 : 
+                        int LA49_65 = input.LA(1);
+
+                         
+                        int index49_65 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred2()) ) {s = 67;}
+
+                        else if ( (true) ) {s = 3;}
+
+                         
+                        input.seek(index49_65);
+                        if ( s>=0 ) return s;
+                        break;
+            }
+            if (backtracking>0) {failed=true; return -1;}
+            NoViableAltException nvae =
+                new NoViableAltException(getDescription(), 49, _s, input);
+            error(nvae);
+            throw nvae;
+        }
+    }
+    static final String DFA63_eotS =
+        "\14\uffff";
+    static final String DFA63_eofS =
+        "\14\uffff";
+    static final String DFA63_minS =
+        "\1\14\1\uffff\1\4\1\13\1\0\1\10\1\uffff\1\10\4\0";
+    static final String DFA63_maxS =
+        "\1\45\1\uffff\2\117\1\0\1\117\1\uffff\1\117\4\0";
+    static final String DFA63_acceptS =
+        "\1\uffff\1\2\4\uffff\1\1\5\uffff";
+    static final String DFA63_specialS =
+        "\4\uffff\1\0\7\uffff}>";
+    static final String[] DFA63_transitionS = {
+            "\2\1\25\uffff\1\2\1\uffff\1\1",
+            "",
+            "\5\1\1\uffff\1\1\1\4\2\uffff\5\1\3\uffff\1\1\1\uffff\1\1\6\uffff"+
+            "\1\1\6\uffff\1\1\1\uffff\1\6\1\1\2\uffff\3\1\1\uffff\1\5\1\7"+
+            "\1\10\1\11\1\3\1\uffff\1\1\4\uffff\1\1\16\uffff\6\6",
+            "\1\12\2\1\25\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\24"+
+            "\uffff\7\1",
+            "\1\uffff",
+            "\1\6\2\uffff\1\13\2\1\6\uffff\1\6\2\uffff\1\6\1\uffff\1\6\11"+
+            "\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\6\22\uffff"+
+            "\7\1",
+            "",
+            "\1\6\2\uffff\1\13\2\1\6\uffff\1\6\2\uffff\1\6\1\uffff\1\6\11"+
+            "\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\6\22\uffff"+
+            "\7\1",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff"
+    };
+
+    static final short[] DFA63_eot = DFA.unpackEncodedString(DFA63_eotS);
+    static final short[] DFA63_eof = DFA.unpackEncodedString(DFA63_eofS);
+    static final char[] DFA63_min = DFA.unpackEncodedStringToUnsignedChars(DFA63_minS);
+    static final char[] DFA63_max = DFA.unpackEncodedStringToUnsignedChars(DFA63_maxS);
+    static final short[] DFA63_accept = DFA.unpackEncodedString(DFA63_acceptS);
+    static final short[] DFA63_special = DFA.unpackEncodedString(DFA63_specialS);
+    static final short[][] DFA63_transition;
+
+    static {
+        int numStates = DFA63_transitionS.length;
+        DFA63_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA63_transition[i] = DFA.unpackEncodedString(DFA63_transitionS[i]);
+        }
+    }
+
+    class DFA63 extends DFA {
+
+        public DFA63(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 63;
+            this.eot = DFA63_eot;
+            this.eof = DFA63_eof;
+            this.min = DFA63_min;
+            this.max = DFA63_max;
+            this.accept = DFA63_accept;
+            this.special = DFA63_special;
+            this.transition = DFA63_transition;
+        }
+        public String getDescription() {
+            return "()* loopback of 1263:3: ( options {backtrack=true; } : DOUBLE_PIPE and_restr_connective[or] )*";
+        }
+        public int specialStateTransition(int s, IntStream input) throws NoViableAltException {
+        	int _s = s;
+            switch ( s ) {
+                    case 0 : 
+                        int LA63_4 = input.LA(1);
+
+                         
+                        int index63_4 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred3()) ) {s = 6;}
+
+                        else if ( (true) ) {s = 1;}
+
+                         
+                        input.seek(index63_4);
+                        if ( s>=0 ) return s;
+                        break;
+            }
+            if (backtracking>0) {failed=true; return -1;}
+            NoViableAltException nvae =
+                new NoViableAltException(getDescription(), 63, _s, input);
+            error(nvae);
+            throw nvae;
+        }
+    }
+    static final String DFA64_eotS =
+        "\42\uffff";
+    static final String DFA64_eofS =
+        "\1\1\41\uffff";
+    static final String DFA64_minS =
+        "\1\14\1\uffff\1\4\1\13\1\uffff\4\10\1\4\1\10\1\4\1\13\1\0\2\10\22"+
+        "\0";
+    static final String DFA64_maxS =
+        "\1\45\1\uffff\2\117\1\uffff\10\117\1\0\2\117\22\0";
+    static final String DFA64_acceptS =
+        "\1\uffff\1\2\2\uffff\1\1\35\uffff";
+    static final String DFA64_specialS =
+        "\15\uffff\1\0\24\uffff}>";
+    static final String[] DFA64_transitionS = {
+            "\2\1\25\uffff\1\1\1\uffff\1\2",
+            "",
+            "\5\1\1\uffff\1\1\1\11\2\uffff\5\1\3\uffff\1\1\1\uffff\1\1\6"+
+            "\uffff\1\1\6\uffff\1\1\1\uffff\1\4\1\1\2\uffff\3\1\1\uffff\1"+
+            "\5\1\6\1\7\1\10\1\3\1\uffff\1\1\4\uffff\1\1\16\uffff\6\4",
+            "\1\12\2\1\25\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\24"+
+            "\uffff\7\1",
+            "",
+            "\1\4\2\uffff\1\13\2\1\6\uffff\1\4\2\uffff\1\4\1\uffff\1\4\11"+
+            "\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\4\22\uffff"+
+            "\7\1",
+            "\1\4\2\uffff\1\13\2\1\6\uffff\1\4\2\uffff\1\4\1\uffff\1\4\11"+
+            "\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\4\22\uffff"+
+            "\7\1",
+            "\1\4\2\uffff\1\13\2\1\6\uffff\1\4\2\uffff\1\4\1\uffff\1\4\11"+
+            "\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\4\22\uffff"+
+            "\7\1",
+            "\1\4\2\uffff\1\13\2\1\6\uffff\1\4\2\uffff\1\4\1\uffff\1\4\11"+
+            "\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\4\22\uffff"+
+            "\7\1",
+            "\5\1\1\uffff\1\1\1\15\2\uffff\5\1\3\uffff\1\1\1\uffff\1\1\6"+
+            "\uffff\1\1\6\uffff\1\1\1\uffff\1\4\1\1\2\uffff\3\1\1\uffff\1"+
+            "\16\1\17\1\20\1\21\1\14\1\uffff\1\1\4\uffff\1\1\16\uffff\6\4",
+            "\1\4\2\uffff\1\22\10\uffff\1\4\2\uffff\1\4\1\uffff\1\4\16\uffff"+
+            "\1\1\7\uffff\5\1\2\4\23\uffff\6\1",
+            "\7\4\1\37\34\4\1\24\7\4\1\33\1\34\1\35\1\36\1\23\25\4\1\25\1"+
+            "\26\1\27\1\30\1\31\1\32",
+            "\1\40\1\uffff\1\1\25\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff"+
+            "\5\1\24\uffff\7\1",
+            "\1\uffff",
+            "\1\4\2\uffff\1\41\1\uffff\1\1\6\uffff\1\4\2\uffff\1\4\1\uffff"+
+            "\1\4\11\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\4\22"+
+            "\uffff\7\1",
+            "\1\4\2\uffff\1\41\1\uffff\1\1\6\uffff\1\4\2\uffff\1\4\1\uffff"+
+            "\1\4\11\uffff\1\1\1\uffff\1\1\2\uffff\1\1\7\uffff\5\1\2\4\22"+
+            "\uffff\7\1",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff",
+            "\1\uffff"
+    };
+
+    static final short[] DFA64_eot = DFA.unpackEncodedString(DFA64_eotS);
+    static final short[] DFA64_eof = DFA.unpackEncodedString(DFA64_eofS);
+    static final char[] DFA64_min = DFA.unpackEncodedStringToUnsignedChars(DFA64_minS);
+    static final char[] DFA64_max = DFA.unpackEncodedStringToUnsignedChars(DFA64_maxS);
+    static final short[] DFA64_accept = DFA.unpackEncodedString(DFA64_acceptS);
+    static final short[] DFA64_special = DFA.unpackEncodedString(DFA64_specialS);
+    static final short[][] DFA64_transition;
+
+    static {
+        int numStates = DFA64_transitionS.length;
+        DFA64_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA64_transition[i] = DFA.unpackEncodedString(DFA64_transitionS[i]);
+        }
+    }
+
+    class DFA64 extends DFA {
+
+        public DFA64(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 64;
+            this.eot = DFA64_eot;
+            this.eof = DFA64_eof;
+            this.min = DFA64_min;
+            this.max = DFA64_max;
+            this.accept = DFA64_accept;
+            this.special = DFA64_special;
+            this.transition = DFA64_transition;
+        }
+        public String getDescription() {
+            return "()* loopback of 1285:3: ( options {backtrack=true; } : t= DOUBLE_AMPER constraint_expression[and] )*";
+        }
+        public int specialStateTransition(int s, IntStream input) throws NoViableAltException {
+        	int _s = s;
+            switch ( s ) {
+                    case 0 : 
+                        int LA64_13 = input.LA(1);
+
+                         
+                        int index64_13 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (synpred4()) ) {s = 4;}
+
+                        else if ( (true) ) {s = 1;}
+
+                         
+                        input.seek(index64_13);
+                        if ( s>=0 ) return s;
+                        break;
+            }
+            if (backtracking>0) {failed=true; return -1;}
+            NoViableAltException nvae =
+                new NoViableAltException(getDescription(), 64, _s, input);
+            error(nvae);
+            throw nvae;
+        }
+    }
  
 
-    public static final BitSet FOLLOW_69_in_opt_semicolon46 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_prolog_in_compilation_unit64 = new BitSet(new long[]{0x000000000000C3C0L});
-    public static final BitSet FOLLOW_statement_in_compilation_unit71 = new BitSet(new long[]{0x000000000000C3C2L});
-    public static final BitSet FOLLOW_package_statement_in_prolog96 = new BitSet(new long[]{0x00000002FF5A0012L});
-    public static final BitSet FOLLOW_ATTRIBUTES_in_prolog111 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
-    public static final BitSet FOLLOW_70_in_prolog113 = new BitSet(new long[]{0x00000002FF5A0002L});
-    public static final BitSet FOLLOW_COMMA_in_prolog122 = new BitSet(new long[]{0x00000000FF5A0000L});
-    public static final BitSet FOLLOW_rule_attribute_in_prolog127 = new BitSet(new long[]{0x00000002FF5A0002L});
-    public static final BitSet FOLLOW_function_import_statement_in_statement156 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_import_statement_in_statement162 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_global_in_statement168 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_function_in_statement174 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_template_in_statement188 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_rule_in_statement197 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_query_in_statement209 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_PACKAGE_in_package_statement238 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_dotted_name_in_package_statement242 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_package_statement245 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_IMPORT_in_import_statement277 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_import_name_in_import_statement300 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_import_statement303 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_IMPORT_in_function_import_statement329 = new BitSet(new long[]{0x0000000000000080L});
-    public static final BitSet FOLLOW_FUNCTION_in_function_import_statement331 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_import_name_in_function_import_statement354 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_function_import_statement357 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_identifier_in_import_name385 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000180L});
-    public static final BitSet FOLLOW_71_in_import_name397 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_import_name401 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000180L});
-    public static final BitSet FOLLOW_72_in_import_name425 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_GLOBAL_in_global461 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_dotted_name_in_global472 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_global484 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_global486 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FUNCTION_in_function513 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_dotted_name_in_function518 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_function525 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_function534 = new BitSet(new long[]{0x07C2FE7D2051FBF0L});
-    public static final BitSet FOLLOW_dotted_name_in_function544 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_argument_in_function551 = new BitSet(new long[]{0x0000000200001000L});
-    public static final BitSet FOLLOW_COMMA_in_function565 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_dotted_name_in_function570 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_argument_in_function577 = new BitSet(new long[]{0x0000000200001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_function601 = new BitSet(new long[]{0x0004000000000000L});
-    public static final BitSet FOLLOW_curly_chunk_in_function607 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_QUERY_in_query639 = new BitSet(new long[]{0x0000000000040800L});
-    public static final BitSet FOLLOW_name_in_query643 = new BitSet(new long[]{0x03000A0000002C00L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_query656 = new BitSet(new long[]{0x0000000000001800L});
-    public static final BitSet FOLLOW_ID_in_query680 = new BitSet(new long[]{0x0000000200001000L});
-    public static final BitSet FOLLOW_COMMA_in_query693 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_ID_in_query697 = new BitSet(new long[]{0x0000000200001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_query734 = new BitSet(new long[]{0x03000A0000002C00L});
-    public static final BitSet FOLLOW_normal_lhs_block_in_query751 = new BitSet(new long[]{0x0000000000002000L});
-    public static final BitSet FOLLOW_END_in_query768 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_TEMPLATE_in_template798 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_template802 = new BitSet(new long[]{0x0000000000000800L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_template804 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_template_slot_in_template819 = new BitSet(new long[]{0x0000000000002800L});
-    public static final BitSet FOLLOW_END_in_template836 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_template838 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_dotted_name_in_template_slot884 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_template_slot902 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_template_slot904 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_RULE_in_rule937 = new BitSet(new long[]{0x0000000000040800L});
-    public static final BitSet FOLLOW_name_in_rule941 = new BitSet(new long[]{0x04000002FF5B0010L});
-    public static final BitSet FOLLOW_rule_attributes_in_rule950 = new BitSet(new long[]{0x0400000000010000L});
-    public static final BitSet FOLLOW_WHEN_in_rule959 = new BitSet(new long[]{0x07000A0000000C00L,0x0000000000000040L});
-    public static final BitSet FOLLOW_70_in_rule961 = new BitSet(new long[]{0x07000A0000000C00L});
-    public static final BitSet FOLLOW_normal_lhs_block_in_rule979 = new BitSet(new long[]{0x0400000000000000L});
-    public static final BitSet FOLLOW_rhs_chunk_in_rule1000 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ATTRIBUTES_in_rule_attributes1021 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
-    public static final BitSet FOLLOW_70_in_rule_attributes1023 = new BitSet(new long[]{0x00000002FF5A0002L});
-    public static final BitSet FOLLOW_COMMA_in_rule_attributes1032 = new BitSet(new long[]{0x00000000FF5A0000L});
-    public static final BitSet FOLLOW_rule_attribute_in_rule_attributes1037 = new BitSet(new long[]{0x00000002FF5A0002L});
-    public static final BitSet FOLLOW_salience_in_rule_attribute1078 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_no_loop_in_rule_attribute1088 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_agenda_group_in_rule_attribute1099 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_duration_in_rule_attribute1112 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_activation_group_in_rule_attribute1126 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_auto_focus_in_rule_attribute1137 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_date_effective_in_rule_attribute1148 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_date_expires_in_rule_attribute1158 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_enabled_in_rule_attribute1168 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ruleflow_group_in_rule_attribute1178 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_lock_on_active_in_rule_attribute1188 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_dialect_in_rule_attribute1197 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DATE_EFFECTIVE_in_date_effective1229 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_STRING_in_date_effective1233 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DATE_EXPIRES_in_date_expires1266 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_STRING_in_date_expires1270 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ENABLED_in_enabled1305 = new BitSet(new long[]{0x0000000000200000L});
-    public static final BitSet FOLLOW_BOOL_in_enabled1309 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_SALIENCE_in_salience1354 = new BitSet(new long[]{0x0000000000800400L});
-    public static final BitSet FOLLOW_INT_in_salience1367 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_paren_chunk_in_salience1382 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NO_LOOP_in_no_loop1422 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NO_LOOP_in_no_loop1450 = new BitSet(new long[]{0x0000000000200000L});
-    public static final BitSet FOLLOW_BOOL_in_no_loop1454 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_AUTO_FOCUS_in_auto_focus1503 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_AUTO_FOCUS_in_auto_focus1531 = new BitSet(new long[]{0x0000000000200000L});
-    public static final BitSet FOLLOW_BOOL_in_auto_focus1535 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ACTIVATION_GROUP_in_activation_group1580 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_STRING_in_activation_group1584 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_RULEFLOW_GROUP_in_ruleflow_group1616 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_STRING_in_ruleflow_group1620 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_AGENDA_GROUP_in_agenda_group1652 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_STRING_in_agenda_group1656 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DURATION_in_duration1690 = new BitSet(new long[]{0x0000000000800000L});
-    public static final BitSet FOLLOW_INT_in_duration1694 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DIALECT_in_dialect1726 = new BitSet(new long[]{0x0000000000040000L});
-    public static final BitSet FOLLOW_STRING_in_dialect1730 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LOCK_ON_ACTIVE_in_lock_on_active1779 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LOCK_ON_ACTIVE_in_lock_on_active1807 = new BitSet(new long[]{0x0000000000200000L});
-    public static final BitSet FOLLOW_BOOL_in_lock_on_active1811 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_lhs_in_normal_lhs_block1849 = new BitSet(new long[]{0x03000A0000000C02L});
-    public static final BitSet FOLLOW_lhs_or_in_lhs1886 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_fact_binding_in_lhs_pattern1914 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_fact_in_lhs_pattern1923 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_from_source_in_from_statement1950 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_identifier_in_from_source1992 = new BitSet(new long[]{0x0000000000000402L,0x0000000000000080L});
-    public static final BitSet FOLLOW_paren_chunk_in_from_source2003 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L});
-    public static final BitSet FOLLOW_expression_chain_in_from_source2017 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_71_in_expression_chain2046 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_expression_chain2050 = new BitSet(new long[]{0x0010000000000402L,0x0000000000000080L});
-    public static final BitSet FOLLOW_square_chunk_in_expression_chain2081 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L});
-    public static final BitSet FOLLOW_paren_chunk_in_expression_chain2115 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L});
-    public static final BitSet FOLLOW_expression_chain_in_expression_chain2136 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ACCUMULATE_in_accumulate_statement2177 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_accumulate_statement2187 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_lhs_pattern_in_accumulate_statement2191 = new BitSet(new long[]{0x0000000600000000L});
-    public static final BitSet FOLLOW_COMMA_in_accumulate_statement2193 = new BitSet(new long[]{0x0000000400000000L});
-    public static final BitSet FOLLOW_INIT_in_accumulate_statement2203 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_paren_chunk_in_accumulate_statement2214 = new BitSet(new long[]{0x0000000A00000000L});
-    public static final BitSet FOLLOW_COMMA_in_accumulate_statement2217 = new BitSet(new long[]{0x0000000800000000L});
-    public static final BitSet FOLLOW_ACTION_in_accumulate_statement2226 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_paren_chunk_in_accumulate_statement2230 = new BitSet(new long[]{0x0000001200000000L});
-    public static final BitSet FOLLOW_COMMA_in_accumulate_statement2233 = new BitSet(new long[]{0x0000001000000000L});
-    public static final BitSet FOLLOW_RESULT_in_accumulate_statement2242 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_paren_chunk_in_accumulate_statement2246 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_accumulate_statement2258 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_COLLECT_in_collect_statement2301 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_collect_statement2311 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_lhs_pattern_in_collect_statement2315 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_collect_statement2319 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_fact_binding2353 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
-    public static final BitSet FOLLOW_70_in_fact_binding2355 = new BitSet(new long[]{0x0000000000000C00L});
-    public static final BitSet FOLLOW_fact_expression_in_fact_binding2368 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_fact_expression2400 = new BitSet(new long[]{0x0000000000000C00L});
-    public static final BitSet FOLLOW_fact_expression_in_fact_expression2404 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact_expression2407 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_fact_in_fact_expression2418 = new BitSet(new long[]{0x000000C000000002L});
-    public static final BitSet FOLLOW_set_in_fact_expression2430 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_fact_in_fact_expression2448 = new BitSet(new long[]{0x000000C000000002L});
-    public static final BitSet FOLLOW_dotted_name_in_fact2509 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_fact2523 = new BitSet(new long[]{0x07C2FE7D2051FFF0L});
-    public static final BitSet FOLLOW_constraints_in_fact2533 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact2546 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_constraint_in_constraints2566 = new BitSet(new long[]{0x0000000200000002L});
-    public static final BitSet FOLLOW_COMMA_in_constraints2573 = new BitSet(new long[]{0x07C2FE7D2051EFF0L});
-    public static final BitSet FOLLOW_constraint_in_constraints2582 = new BitSet(new long[]{0x0000000200000002L});
-    public static final BitSet FOLLOW_or_constr_in_constraint2615 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_and_constr_in_or_constr2638 = new BitSet(new long[]{0x0000008000000002L});
-    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_constr2648 = new BitSet(new long[]{0x07C2FE7D2051EFF0L});
-    public static final BitSet FOLLOW_and_constr_in_or_constr2658 = new BitSet(new long[]{0x0000008000000002L});
-    public static final BitSet FOLLOW_unary_constr_in_and_constr2690 = new BitSet(new long[]{0x0000010000000002L});
-    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_constr2700 = new BitSet(new long[]{0x07C2FE7D2051EFF0L});
-    public static final BitSet FOLLOW_unary_constr_in_and_constr2710 = new BitSet(new long[]{0x0000010000000002L});
-    public static final BitSet FOLLOW_field_constraint_in_unary_constr2738 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_unary_constr2746 = new BitSet(new long[]{0x07C2FE7D2051EFF0L});
-    public static final BitSet FOLLOW_or_constr_in_unary_constr2748 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_unary_constr2751 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EVAL_in_unary_constr2757 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_predicate_in_unary_constr2759 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_field_constraint2791 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
-    public static final BitSet FOLLOW_70_in_field_constraint2793 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_field_constraint2814 = new BitSet(new long[]{0x0000FC0000000402L,0x000000000000FE00L});
-    public static final BitSet FOLLOW_or_restr_connective_in_field_constraint2828 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_73_in_field_constraint2843 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_predicate_in_field_constraint2845 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective2874 = new BitSet(new long[]{0x0000008000000002L});
-    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_restr_connective2884 = new BitSet(new long[]{0x0000FC0000000400L,0x000000000000FC00L});
-    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective2896 = new BitSet(new long[]{0x0000008000000002L});
-    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective2930 = new BitSet(new long[]{0x0000010000000002L});
-    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_restr_connective2940 = new BitSet(new long[]{0x0000FC0000000400L,0x000000000000FC00L});
-    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective2950 = new BitSet(new long[]{0x0000010000000002L});
-    public static final BitSet FOLLOW_compound_operator_in_constraint_expression2985 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_simple_operator_in_constraint_expression2992 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_constraint_expression2999 = new BitSet(new long[]{0x0000FC0000000400L,0x000000000000FC00L});
-    public static final BitSet FOLLOW_or_restr_connective_in_constraint_expression3008 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_constraint_expression3014 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_74_in_simple_operator3045 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_75_in_simple_operator3053 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_76_in_simple_operator3061 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_77_in_simple_operator3069 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_78_in_simple_operator3077 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_79_in_simple_operator3085 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_CONTAINS_in_simple_operator3093 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_NOT_in_simple_operator3101 = new BitSet(new long[]{0x0000040000000000L});
-    public static final BitSet FOLLOW_CONTAINS_in_simple_operator3105 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_EXCLUDES_in_simple_operator3113 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_MATCHES_in_simple_operator3121 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_NOT_in_simple_operator3129 = new BitSet(new long[]{0x0000200000000000L});
-    public static final BitSet FOLLOW_MATCHES_in_simple_operator3133 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_MEMBEROF_in_simple_operator3141 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_NOT_in_simple_operator3149 = new BitSet(new long[]{0x0000400000000000L});
-    public static final BitSet FOLLOW_MEMBEROF_in_simple_operator3153 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_expression_value_in_simple_operator3167 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_IN_in_compound_operator3196 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_NOT_in_compound_operator3208 = new BitSet(new long[]{0x0000800000000000L});
-    public static final BitSet FOLLOW_IN_in_compound_operator3210 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_compound_operator3225 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_expression_value_in_compound_operator3229 = new BitSet(new long[]{0x0000000200001000L});
-    public static final BitSet FOLLOW_COMMA_in_compound_operator3241 = new BitSet(new long[]{0x0003000000A40C00L});
-    public static final BitSet FOLLOW_expression_value_in_compound_operator3245 = new BitSet(new long[]{0x0000000200001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_compound_operator3261 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_expression_value3289 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_enum_constraint_in_expression_value3302 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_constraint_in_expression_value3322 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_retval_constraint_in_expression_value3336 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_literal_constraint3379 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_literal_constraint3390 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_literal_constraint3403 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_literal_constraint3414 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_literal_constraint3426 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_enum_constraint3461 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
-    public static final BitSet FOLLOW_71_in_enum_constraint3467 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_enum_constraint3471 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L});
-    public static final BitSet FOLLOW_paren_chunk_in_predicate3513 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_paren_chunk3562 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_set_in_paren_chunk3578 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_paren_chunk_in_paren_chunk3602 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_paren_chunk3639 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_curly_chunk3690 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_set_in_curly_chunk3706 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_curly_chunk_in_curly_chunk3730 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_curly_chunk3767 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_square_chunk3830 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_set_in_square_chunk3846 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_square_chunk_in_square_chunk3870 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_square_chunk3907 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_paren_chunk_in_retval_constraint3952 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_lhs_and_in_lhs_or3980 = new BitSet(new long[]{0x000000C000000002L});
-    public static final BitSet FOLLOW_set_in_lhs_or3988 = new BitSet(new long[]{0x03000A0000000C00L});
-    public static final BitSet FOLLOW_lhs_and_in_lhs_or4004 = new BitSet(new long[]{0x000000C000000002L});
-    public static final BitSet FOLLOW_lhs_unary_in_lhs_and4040 = new BitSet(new long[]{0x0040010000000002L});
-    public static final BitSet FOLLOW_set_in_lhs_and4048 = new BitSet(new long[]{0x03000A0000000C00L});
-    public static final BitSet FOLLOW_lhs_unary_in_lhs_and4064 = new BitSet(new long[]{0x0040010000000002L});
-    public static final BitSet FOLLOW_lhs_exist_in_lhs_unary4101 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_lhs_not_in_lhs_unary4109 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_lhs_eval_in_lhs_unary4117 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_lhs_pattern_in_lhs_unary4125 = new BitSet(new long[]{0x0080000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_FROM_in_lhs_unary4141 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_accumulate_statement_in_lhs_unary4196 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_collect_statement_in_lhs_unary4225 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_from_statement_in_lhs_unary4260 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_lhs_forall_in_lhs_unary4299 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_unary4307 = new BitSet(new long[]{0x03000A0000000C00L});
-    public static final BitSet FOLLOW_lhs_or_in_lhs_unary4311 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_unary4313 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000020L});
-    public static final BitSet FOLLOW_opt_semicolon_in_lhs_unary4323 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EXISTS_in_lhs_exist4347 = new BitSet(new long[]{0x0000000000000C00L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_exist4367 = new BitSet(new long[]{0x03000A0000000C00L});
-    public static final BitSet FOLLOW_lhs_or_in_lhs_exist4371 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_exist4403 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_lhs_pattern_in_lhs_exist4453 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NOT_in_lhs_not4507 = new BitSet(new long[]{0x0000000000000C00L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_not4520 = new BitSet(new long[]{0x03000A0000000C00L});
-    public static final BitSet FOLLOW_lhs_or_in_lhs_not4524 = new BitSet(new long[]{0x0000000000001000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_not4557 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_lhs_pattern_in_lhs_not4594 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EVAL_in_lhs_eval4642 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_paren_chunk_in_lhs_eval4653 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FORALL_in_lhs_forall4682 = new BitSet(new long[]{0x0000000000000400L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_forall4684 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_lhs_pattern_in_lhs_forall4688 = new BitSet(new long[]{0x0000000200000800L});
-    public static final BitSet FOLLOW_COMMA_in_lhs_forall4702 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_lhs_pattern_in_lhs_forall4708 = new BitSet(new long[]{0x0000000200001800L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_forall4723 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_dotted_name4754 = new BitSet(new long[]{0x0010000000000002L,0x0000000000000080L});
-    public static final BitSet FOLLOW_71_in_dotted_name4766 = new BitSet(new long[]{0x07C2FE7D2051EBF0L});
-    public static final BitSet FOLLOW_identifier_in_dotted_name4770 = new BitSet(new long[]{0x0010000000000002L,0x0000000000000080L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_dotted_name4792 = new BitSet(new long[]{0x0020000000000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_dotted_name4796 = new BitSet(new long[]{0x0010000000000002L});
-    public static final BitSet FOLLOW_identifier_in_argument4835 = new BitSet(new long[]{0x0010000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_argument4841 = new BitSet(new long[]{0x0020000000000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_argument4843 = new BitSet(new long[]{0x0010000000000002L});
-    public static final BitSet FOLLOW_THEN_in_rhs_chunk4887 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_set_in_rhs_chunk4903 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
-    public static final BitSet FOLLOW_END_in_rhs_chunk4940 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_name4984 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_name5003 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_identifier5041 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_PACKAGE_in_identifier5054 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FUNCTION_in_identifier5061 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_GLOBAL_in_identifier5068 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_IMPORT_in_identifier5075 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_RULE_in_identifier5084 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_QUERY_in_identifier5091 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_TEMPLATE_in_identifier5112 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ATTRIBUTES_in_identifier5140 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ENABLED_in_identifier5166 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_SALIENCE_in_identifier5195 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DURATION_in_identifier5217 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FROM_in_identifier5239 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ACCUMULATE_in_identifier5268 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INIT_in_identifier5290 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ACTION_in_identifier5319 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_RESULT_in_identifier5348 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_COLLECT_in_identifier5377 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_OR_in_identifier5406 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_AND_in_identifier5435 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_CONTAINS_in_identifier5464 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EXCLUDES_in_identifier5486 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_MEMBEROF_in_identifier5508 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_MATCHES_in_identifier5528 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_identifier5557 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EXISTS_in_identifier5586 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NOT_in_identifier5615 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EVAL_in_identifier5644 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FORALL_in_identifier5673 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_WHEN_in_identifier5711 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_THEN_in_identifier5743 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_END_in_identifier5772 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_IN_in_identifier5791 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_function_import_statement_in_synpred7156 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_import_statement_in_synpred8162 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_paren_chunk_in_synpred462003 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred482073 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_synpred492107 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_set_in_synpred562430 = new BitSet(new long[]{0x0000000000000800L});
-    public static final BitSet FOLLOW_fact_in_synpred562448 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_field_constraint_in_synpred612738 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DOUBLE_PIPE_in_synpred662884 = new BitSet(new long[]{0x0000FC0000000400L,0x000000000000FC00L});
-    public static final BitSet FOLLOW_and_restr_connective_in_synpred662896 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_DOUBLE_AMPER_in_synpred672940 = new BitSet(new long[]{0x0000FC0000000400L,0x000000000000FC00L});
-    public static final BitSet FOLLOW_constraint_expression_in_synpred672950 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ACCUMULATE_in_synpred1084187 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_COLLECT_in_synpred1094216 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_set_in_synpred1114246 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_70_in_opt_semicolon40 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_prolog_in_compilation_unit58 = new BitSet(new long[]{0x00000000000344C0L});
+    public static final BitSet FOLLOW_statement_in_compilation_unit63 = new BitSet(new long[]{0x00000000000344C2L});
+    public static final BitSet FOLLOW_package_statement_in_prolog86 = new BitSet(new long[]{0x00000003FD680012L});
+    public static final BitSet FOLLOW_ATTRIBUTES_in_prolog100 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_71_in_prolog102 = new BitSet(new long[]{0x00000003FD680002L});
+    public static final BitSet FOLLOW_rule_attribute_in_prolog112 = new BitSet(new long[]{0x00000003FD681002L});
+    public static final BitSet FOLLOW_COMMA_in_prolog135 = new BitSet(new long[]{0x00000003FD680000L});
+    public static final BitSet FOLLOW_rule_attribute_in_prolog140 = new BitSet(new long[]{0x00000003FD681002L});
+    public static final BitSet FOLLOW_PACKAGE_in_package_statement184 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_dotted_name_in_package_statement188 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_package_statement191 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_function_import_statement_in_statement205 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_import_statement_in_statement211 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_global_in_statement217 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_function_in_statement223 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_template_in_statement237 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_rule_in_statement246 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_query_in_statement258 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_IMPORT_in_import_statement287 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_import_name_in_import_statement310 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_import_statement313 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_IMPORT_in_function_import_statement337 = new BitSet(new long[]{0x0000000000000080L});
+    public static final BitSet FOLLOW_FUNCTION_in_function_import_statement339 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_import_name_in_function_import_statement362 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_function_import_statement365 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_import_name391 = new BitSet(new long[]{0x0000000000000202L,0x0000000000000100L});
+    public static final BitSet FOLLOW_DOT_in_import_name403 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_import_name407 = new BitSet(new long[]{0x0000000000000202L,0x0000000000000100L});
+    public static final BitSet FOLLOW_72_in_import_name431 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_GLOBAL_in_global465 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_dotted_name_in_global476 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_global488 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_global490 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FUNCTION_in_function515 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_dotted_name_in_function519 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_function525 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_function534 = new BitSet(new long[]{0x085F70408147E5F0L});
+    public static final BitSet FOLLOW_dotted_name_in_function543 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_argument_in_function549 = new BitSet(new long[]{0x0000000000003000L});
+    public static final BitSet FOLLOW_COMMA_in_function563 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_dotted_name_in_function567 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_argument_in_function573 = new BitSet(new long[]{0x0000000000003000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_function597 = new BitSet(new long[]{0x0080000000000000L});
+    public static final BitSet FOLLOW_curly_chunk_in_function603 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_identifier_in_argument631 = new BitSet(new long[]{0x0200000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_argument637 = new BitSet(new long[]{0x0400000000000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_argument639 = new BitSet(new long[]{0x0200000000000002L});
+    public static final BitSet FOLLOW_QUERY_in_query669 = new BitSet(new long[]{0x0000000000100100L});
+    public static final BitSet FOLLOW_name_in_query673 = new BitSet(new long[]{0x0000078000008900L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_query683 = new BitSet(new long[]{0x0000000000002100L});
+    public static final BitSet FOLLOW_ID_in_query715 = new BitSet(new long[]{0x0000000000003000L});
+    public static final BitSet FOLLOW_COMMA_in_query763 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_ID_in_query767 = new BitSet(new long[]{0x0000000000003000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_query815 = new BitSet(new long[]{0x0000078000008900L});
+    public static final BitSet FOLLOW_normal_lhs_block_in_query833 = new BitSet(new long[]{0x0000000000008000L});
+    public static final BitSet FOLLOW_END_in_query838 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_TEMPLATE_in_template866 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_template870 = new BitSet(new long[]{0x0000000000000100L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_template872 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_template_slot_in_template887 = new BitSet(new long[]{0x0000000000008100L});
+    public static final BitSet FOLLOW_END_in_template902 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_template904 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_qualified_id_in_template_slot950 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_template_slot968 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_template_slot970 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_RULE_in_rule1001 = new BitSet(new long[]{0x0000000000100100L});
+    public static final BitSet FOLLOW_name_in_rule1005 = new BitSet(new long[]{0x08000003FD6C0010L});
+    public static final BitSet FOLLOW_rule_attributes_in_rule1014 = new BitSet(new long[]{0x0800000000040000L});
+    public static final BitSet FOLLOW_WHEN_in_rule1026 = new BitSet(new long[]{0x0800078000000900L,0x0000000000000080L});
+    public static final BitSet FOLLOW_71_in_rule1028 = new BitSet(new long[]{0x0800078000000900L});
+    public static final BitSet FOLLOW_normal_lhs_block_in_rule1039 = new BitSet(new long[]{0x0800000000000000L});
+    public static final BitSet FOLLOW_rhs_chunk_in_rule1049 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ATTRIBUTES_in_rule_attributes1069 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_71_in_rule_attributes1071 = new BitSet(new long[]{0x00000003FD680000L});
+    public static final BitSet FOLLOW_rule_attribute_in_rule_attributes1079 = new BitSet(new long[]{0x00000003FD681002L});
+    public static final BitSet FOLLOW_COMMA_in_rule_attributes1086 = new BitSet(new long[]{0x00000003FD680000L});
+    public static final BitSet FOLLOW_rule_attribute_in_rule_attributes1091 = new BitSet(new long[]{0x00000003FD681002L});
+    public static final BitSet FOLLOW_salience_in_rule_attribute1128 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_no_loop_in_rule_attribute1136 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_agenda_group_in_rule_attribute1145 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_duration_in_rule_attribute1154 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_activation_group_in_rule_attribute1163 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_auto_focus_in_rule_attribute1171 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_date_effective_in_rule_attribute1179 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_date_expires_in_rule_attribute1187 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_enabled_in_rule_attribute1195 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ruleflow_group_in_rule_attribute1203 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lock_on_active_in_rule_attribute1211 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_dialect_in_rule_attribute1218 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DATE_EFFECTIVE_in_date_effective1244 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_STRING_in_date_effective1246 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DATE_EXPIRES_in_date_expires1275 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_STRING_in_date_expires1277 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ENABLED_in_enabled1306 = new BitSet(new long[]{0x0000000000800000L});
+    public static final BitSet FOLLOW_BOOL_in_enabled1308 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_SALIENCE_in_salience1341 = new BitSet(new long[]{0x0000000002000800L});
+    public static final BitSet FOLLOW_INT_in_salience1352 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_paren_chunk_in_salience1367 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NO_LOOP_in_no_loop1398 = new BitSet(new long[]{0x0000000000800002L});
+    public static final BitSet FOLLOW_BOOL_in_no_loop1411 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_AUTO_FOCUS_in_auto_focus1446 = new BitSet(new long[]{0x0000000000800002L});
+    public static final BitSet FOLLOW_BOOL_in_auto_focus1459 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ACTIVATION_GROUP_in_activation_group1495 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_STRING_in_activation_group1497 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_RULEFLOW_GROUP_in_ruleflow_group1525 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_STRING_in_ruleflow_group1527 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_AGENDA_GROUP_in_agenda_group1555 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_STRING_in_agenda_group1557 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DURATION_in_duration1585 = new BitSet(new long[]{0x0000000002000000L});
+    public static final BitSet FOLLOW_INT_in_duration1587 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DIALECT_in_dialect1615 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_STRING_in_dialect1617 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LOCK_ON_ACTIVE_in_lock_on_active1649 = new BitSet(new long[]{0x0000000000800002L});
+    public static final BitSet FOLLOW_BOOL_in_lock_on_active1662 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lhs_in_normal_lhs_block1695 = new BitSet(new long[]{0x0000078000000902L});
+    public static final BitSet FOLLOW_lhs_or_in_lhs1732 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_or1757 = new BitSet(new long[]{0x0000000400000000L});
+    public static final BitSet FOLLOW_OR_in_lhs_or1759 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_and_in_lhs_or1770 = new BitSet(new long[]{0x0000078000002900L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_or1780 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lhs_and_in_lhs_or1798 = new BitSet(new long[]{0x0000000C00000002L});
+    public static final BitSet FOLLOW_set_in_lhs_or1806 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_and_in_lhs_or1822 = new BitSet(new long[]{0x0000000C00000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_and1853 = new BitSet(new long[]{0x0000001000000000L});
+    public static final BitSet FOLLOW_AND_in_lhs_and1855 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_unary_in_lhs_and1866 = new BitSet(new long[]{0x0000078000002900L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_and1876 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lhs_unary_in_lhs_and1894 = new BitSet(new long[]{0x0000003000000002L});
+    public static final BitSet FOLLOW_set_in_lhs_and1902 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_unary_in_lhs_and1918 = new BitSet(new long[]{0x0000003000000002L});
+    public static final BitSet FOLLOW_lhs_exist_in_lhs_unary1955 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_lhs_not_in_lhs_unary1965 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_lhs_eval_in_lhs_unary1975 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_lhs_pattern_in_lhs_unary1985 = new BitSet(new long[]{0x0000004000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_FROM_in_lhs_unary2003 = new BitSet(new long[]{0x085FF8408147C5F0L});
+    public static final BitSet FOLLOW_accumulate_statement_in_lhs_unary2063 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_collect_statement_in_lhs_unary2086 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_from_statement_in_lhs_unary2110 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_lhs_forall_in_lhs_unary2149 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_unary2158 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_or_in_lhs_unary2162 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_unary2164 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_lhs_unary2175 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EXISTS_in_lhs_exist2197 = new BitSet(new long[]{0x0000000000000900L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_exist2217 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_or_in_lhs_exist2221 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_exist2251 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lhs_pattern_in_lhs_exist2301 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NOT_in_lhs_not2353 = new BitSet(new long[]{0x0000000000000900L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_not2366 = new BitSet(new long[]{0x0000078000000900L});
+    public static final BitSet FOLLOW_lhs_or_in_lhs_not2370 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_not2401 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_lhs_pattern_in_lhs_not2438 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EVAL_in_lhs_eval2484 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_paren_chunk_in_lhs_eval2495 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FORALL_in_lhs_forall2522 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_forall2524 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_lhs_pattern_in_lhs_forall2528 = new BitSet(new long[]{0x0000000000001100L});
+    public static final BitSet FOLLOW_COMMA_in_lhs_forall2542 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_lhs_pattern_in_lhs_forall2548 = new BitSet(new long[]{0x0000000000003100L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_forall2561 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_fact_binding_in_lhs_pattern2594 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_fact_in_lhs_pattern2602 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_from_source_in_from_statement2629 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_identifier_in_from_source2658 = new BitSet(new long[]{0x0000000000000A02L});
+    public static final BitSet FOLLOW_paren_chunk_in_from_source2686 = new BitSet(new long[]{0x0000000000000202L});
+    public static final BitSet FOLLOW_expression_chain_in_from_source2700 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DOT_in_expression_chain2729 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_expression_chain2733 = new BitSet(new long[]{0x0200000000000A02L});
+    public static final BitSet FOLLOW_square_chunk_in_expression_chain2764 = new BitSet(new long[]{0x0000000000000202L});
+    public static final BitSet FOLLOW_paren_chunk_in_expression_chain2798 = new BitSet(new long[]{0x0000000000000202L});
+    public static final BitSet FOLLOW_expression_chain_in_expression_chain2819 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ACCUMULATE_in_accumulate_statement2858 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_accumulate_statement2868 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_lhs_pattern_in_accumulate_statement2872 = new BitSet(new long[]{0x0000100000001000L});
+    public static final BitSet FOLLOW_COMMA_in_accumulate_statement2874 = new BitSet(new long[]{0x0000100000000000L});
+    public static final BitSet FOLLOW_INIT_in_accumulate_statement2884 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_paren_chunk_in_accumulate_statement2895 = new BitSet(new long[]{0x0000200000001000L});
+    public static final BitSet FOLLOW_COMMA_in_accumulate_statement2898 = new BitSet(new long[]{0x0000200000000000L});
+    public static final BitSet FOLLOW_ACTION_in_accumulate_statement2907 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_paren_chunk_in_accumulate_statement2911 = new BitSet(new long[]{0x0000400000001000L});
+    public static final BitSet FOLLOW_COMMA_in_accumulate_statement2914 = new BitSet(new long[]{0x0000400000000000L});
+    public static final BitSet FOLLOW_RESULT_in_accumulate_statement2923 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_paren_chunk_in_accumulate_statement2927 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_accumulate_statement2937 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_COLLECT_in_collect_statement2978 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_collect_statement2988 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_lhs_pattern_in_collect_statement2992 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_collect_statement2994 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_fact_binding3026 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_71_in_fact_binding3028 = new BitSet(new long[]{0x0000000000000900L});
+    public static final BitSet FOLLOW_fact_in_fact_binding3042 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_fact_binding3058 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_fact_in_fact_binding3062 = new BitSet(new long[]{0x0000000C00002000L});
+    public static final BitSet FOLLOW_set_in_fact_binding3075 = new BitSet(new long[]{0x0000000000000100L});
+    public static final BitSet FOLLOW_fact_in_fact_binding3087 = new BitSet(new long[]{0x0000000C00002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact_binding3105 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_qualified_id_in_fact3160 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_fact3172 = new BitSet(new long[]{0x085F72408147EDF0L});
+    public static final BitSet FOLLOW_constraints_in_fact3186 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact3197 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_constraint_in_constraints3217 = new BitSet(new long[]{0x0000000000001002L});
+    public static final BitSet FOLLOW_COMMA_in_constraints3224 = new BitSet(new long[]{0x085F72408147CDF0L});
+    public static final BitSet FOLLOW_constraint_in_constraints3233 = new BitSet(new long[]{0x0000000000001002L});
+    public static final BitSet FOLLOW_or_constr_in_constraint3266 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_constr_in_or_constr3289 = new BitSet(new long[]{0x0000000800000002L});
+    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_constr3297 = new BitSet(new long[]{0x085F72408147CDF0L});
+    public static final BitSet FOLLOW_and_constr_in_or_constr3306 = new BitSet(new long[]{0x0000000800000002L});
+    public static final BitSet FOLLOW_unary_constr_in_and_constr3338 = new BitSet(new long[]{0x0000002000000002L});
+    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_constr3346 = new BitSet(new long[]{0x085F72408147CDF0L});
+    public static final BitSet FOLLOW_unary_constr_in_and_constr3355 = new BitSet(new long[]{0x0000002000000002L});
+    public static final BitSet FOLLOW_field_constraint_in_unary_constr3383 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_unary_constr3391 = new BitSet(new long[]{0x085F72408147CDF0L});
+    public static final BitSet FOLLOW_or_constr_in_unary_constr3393 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_unary_constr3396 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EVAL_in_unary_constr3402 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_predicate_in_unary_constr3404 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_field_constraint3434 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_71_in_field_constraint3436 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_field_constraint3457 = new BitSet(new long[]{0x001F010000000802L,0x000000000000FE00L});
+    public static final BitSet FOLLOW_or_restr_connective_in_field_constraint3471 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_73_in_field_constraint3486 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_predicate_in_field_constraint3488 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective3517 = new BitSet(new long[]{0x0000000800000002L});
+    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_restr_connective3536 = new BitSet(new long[]{0x001F010000000800L,0x000000000000FC00L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective3548 = new BitSet(new long[]{0x0000000800000002L});
+    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective3580 = new BitSet(new long[]{0x0000002000000002L});
+    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_restr_connective3601 = new BitSet(new long[]{0x001F010000000800L,0x000000000000FC00L});
+    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective3612 = new BitSet(new long[]{0x0000002000000002L});
+    public static final BitSet FOLLOW_compound_operator_in_constraint_expression3648 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_simple_operator_in_constraint_expression3655 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_constraint_expression3662 = new BitSet(new long[]{0x001F010000000800L,0x000000000000FC00L});
+    public static final BitSet FOLLOW_or_restr_connective_in_constraint_expression3671 = new BitSet(new long[]{0x0000000000002000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_constraint_expression3677 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_74_in_simple_operator3708 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_75_in_simple_operator3716 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_76_in_simple_operator3724 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_77_in_simple_operator3732 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_78_in_simple_operator3740 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_79_in_simple_operator3748 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_CONTAINS_in_simple_operator3756 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_NOT_in_simple_operator3764 = new BitSet(new long[]{0x0001000000000000L});
+    public static final BitSet FOLLOW_CONTAINS_in_simple_operator3768 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_EXCLUDES_in_simple_operator3776 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_MATCHES_in_simple_operator3784 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_NOT_in_simple_operator3792 = new BitSet(new long[]{0x0004000000000000L});
+    public static final BitSet FOLLOW_MATCHES_in_simple_operator3796 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_MEMBEROF_in_simple_operator3804 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_NOT_in_simple_operator3812 = new BitSet(new long[]{0x0008000000000000L});
+    public static final BitSet FOLLOW_MEMBEROF_in_simple_operator3816 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_expression_value_in_simple_operator3830 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_IN_in_compound_operator3857 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_NOT_in_compound_operator3869 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_IN_in_compound_operator3871 = new BitSet(new long[]{0x0000000000000800L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_compound_operator3886 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_expression_value_in_compound_operator3890 = new BitSet(new long[]{0x0000000000003000L});
+    public static final BitSet FOLLOW_COMMA_in_compound_operator3897 = new BitSet(new long[]{0x0060000002900900L});
+    public static final BitSet FOLLOW_expression_value_in_compound_operator3901 = new BitSet(new long[]{0x0000000000003000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_compound_operator3910 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_expression_value3938 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_enum_constraint_in_expression_value3951 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_constraint_in_expression_value3971 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_retval_constraint_in_expression_value3985 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_literal_constraint4028 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_literal_constraint4039 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_literal_constraint4052 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_literal_constraint4063 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_literal_constraint4075 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_enum_constraint4108 = new BitSet(new long[]{0x0000000000000200L});
+    public static final BitSet FOLLOW_DOT_in_enum_constraint4114 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_enum_constraint4118 = new BitSet(new long[]{0x0000000000000202L});
+    public static final BitSet FOLLOW_paren_chunk_in_predicate4160 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_curly_chunk4199 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_set_in_curly_chunk4215 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_curly_chunk_in_curly_chunk4239 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_curly_chunk4276 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_paren_chunk4337 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_set_in_paren_chunk4353 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_paren_chunk_in_paren_chunk4377 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_paren_chunk4414 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_square_chunk4478 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_set_in_square_chunk4494 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_square_chunk_in_square_chunk4518 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_square_chunk4555 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_paren_chunk_in_retval_constraint4600 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_qualified_id4628 = new BitSet(new long[]{0x0200000000000202L});
+    public static final BitSet FOLLOW_DOT_in_qualified_id4639 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_qualified_id4643 = new BitSet(new long[]{0x0200000000000202L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_qualified_id4665 = new BitSet(new long[]{0x0400000000000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_qualified_id4669 = new BitSet(new long[]{0x0200000000000002L});
+    public static final BitSet FOLLOW_identifier_in_dotted_name4710 = new BitSet(new long[]{0x0200000000000202L});
+    public static final BitSet FOLLOW_DOT_in_dotted_name4721 = new BitSet(new long[]{0x085F70408147C5F0L});
+    public static final BitSet FOLLOW_identifier_in_dotted_name4725 = new BitSet(new long[]{0x0200000000000202L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_dotted_name4747 = new BitSet(new long[]{0x0400000000000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_dotted_name4751 = new BitSet(new long[]{0x0200000000000002L});
+    public static final BitSet FOLLOW_THEN_in_rhs_chunk4803 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_set_in_rhs_chunk4819 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x000000000000FFFFL});
+    public static final BitSet FOLLOW_END_in_rhs_chunk4856 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
+    public static final BitSet FOLLOW_opt_semicolon_in_rhs_chunk4858 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_name4892 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_name4900 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_set_in_identifier0 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred12756 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_synpred22790 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DOUBLE_PIPE_in_synpred33536 = new BitSet(new long[]{0x001F010000000800L,0x000000000000FC00L});
+    public static final BitSet FOLLOW_and_restr_connective_in_synpred33548 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_DOUBLE_AMPER_in_synpred43601 = new BitSet(new long[]{0x001F010000000800L,0x000000000000FC00L});
+    public static final BitSet FOLLOW_constraint_expression_in_synpred43612 = new BitSet(new long[]{0x0000000000000002L});
 
 }
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g	2007-06-05 20:37:17 UTC (rev 12343)
@@ -1,1972 +1,1949 @@
-grammar DRL; 
-options {backtrack=true;}
-
- at parser::header {
-	package org.drools.lang;
-	import java.util.List;
-	import java.util.ArrayList;
-	import java.util.Iterator;
-	import java.util.HashMap;	
-	import java.util.StringTokenizer;
-	import org.drools.lang.descr.*;
-	import org.drools.compiler.SwitchingCommonTokenStream;
-}
-
- at parser::members {
-	private PackageDescr packageDescr;
-	private List errors = new ArrayList();
-	private String source = "unknown";
-	private int lineOffset = 0;
-	private DescrFactory factory = new DescrFactory();
-	private boolean parserDebug = false;
-	private Location location = new Location( Location.LOCATION_UNKNOWN );
-	
-	// THE FOLLOWING LINES ARE DUMMY ATTRIBUTES TO WORK AROUND AN ANTLR BUG
-	private BaseDescr from = null;
-	private FieldConstraintDescr fc = null;
-	private RestrictionConnectiveDescr and = null;
-	private RestrictionConnectiveDescr or = null;
-	private ConditionalElementDescr base = null;
-	
-	public void setParserDebug(boolean parserDebug) {
-		this.parserDebug = parserDebug;
-	}
-	
-	public void debug(String message) {
-		if ( parserDebug ) 
-			System.err.println( "drl parser: " + message );
-	}
-	
-	public void setSource(String source) {
-		this.source = source;
-	}
-	public DescrFactory getFactory() {
-		return factory;
-	}	
-
-	public String getSource() {
-		return this.source;
-	}
-	
-	public PackageDescr getPackageDescr() {
-		return packageDescr;
-	}
-	
-	private int offset(int line) {
-		return line + lineOffset;
-	}
-	
-	/**
-	 * This will set the offset to record when reparsing. Normally is zero of course 
-	 */
-	public void setLineOffset(int i) {
-	 	this.lineOffset = i;
-	}
-	
-	private String getString(Token token) {
-		String orig = token.getText();
-		return orig.substring( 1, orig.length() -1 );
-	}
-	
-	public void reportError(RecognitionException ex) {
-	        // if we've already reported an error and have not matched a token
-                // yet successfully, don't report any errors.
-                if ( errorRecovery ) {
-                        return;
-                }
-                errorRecovery = true;
-
-		ex.line = offset(ex.line); //add the offset if there is one
-		errors.add( ex ); 
-	}
-     	
-     	/** return the raw RecognitionException errors */
-     	public List getErrors() {
-     		return errors;
-     	}
-     	
-     	/** Return a list of pretty strings summarising the errors */
-     	public List getErrorMessages() {
-     		List messages = new ArrayList();
- 		for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
-     	     		messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
-     	     	}
-     	     	return messages;
-     	}
-     	
-     	/** return true if any parser errors were accumulated */
-     	public boolean hasErrors() {
-  		return ! errors.isEmpty();
-     	}
-     	
-     	/** This will take a RecognitionException, and create a sensible error message out of it */
-     	public String createErrorMessage(RecognitionException e)
-        {
-		StringBuffer message = new StringBuffer();		
-                message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
-                if ( e instanceof MismatchedTokenException ) {
-                        MismatchedTokenException mte = (MismatchedTokenException)e;
-                        message.append("mismatched token: "+
-                                                           e.token+
-                                                           "; expecting type "+
-                                                           tokenNames[mte.expecting]);
-                }
-                else if ( e instanceof MismatchedTreeNodeException ) {
-                        MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
-                        message.append("mismatched tree node: "+
-                                                           mtne.toString() +
-                                                           "; expecting type "+
-                                                           tokenNames[mtne.expecting]);
-                }
-                else if ( e instanceof NoViableAltException ) {
-                        NoViableAltException nvae = (NoViableAltException)e;
-			message.append( "Unexpected token '" + e.token.getText() + "'" );
-                        /*
-                        message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
-                                                           " state "+nvae.stateNumber+
-                                                           " (decision="+nvae.decisionNumber+
-                                                           ") no viable alt; token="+
-                                                           e.token);
-                                                           */
-                }
-                else if ( e instanceof EarlyExitException ) {
-                        EarlyExitException eee = (EarlyExitException)e;
-                        message.append("required (...)+ loop (decision="+
-                                                           eee.decisionNumber+
-                                                           ") did not match anything; token="+
-                                                           e.token);
-                }
-                else if ( e instanceof MismatchedSetException ) {
-                        MismatchedSetException mse = (MismatchedSetException)e;
-                        message.append("mismatched token '"+
-                                                           e.token+
-                                                           "' expecting set "+mse.expecting);
-                }
-                else if ( e instanceof MismatchedNotSetException ) {
-                        MismatchedNotSetException mse = (MismatchedNotSetException)e;
-                        message.append("mismatched token '"+
-                                                           e.token+
-                                                           "' expecting set "+mse.expecting);
-                }
-                else if ( e instanceof FailedPredicateException ) {
-                        FailedPredicateException fpe = (FailedPredicateException)e;
-                        message.append("rule "+fpe.ruleName+" failed predicate: {"+
-                                                           fpe.predicateText+"}?");
-                } else if (e instanceof GeneralParseException) {
-			message.append(" " + e.getMessage());
-		}
-               	return message.toString();
-        }   
-        
-        void checkTrailingSemicolon(String text, int line) {
-        	if (text.trim().endsWith( ";" ) ) {
-        		this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
-        	}
-        }
-        
-        public Location getLocation() {
-                return this.location;
-        }
-      
-}
-
- at lexer::header {
-	package org.drools.lang;
-}
-
-opt_semicolon
-	: ';'?
-	;
-
-compilation_unit
-	@init {
-		// reset Location information
-		this.location = new Location( Location.LOCATION_UNKNOWN );
-	}
-	:	prolog 
-		( statement )+
-	;
-	
-prolog
-	@init {
-		String packageName = "";
-	}
-	:	( n=package_statement { packageName = n; } )?
-		{ 
-			this.packageDescr = factory.createPackage( packageName ); 
-		}
-			(ATTRIBUTES ':')?
-			(	','? a=rule_attribute
-				{
-					this.packageDescr.addAttribute( a );
-				}
-			)*		
-	;
-	
-statement
-	:
-	(	function_import_statement 
-	|	import_statement 
-	|	global 
-	|	function 
-	|       t=template {this.packageDescr.addFactTemplate( t ); }
-	|	r=rule { if( r != null ) this.packageDescr.addRule( r ); }			
-	|	q=query	{ if( q != null ) this.packageDescr.addRule( q ); }
-	) 
-	;
-
-package_statement returns [String packageName]
-	@init{
-		packageName = null;
-	}
-	:	
-		PACKAGE n=dotted_name[null] opt_semicolon
-		{
-			packageName = n;
-		}
-	;
-	
-
-import_statement
-        @init {
-        	ImportDescr importDecl = null;
-        }
-	:	imp=IMPORT 
-	        {
-	            importDecl = factory.createImport( );
-	            importDecl.setStartCharacter( ((CommonToken)imp).getStartIndex() );
-		    if (packageDescr != null) {
-			packageDescr.addImport( importDecl );
-		    }
-	        }
-	        import_name[importDecl] opt_semicolon
-	;
-
-function_import_statement
-        @init {
-        	FunctionImportDescr importDecl = null;
-        }
-	:	imp=IMPORT FUNCTION 
-	        {
-	            importDecl = factory.createFunctionImport();
-	            importDecl.setStartCharacter( ((CommonToken)imp).getStartIndex() );
-		    if (packageDescr != null) {
-			packageDescr.addFunctionImport( importDecl );
-		    }
-	        }
-	        import_name[importDecl] opt_semicolon
-	;
-
-
-import_name[ImportDescr importDecl] returns [String name]
-	@init {
-		name = null;
-	}
-	:	
-		id=identifier 
-		{ 
-		    name=id.getText(); 
-		    importDecl.setTarget( name );
-		    importDecl.setEndCharacter( ((CommonToken)id).getStopIndex() );
-		} 
-		( '.' id=identifier 
-		    { 
-		        name = name + "." + id.getText(); 
-			importDecl.setTarget( name );
-		        importDecl.setEndCharacter( ((CommonToken)id).getStopIndex() );
-		    } 
-		)* 
-		( star='.*' 
-		    { 
-		        name = name + star.getText(); 
-			importDecl.setTarget( name );
-		        importDecl.setEndCharacter( ((CommonToken)star).getStopIndex() );
-		    }
-		)?
-	;
-
-
-global
-	@init {
-	    GlobalDescr global = null;
-	}
-	:
-		loc=GLOBAL 
-		{
-		    global = factory.createGlobal();
-	            global.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-		    packageDescr.addGlobal( global );
-		}
-		type=dotted_name[null] 
-		{
-		    global.setType( type );
-		}
-		id=identifier opt_semicolon
-		{
-		    global.setIdentifier( id.getText() );
-		    global.setEndCharacter( ((CommonToken)id).getStopIndex() );
-		}
-	;
-	
-
-function
-	@init {
-		FunctionDescr f = null;
-	}
-	:
-		loc=FUNCTION (retType=dotted_name[null])? n=identifier
-		{
-			//System.err.println( "function :: " + n.getText() );
-			f = factory.createFunction( n.getText(), retType );
-			f.setLocation(offset(loc.getLine()), loc.getCharPositionInLine());
-	        	f.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			packageDescr.addFunction( f );
-		} 
-		'('
-			(	(paramType=dotted_name[null])? paramName=argument
-				{
-					f.addParameter( paramType, paramName );
-				}
-				(	',' (paramType=dotted_name[null])? paramName=argument
-					{
-						f.addParameter( paramType, paramName );
-					}
-				)*
-			)?
-		')'
-		body=curly_chunk[f]
-		{
-			//strip out '{','}'
-			f.setText( body.substring( 1, body.length()-1 ) );
-		}
-	;
-
-
-
-query returns [QueryDescr query]
-	@init {
-		query = null;
-		AndDescr lhs = null;
-		List params = null;
-	}
-	:
-		loc=QUERY queryName=name
-		{ 
-			query = factory.createQuery( queryName ); 
-			query.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			query.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			lhs = new AndDescr(); query.setLhs( lhs ); 
-			lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-		}
-		(
-			LEFT_PAREN
-			(
-				{ params = new ArrayList(); }
-				
-				paramName=ID { params.add( paramName.getText() ); }				
-				(',' paramName=ID { params.add( paramName.getText() ); } )*
-								
-				{ query.setParameters( (String[]) params.toArray( new String[params.size()] ) ); }
-		    )?
-	    	RIGHT_PAREN
-	    )?
-		(
-			normal_lhs_block[lhs]
-		)
-					
-		loc=END
-		{
-			query.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		}
-	;
-
-
-template returns [FactTemplateDescr template]
-	@init {
-		template = null;		
-	}
-	:
-		loc=TEMPLATE templateName=identifier opt_semicolon
-		{
-			template = new FactTemplateDescr(templateName.getText());
-			template.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );			
-			template.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-		}
-		(
-			slot=template_slot 
-			{
-				template.addFieldTemplate(slot);
-			}
-		)+
-		loc=END opt_semicolon 
-		{
-			template.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		}		
-	;
-	
-template_slot returns [FieldTemplateDescr field]
-	@init {
-		field = null;
-	}
-	:
-	         {
-			field = factory.createFieldTemplate();
-	         }
-		 fieldType=dotted_name[field] 
-		 {
-		        field.setClassType( fieldType );
-		 }
-		 
-		 n=identifier opt_semicolon
-		 {
-		        field.setName( n.getText() );
-			field.setLocation( offset(n.getLine()), n.getCharPositionInLine() );
-			field.setEndCharacter( ((CommonToken)n).getStopIndex() );
-		 } 
-	;	
-	
-rule returns [RuleDescr rule]
-	@init {
-		rule = null;
-		String consequence = "";
-		AndDescr lhs = null;
-	}
-	:
-		loc=RULE ruleName=name 
-		{ 
-			location.setType( Location.LOCATION_RULE_HEADER );
-			debug( "start rule: " + ruleName );
-			rule = new RuleDescr( ruleName, null ); 
-			rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-		}
-		rule_attributes[rule]
-		(	loc=WHEN ':'?
-			{ 
-				this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-				lhs = new AndDescr(); rule.setLhs( lhs ); 
-				lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			}
-			(
-//				{ expander != null }? expander_lhs_block[lhs] |
-				normal_lhs_block[lhs]
-			)
-					
-		)?
-		rhs_chunk[rule]
-	;
-	
-
-
-rule_attributes[RuleDescr rule]
-	: 
-			(ATTRIBUTES ':')?
-			(	','? a=rule_attribute
-				{
-					rule.addAttribute( a );
-				}
-			)*
-	;
-
-
-	
-rule_attribute returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-			a=salience { d = a; }
-		|	a=no_loop  { d = a; }
-		|	a=agenda_group  { d = a; }		
-		|	a=duration  { d = a; }			
-		|	a=activation_group { d = a; }	
-		|	a=auto_focus { d = a; }	
-		|	a=date_effective {d = a; }
-		|	a=date_expires {d = a; }
-		|	a=enabled {d=a;}
-		|	a=ruleflow_group { d = a; }
-		|	a=lock_on_active{ d = a; }
-		|	a=dialect {d = a; }
-		
-	;
-	
-date_effective returns [AttributeDescr d]
-	@init {
-		d = null;
-	}	
-	:
-		loc=DATE_EFFECTIVE val=STRING  
-		{
-			d = new AttributeDescr( "date-effective", getString( val ) );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)val).getStopIndex() );
-		}
-
-	;
-
-date_expires returns [AttributeDescr d]
-	@init {
-		d = null;
-	}	
-	:
-		loc=DATE_EXPIRES val=STRING  
-		{
-			d = new AttributeDescr( "date-expires", getString( val ) );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)val).getStopIndex() );
-		}
-
-	;
-
-	
-enabled returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-			loc=ENABLED t=BOOL   
-			{
-				d = new AttributeDescr( "enabled", t.getText() );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-			}
-		
-		
-	;	
-	
-	
-
-salience returns [AttributeDescr d ]
-	@init {
-		d = null;
-	}
-	:	
-		loc=SALIENCE 
-		{
-			d = new AttributeDescr( "salience" );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-		}
-		( i=INT   
-		{
-			d.setValue( i.getText() );
-			d.setEndCharacter( ((CommonToken)i).getStopIndex() );
-		}
-		| txt=paren_chunk[d]
-		{
-			d.setValue( txt );
-		}
-		)
-	;
-	
-no_loop returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		(
-			loc=NO_LOOP   
-			{
-				d = new AttributeDescr( "no-loop", "true" );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-			}
-		) 
-		|
-		(
-			loc=NO_LOOP t=BOOL   
-			{
-				d = new AttributeDescr( "no-loop", t.getText() );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-			}
-		
-		)
-		
-	;
-	
-auto_focus returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		(
-			loc=AUTO_FOCUS   
-			{
-				d = new AttributeDescr( "auto-focus", "true" );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-			}
-		) 
-		|
-		(
-			loc=AUTO_FOCUS t=BOOL   
-			{
-				d = new AttributeDescr( "auto-focus", t.getText() );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-			}
-		
-		)
-		
-	;	
-	
-activation_group returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		loc=ACTIVATION_GROUP n=STRING   
-		{
-			d = new AttributeDescr( "activation-group", getString( n ) );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
-		}
-	;
-
-ruleflow_group returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		loc=RULEFLOW_GROUP n=STRING   
-		{
-			d = new AttributeDescr( "ruleflow-group", getString( n ) );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
-		}
-	;
-
-agenda_group returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		loc=AGENDA_GROUP n=STRING   
-		{
-			d = new AttributeDescr( "agenda-group", getString( n ) );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
-		}
-	;
-	
-
-duration returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		loc=DURATION i=INT 
-		{
-			d = new AttributeDescr( "duration", i.getText() );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)i).getStopIndex() );
-		}
-	;	
-	
-dialect returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		loc=DIALECT n=STRING   
-		{
-			d = new AttributeDescr( "dialect", getString( n ) );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			d.setEndCharacter( ((CommonToken)n).getStopIndex() );
-		}
-	;			
-
-
-	
-	
-	
-	
-lock_on_active returns [AttributeDescr d]
-	@init {
-		d = null;
-	}
-	:
-		(
-			loc=LOCK_ON_ACTIVE   
-			{
-				d = new AttributeDescr( "lock-on-active", "true" );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-			}
-		) 
-		|
-		(
-			loc=LOCK_ON_ACTIVE t=BOOL   
-			{
-				d = new AttributeDescr( "lock-on-active", t.getText() );
-				d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-				d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-				d.setEndCharacter( ((CommonToken)t).getStopIndex() );
-			}
-		
-		)
-		
-	;		
-
-normal_lhs_block[AndDescr descr]
-	:
-		(	d=lhs[descr]
-			{ if(d != null) descr.addDescr( d ); }
-		)*
-	;
-
-	
-lhs[ConditionalElementDescr ce] returns [BaseDescr d]
-	@init {
-		d=null;
-	}
-	:	l=lhs_or { d = l; } 
-	;
-
-	
-lhs_pattern returns [BaseDescr d]
-	@init {
-		d=null;
-	}
-	:	f=fact_binding	{ d = f; }
-	|	f=fact		{ d = f; }
-	;
-
-from_statement returns [FromDescr d]
-	@init {
-		d=factory.createFrom();
-	}
-	:
-	ds=from_source[d]
-		{
-			d.setDataSource(ds);
-		
-		}
-		
-		
-		
-	;
-	
-from_source[FromDescr from] returns [DeclarativeInvokerDescr ds]
-	@init {
-		ds = null;
-		AccessorDescr ad = null;
-	}
-	:	
-		ident=identifier
-		{
-			ad = new AccessorDescr(ident.getText());	
-			ad.setLocation( offset(ident.getLine()), ident.getCharPositionInLine() );
-			ad.setStartCharacter( ((CommonToken)ident).getStartIndex() );
-			ad.setEndCharacter( ((CommonToken)ident).getStopIndex() );
-			ds = ad;
-			location.setProperty(Location.LOCATION_FROM_CONTENT, ident.getText());
-		}
-		(args=paren_chunk[from]
-		{
-			if( args != null ) {
-				ad.setVariableName( null );
-				FunctionCallDescr fc = new FunctionCallDescr(ident.getText());
-				fc.setLocation( offset(ident.getLine()), ident.getCharPositionInLine() );			
-				fc.setArguments(args);
-				fc.setStartCharacter( ((CommonToken)ident).getStartIndex() );
-				fc.setEndCharacter( ((CommonToken)ident).getStopIndex() );
-				ad.addInvoker(fc);
-				location.setProperty(Location.LOCATION_FROM_CONTENT, args);
-			}
-		}
-		)?
-		expression_chain[from, ad]?
-		{
-			if( ad != null ) {
-				location.setProperty(Location.LOCATION_FROM_CONTENT, ad.toString() );
-			}
-		}
-	;	
-	
-expression_chain[FromDescr from, AccessorDescr as]
-	@init {
-  		FieldAccessDescr fa = null;
-	    	MethodAccessDescr ma = null;	
-	}
-	:
-	( '.' field=identifier  
-	    {
-	        fa = new FieldAccessDescr(field.getText());	
-		fa.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
-		fa.setStartCharacter( ((CommonToken)field).getStartIndex() );
-		fa.setEndCharacter( ((CommonToken)field).getStopIndex() );
-	    }
-	  (
-	    ( LEFT_SQUARE ) => sqarg=square_chunk[from]
-	      {
-	          fa.setArgument( sqarg );	
-	      }
-	    |
-	    ( LEFT_PAREN ) => paarg=paren_chunk[from]
-		{
-	    	  ma = new MethodAccessDescr( field.getText(), paarg );	
-		  ma.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
-		  ma.setStartCharacter( ((CommonToken)field).getStartIndex() );
-		}
-	  )?
-	  {
-	      if( ma != null ) {
-	          as.addInvoker( ma );
-	      } else {
-	          as.addInvoker( fa );
-	      }
-	  }
-	  expression_chain[from, as]?
-	)  
-	;	
-	
-accumulate_statement returns [AccumulateDescr d]
-	@init {
-		d = factory.createAccumulate();
-	}
-	:
-	        loc=ACCUMULATE 
-		{ 
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE );
-		}	
-		LEFT_PAREN pattern=lhs_pattern COMMA? 
-		{
-		        d.setSourcePattern( (PatternDescr)pattern );
-		}
-		INIT 
-		{
-			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_INIT );
-		}
-		text=paren_chunk[null] COMMA?
-		{
-			if( text != null ) {
-			        d.setInitCode( text.substring(1, text.length()-1) );
-				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_INIT_CONTENT, d.getInitCode());
-				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_ACTION );
-			}
-		}
-		ACTION text=paren_chunk[null] COMMA?
-		{
-			if( text != null ) {
-			        d.setActionCode( text.substring(1, text.length()-1) );
-	       			location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_ACTION_CONTENT, d.getActionCode());
-				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_RESULT );
-			}
-		}
-		RESULT text=paren_chunk[null] 
-		{
-			if( text != null ) {
-			        d.setResultCode( text.substring(1, text.length()-1) );
-				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_RESULT_CONTENT, d.getResultCode());
-			}
-		}
-		loc=RIGHT_PAREN
-		{
-			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-			d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		} 
-	; 		
- 		
-collect_statement returns [CollectDescr d]
-	@init {
-		d = factory.createCollect();
-	}
-	:
-	        loc=COLLECT 
-		{ 
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			location.setType( Location.LOCATION_LHS_FROM_COLLECT );
-		}	
-		LEFT_PAREN pattern=lhs_pattern loc=RIGHT_PAREN
-		{
-		        d.setSourcePattern( (PatternDescr)pattern );
-			d.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-		}
-	; 		
-
-fact_binding returns [BaseDescr d]
-	@init {
-		d=null;
-		boolean multi=false;
-	}
- 	:
- 		id=ID ':' 
- 		{
- 		        // handling incomplete parsing
- 		        d = new PatternDescr( );
- 		        ((PatternDescr) d).setIdentifier( id.getText() );
- 		}
- 		fe=fact_expression[id.getText()]
- 		{
- 		        // override previously instantiated pattern
- 			d=fe;
- 			if( d != null ) {
-   			    d.setStartCharacter( ((CommonToken)id).getStartIndex() );
-   			}
- 		}
-	;
- 
- fact_expression[String id] returns [BaseDescr pd]
- 	@init {
- 		pd = null;
- 		boolean multi = false;
- 	}
- 	:	LEFT_PAREN fe=fact_expression[id] RIGHT_PAREN { pd=fe; }
- 	| 	f=fact
- 		{
- 			((PatternDescr)f).setIdentifier( id );
- 			pd = f;
- 		}
- 		( (OR|DOUBLE_PIPE)
- 			{	if ( ! multi ) {
- 					BaseDescr first = pd;
- 					pd = new OrDescr();
- 					((OrDescr)pd).addDescr( first );
- 					multi=true;
- 				}
- 			}
- 			f=fact
- 			{
- 				((PatternDescr)f).setIdentifier( id );
- 				((OrDescr)pd).addDescr( f );
- 			}
- 		)*	
-	;
-
-fact returns [BaseDescr d] 
-	@init {
-		d=null;
-		PatternDescr pattern = null;
-	}
- 	:	
- 	        {
- 			pattern = new PatternDescr( );
- 			d = pattern; 
- 	        }
- 	        id=dotted_name[d] 
- 		{ 
- 		        pattern.setObjectType( id );
- 		        pattern.setEndCharacter( -1 );
- 		}
- 		loc=LEFT_PAREN {
-		                location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START );
-            			location.setProperty( Location.LOCATION_PROPERTY_CLASS_NAME, id );
- 				
- 				pattern.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- 			        pattern.setLeftParentCharacter( ((CommonToken)loc).getStartIndex() );
- 			} 
- 		( constraints[pattern]  )? 
- 		endLoc=RIGHT_PAREN
-		{
-		        if( endLoc.getType() == RIGHT_PAREN ) {
-				this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-				pattern.setEndLocation( offset(endLoc.getLine()), endLoc.getCharPositionInLine() );	
-				pattern.setEndCharacter( ((CommonToken)endLoc).getStopIndex() );
- 			        pattern.setRightParentCharacter( ((CommonToken)endLoc).getStartIndex() );
-			}
- 		}
- 	;
-	
-	
-constraints[PatternDescr pattern]
-	:	constraint[pattern]
-		( ',' { location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START ); } 
-		  constraint[pattern] 
-		)* 
-	;
-	
-constraint[PatternDescr pattern]
-	@init {
-		ConditionalElementDescr top = null;
-	}
-	:
-		{
-			top = pattern.getConstraint();
-		}
-		or_constr[top]
-	;	
-	
-or_constr[ConditionalElementDescr base]
-	@init {
-		OrDescr or = new OrDescr();
-	}
-	:
-		and_constr[or] 
-		( t=DOUBLE_PIPE 
-			{
-				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
-			}
-		and_constr[or] 
-		)*
-		{
-		        if( or.getDescrs().size() == 1 ) {
-		                base.addOrMerge( (BaseDescr) or.getDescrs().get(0) );
-		        } else if ( or.getDescrs().size() > 1 ) {
-		        	base.addDescr( or );
-		        }
-		}
-	;
-	
-and_constr[ConditionalElementDescr base]
-	@init {
-		AndDescr and = new AndDescr();
-	}
-	:
-		unary_constr[and] 
-		( t=DOUBLE_AMPER 
-			{
-				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
-			}
-		unary_constr[and] 
-		)*
-		{
-		        if( and.getDescrs().size() == 1) {
-		                base.addOrMerge( (BaseDescr) and.getDescrs().get(0) );
-		        } else if( and.getDescrs().size() > 1) {
-		        	base.addDescr( and );
-		        }
-		}
-	;
-	
-unary_constr[ConditionalElementDescr base]
-	:
-		( field_constraint[base] 
-		| LEFT_PAREN or_constr[base] RIGHT_PAREN
-		| EVAL predicate[base]
-		)
-	;	
-		
-field_constraint[ConditionalElementDescr base]
-	@init {
-		FieldBindingDescr fbd = null;
-		FieldConstraintDescr fc = null;
-		RestrictionConnectiveDescr top = null;
-	}
-	:
-		( fb=ID ':' 
-		    { 
-			fbd = new FieldBindingDescr();
-			fbd.setIdentifier( fb.getText() );
-			fbd.setLocation( offset(fb.getLine()), fb.getCharPositionInLine() );
-			fbd.setStartCharacter( ((CommonToken)fb).getStartIndex() );
-			base.addDescr( fbd );
-
-		    }
-		)? 
-		f=identifier	
-		{
-		    if( f != null ) {
-			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
-			location.setProperty(Location.LOCATION_PROPERTY_PROPERTY_NAME, f.getText());
-		    
-			if ( fbd != null ) {
-			    fbd.setFieldName( f.getText() );
- 			    fbd.setEndCharacter( ((CommonToken)f).getStopIndex() );
-			} 
-			fc = new FieldConstraintDescr(f.getText());
-			fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
-			fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
-			top = fc.getRestriction();
-			
-			// it must be a field constraint, as it is not a binding
-			if( fb == null ) {
-			    base.addDescr( fc );
-			}
-		    }
-		}
-		(
-			or_restr_connective[top]
-			{
-				// we must add now as we didn't before
-				if( fb != null) {
-				    base.addDescr( fc );
-				}
-			}
-		|
-			'->' predicate[base] 
-		)?
-	;
-	
-
-or_restr_connective[ RestrictionConnectiveDescr base ]
-	@init {
-		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
-	}
-	:
-		and_restr_connective[or] 
-		( t=DOUBLE_PIPE 
-			{
-				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
-			}
-		  and_restr_connective[or] 
-		)*
-		{
-		        if( or.getRestrictions().size() == 1 ) {
-		                base.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
-		        } else if ( or.getRestrictions().size() > 1 ) {
-		        	base.addRestriction( or );
-		        }
-		}
-	;	
-
-	
-and_restr_connective[ RestrictionConnectiveDescr base ]
-	@init {
-		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
-	}
-	:
-		constraint_expression[and] 
-		( t=DOUBLE_AMPER 
-			{
-				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
-			}
-		constraint_expression[and] 
-		)*
-		{
-		        if( and.getRestrictions().size() == 1) {
-		                base.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
-		        } else if ( and.getRestrictions().size() > 1 ) {
-		        	base.addRestriction( and );
-		        }
-		}
-	;
-
-constraint_expression[RestrictionConnectiveDescr base]
-        :	
-		( compound_operator[base]
-		| simple_operator[base]
-		| LEFT_PAREN 
-		{
-			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
-		}
-		or_restr_connective[base] 
-		RIGHT_PAREN
- 		)
-	;	
-	
-simple_operator[RestrictionConnectiveDescr base]
-	@init {
-		String op = null;
-	}
-	:
-		(	t='=='
-		|	t='>'
-		|	t='>='
-		|	t='<'
-		|	t='<='
-		|	t='!='
-		|	t=CONTAINS
-		|	n=NOT t=CONTAINS
-		|	t=EXCLUDES
-		|	t=MATCHES
-		|	n=NOT t=MATCHES
-		|	t=MEMBEROF
-		|	n=NOT t=MEMBEROF
-		)
-		{
-  		    location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
-                    location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, t.getText());
-		    if( n != null ) {
-		        op = "not "+t.getText();
-		    } else {
-		        op = t.getText();
-		    }
-		}
-		rd=expression_value[op]
-		{
-			    if( rd != null ) {
-				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
-			        base.addRestriction( rd );
-			    } else if ( rd == null && op != null ) {
-			        base.addRestriction( new LiteralRestrictionDescr(op, null) );
-			    }
-		}
-	;	
-	
-compound_operator[RestrictionConnectiveDescr base]
-	@init {
-		String op = null;
-		RestrictionConnectiveDescr group = null;
-	}
-	:
-		( IN 
-			{
-			  op = "==";
-			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
-			  base.addRestriction( group );
-  		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
-                    	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
-			}
-		| NOT IN 
-			{
-			  op = "!=";
-			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
-			  base.addRestriction( group );
-  		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
-                    	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
-			}	
-		)
-		LEFT_PAREN rd=expression_value[op]
-			{
-			    if( rd != null ) {
-			        group.addRestriction( rd );
-			    }
-			}
-		( COMMA rd=expression_value[op]
-			{
-			    if( rd != null ) {
-		        	group.addRestriction( rd );
-			    }
-			}
-		)* 
-		RIGHT_PAREN 
-		{
-			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
-		}
-	;
-	
-expression_value[String op] returns [RestrictionDescr rd]
-	:
-		(	bvc=ID
-			{
-				rd = new VariableRestrictionDescr(op, bvc.getText());
-			}
-		|	lc=enum_constraint 
-			{ 
-				rd  = new QualifiedIdentifierRestrictionDescr(op, lc);
-			}						
-		|	lc=literal_constraint 
-			{ 
-				rd  = new LiteralRestrictionDescr(op, lc);
-			}
-		|	rvc=retval_constraint 
-			{ 
-				rd = new ReturnValueRestrictionDescr(op, rvc);							
-			} 
-		)	
-		{
-			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
-		}
-	;	
-	
-literal_constraint returns [String text]
-	@init {
-		text = null;
-	}
-	:	(	t=STRING { text = getString( t ); } 
-		|	t=INT    { text = t.getText(); }
-		|	t=FLOAT	 { text = t.getText(); }
-		|	t=BOOL 	 { text = t.getText(); }
-		|	t=NULL   { text = null; }
-		)
-	;
-	
-enum_constraint returns [String text]
-	@init {
-		text = null;
-	}
-	:	
-		id=ID { text=id.getText(); } ( '.' ident=identifier { text += "." + ident.getText(); } )+ 
-	;	
-	
-
-predicate[ConditionalElementDescr base]
-        @init {
-		PredicateDescr d = null;
-        }
-	:
-		{
-			d = new PredicateDescr( );
-		}
-		text=paren_chunk[d]
-		{
-		        if( text != null ) {
-			        String body = text.substring(1, text.length()-1);
-			        d.setContent( body );
-				base.addDescr( d );
-		        }
-		}
-	;
-
-paren_chunk[BaseDescr descr] returns [String text]
-        @init {
-           StringBuffer buf = null;
-           Integer channel = null;
-        }
-	:
-	        {
-	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-		    buf = new StringBuffer();
-	        }
-		loc=LEFT_PAREN 
-		{
-		    buf.append( loc.getText());
-		} 
-		( 
-			~(LEFT_PAREN|RIGHT_PAREN)
-			  {
-			    buf.append( input.LT(-1).getText() );
-			  }
-			|
-			chunk=paren_chunk[null]
-			  {
-			    buf.append( chunk );
-			  }
-		)*
-		{
-		    if( channel != null ) {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-		    } else {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-		    }
-		}
-                loc=RIGHT_PAREN
-                {
-                    buf.append( loc.getText() );
-		    text = buf.toString();
-		    if( descr != null ) {
-		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		    }
-                }
-	;
-
-curly_chunk[BaseDescr descr] returns [String text]
-        @init {
-           StringBuffer buf = null;
-           Integer channel = null;
-        }
-	:
-		loc=LEFT_CURLY 
-		{
-	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-		    buf = new StringBuffer();
-		    
-		    buf.append( loc.getText() );
-		} 
-		( 
-			~(LEFT_CURLY|RIGHT_CURLY)
-			  {
-			    buf.append( input.LT(-1).getText() );
-			  }
-			|
-			chunk=curly_chunk[descr]
-			  {
-			    buf.append( chunk );
-			  }
-		)*
-		{
-		    if( channel != null ) {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-		    } else {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-		    }
-		}
-                loc=RIGHT_CURLY
-                {
-                    buf.append( loc.getText() );
-		    text = buf.toString();
-		    if( descr != null ) {
-		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		    }
-                }
-	;
-
-square_chunk[BaseDescr descr]  returns [String text]
-        @init {
-           StringBuffer buf = null;
-           Integer channel = null;
-        }
-	:
-	        {
-	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-		    buf = new StringBuffer();
-	        }
-		loc=LEFT_SQUARE 
-		{
-		    buf.append( loc.getText());
- 
-		} 
-		( 
-			~(LEFT_SQUARE|RIGHT_SQUARE)
-			  {
-			    buf.append( input.LT(-1).getText() );
-			  }
-			|
-			chunk=square_chunk[null]
-			  {
-			    buf.append( chunk );
-			  }
-		)*
-		{
-		    if( channel != null ) {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-		    } else {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-		    }
-		}
-                loc=RIGHT_SQUARE
-                {
-                    buf.append( loc.getText() );
-		    text = buf.toString();
-		    if( descr != null ) {
-		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		    }
-                }
-	;
-	
-retval_constraint returns [String text]
-	@init {
-		text = null;
-	}
-	:	
-		c=paren_chunk[null] { text = c.substring(1, c.length()-1); }
-	;
-
-lhs_or returns [BaseDescr d]
-	@init{
-		d = null;
-		OrDescr or = null;
-	}
-	:	
-		left=lhs_and {d = left; }
-		( (OR|'||')
-			{
-				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
-			}
-			right=lhs_and 
-			{
-				if ( or == null ) {
-					or = new OrDescr();
-					or.addDescr( left );
-					d = or;
-				}
-				
-				or.addDescr( right );
-			}
-		)*
-	;
-	
-lhs_and returns [BaseDescr d]
-	@init{
-		d = null;
-		AndDescr and = null;
-	}
-	:
-		left=lhs_unary { d = left; }
-		( (AND|DOUBLE_AMPER)
-			{
-				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
-			}
-			right=lhs_unary
-			{
-				if ( and == null ) {
-					and = new AndDescr();
-					and.addDescr( left );
-					d = and;
-				}
-				
-				and.addDescr( right );
-			}
-		)* 
-	;
-	
-lhs_unary returns [BaseDescr d]
-	@init {
-		d = null;
-	}
-	:	(	u=lhs_exist
-		|	u=lhs_not
-		|	u=lhs_eval
-		|	u=lhs_pattern (
-		          FROM 
-		          {
-				location.setType(Location.LOCATION_LHS_FROM);
-				location.setProperty(Location.LOCATION_FROM_CONTENT, "");
-		          }
-		          (
-		           ( ACCUMULATE ) => (ac=accumulate_statement {ac.setResultPattern((PatternDescr) u); u=ac; })
-		          |( COLLECT ) => (cs=collect_statement {cs.setResultPattern((PatternDescr) u); u=cs; }) 
-		          |( ~(ACCUMULATE|COLLECT) ) => (fm=from_statement {fm.setPattern((PatternDescr) u); u=fm; }) 
-		          )
-		        )?
-		|	u=lhs_forall  
-		|	'(' u=lhs_or ')'
-		) { d = u; }
-		opt_semicolon
-	;
-	
-lhs_exist returns [BaseDescr d]
-	@init {
-		d = null;
-	}
-	:	loc=EXISTS 
-		{
-			d = new ExistsDescr( ); 
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS );
-		}
-	        ( ( '(' pattern=lhs_or 
-	           	{ if ( pattern != null ) ((ExistsDescr)d).addDescr( pattern ); }
-	           end=')' 
-	                { if ( end != null ) d.setEndCharacter( ((CommonToken)end).getStopIndex() ); }
-	        )    
-	        | pattern=lhs_pattern
-	                {
-	                	if ( pattern != null ) {
-	                		((ExistsDescr)d).addDescr( pattern );
-	                		d.setEndCharacter( pattern.getEndCharacter() );
-	                	}
-	                }
-	        )
-	;
-	
-lhs_not	returns [NotDescr d]
-	@init {
-		d = null;
-	}
-	:	loc=NOT 
-		{
-			d = new NotDescr( ); 
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-			d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_NOT );
-		}
-		( ( '(' pattern=lhs_or  
-	           	{ if ( pattern != null ) d.addDescr( pattern ); }
-	           end=')' 
-	                { if ( end != null ) d.setEndCharacter( ((CommonToken)end).getStopIndex() ); }
-		  )
-		| 
-		pattern=lhs_pattern
-	                {
-	                	if ( pattern != null ) {
-	                		d.addDescr( pattern );
-	                		d.setEndCharacter( pattern.getEndCharacter() );
-	                	}
-	                }
-		)
-	;
-
-lhs_eval returns [BaseDescr d]
-	@init {
-		d = new EvalDescr( );
-	}
-	:
-		loc=EVAL 
-		{
-			location.setType( Location.LOCATION_LHS_INSIDE_EVAL );
-		}
-		c=paren_chunk[d]
-		{ 
-			if ( loc != null ) d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-		        if( c != null ) {
-	  		    this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
-		            String body = c.length() > 1 ? c.substring(1, c.length()-1) : "";
-			    checkTrailingSemicolon( body, offset(loc.getLine()) );
-			    ((EvalDescr) d).setContent( body );
-			    location.setProperty(Location.LOCATION_EVAL_CONTENT, body);
-			}
-		}
-	;
-	
-lhs_forall returns [ForallDescr d]
-	@init {
-		d = factory.createForall();
-	}
-	:	loc=FORALL '(' base=lhs_pattern   
-		{
-			if ( loc != null ) d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-		        // adding the base pattern
-		        d.addDescr( base );
-			d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
-		}
-		( (',')? pattern=lhs_pattern
-		{
-		        // adding additional patterns
-			d.addDescr( pattern );
-		}
-		)+
-		end=')'
-		{
-		        if ( end != null ) d.setEndCharacter( ((CommonToken)end).getStopIndex() );
-		}
-	;
-
-dotted_name[BaseDescr descr] returns [String name]
-	@init {
-		name = null;
-	}
-	:	
-		id=ID 
-		{ 
-		    name=id.getText(); 
-		    if( descr != null ) {
-			descr.setStartCharacter( ((CommonToken)id).getStartIndex() );
-			descr.setEndCharacter( ((CommonToken)id).getStopIndex() );
-		    }
-		} 
-		( '.' ident=identifier 
-		    { 
-		        name = name + "." + ident.getText(); 
-    		        if( descr != null ) {
-			    descr.setEndCharacter( ((CommonToken)ident).getStopIndex() );
-		        }
-		    } 
-		)* 
-		( '[' loc=']'
-		    { 
-		        name = name + "[]";
-    		        if( descr != null ) {
-			    descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
-		        }
-		    }
-		)*
-	;
-	
-argument returns [String name]
-	@init {
-		name = null;
-	}
-	:
-		id=identifier { name=id.getText(); } ( '[' ']' { name = name + "[]";})*
-	;
-
-rhs_chunk[RuleDescr rule]
-        @init {
-           StringBuffer buf = null;
-           Integer channel = null;
-        }
-	:
-	        {
-	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
-		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
-		    buf = new StringBuffer();
-	        }
-		start=THEN
-		{
-			location.setType( Location.LOCATION_RHS );
-		}
-		( 
-			  ~END
-			  {
-			    buf.append( input.LT(-1).getText() );
-			  }
-		)*
-		{
-		    if( channel != null ) {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
-		    } else {
-			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
-		    }
-		}
-                loc=END
-                {
-                    // ignoring first line in the consequence
-                    int index = 0;
-                    while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
-                           (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
-                               index++;
-                    if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
-                        index++;
-                    if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
-                        index++;
-                    
-		    rule.setConsequence( buf.substring( index ) );
-     		    rule.setConsequenceLocation(offset(start.getLine()), start.getCharPositionInLine());
- 		    rule.setEndCharacter( ((CommonToken)loc).getStopIndex() );
- 		    location.setProperty( Location.LOCATION_RHS_CONTENT, rule.getConsequence() );
-                }
-	;
-
-name returns [String s]
-	:
-	( 
-	    tok=ID
-	    {
-	        s = tok.getText();
-	    }
-	|
-	    str=STRING
-	    {
-	       s = getString( str );
-	    }
-	)
-	;
-	
-identifier returns [Token tok]
-	:	
-	(       t=ID      
-	|	t=PACKAGE
-	|	t=FUNCTION
-	|	t=GLOBAL
-	|	t=IMPORT  
-	|	t=RULE
-	|	t=QUERY 
-        |       t=TEMPLATE        
-        |       t=ATTRIBUTES      
-        |       t=ENABLED         
-        |       t=SALIENCE 	
-        |       t=DURATION 	
-        |       t=FROM	        
-        |       t=ACCUMULATE 	
-        |       t=INIT	        
-        |       t=ACTION	        
-        |       t=RESULT	        
-        |       t=COLLECT         
-        |       t=OR	        
-        |       t=AND	        
-        |       t=CONTAINS 	
-        |       t=EXCLUDES 	
-        |       t=MEMBEROF
-        |       t=MATCHES         
-        |       t=NULL	        
-        |       t=EXISTS	        
-        |       t=NOT	        
-        |       t=EVAL	        
-        |       t=FORALL	            					
-        |       t=WHEN            
-        |       t=THEN	        
-        |       t=END     
-        |	t=IN        
-	) 
-	{
-	    tok = t;
-	}
-	;
-	
-WS      :       (	' '
-                |	'\t'
-                |	'\f'
-                |	EOL
-                )
-                { $channel=HIDDEN; }
-        ;
-
-fragment
-EOL 	:	     
-   		(       ( '\r\n' )=> '\r\n'  // Evil DOS
-                |       '\r'    // Macintosh
-                |       '\n'    // Unix (the right way)
-                )
-        ;  
-        
-INT	
-	:	('-')?('0'..'9')+
-		;
-
-FLOAT
-	:	('-')?('0'..'9')+ '.' ('0'..'9')+
-	;
-
-STRING
-    :  ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
-     | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
-    ;
-
-fragment
-HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
-
-fragment
-EscapeSequence
-    :   '\\' ('b'|'B'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\'|'.'|'o'|
-              'x'|'a'|'e'|'c'|'d'|'D'|'s'|'S'|'w'|'W'|'p'|'A'|
-              'G'|'Z'|'z'|'Q'|'E'|'*'|'['|']'|'('|')'|'$'|'^'|
-              '{'|'}'|'?'|'+'|'-'|'&'|'|')
-    |   UnicodeEscape
-    |   OctalEscape
-    ;
-
-fragment
-OctalEscape
-    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')
-    |   '\\' ('0'..'7') ('0'..'7')
-    |   '\\' ('0'..'7')
-    ;
-
-fragment
-UnicodeEscape
-    :   '\\' 'u' HexDigit HexDigit HexDigit HexDigit
-    ;
-
-BOOL
-	:	('true'|'false') 
-	;	
-
-PACKAGE	:	'package';
-
-IMPORT	:	'import';
-
-FUNCTION :	'function';
-
-GLOBAL	:	'global';
-	
-RULE    :	'rule';
-
-QUERY	:	'query';
-
-TEMPLATE :	'template';
-
-ATTRIBUTES :	'attributes';
-	
-DATE_EFFECTIVE 
-	:	'date-effective';
-
-DATE_EXPIRES 
-	:	'date-expires';	
-	
-ENABLED :	'enabled';
-
-SALIENCE 
-	:	'salience';
-	
-NO_LOOP :	'no-loop';
-
-AUTO_FOCUS 
-	:	'auto-focus';
-	
-ACTIVATION_GROUP 
-	:	'activation-group';
-	
-AGENDA_GROUP 
-	:	'agenda-group';
-	
-DIALECT 
-	:	'dialect';	
-	
-RULEFLOW_GROUP 
-	:	'ruleflow-group';
-	
-DURATION 
-	:	'duration';
-	
-LOCK_ON_ACTIVE
-	:	'lock-on-active';	
-	
-FROM	:	'from';
-
-ACCUMULATE 
-	:	'accumulate';
-	
-INIT	:	'init';
-
-ACTION	:	'action';
-
-RESULT	:	'result';
-
-COLLECT :	'collect';
-
-OR	:	'or';
-
-AND	:	'and';
-
-CONTAINS 
-	:	'contains';
-	
-EXCLUDES 
-	:	'excludes';
-	
-MEMBEROF
-	:	'memberOf';
-
-MATCHES :	'matches';
-
-IN	:	'in';
-
-NULL	:	'null';
-
-EXISTS	:	'exists';
-
-NOT	:	'not';
-
-EVAL	:	'eval';
-
-FORALL	:	'forall';							
-
-WHEN    :	'when'; 
-
-THEN	:    	'then';
-
-END     :	'end';
-
-ID	
-	:	('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff')('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff')* 
-	;
-		
-LEFT_PAREN
-        :	'('
-        ;
-
-RIGHT_PAREN
-        :	')'
-        ;
-        
-LEFT_SQUARE
-        :	'['
-        ;
-
-RIGHT_SQUARE
-        :	']'
-        ;        
-
-LEFT_CURLY
-        :	'{'
-        ;
-
-RIGHT_CURLY
-        :	'}'
-        ;
-        
-COMMA	:	','
-	;
-	
-DOUBLE_AMPER
-	:	'&&'
-	;
-	
-DOUBLE_PIPE
-	:	'||'
-	;				
-	
-SH_STYLE_SINGLE_LINE_COMMENT	
-	:	'#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n'  */
-                { $channel=HIDDEN; }
-	;
-        
-        
-C_STYLE_SINGLE_LINE_COMMENT	
-	:	'//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n' 
-                { $channel=HIDDEN; }
-	;
-
-MULTI_LINE_COMMENT
-	:	'/*' (options{greedy=false;} : .)* '*/'
-                { $channel=HIDDEN; }
-	;
-
-MISC 	:
-		'!' | '@' | '$' | '%' | '^' | '*' | '_' | '-' | '+'  | '?' | '=' | '/' | '\'' | '\\' | '|' | '&'
-	;
+grammar DRL; 
+//options {backtrack=true;}
+
+ at parser::header {
+	package org.drools.lang;
+	import java.util.List;
+	import java.util.ArrayList;
+	import java.util.Iterator;
+	import java.util.HashMap;	
+	import java.util.StringTokenizer;
+	import org.drools.lang.descr.*;
+	import org.drools.compiler.SwitchingCommonTokenStream;
+}
+
+ at parser::members {
+	private PackageDescr packageDescr;
+	private List errors = new ArrayList();
+	private String source = "unknown";
+	private int lineOffset = 0;
+	private DescrFactory factory = new DescrFactory();
+	private boolean parserDebug = false;
+	private Location location = new Location( Location.LOCATION_UNKNOWN );
+	
+	// THE FOLLOWING LINES ARE DUMMY ATTRIBUTES TO WORK AROUND AN ANTLR BUG
+	private BaseDescr from = null;
+	private FieldConstraintDescr fc = null;
+	private RestrictionConnectiveDescr and = null;
+	private RestrictionConnectiveDescr or = null;
+	private ConditionalElementDescr base = null;
+	
+	public void setParserDebug(boolean parserDebug) {
+		this.parserDebug = parserDebug;
+	}
+	
+	public void debug(String message) {
+		if ( parserDebug ) 
+			System.err.println( "drl parser: " + message );
+	}
+	
+	public void setSource(String source) {
+		this.source = source;
+	}
+	public DescrFactory getFactory() {
+		return factory;
+	}	
+
+	public String getSource() {
+		return this.source;
+	}
+	
+	public PackageDescr getPackageDescr() {
+		return packageDescr;
+	}
+	
+	private int offset(int line) {
+		return line + lineOffset;
+	}
+	
+	/**
+	 * This will set the offset to record when reparsing. Normally is zero of course 
+	 */
+	public void setLineOffset(int i) {
+	 	this.lineOffset = i;
+	}
+	
+	private String getString(String token) {
+		return token.substring( 1, token.length() -1 );
+	}
+	
+	public void reportError(RecognitionException ex) {
+	        // if we've already reported an error and have not matched a token
+                // yet successfully, don't report any errors.
+                if ( errorRecovery ) {
+                        return;
+                }
+                errorRecovery = true;
+
+		ex.line = offset(ex.line); //add the offset if there is one
+		errors.add( ex ); 
+	}
+     	
+     	/** return the raw RecognitionException errors */
+     	public List getErrors() {
+     		return errors;
+     	}
+     	
+     	/** Return a list of pretty strings summarising the errors */
+     	public List getErrorMessages() {
+     		List messages = new ArrayList();
+ 		for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+     	     		messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+     	     	}
+     	     	return messages;
+     	}
+     	
+     	/** return true if any parser errors were accumulated */
+     	public boolean hasErrors() {
+  		return ! errors.isEmpty();
+     	}
+     	
+     	/** This will take a RecognitionException, and create a sensible error message out of it */
+     	public String createErrorMessage(RecognitionException e)
+        {
+		StringBuffer message = new StringBuffer();		
+                message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+                if ( e instanceof MismatchedTokenException ) {
+                        MismatchedTokenException mte = (MismatchedTokenException)e;
+                        message.append("mismatched token: "+
+                                                           e.token+
+                                                           "; expecting type "+
+                                                           tokenNames[mte.expecting]);
+                }
+                else if ( e instanceof MismatchedTreeNodeException ) {
+                        MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+                        message.append("mismatched tree node: "+
+                                                           mtne.toString() +
+                                                           "; expecting type "+
+                                                           tokenNames[mtne.expecting]);
+                }
+                else if ( e instanceof NoViableAltException ) {
+                        NoViableAltException nvae = (NoViableAltException)e;
+			message.append( "Unexpected token '" + e.token.getText() + "'" );
+                        /*
+                        message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+                                                           " state "+nvae.stateNumber+
+                                                           " (decision="+nvae.decisionNumber+
+                                                           ") no viable alt; token="+
+                                                           e.token);
+                                                           */
+                }
+                else if ( e instanceof EarlyExitException ) {
+                        EarlyExitException eee = (EarlyExitException)e;
+                        message.append("required (...)+ loop (decision="+
+                                                           eee.decisionNumber+
+                                                           ") did not match anything; token="+
+                                                           e.token);
+                }
+                else if ( e instanceof MismatchedSetException ) {
+                        MismatchedSetException mse = (MismatchedSetException)e;
+                        message.append("mismatched token '"+
+                                                           e.token+
+                                                           "' expecting set "+mse.expecting);
+                }
+                else if ( e instanceof MismatchedNotSetException ) {
+                        MismatchedNotSetException mse = (MismatchedNotSetException)e;
+                        message.append("mismatched token '"+
+                                                           e.token+
+                                                           "' expecting set "+mse.expecting);
+                }
+                else if ( e instanceof FailedPredicateException ) {
+                        FailedPredicateException fpe = (FailedPredicateException)e;
+                        message.append("rule "+fpe.ruleName+" failed predicate: {"+
+                                                           fpe.predicateText+"}?");
+                } else if (e instanceof GeneralParseException) {
+			message.append(" " + e.getMessage());
+		}
+               	return message.toString();
+        }   
+        
+        void checkTrailingSemicolon(String text, int line) {
+        	if (text.trim().endsWith( ";" ) ) {
+        		this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+        	}
+        }
+        
+        public Location getLocation() {
+                return this.location;
+        }
+      
+}
+
+ at lexer::header {
+	package org.drools.lang;
+}
+
+opt_semicolon
+	: ';'?
+	;
+
+compilation_unit
+	@init {
+		// reset Location information
+		this.location = new Location( Location.LOCATION_UNKNOWN );
+	}
+	:	prolog 
+		statement+
+	;
+	
+prolog
+	@init {
+		String packageName = "";
+	}
+	:	( pkgstmt=package_statement { packageName = $pkgstmt.packageName; } )?
+		{ 
+			this.packageDescr = factory.createPackage( packageName ); 
+		}
+		(ATTRIBUTES ':')?
+		(	a=rule_attribute
+ 	  		{
+ 	  	        	this.packageDescr.addAttribute( a );
+	                }
+ 	  	(       ','? a=rule_attribute
+ 	  		{
+ 	  	        	this.packageDescr.addAttribute( a );
+	                }
+ 	  	)* )?	
+	;
+	
+package_statement returns [String packageName]
+	@init{
+		$packageName = null;
+	}
+	:	
+		PACKAGE n=dotted_name[null] opt_semicolon
+		{
+			$packageName = $n.name;
+		}
+	;
+statement
+	:	function_import_statement 
+	|	import_statement 
+	|	global 
+	|	function 
+	|       t=template { this.packageDescr.addFactTemplate( $t.template ); }
+	|	r=rule { this.packageDescr.addRule( $r.rule ); }			
+	|	q=query	{ this.packageDescr.addRule( $q.query ); }
+	;
+
+	
+
+import_statement
+        @init {
+        	ImportDescr importDecl = null;
+        }
+	:	IMPORT 
+	        {
+	            importDecl = factory.createImport( );
+	            importDecl.setStartCharacter( ((CommonToken)$IMPORT).getStartIndex() );
+		    if (packageDescr != null) {
+			packageDescr.addImport( importDecl );
+		    }
+	        }
+	        import_name[importDecl] opt_semicolon
+	;
+
+function_import_statement
+        @init {
+        	FunctionImportDescr importDecl = null;
+        }
+	:	IMPORT FUNCTION 
+	        {
+	            importDecl = factory.createFunctionImport();
+	            importDecl.setStartCharacter( ((CommonToken)$IMPORT).getStartIndex() );
+		    if (packageDescr != null) {
+			packageDescr.addFunctionImport( importDecl );
+		    }
+	        }
+	        import_name[importDecl] opt_semicolon
+	;
+
+
+import_name[ImportDescr importDecl] returns [String name]
+	@init {
+		$name = null;
+	}
+	:	
+		ID 
+		{ 
+		    $name=$ID.text; 
+		    $importDecl.setTarget( name );
+		    $importDecl.setEndCharacter( ((CommonToken)$ID).getStopIndex() );
+		} 
+		( DOT id=identifier 
+		    { 
+		        $name = $name + $DOT.text + $id.text; 
+			$importDecl.setTarget( $name );
+		        $importDecl.setEndCharacter( ((CommonToken)$id.start).getStopIndex() );
+		    } 
+		)* 
+		( star='.*' 
+		    { 
+		        $name = $name + $star.text; 
+			$importDecl.setTarget( $name );
+		        $importDecl.setEndCharacter( ((CommonToken)$star).getStopIndex() );
+		    }
+		)?
+	;
+
+
+global
+	@init {
+	    GlobalDescr global = null;
+	}
+	:
+		GLOBAL 
+		{
+		    global = factory.createGlobal();
+	            global.setStartCharacter( ((CommonToken)$GLOBAL).getStartIndex() );
+		    packageDescr.addGlobal( global );
+		}
+		type=dotted_name[null] 
+		{
+		    global.setType( $type.name );
+		}
+		id=identifier opt_semicolon
+		{
+		    global.setIdentifier( $id.text );
+		    global.setEndCharacter( ((CommonToken)$id.start).getStopIndex() );
+		}
+	;
+	
+
+function
+	@init {
+		FunctionDescr f = null;
+	}
+	:
+		FUNCTION retType=dotted_name[null]? id=identifier
+		{
+			//System.err.println( "function :: " + n.getText() );
+			f = factory.createFunction( $id.text, $retType.name );
+			f.setLocation(offset($FUNCTION.line), $FUNCTION.pos);
+	        	f.setStartCharacter( ((CommonToken)$FUNCTION).getStartIndex() );
+			packageDescr.addFunction( f );
+		} 
+		LEFT_PAREN
+			(	paramType=dotted_name[null]? paramName=argument
+				{
+					f.addParameter( $paramType.name, $paramName.name );
+				}
+				(	COMMA paramType=dotted_name[null]? paramName=argument
+					{
+						f.addParameter( $paramType.name, $paramName.name );
+					}
+				)*
+			)?
+		RIGHT_PAREN
+		body=curly_chunk[f]
+		{
+			//strip out '{','}'
+			f.setText( $body.text.substring( 1, $body.text.length()-1 ) );
+		}
+	;
+
+argument returns [String name]
+	@init {
+		$name = null;
+	}
+	:	id=identifier { $name=$id.text; } ( '[' ']' { $name += "[]";})*
+	;
+	
+
+
+query returns [QueryDescr query]
+	@init {
+		$query = null;
+		AndDescr lhs = null;
+		List params = null;
+	}
+	:
+		QUERY queryName=name
+		{ 
+			$query = factory.createQuery( $queryName.name ); 
+			$query.setLocation( offset($QUERY.line), $QUERY.pos );
+			$query.setStartCharacter( ((CommonToken)$QUERY).getStartIndex() );
+			lhs = new AndDescr(); $query.setLhs( lhs ); 
+			lhs.setLocation( offset($QUERY.line), $QUERY.pos );
+		}
+		( LEFT_PAREN
+		        ( { params = new ArrayList(); }
+		            paramName=ID { params.add( $paramName.text ); }                             
+	        	    (',' paramName=ID { params.add( $paramName.text ); } )*
+		            { $query.setParameters( (String[]) params.toArray( new String[params.size()] ) ); }
+		         )?
+	          RIGHT_PAREN
+	        )?		
+		normal_lhs_block[lhs]
+		END
+		{
+			$query.setEndCharacter( ((CommonToken)$END).getStopIndex() );
+		}
+	;
+
+
+template returns [FactTemplateDescr template]
+	@init {
+		$template = null;		
+	}
+	:
+		TEMPLATE templateName=identifier opt_semicolon
+		{
+			$template = new FactTemplateDescr($templateName.text);
+			$template.setLocation( offset($TEMPLATE.line), $TEMPLATE.pos );			
+			$template.setStartCharacter( ((CommonToken)$TEMPLATE).getStartIndex() );
+		}
+		(
+			slot=template_slot 
+			{
+				template.addFieldTemplate( $slot.field );
+			}
+		)+
+		END opt_semicolon 
+		{
+			template.setEndCharacter( ((CommonToken)$END).getStopIndex() );
+		}		
+	;
+	
+template_slot returns [FieldTemplateDescr field]
+	@init {
+		$field = null;
+	}
+	:
+	         {
+			$field = factory.createFieldTemplate();
+	         }
+		 fieldType=qualified_id[$field] 
+		 {
+		        $field.setClassType( $fieldType.name );
+		 }
+		 
+		 id=identifier opt_semicolon
+		 {
+		        $field.setName( $id.text );
+			$field.setLocation( offset($id.start.getLine()), $id.start.getCharPositionInLine() );
+			$field.setEndCharacter( ((CommonToken)$id.start).getStopIndex() );
+		 } 
+	;	
+	
+rule returns [RuleDescr rule]
+	@init {
+		$rule = null;
+		AndDescr lhs = null;
+	}
+	:
+		RULE ruleName=name 
+		{ 
+			location.setType( Location.LOCATION_RULE_HEADER );
+			debug( "start rule: " + $ruleName.name );
+			$rule = new RuleDescr( $ruleName.name, null ); 
+			$rule.setLocation( offset($RULE.line), $RULE.pos );
+			$rule.setStartCharacter( ((CommonToken)$RULE).getStartIndex() );
+		}
+		rule_attributes[$rule]?
+		(	
+			WHEN ':'?
+			{ 
+				this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+				lhs = new AndDescr(); $rule.setLhs( lhs ); 
+				lhs.setLocation( offset($WHEN.line), $WHEN.pos );
+				lhs.setStartCharacter( ((CommonToken)$WHEN).getStartIndex() );
+			}
+			normal_lhs_block[lhs]
+		)?
+		rhs_chunk[$rule]
+	;
+	
+
+
+rule_attributes[RuleDescr rule]
+	: 
+	( ATTRIBUTES ':' )?
+	attr=rule_attribute { $rule.addAttribute( $attr.attr ); }
+	( ','? attr=rule_attribute { $rule.addAttribute( $attr.attr ); } )*
+	;
+
+
+	
+rule_attribute returns [AttributeDescr attr]
+	@init {
+		$attr = null;
+	}
+	@after {
+		$attr = $a.descr;
+	}
+	:	a=salience 
+	|	a=no_loop  
+	|	a=agenda_group  
+	|	a=duration  
+	|	a=activation_group 
+	|	a=auto_focus 
+	|	a=date_effective 
+	|	a=date_expires 
+	|	a=enabled 
+	|	a=ruleflow_group 
+	|	a=lock_on_active
+	|	a=dialect 
+	;
+	
+date_effective returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}	
+	:
+		DATE_EFFECTIVE STRING  
+		{
+			$descr = new AttributeDescr( "date-effective", getString( $STRING.text ) );
+			$descr.setLocation( offset( $DATE_EFFECTIVE.line ), $DATE_EFFECTIVE.pos );
+			$descr.setStartCharacter( ((CommonToken)$DATE_EFFECTIVE).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$STRING).getStopIndex() );
+		}
+
+	;
+
+date_expires returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}	
+	:	DATE_EXPIRES STRING  
+		{
+			$descr = new AttributeDescr( "date-expires", getString( $STRING.text ) );
+			$descr.setLocation( offset($DATE_EXPIRES.line), $DATE_EXPIRES.pos );
+			$descr.setStartCharacter( ((CommonToken)$DATE_EXPIRES).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$STRING).getStopIndex() );
+		}
+	;
+	
+enabled returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:		ENABLED BOOL   
+			{
+				$descr = new AttributeDescr( "enabled", $BOOL.text );
+				$descr.setLocation( offset($ENABLED.line), $ENABLED.pos );
+				$descr.setStartCharacter( ((CommonToken)$ENABLED).getStartIndex() );
+				$descr.setEndCharacter( ((CommonToken)$BOOL).getStopIndex() );
+			}
+	;	
+
+salience returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	
+		SALIENCE 
+		{
+			$descr = new AttributeDescr( "salience" );
+			$descr.setLocation( offset($SALIENCE.line), $SALIENCE.pos );
+			$descr.setStartCharacter( ((CommonToken)$SALIENCE).getStartIndex() );
+		}
+		( INT   
+		{
+			$descr.setValue( $INT.text );
+			$descr.setEndCharacter( ((CommonToken)$INT).getStopIndex() );
+		}
+		| txt=paren_chunk[$descr]
+		{
+			$descr.setValue( $txt.text );
+		}
+		)
+	;
+	
+no_loop returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	NO_LOOP   
+		{
+			$descr = new AttributeDescr( "no-loop", "true" );
+			$descr.setLocation( offset($NO_LOOP.line), $NO_LOOP.pos );
+			$descr.setStartCharacter( ((CommonToken)$NO_LOOP).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$NO_LOOP).getStopIndex() );
+		}
+		( BOOL   
+			{
+				$descr.setValue( $BOOL.text );
+				$descr.setEndCharacter( ((CommonToken)$BOOL).getStopIndex() );
+			}
+		)?
+	;
+	
+auto_focus returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	AUTO_FOCUS   
+		{
+			$descr = new AttributeDescr( "auto-focus", "true" );
+			$descr.setLocation( offset($AUTO_FOCUS.line), $AUTO_FOCUS.pos );
+			$descr.setStartCharacter( ((CommonToken)$AUTO_FOCUS).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$AUTO_FOCUS).getStopIndex() );
+		}
+		( BOOL   
+			{
+				$descr.setValue( $BOOL.text );
+				$descr.setEndCharacter( ((CommonToken)$BOOL).getStopIndex() );
+			}
+		)?
+	;	
+	
+activation_group returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	ACTIVATION_GROUP STRING   
+		{
+			$descr = new AttributeDescr( "activation-group", getString( $STRING.text ) );
+			$descr.setLocation( offset($ACTIVATION_GROUP.line), $ACTIVATION_GROUP.pos );
+			$descr.setStartCharacter( ((CommonToken)$ACTIVATION_GROUP).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$STRING).getStopIndex() );
+		}
+	;
+
+ruleflow_group returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	RULEFLOW_GROUP STRING   
+		{
+			$descr = new AttributeDescr( "ruleflow-group", getString( $STRING.text ) );
+			$descr.setLocation( offset($RULEFLOW_GROUP.line), $RULEFLOW_GROUP.pos );
+			$descr.setStartCharacter( ((CommonToken)$RULEFLOW_GROUP).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$STRING).getStopIndex() );
+		}
+	;
+
+agenda_group returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	AGENDA_GROUP STRING   
+		{
+			$descr = new AttributeDescr( "agenda-group", getString( $STRING.text ) );
+			$descr.setLocation( offset($AGENDA_GROUP.line), $AGENDA_GROUP.pos );
+			$descr.setStartCharacter( ((CommonToken)$AGENDA_GROUP).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$STRING).getStopIndex() );
+		}
+	;
+
+duration returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	DURATION INT 
+		{
+			$descr = new AttributeDescr( "duration", $INT.text );
+			$descr.setLocation( offset($DURATION.line), $DURATION.pos );
+			$descr.setStartCharacter( ((CommonToken)$DURATION).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$INT).getStopIndex() );
+		}
+	;	
+	
+dialect returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	DIALECT STRING   
+		{
+			$descr = new AttributeDescr( "dialect", getString( $STRING.text ) );
+			$descr.setLocation( offset($DIALECT.line), $DIALECT.pos );
+			$descr.setStartCharacter( ((CommonToken)$DIALECT).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$STRING).getStopIndex() );
+		}
+	;			
+	
+lock_on_active returns [AttributeDescr descr]
+	@init {
+		$descr = null;
+	}
+	:	LOCK_ON_ACTIVE   
+		{
+			$descr = new AttributeDescr( "lock-on-active", "true" );
+			$descr.setLocation( offset($LOCK_ON_ACTIVE.line), $LOCK_ON_ACTIVE.pos );
+			$descr.setStartCharacter( ((CommonToken)$LOCK_ON_ACTIVE).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$LOCK_ON_ACTIVE).getStopIndex() );
+		}
+		( BOOL   
+			{
+				$descr.setValue( $BOOL.text );
+				$descr.setEndCharacter( ((CommonToken)$BOOL).getStopIndex() );
+			}
+		)?
+	;		
+
+normal_lhs_block[AndDescr descr]
+	:
+		(	d=lhs[$descr]
+			{ if( $d.d != null) $descr.addDescr( $d.d ); }
+		)*
+	;
+
+	
+lhs[ConditionalElementDescr ce] returns [BaseDescr d]
+	@init {
+		$d=null;
+	}
+	:	l=lhs_or { $d = $l.d; } 
+	;
+
+	
+lhs_or returns [BaseDescr d]
+	@init{
+		$d = null;
+		OrDescr or = null;
+	}
+	:	LEFT_PAREN OR 
+		{
+			or = new OrDescr();
+			$d = or;
+			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+		}
+		lhsand=lhs_and+ 
+		{
+			or.addDescr( $lhsand.d );
+		}
+		RIGHT_PAREN // PREFIX
+	|	
+	        left=lhs_and { $d = $left.d; }
+		( (OR|DOUBLE_PIPE)
+			{
+				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+			}
+			right=lhs_and
+			{
+				if ( or == null ) {
+					or = new OrDescr();
+					or.addDescr( $left.d );
+					$d = or;
+				}
+				
+				or.addDescr( $right.d );
+			}
+		)*
+	;
+	
+lhs_and returns [BaseDescr d]
+	@init{
+		$d = null;
+		AndDescr and = null;
+	}
+	:	LEFT_PAREN AND 
+		{
+			and = new AndDescr();
+			$d = and;
+			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+		}
+		lhsunary=lhs_unary+ 
+		{
+			and.addDescr( $lhsunary.d );
+		}
+		RIGHT_PAREN 
+	|	
+	        left=lhs_unary { $d = $left.d; }
+		( (AND|DOUBLE_AMPER)
+			{
+				location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR );
+			}
+			right=lhs_unary
+			{
+				if ( and == null ) {
+					and = new AndDescr();
+					and.addDescr( $left.d );
+					$d = and;
+				}
+				
+				and.addDescr( $right.d );
+			}
+		)* 
+	;
+	
+lhs_unary returns [BaseDescr d]
+	@init {
+		$d = null;
+	}
+	:	(	u=lhs_exist { $d = $u.d; }
+		|	u=lhs_not { $d = $u.d; }
+		|	u=lhs_eval { $d = $u.d; }
+		|	u=lhs_pattern { $d = $u.d; } (
+		          FROM 
+		          {
+				location.setType(Location.LOCATION_LHS_FROM);
+				location.setProperty(Location.LOCATION_FROM_CONTENT, "");
+		          }
+		          ( options { k=1; } :
+		            ( ac=accumulate_statement { $ac.d.setResultPattern((PatternDescr) $u.d); $d=$ac.d; })
+		          | ( cs=collect_statement { $cs.d.setResultPattern((PatternDescr) $u.d); $d=$cs.d; }) 
+		          | ( fm=from_statement {$fm.d.setPattern((PatternDescr) $u.d); $d=$fm.d; }) 
+		          )
+		        )?
+		|	u=lhs_forall  { $d = $u.d; }
+		|	LEFT_PAREN u=lhs_or RIGHT_PAREN { $d = $u.d; }
+		) 
+		opt_semicolon
+	;
+	
+lhs_exist returns [BaseDescr d]
+	@init {
+		$d = null;
+	}
+	:	EXISTS 
+		{
+			$d = new ExistsDescr( ); 
+			$d.setLocation( offset($EXISTS.line), $EXISTS.pos );
+			$d.setStartCharacter( ((CommonToken)$EXISTS).getStartIndex() );
+			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS );
+		}
+	        ( ( LEFT_PAREN pattern=lhs_or 
+	           	{ if ( $pattern.d != null ) ((ExistsDescr)$d).addDescr( $pattern.d ); }
+	           RIGHT_PAREN 
+	                { $d.setEndCharacter( ((CommonToken)$RIGHT_PAREN).getStopIndex() ); }
+	        )    
+	        | pattern=lhs_pattern
+	                {
+	                	if ( $pattern.d != null ) {
+	                		((ExistsDescr)$d).addDescr( $pattern.d );
+	                		$d.setEndCharacter( $pattern.d.getEndCharacter() );
+	                	}
+	                }
+	        )
+	;
+	
+lhs_not	returns [NotDescr d]
+	@init {
+		$d = null;
+	}
+	:	NOT 
+		{
+			$d = new NotDescr( ); 
+			$d.setLocation( offset($NOT.line), $NOT.pos );
+			$d.setStartCharacter( ((CommonToken)$NOT).getStartIndex() );
+			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION_NOT );
+		}
+		( ( LEFT_PAREN pattern=lhs_or  
+	           	{ if ( $pattern.d != null ) $d.addDescr( $pattern.d ); }
+	           RIGHT_PAREN 
+	                { $d.setEndCharacter( ((CommonToken)$RIGHT_PAREN).getStopIndex() ); }
+		  )
+		| 
+		pattern=lhs_pattern
+	                {
+	                	if ( $pattern.d != null ) {
+	                		$d.addDescr( $pattern.d );
+	                		$d.setEndCharacter( $pattern.d.getEndCharacter() );
+	                	}
+	                }
+		)
+	;
+
+lhs_eval returns [BaseDescr d]
+	@init {
+		$d = new EvalDescr( );
+	}
+	:
+		EVAL 
+		{
+			location.setType( Location.LOCATION_LHS_INSIDE_EVAL );
+		}
+		c=paren_chunk[$d]
+		{ 
+			$d.setStartCharacter( ((CommonToken)$EVAL).getStartIndex() );
+		        if( $c.text != null ) {
+	  		    this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+		            String body = $c.text.length() > 1 ? $c.text.substring(1, $c.text.length()-1) : "";
+			    checkTrailingSemicolon( body, offset($EVAL.line) );
+			    ((EvalDescr) $d).setContent( body );
+			    location.setProperty(Location.LOCATION_EVAL_CONTENT, body);
+			}
+		}
+	;
+	
+lhs_forall returns [ForallDescr d]
+	@init {
+		$d = factory.createForall();
+	}
+	:	FORALL LEFT_PAREN base=lhs_pattern   
+		{
+			$d.setStartCharacter( ((CommonToken)$FORALL).getStartIndex() );
+		        // adding the base pattern
+		        $d.addDescr( $base.d );
+			$d.setLocation( offset($FORALL.line), $FORALL.pos );
+		}
+		( (COMMA)? pattern=lhs_pattern
+		{
+		        // adding additional patterns
+			$d.addDescr( $pattern.d );
+		}
+		)+
+		RIGHT_PAREN
+		{
+		        $d.setEndCharacter( ((CommonToken)$RIGHT_PAREN).getStopIndex() );
+		}
+	;
+
+lhs_pattern returns [BaseDescr d]
+	@init {
+		$d=null;
+	}
+	@after {
+		$d=$f.d;
+	}
+	:	f=fact_binding	
+	|	f=fact[null]		
+	;
+
+from_statement returns [FromDescr d]
+	@init {
+		$d=factory.createFrom();
+	}
+	:
+	ds=from_source[$d]
+	{
+		$d.setDataSource( $ds.ds );
+	}
+	;
+	
+from_source[FromDescr from] returns [DeclarativeInvokerDescr ds]
+	@init {
+		$ds = null;
+		AccessorDescr ad = null;
+	}
+	:	ident=identifier
+		{
+			ad = new AccessorDescr(ident.start.getText());	
+			ad.setLocation( offset(ident.start.getLine()), ident.start.getCharPositionInLine() );
+			ad.setStartCharacter( ((CommonToken)ident.start).getStartIndex() );
+			ad.setEndCharacter( ((CommonToken)ident.start).getStopIndex() );
+			$ds = ad;
+			location.setProperty(Location.LOCATION_FROM_CONTENT, ident.start.getText());
+		}
+		(	/* WARNING: $o : O() from x(y) could be also $o : O() from x followed
+			   by (y).  Resolve by always forcing (...) to be paren_chunk if
+			   after a from.  Setting k=1 will force this to happen.  No backtracking
+			   but you'll get a warning from ANTLR.  ANTLR resolves by choosing first
+			   alternative to win, which is the paren_chunk case not the loop exit.
+			*/
+			options {k=1;}
+		:	args=paren_chunk[$from]
+		{
+			if( $args.text != null ) {
+				ad.setVariableName( null );
+				FunctionCallDescr fc = new FunctionCallDescr($ident.start.getText());
+				fc.setLocation( offset($ident.start.getLine()), $ident.start.getCharPositionInLine() );			
+				fc.setArguments($args.text);
+				fc.setStartCharacter( ((CommonToken)$ident.start).getStartIndex() );
+				fc.setEndCharacter( ((CommonToken)$ident.start).getStopIndex() );
+				ad.addInvoker(fc);
+				location.setProperty(Location.LOCATION_FROM_CONTENT, $args.text);
+			}
+		}
+		)?
+		expression_chain[$from, ad]?
+		{
+			if( ad != null ) {
+				location.setProperty(Location.LOCATION_FROM_CONTENT, ad.toString() );
+			}
+		}
+	;	
+	
+expression_chain[FromDescr from, AccessorDescr as]
+	@init {
+  		FieldAccessDescr fa = null;
+	    	MethodAccessDescr ma = null;	
+	}
+	:
+	( DOT field=identifier  
+	    {
+	        fa = new FieldAccessDescr($field.start.getText());	
+		fa.setLocation( offset($field.start.getLine()), $field.start.getCharPositionInLine() );
+		fa.setStartCharacter( ((CommonToken)$field.start).getStartIndex() );
+		fa.setEndCharacter( ((CommonToken)$field.start).getStopIndex() );
+	    }
+	  (
+	    ( LEFT_SQUARE ) => sqarg=square_chunk[$from]
+	      {
+	          fa.setArgument( $sqarg.text );	
+	      }
+	    |
+	    ( LEFT_PAREN ) => paarg=paren_chunk[$from]
+		{
+	    	  ma = new MethodAccessDescr( $field.start.getText(), $paarg.text );	
+		  ma.setLocation( offset($field.start.getLine()), $field.start.getCharPositionInLine() );
+		  ma.setStartCharacter( ((CommonToken)$field.start).getStartIndex() );
+		}
+	  )?
+	  {
+	      if( ma != null ) {
+	          $as.addInvoker( ma );
+	      } else {
+	          $as.addInvoker( fa );
+	      }
+	  }
+	  expression_chain[from, as]?
+	)  
+	;	
+	
+accumulate_statement returns [AccumulateDescr d]
+	@init {
+		$d = factory.createAccumulate();
+	}
+	:
+	        ACCUMULATE 
+		{ 
+			$d.setLocation( offset($ACCUMULATE.line), $ACCUMULATE.pos );
+			$d.setStartCharacter( ((CommonToken)$ACCUMULATE).getStartIndex() );
+			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE );
+		}	
+		LEFT_PAREN pattern=lhs_pattern COMMA? 
+		{
+		        $d.setSourcePattern( (PatternDescr) $pattern.d );
+		}
+		INIT 
+		{
+			location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_INIT );
+		}
+		text=paren_chunk[null] COMMA?
+		{
+			if( $text.text != null ) {
+			        $d.setInitCode( $text.text.substring(1, $text.text.length()-1) );
+				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_INIT_CONTENT, $d.getInitCode());
+				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_ACTION );
+			}
+		}
+		ACTION text=paren_chunk[null] COMMA?
+		{
+			if( $text.text != null ) {
+			        $d.setActionCode( $text.text.substring(1, $text.text.length()-1) );
+	       			location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_ACTION_CONTENT, $d.getActionCode());
+				location.setType( Location.LOCATION_LHS_FROM_ACCUMULATE_RESULT );
+			}
+		}
+		RESULT text=paren_chunk[null] 
+		{
+			if( $text.text != null ) {
+			        $d.setResultCode( $text.text.substring(1, $text.text.length()-1) );
+				location.setProperty(Location.LOCATION_PROPERTY_FROM_ACCUMULATE_RESULT_CONTENT, $d.getResultCode());
+			}
+		}
+		RIGHT_PAREN
+		{
+			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+			d.setEndCharacter( ((CommonToken)$RIGHT_PAREN).getStopIndex() );
+		} 
+	; 		
+ 		
+collect_statement returns [CollectDescr d]
+	@init {
+		$d = factory.createCollect();
+	}
+	:
+	        COLLECT 
+		{ 
+			$d.setLocation( offset($COLLECT.line), $COLLECT.pos );
+			$d.setStartCharacter( ((CommonToken)$COLLECT).getStartIndex() );
+			location.setType( Location.LOCATION_LHS_FROM_COLLECT );
+		}	
+		LEFT_PAREN pattern=lhs_pattern RIGHT_PAREN
+		{
+		        $d.setSourcePattern( (PatternDescr)$pattern.d );
+			$d.setEndCharacter( ((CommonToken)$RIGHT_PAREN).getStopIndex() );
+			location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+		}
+	; 		
+
+fact_binding returns [BaseDescr d]
+	@init {
+		$d=null;
+		OrDescr or = null;
+	}
+ 	:
+ 		ID ':' 
+ 		{
+ 		        // handling incomplete parsing
+ 		        $d = new PatternDescr( );
+ 		        ((PatternDescr) $d).setIdentifier( $ID.text );
+ 		}
+		( fe=fact[$ID.text]
+ 		{
+ 		        // override previously instantiated pattern
+ 			$d=$fe.d;
+ 			if( $d != null ) {
+   			    $d.setStartCharacter( ((CommonToken)$ID).getStartIndex() );
+   			}
+ 		}
+ 		|
+ 		LEFT_PAREN left=fact[$ID.text]
+ 		{
+ 		        // override previously instantiated pattern
+ 			$d=$left.d;
+ 			if( $d != null ) {
+   			    $d.setStartCharacter( ((CommonToken)$ID).getStartIndex() );
+   			}
+ 		}
+ 		( (OR|DOUBLE_PIPE)
+ 			right=fact[$ID.text]
+ 			{
+				if ( or == null ) {
+					or = new OrDescr();
+					or.addDescr( $left.d );
+					$d = or;
+				}
+				or.addDescr( $right.d );
+ 			}
+ 		)*
+ 		RIGHT_PAREN
+ 		)
+	;
+ 
+fact[String ident] returns [BaseDescr d] 
+	@init {
+		$d=null;
+		PatternDescr pattern = null;
+	}
+ 	:	
+ 	        {
+ 			pattern = new PatternDescr( );
+ 			if( $ident != null ) {
+ 				pattern.setIdentifier( $ident );
+ 			}
+ 			$d = pattern; 
+ 	        }
+ 	        id=qualified_id[$d] 
+ 		{ 
+ 		        pattern.setObjectType( $id.name );
+ 		        pattern.setEndCharacter( -1 );
+ 		}
+ 		LEFT_PAREN 
+ 		{
+		        location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START );
+            		location.setProperty( Location.LOCATION_PROPERTY_CLASS_NAME, $id.name );
+ 				
+ 			pattern.setLocation( offset($LEFT_PAREN.line), $LEFT_PAREN.pos );
+ 			pattern.setLeftParentCharacter( ((CommonToken)$LEFT_PAREN).getStartIndex() );
+ 		} 
+ 		( constraints[pattern]  )? 
+ 		RIGHT_PAREN
+		{
+			this.location.setType( Location.LOCATION_LHS_BEGIN_OF_CONDITION );
+			pattern.setEndLocation( offset($RIGHT_PAREN.line), $RIGHT_PAREN.pos );	
+			pattern.setEndCharacter( ((CommonToken)$RIGHT_PAREN).getStopIndex() );
+		        pattern.setRightParentCharacter( ((CommonToken)$RIGHT_PAREN).getStartIndex() );
+ 		}
+ 	;
+	
+	
+constraints[PatternDescr pattern]
+	:	constraint[$pattern]
+		( COMMA { location.setType( Location.LOCATION_LHS_INSIDE_CONDITION_START ); } 
+		  constraint[$pattern] 
+		)* 
+	;
+	
+constraint[PatternDescr pattern]
+	@init {
+		ConditionalElementDescr top = null;
+	}
+	:
+		{
+			top = $pattern.getConstraint();
+		}
+		or_constr[top]
+	;	
+	
+or_constr[ConditionalElementDescr base]
+	@init {
+		OrDescr or = new OrDescr();
+	}
+	:
+		and_constr[or] 
+		( DOUBLE_PIPE 
+		{
+			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
+		}
+		and_constr[or] 
+		)*
+		{
+		        if( or.getDescrs().size() == 1 ) {
+		                $base.addOrMerge( (BaseDescr) or.getDescrs().get(0) );
+		        } else if ( or.getDescrs().size() > 1 ) {
+		        	$base.addDescr( or );
+		        }
+		}
+	;
+	
+and_constr[ConditionalElementDescr base]
+	@init {
+		AndDescr and = new AndDescr();
+	}
+	:
+		unary_constr[and] 
+		( DOUBLE_AMPER 
+		{
+			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_START);
+		}
+		unary_constr[and] 
+		)*
+		{
+		        if( and.getDescrs().size() == 1) {
+		                $base.addOrMerge( (BaseDescr) and.getDescrs().get(0) );
+		        } else if( and.getDescrs().size() > 1) {
+		        	$base.addDescr( and );
+		        }
+		}
+	;
+	
+unary_constr[ConditionalElementDescr base]
+	:
+		( field_constraint[$base] 
+		| LEFT_PAREN or_constr[$base] RIGHT_PAREN
+		| EVAL predicate[$base]
+		)
+	;	
+		
+field_constraint[ConditionalElementDescr base]
+	@init {
+		FieldBindingDescr fbd = null;
+		FieldConstraintDescr fc = null;
+		RestrictionConnectiveDescr top = null;
+	}
+	:
+		( ID ':' 
+		    { 
+			fbd = new FieldBindingDescr();
+			fbd.setIdentifier( $ID.text );
+			fbd.setLocation( offset($ID.line), $ID.pos );
+			fbd.setStartCharacter( ((CommonToken)$ID).getStartIndex() );
+			$base.addDescr( fbd );
+
+		    }
+		)? 
+		f=identifier	
+		{
+		    // use $f.start to get token matched in identifier
+		    // or use $f.text to get text.
+		    if( $f.text != null ) {
+			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+			location.setProperty(Location.LOCATION_PROPERTY_PROPERTY_NAME, $f.text);
+		    
+			if ( fbd != null ) {
+			    fbd.setFieldName( $f.text );
+ 			    fbd.setEndCharacter( ((CommonToken)$f.start).getStopIndex() );
+			} 
+			fc = new FieldConstraintDescr($f.text);
+			fc.setLocation( offset($f.start.getLine()), $f.start.getCharPositionInLine() );
+			fc.setStartCharacter( ((CommonToken)$f.start).getStartIndex() );
+			top = fc.getRestriction();
+			
+			// it must be a field constraint, as it is not a binding
+			if( $ID == null ) {
+			    $base.addDescr( fc );
+			}
+		    }
+		}
+		(
+			or_restr_connective[top]
+			{
+				// we must add now as we didn't before
+				if( $ID != null) {
+				    $base.addDescr( fc );
+				}
+			}
+		|
+			'->' predicate[$base] 
+		)?
+	;
+	
+
+or_restr_connective[ RestrictionConnectiveDescr base ]
+	@init {
+		RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+	}
+	:
+		and_restr_connective[or] 
+		(	options {backtrack=true;}
+		:	DOUBLE_PIPE 
+			{
+				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+			}
+		  and_restr_connective[or] 
+		)*
+		{
+		        if( or.getRestrictions().size() == 1 ) {
+		                $base.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
+		        } else if ( or.getRestrictions().size() > 1 ) {
+		        	$base.addRestriction( or );
+		        }
+		}
+	;	
+
+and_restr_connective[ RestrictionConnectiveDescr base ]
+	@init {
+		RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+	}
+	:
+		constraint_expression[and] 
+		(	options {backtrack=true;}
+		:	t=DOUBLE_AMPER 
+			{
+				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+			}
+			constraint_expression[and] 
+		)*
+		{
+		        if( and.getRestrictions().size() == 1) {
+		                $base.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
+		        } else if ( and.getRestrictions().size() > 1 ) {
+		        	$base.addRestriction( and );
+		        }
+		}
+	;
+	
+constraint_expression[RestrictionConnectiveDescr base]
+        :	
+		( compound_operator[$base]
+		| simple_operator[$base]
+		| LEFT_PAREN 
+		{
+			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+		}
+		or_restr_connective[$base] 
+		RIGHT_PAREN
+ 		)
+	;	
+	
+simple_operator[RestrictionConnectiveDescr base]
+	@init {
+		String op = null;
+	}
+	:
+		(	t='=='
+		|	t='>'
+		|	t='>='
+		|	t='<'
+		|	t='<='
+		|	t='!='
+		|	t=CONTAINS
+		|	n=NOT t=CONTAINS
+		|	t=EXCLUDES
+		|	t=MATCHES
+		|	n=NOT t=MATCHES
+		|	t=MEMBEROF
+		|	n=NOT t=MEMBEROF
+		)
+		{
+  		    location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
+                    location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, $t.text);
+		    if( $n != null ) {
+		        op = "not "+$t.text;
+		    } else {
+		        op = $t.text;
+		    }
+		}
+		rd=expression_value[$base, op]
+/*		{
+			if( $rd.rd != null ) {
+				location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
+				$base.addRestriction( $rd.rd );
+			} else if ( $rd.rd == null && op != null ) {
+			        $base.addRestriction( new LiteralRestrictionDescr(op, null) );
+			}
+		}*/
+	;	
+	
+compound_operator[RestrictionConnectiveDescr base]
+	@init {
+		String op = null;
+		RestrictionConnectiveDescr group = null;
+	}
+	:
+		( IN 
+			{
+			  op = "==";
+			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+			  $base.addRestriction( group );
+  		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
+                    	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
+			}
+		| NOT IN 
+			{
+			  op = "!=";
+			  group = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+			  $base.addRestriction( group );
+  		    	  location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);
+                    	  location.setProperty(Location.LOCATION_PROPERTY_OPERATOR, "in");
+			}	
+		)
+		LEFT_PAREN rd=expression_value[group, op]
+		( COMMA rd=expression_value[group, op]	)* 
+		RIGHT_PAREN 
+		{
+			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
+		}
+	;
+	
+expression_value[RestrictionConnectiveDescr base, String op]
+	@init {
+		RestrictionDescr rd = null;
+	}
+	:
+		(	ID
+			{
+				rd = new VariableRestrictionDescr($op, $ID.text);
+			}
+		|	lc=enum_constraint 
+			{ 
+				rd  = new QualifiedIdentifierRestrictionDescr($op, $lc.text);
+			}						
+		|	lc=literal_constraint 
+			{ 
+				rd  = new LiteralRestrictionDescr($op, $lc.text);
+			}
+		|	rvc=retval_constraint 
+			{ 
+				rd = new ReturnValueRestrictionDescr($op, $rvc.text);							
+			} 
+		)	
+		{
+			location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_END);
+			if( rd != null ) {
+				$base.addRestriction( rd );
+			}
+		}
+	;	
+	
+literal_constraint returns [String text]
+	@init {
+		$text = null;
+	}
+	:	(	t=STRING { $text = getString( $t.text ); } 
+		|	t=INT    { $text = $t.text; }
+		|	t=FLOAT	 { $text = $t.text; }
+		|	t=BOOL 	 { $text = $t.text; }
+		|	t=NULL   { $text = null; }
+		)
+	;
+	
+enum_constraint returns [String text]
+	@init {
+		$text = null;
+	}
+	:	
+		ID { text=$ID.text; } ( '.' ident=identifier { text += "." + $ident.start.getText(); } )+ 
+	;	
+	
+
+predicate[ConditionalElementDescr base]
+        @init {
+		PredicateDescr d = null;
+        }
+	:
+		{
+			d = new PredicateDescr( );
+		}
+		text=paren_chunk[d]
+		{
+		        if( $text.text != null ) {
+			        String body = $text.text.substring(1, $text.text.length()-1);
+			        d.setContent( body );
+				$base.addDescr( d );
+		        }
+		}
+	;
+
+
+curly_chunk[BaseDescr descr] returns [String text]
+        @init {
+           StringBuffer buf = null;
+           Integer channel = null;
+        }
+	:
+		loc=LEFT_CURLY 
+		{
+	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+		    buf = new StringBuffer();
+		    
+		    buf.append( loc.getText() );
+		} 
+		( 
+			~(LEFT_CURLY|RIGHT_CURLY)
+			  {
+			    buf.append( input.LT(-1).getText() );
+			  }
+			|
+			chunk=curly_chunk[descr]
+			  {
+			    buf.append( chunk );
+			  }
+		)*
+		{
+		    if( channel != null ) {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+		    } else {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+		    }
+		}
+                loc=RIGHT_CURLY
+                {
+                    buf.append( loc.getText() );
+		    text = buf.toString();
+		    if( descr != null ) {
+		        descr.setEndCharacter( ((CommonToken)loc).getStopIndex() );
+		    }
+                }
+	;
+paren_chunk[BaseDescr descr] returns [String text]
+        @init {
+           StringBuffer buf = null;
+           Integer channel = null;
+        }
+	:
+	        {
+	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+		    buf = new StringBuffer();
+	        }
+		loc=LEFT_PAREN 
+		{
+		    buf.append( $loc.text );
+		} 
+		( 
+			~(LEFT_PAREN|RIGHT_PAREN)
+			  {
+			    buf.append( input.LT(-1).getText() );
+			  }
+			|
+			chunk=paren_chunk[null]
+			  {
+			    buf.append( $chunk.text );
+			  }
+		)*
+		{
+		    if( channel != null ) {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+		    } else {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+		    }
+		}
+                end=RIGHT_PAREN
+                {
+                    buf.append( $end.text );
+		    $text = buf.toString();
+		    if( $descr != null ) {
+		        $descr.setEndCharacter( ((CommonToken)$end).getStopIndex() );
+		    }
+                }
+	;
+
+
+square_chunk[BaseDescr descr]  returns [String text]
+        @init {
+           StringBuffer buf = null;
+           Integer channel = null;
+        }
+	:
+	        {
+	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+		    buf = new StringBuffer();
+	        }
+		loc=LEFT_SQUARE 
+		{
+		    buf.append( $loc.text);
+ 
+		} 
+		( 
+			~(LEFT_SQUARE|RIGHT_SQUARE)
+			  {
+			    buf.append( input.LT(-1).getText() );
+			  }
+			|
+			chunk=square_chunk[null]
+			  {
+			    buf.append( $chunk.text );
+			  }
+		)*
+		{
+		    if( channel != null ) {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+		    } else {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+		    }
+		}
+                loc=RIGHT_SQUARE
+                {
+                    buf.append( $loc.text );
+		    $text = buf.toString();
+		    if( $descr != null ) {
+		        $descr.setEndCharacter( ((CommonToken)$loc).getStopIndex() );
+		    }
+                }
+	;
+	
+retval_constraint returns [String text]
+	@init {
+		$text = null;
+	}
+	:	
+		c=paren_chunk[null] { $text = $c.text.substring(1, $c.text.length()-1); }
+	;
+
+qualified_id[BaseDescr descr] returns [String name]
+	@init {
+		$name = null;
+	}
+	:	
+		ID
+		{ 
+		    $name=$ID.text; 
+		    if( $descr != null ) {
+			$descr.setStartCharacter( ((CommonToken)$ID).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$ID).getStopIndex() );
+		    }
+		} 
+		( '.' ident=identifier 
+		    { 
+		        $name += "." + ident.start.getText(); 
+    		        if( $descr != null ) {
+			    $descr.setEndCharacter( ((CommonToken)$ident.start).getStopIndex() );
+		        }
+		    } 
+		)* 
+		( '[' loc=']'
+		    { 
+		        $name += "[]";
+    		        if( $descr != null ) {
+			    $descr.setEndCharacter( ((CommonToken)$loc).getStopIndex() );
+		        }
+		    }
+		)*
+	;
+	
+dotted_name[BaseDescr descr] returns [String name]
+	@init {
+		$name = null;
+	}
+	:	
+		id=identifier
+		{ 
+		    name=$id.text; 
+		    if( $descr != null ) {
+			$descr.setStartCharacter( ((CommonToken)$id.start).getStartIndex() );
+			$descr.setEndCharacter( ((CommonToken)$id.start).getStopIndex() );
+		    }
+		} 
+		( '.' ident=identifier 
+		    { 
+		        $name += "." + $ident.text; 
+    		        if( $descr != null ) {
+			    $descr.setEndCharacter( ((CommonToken)$ident.start).getStopIndex() );
+		        }
+		    } 
+		)* 
+		( '[' loc=']'
+		    { 
+		        $name += "[]";
+    		        if( $descr != null ) {
+			    $descr.setEndCharacter( ((CommonToken)$loc).getStopIndex() );
+		        }
+		    }
+		)*
+	;
+	
+rhs_chunk[RuleDescr rule]
+        @init {
+           StringBuffer buf = null;
+           Integer channel = null;
+        }
+	:
+	        {
+	            channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); 
+		    ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+		    buf = new StringBuffer();
+	        }
+		THEN
+		{
+			location.setType( Location.LOCATION_RHS );
+		}
+		( 
+			  ~END
+			  {
+			    buf.append( input.LT(-1).getText() );
+			  }
+		)*
+		{
+		    if( channel != null ) {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+		    } else {
+			    ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+		    }
+		}
+                loc=END opt_semicolon
+                {
+                    // ignoring first line in the consequence
+                    int index = 0;
+                    while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
+                           (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
+                               index++;
+                    if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
+                        index++;
+                    if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
+                        index++;
+                    
+		    $rule.setConsequence( buf.substring( index ) );
+     		    $rule.setConsequenceLocation(offset($THEN.line), $THEN.pos);
+ 		    $rule.setEndCharacter( ((CommonToken)$loc).getStopIndex() );
+ 		    location.setProperty( Location.LOCATION_RHS_CONTENT, $rule.getConsequence() );
+                }
+	;
+
+name returns [String name]
+	: 	ID { $name = $ID.text; }
+	| 	STRING { $name = getString( $STRING.text ); }
+	;
+	
+identifier
+	:       ID      
+	|	PACKAGE
+	|	FUNCTION
+	|	GLOBAL
+	|	IMPORT  
+	|	RULE
+	|	QUERY 
+        |       TEMPLATE        
+        |       ATTRIBUTES      
+        |       ENABLED         
+        |       SALIENCE 	
+        |       DURATION 	
+        |       FROM	        
+       // |       ACCUMULATE 	
+        |       INIT	        
+        |       ACTION	        
+        |       RESULT	        
+       // |       COLLECT         
+        |       CONTAINS 	
+        |       EXCLUDES 	
+        |       MEMBEROF
+        |       MATCHES         
+        |       NULL	        
+        |       WHEN            
+        |       THEN	        
+        |       END     
+        |	IN        
+	;
+	
+WS      :       (	' '
+                |	'\t'
+                |	'\f'
+                |	EOL
+                )+
+                { $channel=HIDDEN; }
+        ;
+
+fragment
+EOL 	:	     
+   		(       ( '\r\n' )=> '\r\n'  // Evil DOS
+                |       '\r'    // Macintosh
+                |       '\n'    // Unix (the right way)
+                )
+        ;  
+        
+INT	
+	:	('-')?('0'..'9')+
+		;
+
+FLOAT
+	:	('-')?('0'..'9')+ '.' ('0'..'9')+
+	;
+
+STRING
+    :  ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
+     | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
+    ;
+
+fragment
+HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+fragment
+EscapeSequence
+    :   '\\' ('b'|'B'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\'|'.'|'o'|
+              'x'|'a'|'e'|'c'|'d'|'D'|'s'|'S'|'w'|'W'|'p'|'A'|
+              'G'|'Z'|'z'|'Q'|'E'|'*'|'['|']'|'('|')'|'$'|'^'|
+              '{'|'}'|'?'|'+'|'-'|'&'|'|')
+    |   UnicodeEscape
+    |   OctalEscape
+    ;
+
+fragment
+OctalEscape
+    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+    |   '\\' ('0'..'7') ('0'..'7')
+    |   '\\' ('0'..'7')
+    ;
+
+fragment
+UnicodeEscape
+    :   '\\' 'u' HexDigit HexDigit HexDigit HexDigit
+    ;
+
+BOOL
+	:	('true'|'false') 
+	;	
+
+PACKAGE	:	'package';
+
+IMPORT	:	'import';
+
+FUNCTION :	'function';
+
+GLOBAL	:	'global';
+	
+RULE    :	'rule';
+
+QUERY	:	'query';
+
+TEMPLATE :	'template';
+
+ATTRIBUTES :	'attributes';
+	
+DATE_EFFECTIVE 
+	:	'date-effective';
+
+DATE_EXPIRES 
+	:	'date-expires';	
+	
+ENABLED :	'enabled';
+
+SALIENCE 
+	:	'salience';
+	
+NO_LOOP :	'no-loop';
+
+AUTO_FOCUS 
+	:	'auto-focus';
+	
+ACTIVATION_GROUP 
+	:	'activation-group';
+	
+AGENDA_GROUP 
+	:	'agenda-group';
+	
+DIALECT 
+	:	'dialect';	
+	
+RULEFLOW_GROUP 
+	:	'ruleflow-group';
+	
+DURATION 
+	:	'duration';
+	
+LOCK_ON_ACTIVE
+	:	'lock-on-active';	
+	
+FROM	:	'from';
+
+ACCUMULATE 
+	:	'accumulate';
+	
+INIT	:	'init';
+
+ACTION	:	'action';
+
+RESULT	:	'result';
+
+COLLECT :	'collect';
+
+OR	:	'or';
+
+AND	:	'and';
+
+CONTAINS 
+	:	'contains';
+	
+EXCLUDES 
+	:	'excludes';
+	
+MEMBEROF
+	:	'memberOf';
+
+MATCHES :	'matches';
+
+IN	:	'in';
+
+NULL	:	'null';
+
+EXISTS	:	'exists';
+
+NOT	:	'not';
+
+EVAL	:	'eval';
+
+FORALL	:	'forall';							
+
+WHEN    :	'when'; 
+
+THEN	:    	'then';
+
+END     :	'end';
+
+ID	
+	:	('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff')('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff')* 
+	;
+		
+LEFT_PAREN
+        :	'('
+        ;
+
+RIGHT_PAREN
+        :	')'
+        ;
+        
+LEFT_SQUARE
+        :	'['
+        ;
+
+RIGHT_SQUARE
+        :	']'
+        ;        
+
+LEFT_CURLY
+        :	'{'
+        ;
+
+RIGHT_CURLY
+        :	'}'
+        ;
+        
+COMMA	:	','
+	;
+	
+DOT	:	'.'
+	;	
+	
+DOUBLE_AMPER
+	:	'&&'
+	;
+	
+DOUBLE_PIPE
+	:	'||'
+	;				
+	
+SH_STYLE_SINGLE_LINE_COMMENT	
+	:	'#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n'  */
+                { $channel=HIDDEN; }
+	;
+        
+        
+C_STYLE_SINGLE_LINE_COMMENT	
+	:	'//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n' 
+                { $channel=HIDDEN; }
+	;
+
+MULTI_LINE_COMMENT
+	:	'/*' (options{greedy=false;} : .)* '*/'
+                { $channel=HIDDEN; }
+	;
+
+MISC 	:
+		'!' | '@' | '$' | '%' | '^' | '*' | '_' | '-' | '+'  | '?' | '=' | '/' | '\'' | '\\' | '|' | '&'
+	;

Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java	2007-06-05 20:37:17 UTC (rev 12343)
@@ -127,11 +127,10 @@
         assertNull( rule.getLhs() );
         assertNotNull( rule.getConsequence() );
 
-        assertFalse( this.parser.hasErrors() );
+        assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
     }
 
     public void testKeywordCollisions() throws Exception {
-        //MN: this really needs the multiphase parser for it to work properly
         final DRLParser parser = parseResource( "eol_funny_business.drl" );
 
         parser.compilation_unit();
@@ -2154,10 +2153,7 @@
 
     public void testPackageAttributes() throws Exception {
         parseResource( "package_attributes.drl" ).compilation_unit();
-        if ( this.parser.hasErrors() ) {
-            System.err.println( this.parser.getErrorMessages() );
-        }
-        assertFalse( this.parser.hasErrors() );
+        assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
 
         PackageDescr pkg = this.parser.getPackageDescr();
         AttributeDescr at = (AttributeDescr) pkg.getAttributes().get( 0 );
@@ -2724,7 +2720,7 @@
         final TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
         final DRLParser parser = new DRLParser( tokenStream );
 
-        PatternDescr pattern = (PatternDescr) parser.fact();
+        PatternDescr pattern = (PatternDescr) parser.fact(null);
         assertFalse( parser.getErrorMessages().toString(),
                      parser.hasErrors() );
 
@@ -2745,7 +2741,7 @@
         final TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
         final DRLParser parser = new DRLParser( tokenStream );
 
-        PatternDescr pattern = (PatternDescr) parser.fact();
+        PatternDescr pattern = (PatternDescr) parser.fact(null);
         assertFalse( parser.getErrorMessages().toString(),
                      parser.hasErrors() );
 
@@ -2769,7 +2765,7 @@
         final TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
         final DRLParser parser = new DRLParser( tokenStream );
 
-        PatternDescr pattern = (PatternDescr) parser.fact();
+        PatternDescr pattern = (PatternDescr) parser.fact(null);
         assertFalse( parser.getErrorMessages().toString(),
                      parser.hasErrors() );
 
@@ -2832,7 +2828,7 @@
         final TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
         final DRLParser parser = new DRLParser( tokenStream );
 
-        PatternDescr pattern = (PatternDescr) parser.fact();
+        PatternDescr pattern = (PatternDescr) parser.fact(null);
         assertFalse( parser.getErrorMessages().toString(),
                      parser.hasErrors() );
 
@@ -2896,7 +2892,7 @@
         final TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
         final DRLParser parser = new DRLParser( tokenStream );
 
-        PatternDescr pattern = (PatternDescr) parser.fact();
+        PatternDescr pattern = (PatternDescr) parser.fact(null);
         assertFalse( parser.getErrorMessages().toString(),
                      parser.hasErrors() );
 

Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertions2.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertions2.drl	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertions2.drl	2007-06-05 20:37:17 UTC (rev 12343)
@@ -16,7 +16,7 @@
 rule "Problem detected" 
     salience 10
     when
-        sensor : Sensor( temperature > 100 ) or Sensor( pressure > 150 )
+        sensor : ( Sensor( temperature > 100 ) or Sensor( pressure > 150 ) )
     then
         events.add( "Problem detected: "+sensor.toString() );
         assertLogical( new Alarm( "Call emergency team" ) );

Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/eol_funny_business.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/eol_funny_business.drl	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/eol_funny_business.drl	2007-06-05 20:37:17 UTC (rev 12343)
@@ -1,8 +1,8 @@
 package test.rule.when.end.package.mine;
 
-global java.lang.String accumulate;
+global java.lang.String rule;
 
-function boolean eval() {
+function boolean test() {
     return true;
 }
 

Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/pattern_partial.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/pattern_partial.drl	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/pattern_partial.drl	2007-06-05 20:37:17 UTC (rev 12343)
@@ -6,5 +6,4 @@
 rule simple_rule 
   when
     foo3 : Bar(
-#I think the problem is it is not building the pattern due to not knowing when to finish looking
-#at the lhs.
+

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/IncompleteParsingTest.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/IncompleteParsingTest.java	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/IncompleteParsingTest.java	2007-06-05 20:37:17 UTC (rev 12343)
@@ -46,7 +46,7 @@
 	}
 	
 	
-    public void testParsingColumn() {
+    public void FIXME_testParsingColumn() {
         String input = 
         	"rule MyRule \n" +
         	"  when \n" +
@@ -117,18 +117,11 @@
 			"  when \n" +
 			"    class:";
         rule = parseRuleString(input);
-        // KRISV: at this point we don't know if the variable will be bound to a 
-        // simple pattern, or a FROM result pattern, or ACCUMULATE result pattern, etc.
-        // I tried to set a simple pattern as default, and changing in case it ends up
-        // another thing, but the code is really a hack and made the parser a lot more
-        // complex... can we leave as it is for now?
-        // 
-        // assertEquals(1, rule.getLhs().getDescrs().size());
-        // pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
-        // assertEquals("class", pattern.getIdentifier());
-        // assertNull(pattern.getObjectType());
-        // assertEquals(-1, pattern.getEndCharacter());
-        assertEquals(0, rule.getLhs().getDescrs().size());
+        assertEquals(1, rule.getLhs().getDescrs().size());
+        pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+        assertEquals("class", pattern.getIdentifier());
+        assertNull(pattern.getObjectType());
+        assertEquals(-1, pattern.getEndCharacter());
 
         input = 
 			"rule MyRule \n" +
@@ -295,16 +288,6 @@
         field = (FieldConstraintDescr) pattern.getDescrs().get(1);
         assertEquals("property", field.getFieldName());
         assertEquals(1, field.getRestrictions().size());
-        // KRISV: you are right
-        //
-        // now I would like to access the evaluator '==', but this seems
-        // not possible because the parser cannot create this descr yet
-        // since it does not know what class to create (VariableRestrictionDescr
-        // or LiteralRestrictionDescr or ?)
-        // so maybe I should just extract this info myself, based on the
-        // starting character of this FieldConstraintDescr?
-        // TODO this method does not yet exist
-        // assertEquals(-1, field.getEndCharacter());
         
         input = 
         	"rule MyRule \n" +

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/LocationDeterminatorTest.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/LocationDeterminatorTest.java	2007-06-05 20:02:11 UTC (rev 12342)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/LocationDeterminatorTest.java	2007-06-05 20:37:17 UTC (rev 12343)
@@ -55,7 +55,7 @@
     	assertTrue(LocationDeterminator.PATTERN_PATTERN_COMPARATOR_ARGUMENT.matcher("(property==otherProp").matches());
     }
     
-    public void testCheckLHSLocationDetermination() {
+    public void FIXME_testCheckLHSLocationDetermination() {
         String input = 
         	"rule MyRule \n" +
         	"	when \n" +




More information about the jboss-svn-commits mailing list