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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Sep 21 10:46:37 EDT 2008


Author: porcelli
Date: 2008-09-21 10:46:35 -0400 (Sun, 21 Sep 2008)
New Revision: 22953

Modified:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java
   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
Log:
JBRULES-1689: fix on expression_chain (regarding ANTLR predicates) + test case

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java	2008-09-21 10:54:48 UTC (rev 22952)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java	2008-09-21 14:46:35 UTC (rev 22953)
@@ -47,6 +47,7 @@
  */
 public class DrlParser {
 
+	private static final String GENERIC_ERROR_MESSAGE = "Unknown error while parsing. This is a bug. Please contact the Development team.";
 	private final List results = new ArrayList();
 	private List<DroolsSentence> editorSentences = null;
 	private Location location = new Location(Location.LOCATION_UNKNOWN);
@@ -206,6 +207,9 @@
 				return null;
 			}
 		} catch (Exception e) {
+			final ParserError err = new ParserError(GENERIC_ERROR_MESSAGE,
+					-1, 0);
+			this.results.add(err);
 			if (isEditor) {
 				if (walker == null){
 					return null;
@@ -213,7 +217,7 @@
 				return walker.getPackageDescr();
 			} else {
 				throw new DroolsParserException(
-						"Unknown error while parsing. This is a bug. Please contact the Development team.",
+						GENERIC_ERROR_MESSAGE,
 						e);
 			}
 		}

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	2008-09-21 10:54:48 UTC (rev 22952)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java	2008-09-21 14:46:35 UTC (rev 22953)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2008-08-29 11:29:04
+// $ANTLR 3.0.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2008-09-21 11:30:36
 
 	package org.drools.lang;
 

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	2008-09-21 10:54:48 UTC (rev 22952)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java	2008-09-21 14:46:35 UTC (rev 22953)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2008-08-29 11:29:03
+// $ANTLR 3.0.1 /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2008-09-21 11:30:35
 
 	package org.drools.lang;
 	
@@ -149,7 +149,7 @@
 
         public DRLParser(TokenStream input) {
             super(input);
-            ruleMemo = new HashMap[143+1];
+            ruleMemo = new HashMap[141+1];
          }
         
     protected TreeAdaptor adaptor = new CommonTreeAdaptor();
@@ -458,10 +458,10 @@
             int alt1=2;
             int LA1_0 = input.LA(1);
 
-            if ( (LA1_0==ID) && ((((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.QUERY))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validate!
 LT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.PACKAGE))||!
 (validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") 
&& validateLT(3, DroolsSoftKeywords.FOCUS))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSof!
 tKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))))) {
+            if ( (LA1_0==ID) && ((((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.QUERY))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.DATE) &&!
  validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(valid!
 ateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(
DroolsSoftKeywords.PACKAGE))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||((validateLT(1, DroolsSoftKeywords.DECLARE!
 ))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))) {
                 int LA1_1 = input.LA(2);
 
-                if ( (LA1_1==ID) && ((((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywo!
 rds.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.PACKAGE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsS!
 oftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLA
RE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||((validateLT(1!
 , DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKe!
 ywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(val
idateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))) {
+                if ( (LA1_1==ID) && ((((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateL!
 T(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.PACKAGE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSof!
 tKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLA
TE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||((validateLT(1, Dro!
 olsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSo!
 ftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(
validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))))) {
                     int LA1_4 = input.LA(3);
 
                     if ( ((validateIdentifierKey(DroolsSoftKeywords.PACKAGE))) ) {
@@ -490,7 +490,7 @@
                 int alt2=2;
                 int LA2_0 = input.LA(1);
 
-                if ( (LA2_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdenti!
 fierKey(DroolsSoftKeywords.RULE))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))))) {
+                if ( (LA2_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(valid!
 ateIdentifierKey(DroolsSoftKeywords.RULE))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))))) {
                     alt2=1;
                 }
 
@@ -889,13 +889,13 @@
             int alt5=9;
             int LA5_0 = input.LA(1);
 
-            if ( (LA5_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TE!
 MPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL)!
 )||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKe
y(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMP!
 LATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))) {
+            if ( (LA5_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && vali!
 dateLT(3, DroolsSoftKeywords.EXPIRES))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||(validateIdentifie!
 rKey(DroolsSoftKeywords.GLOBAL))||((validateLT(1, DroolsSoftKeywords.T
EMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKe!
 ywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))) {
                 int LA5_1 = input.LA(2);
 
                 if ( (LA5_1==MISC) && (((validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-")!
  && validateLT(3, DroolsSoftKeywords.EFFECTIVE))))) {
                     alt5=1;
                 }
-                else if ( (LA5_1==ID) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords!
 .TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, "import") && validateLT(2,!
  "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||(
(validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsS!
 oftKeywords.GLOBAL))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&!
 (validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1,
 DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))))) {
+                else if ( (LA5_1==ID) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, Dr!
 oolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TE!
 MPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((val
idateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.IMPORT))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(Drool!
 sSoftKeywords.TEMPLATE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, DroolsSoftKeywords.TEM!
 PLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((vali
dateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))||((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.DECLARE))&&(validateIdentifierKey(DroolsSoftKeywords.DECLARE)))))) {
                     int LA5_3 = input.LA(3);
 
                     if ( (((validateLT(1, "import") && validateLT(2, "function") )&&(validateIdentifierKey(DroolsSoftKeywords.IMPORT)))) ) {
@@ -930,11 +930,8 @@
                         throw nvae;
                     }
                 }
-                else if ( (LA5_1==INT) && (((validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))))) {
-                    alt5=1;
-                }
-                else if ( (LA5_1==STRING) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, Drool!
 sSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))))) {
-                    int LA5_5 = input.LA(3);
+                else if ( (LA5_1==STRING) && (((validateIdentifierKey(DroolsSoftKeywords.QUERY))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, Drool!
 sSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||(validateIdentifierKey(DroolsSoftKeywords.RULE))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))||((validateLT(1, DroolsSoftKeywords.TEMPLATE))&&(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE)))))) {
+                    int LA5_4 = input.LA(3);
 
                     if ( ((validateIdentifierKey(DroolsSoftKeywords.DIALECT))) ) {
                         alt5=1;
@@ -951,11 +948,14 @@
                     else {
                         if (backtracking>0) {failed=true; return retval;}
                         NoViableAltException nvae =
-                            new NoViableAltException("454:1: statement options {k=2; } : ( rule_attribute | {...}? => function_import_statement | import_statement | global | function | {...}? => template | {...}? => type_declaration | rule | query );", 5, 5, input);
+                            new NoViableAltException("454:1: statement options {k=2; } : ( rule_attribute | {...}? => function_import_statement | import_statement | global | function | {...}? => template | {...}? => type_declaration | rule | query );", 5, 4, input);
 
                         throw nvae;
                     }
                 }
+                else if ( (LA5_1==INT) && (((validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))))) {
+                    alt5=1;
+                }
                 else if ( (LA5_1==LEFT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.SALIENCE)))) {
                     alt5=1;
                 }
@@ -3659,7 +3659,7 @@
             int alt28=2;
             int LA28_0 = input.LA(1);
 
-            if ( (LA28_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.DIALECT))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(Drool!
 sSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ATTRIBUTES))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))))) {
+            if ( (LA28_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(Drool!
 sSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ATTRIBUTES))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))))) {
                 alt28=1;
             }
             switch (alt28) {
@@ -4032,7 +4032,7 @@
             int alt32=2;
             int LA32_0 = input.LA(1);
 
-            if ( (LA32_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.DIALECT))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(Drool!
 sSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ATTRIBUTES))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))))) {
+            if ( (LA32_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))||(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(Drool!
 sSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ATTRIBUTES))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))))) {
                 int LA32_1 = input.LA(2);
 
                 if ( (LA32_1==COLON) && ((validateIdentifierKey(DroolsSoftKeywords.ATTRIBUTES)))) {
@@ -4227,7 +4227,7 @@
             int alt35=12;
             int LA35_0 = input.LA(1);
 
-            if ( (LA35_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(Drools!
 SoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))))) {
+            if ( (LA35_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.DIALECT))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.ENABLED))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(Drools!
 SoftKeywords.DURATION))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))))) {
                 int LA35_1 = input.LA(2);
 
                 if ( (LA35_1==MISC) && (((validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.EXPIRES))||(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, "-") && validateLT(5, DroolsSoftKeywords.ACTIVE))||(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.LOOP))||(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.GROUP))||(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, "-") && validateLT(3, DroolsSoftKeywords.FOCUS))||(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, "-"!
 ) && validateLT(3, DroolsSoftKeywords.EFFECTIVE))))) {
@@ -4287,14 +4287,8 @@
                         throw nvae;
                     }
                 }
-                else if ( (LA35_1==STRING) && ((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))) {
-                    alt35=12;
-                }
-                else if ( (LA35_1==BOOL) && ((validateIdentifierKey(DroolsSoftKeywords.ENABLED)))) {
-                    alt35=9;
-                }
                 else if ( (LA35_1==INT) && (((validateIdentifierKey(DroolsSoftKeywords.SALIENCE))||(validateIdentifierKey(DroolsSoftKeywords.DURATION))))) {
-                    int LA35_5 = input.LA(3);
+                    int LA35_3 = input.LA(3);
 
                     if ( ((validateIdentifierKey(DroolsSoftKeywords.SALIENCE))) ) {
                         alt35=1;
@@ -4305,14 +4299,20 @@
                     else {
                         if (backtracking>0) {failed=true; return retval;}
                         NoViableAltException nvae =
-                            new NoViableAltException("684:1: rule_attribute : ( salience | no_loop | agenda_group | duration | activation_group | auto_focus | date_effective | date_expires | enabled | ruleflow_group | lock_on_active | dialect );", 35, 5, input);
+                            new NoViableAltException("684:1: rule_attribute : ( salience | no_loop | agenda_group | duration | activation_group | auto_focus | date_effective | date_expires | enabled | ruleflow_group | lock_on_active | dialect );", 35, 3, input);
 
                         throw nvae;
                     }
                 }
+                else if ( (LA35_1==BOOL) && ((validateIdentifierKey(DroolsSoftKeywords.ENABLED)))) {
+                    alt35=9;
+                }
                 else if ( (LA35_1==LEFT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.SALIENCE)))) {
                     alt35=1;
                 }
+                else if ( (LA35_1==STRING) && ((validateIdentifierKey(DroolsSoftKeywords.DIALECT)))) {
+                    alt35=12;
+                }
                 else {
                     if (backtracking>0) {failed=true; return retval;}
                     NoViableAltException nvae =
@@ -5980,7 +5980,10 @@
             if ( (LA48_0==LEFT_PAREN) ) {
                 int LA48_1 = input.LA(2);
 
-                if ( (LA48_1==ID) ) {
+                if ( (LA48_1==LEFT_PAREN) ) {
+                    alt48=2;
+                }
+                else if ( (LA48_1==ID) ) {
                     switch ( input.LA(3) ) {
                     case DOT:
                     case COLON:
@@ -5989,26 +5992,185 @@
                         alt48=2;
                         }
                         break;
-                    case ID:
+                    case LEFT_PAREN:
                         {
-                        int LA48_4 = input.LA(4);
+                        switch ( input.LA(4) ) {
+                        case LEFT_PAREN:
+                            {
+                            int LA48_6 = input.LA(5);
 
-                        if ( (synpred3()) ) {
-                            alt48=1;
-                        }
-                        else if ( (true) ) {
+                            if ( (synpred3()) ) {
+                                alt48=1;
+                            }
+                            else if ( (true) ) {
+                                alt48=2;
+                            }
+                            else {
+                                if (backtracking>0) {failed=true; return retval;}
+                                NoViableAltException nvae =
+                                    new NoViableAltException("830:1: lhs_and : ( ( LEFT_PAREN and_key )=> LEFT_PAREN and= and_key ( lhs_unary )+ RIGHT_PAREN -> ^( VT_AND_PREFIX[$and.start] ( lhs_unary )+ RIGHT_PAREN ) | ( lhs_unary -> lhs_unary ) ( ( and_key | DOUBLE_AMPER )=> (value= and_key | amper= DOUBLE_AMPER ) lhs_unary -> ^( VT_AND_INFIX[andToken] $lhs_and lhs_unary ) )* );", 48, 6, input);
+
+                                throw nvae;
+                            }
+                            }
+                            break;
+                        case ID:
+                            {
+                            int LA48_7 = input.LA(5);
+
+                            if ( (synpred3()) ) {
+                                alt48=1;
+                            }
+                            else if ( (true) ) {
+                                alt48=2;
+                            }
+                            else {
+                                if (backtracking>0) {failed=true; return retval;}
+                                NoViableAltException nvae =
+                                    new NoViableAltException("830:1: lhs_and : ( ( LEFT_PAREN and_key )=> LEFT_PAREN and= and_key ( lhs_unary )+ RIGHT_PAREN -> ^( VT_AND_PREFIX[$and.start] ( lhs_unary )+ RIGHT_PAREN ) | ( lhs_unary -> lhs_unary ) ( ( and_key | DOUBLE_AMPER )=> (value= and_key | amper= DOUBLE_AMPER ) lhs_unary -> ^( VT_AND_INFIX[andToken] $lhs_and lhs_unary ) )* );", 48, 7, input);
+
+                                throw nvae;
+                            }
+                            }
+                            break;
+                        case VT_COMPILATION_UNIT:
+                        case VT_FUNCTION_IMPORT:
+                        case VT_FACT:
+                        case VT_CONSTRAINTS:
+                        case VT_LABEL:
+                        case VT_QUERY_ID:
+                        case VT_TEMPLATE_ID:
+                        case VT_TYPE_DECLARE_ID:
+                        case VT_RULE_ID:
+                        case VT_ENTRYPOINT_ID:
+                        case VT_SLOT_ID:
+                        case VT_SLOT:
+                        case VT_RULE_ATTRIBUTES:
+                        case VT_RHS_CHUNK:
+                        case VT_CURLY_CHUNK:
+                        case VT_SQUARE_CHUNK:
+                        case VT_PAREN_CHUNK:
+                        case VT_BEHAVIOR:
+                        case VT_AND_IMPLICIT:
+                        case VT_AND_PREFIX:
+                        case VT_OR_PREFIX:
+                        case VT_AND_INFIX:
+                        case VT_OR_INFIX:
+                        case VT_ACCUMULATE_INIT_CLAUSE:
+                        case VT_ACCUMULATE_ID_CLAUSE:
+                        case VT_FROM_SOURCE:
+                        case VT_EXPRESSION_CHAIN:
+                        case VT_PATTERN:
+                        case VT_FACT_BINDING:
+                        case VT_FACT_OR:
+                        case VT_BIND_FIELD:
+                        case VT_FIELD:
+                        case VT_ACCESSOR_PATH:
+                        case VT_ACCESSOR_ELEMENT:
+                        case VT_DATA_TYPE:
+                        case VT_PATTERN_TYPE:
+                        case VT_PACKAGE_ID:
+                        case VT_IMPORT_ID:
+                        case VT_GLOBAL_ID:
+                        case VT_FUNCTION_ID:
+                        case VT_PARAM_LIST:
+                        case VK_DATE_EFFECTIVE:
+                        case VK_DATE_EXPIRES:
+                        case VK_LOCK_ON_ACTIVE:
+                        case VK_NO_LOOP:
+                        case VK_AUTO_FOCUS:
+                        case VK_ACTIVATION_GROUP:
+                        case VK_AGENDA_GROUP:
+                        case VK_RULEFLOW_GROUP:
+                        case VK_DURATION:
+                        case VK_DIALECT:
+                        case VK_SALIENCE:
+                        case VK_ENABLED:
+                        case VK_ATTRIBUTES:
+                        case VK_RULE:
+                        case VK_IMPORT:
+                        case VK_PACKAGE:
+                        case VK_TEMPLATE:
+                        case VK_QUERY:
+                        case VK_DECLARE:
+                        case VK_FUNCTION:
+                        case VK_GLOBAL:
+                        case VK_EVAL:
+                        case VK_CONTAINS:
+                        case VK_MATCHES:
+                        case VK_EXCLUDES:
+                        case VK_SOUNDSLIKE:
+                        case VK_MEMBEROF:
+                        case VK_ENTRY_POINT:
+                        case VK_NOT:
+                        case VK_IN:
+                        case VK_OR:
+                        case VK_AND:
+                        case VK_EXISTS:
+                        case VK_FORALL:
+                        case VK_ACTION:
+                        case VK_REVERSE:
+                        case VK_RESULT:
+                        case SEMICOLON:
+                        case DOT:
+                        case DOT_STAR:
+                        case END:
+                        case STRING:
+                        case COMMA:
+                        case RIGHT_PAREN:
+                        case AT:
+                        case COLON:
+                        case EQUALS:
+                        case WHEN:
+                        case BOOL:
+                        case INT:
+                        case DOUBLE_PIPE:
+                        case DOUBLE_AMPER:
+                        case FROM:
+                        case OVER:
+                        case ACCUMULATE:
+                        case INIT:
+                        case COLLECT:
+                        case ARROW:
+                        case EQUAL:
+                        case GREATER:
+                        case GREATER_EQUAL:
+                        case LESS:
+                        case LESS_EQUAL:
+                        case NOT_EQUAL:
+                        case GRAVE_ACCENT:
+                        case FLOAT:
+                        case NULL:
+                        case LEFT_SQUARE:
+                        case RIGHT_SQUARE:
+                        case THEN:
+                        case LEFT_CURLY:
+                        case RIGHT_CURLY:
+                        case MISC:
+                        case EOL:
+                        case WS:
+                        case EscapeSequence:
+                        case HexDigit:
+                        case UnicodeEscape:
+                        case OctalEscape:
+                        case SH_STYLE_SINGLE_LINE_COMMENT:
+                        case C_STYLE_SINGLE_LINE_COMMENT:
+                        case MULTI_LINE_COMMENT:
+                            {
                             alt48=2;
-                        }
-                        else {
+                            }
+                            break;
+                        default:
                             if (backtracking>0) {failed=true; return retval;}
                             NoViableAltException nvae =
                                 new NoViableAltException("830:1: lhs_and : ( ( LEFT_PAREN and_key )=> LEFT_PAREN and= and_key ( lhs_unary )+ RIGHT_PAREN -> ^( VT_AND_PREFIX[$and.start] ( lhs_unary )+ RIGHT_PAREN ) | ( lhs_unary -> lhs_unary ) ( ( and_key | DOUBLE_AMPER )=> (value= and_key | amper= DOUBLE_AMPER ) lhs_unary -> ^( VT_AND_INFIX[andToken] $lhs_and lhs_unary ) )* );", 48, 4, input);
 
                             throw nvae;
                         }
+
                         }
                         break;
-                    case LEFT_PAREN:
+                    case ID:
                         {
                         int LA48_5 = input.LA(4);
 
@@ -6036,9 +6198,6 @@
                     }
 
                 }
-                else if ( (LA48_1==LEFT_PAREN) ) {
-                    alt48=2;
-                }
                 else {
                     if (backtracking>0) {failed=true; return retval;}
                     NoViableAltException nvae =
@@ -8769,32 +8928,7 @@
             }
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1049:3: ( ( LEFT_PAREN )=>args= paren_chunk )?
             int alt66=2;
-            int LA66_0 = input.LA(1);
-
-            if ( (LA66_0==LEFT_PAREN) ) {
-                int LA66_1 = input.LA(2);
-
-                if ( (LA66_1==LEFT_PAREN) ) {
-                    int LA66_3 = input.LA(3);
-
-                    if ( (synpred8()) ) {
-                        alt66=1;
-                    }
-                }
-                else if ( (LA66_1==ID) ) {
-                    int LA66_4 = input.LA(3);
-
-                    if ( (synpred8()) ) {
-                        alt66=1;
-                    }
-                }
-                else if ( ((LA66_1>=VT_COMPILATION_UNIT && LA66_1<=SEMICOLON)||(LA66_1>=DOT && LA66_1<=STRING)||LA66_1==COMMA||(LA66_1>=AT && LA66_1<=MULTI_LINE_COMMENT)) && (synpred8())) {
-                    alt66=1;
-                }
-                else if ( (LA66_1==RIGHT_PAREN) && (synpred8())) {
-                    alt66=1;
-                }
-            }
+            alt66 = dfa66.predict(input);
             switch (alt66) {
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1049:5: ( LEFT_PAREN )=>args= paren_chunk
@@ -8904,7 +9038,7 @@
     };
 
     // $ANTLR start expression_chain
-    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1059:1: expression_chain : DOT ID ( ( LEFT_SQUARE )=> square_chunk | ( LEFT_PAREN )=> paren_chunk )? ( expression_chain )? -> ^( VT_EXPRESSION_CHAIN[$DOT] ID ( square_chunk )? ( paren_chunk )? ( expression_chain )? ) ;
+    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1059:1: expression_chain : DOT ID ({...}? paren_chunk | square_chunk )? ( expression_chain )? -> ^( VT_EXPRESSION_CHAIN[$DOT] ID ( square_chunk )? ( paren_chunk )? ( expression_chain )? ) ;
     public final expression_chain_return expression_chain() throws RecognitionException {
         expression_chain_return retval = new expression_chain_return();
         retval.start = input.LT(1);
@@ -8913,9 +9047,9 @@
 
         Token DOT191=null;
         Token ID192=null;
-        square_chunk_return square_chunk193 = null;
+        paren_chunk_return paren_chunk193 = null;
 
-        paren_chunk_return paren_chunk194 = null;
+        square_chunk_return square_chunk194 = null;
 
         expression_chain_return expression_chain195 = null;
 
@@ -8928,8 +9062,8 @@
         RewriteRuleSubtreeStream stream_expression_chain=new RewriteRuleSubtreeStream(adaptor,"rule expression_chain");
         RewriteRuleSubtreeStream stream_paren_chunk=new RewriteRuleSubtreeStream(adaptor,"rule paren_chunk");
         try {
-            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1060:2: ( DOT ID ( ( LEFT_SQUARE )=> square_chunk | ( LEFT_PAREN )=> paren_chunk )? ( expression_chain )? -> ^( VT_EXPRESSION_CHAIN[$DOT] ID ( square_chunk )? ( paren_chunk )? ( expression_chain )? ) )
-            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1061:3: DOT ID ( ( LEFT_SQUARE )=> square_chunk | ( LEFT_PAREN )=> paren_chunk )? ( expression_chain )?
+            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1060:2: ( DOT ID ({...}? paren_chunk | square_chunk )? ( expression_chain )? -> ^( VT_EXPRESSION_CHAIN[$DOT] ID ( square_chunk )? ( paren_chunk )? ( expression_chain )? ) )
+            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1061:3: DOT ID ({...}? paren_chunk | square_chunk )? ( expression_chain )?
             {
             DOT191=(Token)input.LT(1);
             match(input,DOT,FOLLOW_DOT_in_expression_chain3407); if (failed) return retval;
@@ -8945,29 +9079,187 @@
             if ( backtracking==0 ) {
               	emit(ID192, DroolsEditorType.IDENTIFIER);	
             }
-            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1063:4: ( ( LEFT_SQUARE )=> square_chunk | ( LEFT_PAREN )=> paren_chunk )?
+            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1063:4: ({...}? paren_chunk | square_chunk )?
             int alt68=3;
-            alt68 = dfa68.predict(input);
+            int LA68_0 = input.LA(1);
+
+            if ( (LA68_0==LEFT_PAREN) ) {
+                switch ( input.LA(2) ) {
+                    case LEFT_PAREN:
+                        {
+                        int LA68_4 = input.LA(3);
+
+                        if ( (input.LA(1) == LEFT_PAREN) ) {
+                            alt68=1;
+                        }
+                        }
+                        break;
+                    case ID:
+                        {
+                        int LA68_5 = input.LA(3);
+
+                        if ( (input.LA(1) == LEFT_PAREN) ) {
+                            alt68=1;
+                        }
+                        }
+                        break;
+                    case VT_COMPILATION_UNIT:
+                    case VT_FUNCTION_IMPORT:
+                    case VT_FACT:
+                    case VT_CONSTRAINTS:
+                    case VT_LABEL:
+                    case VT_QUERY_ID:
+                    case VT_TEMPLATE_ID:
+                    case VT_TYPE_DECLARE_ID:
+                    case VT_RULE_ID:
+                    case VT_ENTRYPOINT_ID:
+                    case VT_SLOT_ID:
+                    case VT_SLOT:
+                    case VT_RULE_ATTRIBUTES:
+                    case VT_RHS_CHUNK:
+                    case VT_CURLY_CHUNK:
+                    case VT_SQUARE_CHUNK:
+                    case VT_PAREN_CHUNK:
+                    case VT_BEHAVIOR:
+                    case VT_AND_IMPLICIT:
+                    case VT_AND_PREFIX:
+                    case VT_OR_PREFIX:
+                    case VT_AND_INFIX:
+                    case VT_OR_INFIX:
+                    case VT_ACCUMULATE_INIT_CLAUSE:
+                    case VT_ACCUMULATE_ID_CLAUSE:
+                    case VT_FROM_SOURCE:
+                    case VT_EXPRESSION_CHAIN:
+                    case VT_PATTERN:
+                    case VT_FACT_BINDING:
+                    case VT_FACT_OR:
+                    case VT_BIND_FIELD:
+                    case VT_FIELD:
+                    case VT_ACCESSOR_PATH:
+                    case VT_ACCESSOR_ELEMENT:
+                    case VT_DATA_TYPE:
+                    case VT_PATTERN_TYPE:
+                    case VT_PACKAGE_ID:
+                    case VT_IMPORT_ID:
+                    case VT_GLOBAL_ID:
+                    case VT_FUNCTION_ID:
+                    case VT_PARAM_LIST:
+                    case VK_DATE_EFFECTIVE:
+                    case VK_DATE_EXPIRES:
+                    case VK_LOCK_ON_ACTIVE:
+                    case VK_NO_LOOP:
+                    case VK_AUTO_FOCUS:
+                    case VK_ACTIVATION_GROUP:
+                    case VK_AGENDA_GROUP:
+                    case VK_RULEFLOW_GROUP:
+                    case VK_DURATION:
+                    case VK_DIALECT:
+                    case VK_SALIENCE:
+                    case VK_ENABLED:
+                    case VK_ATTRIBUTES:
+                    case VK_RULE:
+                    case VK_IMPORT:
+                    case VK_PACKAGE:
+                    case VK_TEMPLATE:
+                    case VK_QUERY:
+                    case VK_DECLARE:
+                    case VK_FUNCTION:
+                    case VK_GLOBAL:
+                    case VK_EVAL:
+                    case VK_CONTAINS:
+                    case VK_MATCHES:
+                    case VK_EXCLUDES:
+                    case VK_SOUNDSLIKE:
+                    case VK_MEMBEROF:
+                    case VK_ENTRY_POINT:
+                    case VK_NOT:
+                    case VK_IN:
+                    case VK_OR:
+                    case VK_AND:
+                    case VK_EXISTS:
+                    case VK_FORALL:
+                    case VK_ACTION:
+                    case VK_REVERSE:
+                    case VK_RESULT:
+                    case SEMICOLON:
+                    case DOT:
+                    case DOT_STAR:
+                    case END:
+                    case STRING:
+                    case COMMA:
+                    case RIGHT_PAREN:
+                    case AT:
+                    case COLON:
+                    case EQUALS:
+                    case WHEN:
+                    case BOOL:
+                    case INT:
+                    case DOUBLE_PIPE:
+                    case DOUBLE_AMPER:
+                    case FROM:
+                    case OVER:
+                    case ACCUMULATE:
+                    case INIT:
+                    case COLLECT:
+                    case ARROW:
+                    case EQUAL:
+                    case GREATER:
+                    case GREATER_EQUAL:
+                    case LESS:
+                    case LESS_EQUAL:
+                    case NOT_EQUAL:
+                    case GRAVE_ACCENT:
+                    case FLOAT:
+                    case NULL:
+                    case LEFT_SQUARE:
+                    case RIGHT_SQUARE:
+                    case THEN:
+                    case LEFT_CURLY:
+                    case RIGHT_CURLY:
+                    case MISC:
+                    case EOL:
+                    case WS:
+                    case EscapeSequence:
+                    case HexDigit:
+                    case UnicodeEscape:
+                    case OctalEscape:
+                    case SH_STYLE_SINGLE_LINE_COMMENT:
+                    case C_STYLE_SINGLE_LINE_COMMENT:
+                    case MULTI_LINE_COMMENT:
+                        {
+                        alt68=1;
+                        }
+                        break;
+                }
+
+            }
+            else if ( (LA68_0==LEFT_SQUARE) ) {
+                alt68=2;
+            }
             switch (alt68) {
                 case 1 :
-                    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1064:6: ( LEFT_SQUARE )=> square_chunk
+                    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1064:6: {...}? paren_chunk
                     {
-                    pushFollow(FOLLOW_square_chunk_in_expression_chain3436);
-                    square_chunk193=square_chunk();
+                    if ( !(input.LA(1) == LEFT_PAREN) ) {
+                        if (backtracking>0) {failed=true; return retval;}
+                        throw new FailedPredicateException(input, "expression_chain", "input.LA(1) == LEFT_PAREN");
+                    }
+                    pushFollow(FOLLOW_paren_chunk_in_expression_chain3430);
+                    paren_chunk193=paren_chunk();
                     _fsp--;
                     if (failed) return retval;
-                    if ( backtracking==0 ) stream_square_chunk.add(square_chunk193.getTree());
+                    if ( backtracking==0 ) stream_paren_chunk.add(paren_chunk193.getTree());
 
                     }
                     break;
                 case 2 :
-                    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1066:6: ( LEFT_PAREN )=> paren_chunk
+                    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1066:6: square_chunk
                     {
-                    pushFollow(FOLLOW_paren_chunk_in_expression_chain3458);
-                    paren_chunk194=paren_chunk();
+                    pushFollow(FOLLOW_square_chunk_in_expression_chain3444);
+                    square_chunk194=square_chunk();
                     _fsp--;
                     if (failed) return retval;
-                    if ( backtracking==0 ) stream_paren_chunk.add(paren_chunk194.getTree());
+                    if ( backtracking==0 ) stream_square_chunk.add(square_chunk194.getTree());
 
                     }
                     break;
@@ -8985,7 +9277,7 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1068:4: expression_chain
                     {
-                    pushFollow(FOLLOW_expression_chain_in_expression_chain3469);
+                    pushFollow(FOLLOW_expression_chain_in_expression_chain3455);
                     expression_chain195=expression_chain();
                     _fsp--;
                     if (failed) return retval;
@@ -9114,7 +9406,7 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1073:4: fact_binding
                     {
-                    pushFollow(FOLLOW_fact_binding_in_lhs_pattern3502);
+                    pushFollow(FOLLOW_fact_binding_in_lhs_pattern3488);
                     fact_binding196=fact_binding();
                     _fsp--;
                     if (failed) return retval;
@@ -9152,7 +9444,7 @@
                 case 2 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1074:4: fact
                     {
-                    pushFollow(FOLLOW_fact_in_lhs_pattern3515);
+                    pushFollow(FOLLOW_fact_in_lhs_pattern3501);
                     fact197=fact();
                     _fsp--;
                     if (failed) return retval;
@@ -9239,7 +9531,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1078:3: ( label ( fact | LEFT_PAREN fact_binding_expression RIGHT_PAREN ) -> ^( VT_FACT_BINDING label ( fact )? ( fact_binding_expression )? ( RIGHT_PAREN )? ) )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1078:5: label ( fact | LEFT_PAREN fact_binding_expression RIGHT_PAREN )
             {
-            pushFollow(FOLLOW_label_in_fact_binding3535);
+            pushFollow(FOLLOW_label_in_fact_binding3521);
             label198=label();
             _fsp--;
             if (failed) return retval;
@@ -9265,7 +9557,7 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1079:5: fact
                     {
-                    pushFollow(FOLLOW_fact_in_fact_binding3541);
+                    pushFollow(FOLLOW_fact_in_fact_binding3527);
                     fact199=fact();
                     _fsp--;
                     if (failed) return retval;
@@ -9277,19 +9569,19 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1080:6: LEFT_PAREN fact_binding_expression RIGHT_PAREN
                     {
                     LEFT_PAREN200=(Token)input.LT(1);
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_binding3548); if (failed) return retval;
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_binding3534); if (failed) return retval;
                     if ( backtracking==0 ) stream_LEFT_PAREN.add(LEFT_PAREN200);
 
                     if ( backtracking==0 ) {
                       	emit(LEFT_PAREN200, DroolsEditorType.SYMBOL);	
                     }
-                    pushFollow(FOLLOW_fact_binding_expression_in_fact_binding3556);
+                    pushFollow(FOLLOW_fact_binding_expression_in_fact_binding3542);
                     fact_binding_expression201=fact_binding_expression();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) stream_fact_binding_expression.add(fact_binding_expression201.getTree());
                     RIGHT_PAREN202=(Token)input.LT(1);
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_binding3564); if (failed) return retval;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_binding3550); if (failed) return retval;
                     if ( backtracking==0 ) stream_RIGHT_PAREN.add(RIGHT_PAREN202);
 
                     if ( backtracking==0 ) {
@@ -9401,7 +9693,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1090:5: ( fact -> fact )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1090:6: fact
             {
-            pushFollow(FOLLOW_fact_in_fact_binding_expression3605);
+            pushFollow(FOLLOW_fact_in_fact_binding_expression3591);
             fact203=fact();
             _fsp--;
             if (failed) return retval;
@@ -9467,7 +9759,7 @@
             	        case 1 :
             	            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1090:23: value= or_key
             	            {
-            	            pushFollow(FOLLOW_or_key_in_fact_binding_expression3617);
+            	            pushFollow(FOLLOW_or_key_in_fact_binding_expression3603);
             	            value=or_key();
             	            _fsp--;
             	            if (failed) return retval;
@@ -9482,7 +9774,7 @@
             	            // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1090:62: pipe= DOUBLE_PIPE
             	            {
             	            pipe=(Token)input.LT(1);
-            	            match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_fact_binding_expression3623); if (failed) return retval;
+            	            match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_fact_binding_expression3609); if (failed) return retval;
             	            if ( backtracking==0 ) stream_DOUBLE_PIPE.add(pipe);
 
             	            if ( backtracking==0 ) {
@@ -9494,7 +9786,7 @@
 
             	    }
 
-            	    pushFollow(FOLLOW_fact_in_fact_binding_expression3628);
+            	    pushFollow(FOLLOW_fact_in_fact_binding_expression3614);
             	    fact204=fact();
             	    _fsp--;
             	    if (failed) return retval;
@@ -9587,13 +9879,13 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1097:2: ( pattern_type LEFT_PAREN ( constraints )? RIGHT_PAREN -> ^( VT_FACT pattern_type ( constraints )? RIGHT_PAREN ) )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1097:4: pattern_type LEFT_PAREN ( constraints )? RIGHT_PAREN
             {
-            pushFollow(FOLLOW_pattern_type_in_fact3668);
+            pushFollow(FOLLOW_pattern_type_in_fact3654);
             pattern_type205=pattern_type();
             _fsp--;
             if (failed) return retval;
             if ( backtracking==0 ) stream_pattern_type.add(pattern_type205.getTree());
             LEFT_PAREN206=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact3673); if (failed) return retval;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact3659); if (failed) return retval;
             if ( backtracking==0 ) stream_LEFT_PAREN.add(LEFT_PAREN206);
 
             if ( backtracking==0 ) {
@@ -9613,7 +9905,7 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1100:4: constraints
                     {
-                    pushFollow(FOLLOW_constraints_in_fact3684);
+                    pushFollow(FOLLOW_constraints_in_fact3670);
                     constraints207=constraints();
                     _fsp--;
                     if (failed) return retval;
@@ -9625,7 +9917,7 @@
             }
 
             RIGHT_PAREN208=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact3690); if (failed) return retval;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact3676); if (failed) return retval;
             if ( backtracking==0 ) stream_RIGHT_PAREN.add(RIGHT_PAREN208);
 
             if ( backtracking==0 ) {
@@ -9728,7 +10020,7 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            pushFollow(FOLLOW_constraint_in_constraints3724);
+            pushFollow(FOLLOW_constraint_in_constraints3710);
             constraint209=constraint();
             _fsp--;
             if (failed) return retval;
@@ -9749,12 +10041,12 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1117:17: COMMA constraint
             	    {
             	    COMMA210=(Token)input.LT(1);
-            	    match(input,COMMA,FOLLOW_COMMA_in_constraints3728); if (failed) return retval;
+            	    match(input,COMMA,FOLLOW_COMMA_in_constraints3714); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	      	emit(COMMA210, DroolsEditorType.SYMBOL);
             	      		emit(Location.LOCATION_LHS_INSIDE_CONDITION_START);	
             	    }
-            	    pushFollow(FOLLOW_constraint_in_constraints3735);
+            	    pushFollow(FOLLOW_constraint_in_constraints3721);
             	    constraint211=constraint();
             	    _fsp--;
             	    if (failed) return retval;
@@ -9811,7 +10103,7 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            pushFollow(FOLLOW_or_constr_in_constraint3749);
+            pushFollow(FOLLOW_or_constr_in_constraint3735);
             or_constr212=or_constr();
             _fsp--;
             if (failed) return retval;
@@ -9863,7 +10155,7 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            pushFollow(FOLLOW_and_constr_in_or_constr3760);
+            pushFollow(FOLLOW_and_constr_in_or_constr3746);
             and_constr213=and_constr();
             _fsp--;
             if (failed) return retval;
@@ -9884,7 +10176,7 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1127:17: DOUBLE_PIPE and_constr
             	    {
             	    DOUBLE_PIPE214=(Token)input.LT(1);
-            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_constr3764); if (failed) return retval;
+            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_constr3750); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	    DOUBLE_PIPE214_tree = (Object)adaptor.create(DOUBLE_PIPE214);
             	    root_0 = (Object)adaptor.becomeRoot(DOUBLE_PIPE214_tree, root_0);
@@ -9892,7 +10184,7 @@
             	    if ( backtracking==0 ) {
             	      	emit(DOUBLE_PIPE214, DroolsEditorType.SYMBOL);	
             	    }
-            	    pushFollow(FOLLOW_and_constr_in_or_constr3771);
+            	    pushFollow(FOLLOW_and_constr_in_or_constr3757);
             	    and_constr215=and_constr();
             	    _fsp--;
             	    if (failed) return retval;
@@ -9953,7 +10245,7 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            pushFollow(FOLLOW_unary_constr_in_and_constr3786);
+            pushFollow(FOLLOW_unary_constr_in_and_constr3772);
             unary_constr216=unary_constr();
             _fsp--;
             if (failed) return retval;
@@ -9974,7 +10266,7 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1132:19: DOUBLE_AMPER unary_constr
             	    {
             	    DOUBLE_AMPER217=(Token)input.LT(1);
-            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_constr3790); if (failed) return retval;
+            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_constr3776); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	    DOUBLE_AMPER217_tree = (Object)adaptor.create(DOUBLE_AMPER217);
             	    root_0 = (Object)adaptor.becomeRoot(DOUBLE_AMPER217_tree, root_0);
@@ -9982,7 +10274,7 @@
             	    if ( backtracking==0 ) {
             	      	emit(DOUBLE_AMPER217, DroolsEditorType.SYMBOL);;	
             	    }
-            	    pushFollow(FOLLOW_unary_constr_in_and_constr3797);
+            	    pushFollow(FOLLOW_unary_constr_in_and_constr3783);
             	    unary_constr218=unary_constr();
             	    _fsp--;
             	    if (failed) return retval;
@@ -10096,12 +10388,12 @@
                     {
                     root_0 = (Object)adaptor.nil();
 
-                    pushFollow(FOLLOW_eval_key_in_unary_constr3830);
+                    pushFollow(FOLLOW_eval_key_in_unary_constr3816);
                     eval_key219=eval_key();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) root_0 = (Object)adaptor.becomeRoot(eval_key219.getTree(), root_0);
-                    pushFollow(FOLLOW_paren_chunk_in_unary_constr3833);
+                    pushFollow(FOLLOW_paren_chunk_in_unary_constr3819);
                     paren_chunk220=paren_chunk();
                     _fsp--;
                     if (failed) return retval;
@@ -10114,7 +10406,7 @@
                     {
                     root_0 = (Object)adaptor.nil();
 
-                    pushFollow(FOLLOW_field_constraint_in_unary_constr3838);
+                    pushFollow(FOLLOW_field_constraint_in_unary_constr3824);
                     field_constraint221=field_constraint();
                     _fsp--;
                     if (failed) return retval;
@@ -10128,17 +10420,17 @@
                     root_0 = (Object)adaptor.nil();
 
                     LEFT_PAREN222=(Token)input.LT(1);
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_unary_constr3844); if (failed) return retval;
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_unary_constr3830); if (failed) return retval;
                     if ( backtracking==0 ) {
                       	emit(LEFT_PAREN222, DroolsEditorType.SYMBOL);	
                     }
-                    pushFollow(FOLLOW_or_constr_in_unary_constr3854);
+                    pushFollow(FOLLOW_or_constr_in_unary_constr3840);
                     or_constr223=or_constr();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) adaptor.addChild(root_0, or_constr223.getTree());
                     RIGHT_PAREN224=(Token)input.LT(1);
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_unary_constr3859); if (failed) return retval;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_unary_constr3845); if (failed) return retval;
                     if ( backtracking==0 ) {
                     RIGHT_PAREN224_tree = (Object)adaptor.create(RIGHT_PAREN224);
                     adaptor.addChild(root_0, RIGHT_PAREN224_tree);
@@ -10248,12 +10540,12 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1158:5: label accessor_path ( or_restr_connective | arw= ARROW paren_chunk )?
                     {
-                    pushFollow(FOLLOW_label_in_field_constraint3879);
+                    pushFollow(FOLLOW_label_in_field_constraint3865);
                     label225=label();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) stream_label.add(label225.getTree());
-                    pushFollow(FOLLOW_accessor_path_in_field_constraint3881);
+                    pushFollow(FOLLOW_accessor_path_in_field_constraint3867);
                     accessor_path226=accessor_path();
                     _fsp--;
                     if (failed) return retval;
@@ -10272,7 +10564,7 @@
                         case 1 :
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1159:5: or_restr_connective
                             {
-                            pushFollow(FOLLOW_or_restr_connective_in_field_constraint3888);
+                            pushFollow(FOLLOW_or_restr_connective_in_field_constraint3874);
                             or_restr_connective227=or_restr_connective();
                             _fsp--;
                             if (failed) return retval;
@@ -10284,13 +10576,13 @@
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1159:27: arw= ARROW paren_chunk
                             {
                             arw=(Token)input.LT(1);
-                            match(input,ARROW,FOLLOW_ARROW_in_field_constraint3894); if (failed) return retval;
+                            match(input,ARROW,FOLLOW_ARROW_in_field_constraint3880); if (failed) return retval;
                             if ( backtracking==0 ) stream_ARROW.add(arw);
 
                             if ( backtracking==0 ) {
                               	emit(arw, DroolsEditorType.SYMBOL);	
                             }
-                            pushFollow(FOLLOW_paren_chunk_in_field_constraint3898);
+                            pushFollow(FOLLOW_paren_chunk_in_field_constraint3884);
                             paren_chunk228=paren_chunk();
                             _fsp--;
                             if (failed) return retval;
@@ -10388,12 +10680,12 @@
                 case 2 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1162:4: accessor_path or_restr_connective
                     {
-                    pushFollow(FOLLOW_accessor_path_in_field_constraint3952);
+                    pushFollow(FOLLOW_accessor_path_in_field_constraint3938);
                     accessor_path229=accessor_path();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) stream_accessor_path.add(accessor_path229.getTree());
-                    pushFollow(FOLLOW_or_restr_connective_in_field_constraint3954);
+                    pushFollow(FOLLOW_or_restr_connective_in_field_constraint3940);
                     or_restr_connective230=or_restr_connective();
                     _fsp--;
                     if (failed) return retval;
@@ -10474,14 +10766,14 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1167:4: value= ID COLON
             {
             value=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_label3979); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_label3965); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(value);
 
             if ( backtracking==0 ) {
               	emit(value, DroolsEditorType.IDENTIFIER_VARIABLE);	
             }
             COLON231=(Token)input.LT(1);
-            match(input,COLON,FOLLOW_COLON_in_label3986); if (failed) return retval;
+            match(input,COLON,FOLLOW_COLON_in_label3972); if (failed) return retval;
             if ( backtracking==0 ) stream_COLON.add(COLON231);
 
             if ( backtracking==0 ) {
@@ -10553,7 +10845,7 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective4007);
+            pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective3993);
             and_restr_connective232=and_restr_connective();
             _fsp--;
             if (failed) return retval;
@@ -10572,7 +10864,7 @@
             	        throw new FailedPredicateException(input, "or_restr_connective", "(validateRestr())");
             	    }
             	    DOUBLE_PIPE233=(Token)input.LT(1);
-            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_restr_connective4013); if (failed) return retval;
+            	    match(input,DOUBLE_PIPE,FOLLOW_DOUBLE_PIPE_in_or_restr_connective3999); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	    DOUBLE_PIPE233_tree = (Object)adaptor.create(DOUBLE_PIPE233);
             	    root_0 = (Object)adaptor.becomeRoot(DOUBLE_PIPE233_tree, root_0);
@@ -10580,7 +10872,7 @@
             	    if ( backtracking==0 ) {
             	      	emit(DOUBLE_PIPE233, DroolsEditorType.SYMBOL);	
             	    }
-            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective4021);
+            	    pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective4007);
             	    and_restr_connective234=and_restr_connective();
             	    _fsp--;
             	    if (failed) return retval;
@@ -10641,7 +10933,7 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            pushFollow(FOLLOW_constraint_expression_in_and_restr_connective4036);
+            pushFollow(FOLLOW_constraint_expression_in_and_restr_connective4022);
             constraint_expression235=constraint_expression();
             _fsp--;
             if (failed) return retval;
@@ -10660,7 +10952,7 @@
             	        throw new FailedPredicateException(input, "and_restr_connective", "(validateRestr())");
             	    }
             	    DOUBLE_AMPER236=(Token)input.LT(1);
-            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_restr_connective4042); if (failed) return retval;
+            	    match(input,DOUBLE_AMPER,FOLLOW_DOUBLE_AMPER_in_and_restr_connective4028); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	    DOUBLE_AMPER236_tree = (Object)adaptor.create(DOUBLE_AMPER236);
             	    root_0 = (Object)adaptor.becomeRoot(DOUBLE_AMPER236_tree, root_0);
@@ -10668,7 +10960,7 @@
             	    if ( backtracking==0 ) {
             	      	emit(DOUBLE_AMPER236, DroolsEditorType.SYMBOL);	
             	    }
-            	    pushFollow(FOLLOW_constraint_expression_in_and_restr_connective4049);
+            	    pushFollow(FOLLOW_constraint_expression_in_and_restr_connective4035);
             	    constraint_expression237=constraint_expression();
             	    _fsp--;
             	    if (failed) return retval;
@@ -10738,8 +11030,11 @@
                 if ( (LA83_1==ID) ) {
                     int LA83_10 = input.LA(3);
 
-                    if ( (LA83_10==LEFT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.NOT)))) {
-                        int LA83_18 = input.LA(4);
+                    if ( (LA83_10==ID||LA83_10==STRING||(LA83_10>=BOOL && LA83_10<=INT)||(LA83_10>=FLOAT && LA83_10<=NULL)) && ((validateIdentifierKey(DroolsSoftKeywords.NOT)))) {
+                        alt83=2;
+                    }
+                    else if ( (LA83_10==LEFT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.NOT)))) {
+                        int LA83_24 = input.LA(4);
 
                         if ( ((validateIdentifierKey(DroolsSoftKeywords.NOT))) ) {
                             alt83=1;
@@ -10750,14 +11045,11 @@
                         else {
                             if (backtracking>0) {failed=true; return retval;}
                             NoViableAltException nvae =
-                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 18, input);
+                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 24, input);
 
                             throw nvae;
                         }
                     }
-                    else if ( (LA83_10==ID||LA83_10==STRING||(LA83_10>=BOOL && LA83_10<=INT)||(LA83_10>=FLOAT && LA83_10<=NULL)) && ((validateIdentifierKey(DroolsSoftKeywords.NOT)))) {
-                        alt83=2;
-                    }
                     else if ( (LA83_10==DOT||(LA83_10>=COMMA && LA83_10<=RIGHT_PAREN)||(LA83_10>=DOUBLE_PIPE && LA83_10<=DOUBLE_AMPER)||LA83_10==LEFT_SQUARE) ) {
                         alt83=2;
                     }
@@ -10793,7 +11085,7 @@
                         }
                         }
                         break;
-                    case STRING:
+                    case LEFT_PAREN:
                         {
                         int LA83_32 = input.LA(4);
 
@@ -10812,101 +11104,6 @@
                         }
                         }
                         break;
-                    case INT:
-                        {
-                        int LA83_33 = input.LA(4);
-
-                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
-                            alt83=1;
-                        }
-                        else if ( (true) ) {
-                            alt83=2;
-                        }
-                        else {
-                            if (backtracking>0) {failed=true; return retval;}
-                            NoViableAltException nvae =
-                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 33, input);
-
-                            throw nvae;
-                        }
-                        }
-                        break;
-                    case FLOAT:
-                        {
-                        int LA83_34 = input.LA(4);
-
-                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
-                            alt83=1;
-                        }
-                        else if ( (true) ) {
-                            alt83=2;
-                        }
-                        else {
-                            if (backtracking>0) {failed=true; return retval;}
-                            NoViableAltException nvae =
-                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 34, input);
-
-                            throw nvae;
-                        }
-                        }
-                        break;
-                    case BOOL:
-                        {
-                        int LA83_35 = input.LA(4);
-
-                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
-                            alt83=1;
-                        }
-                        else if ( (true) ) {
-                            alt83=2;
-                        }
-                        else {
-                            if (backtracking>0) {failed=true; return retval;}
-                            NoViableAltException nvae =
-                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 35, input);
-
-                            throw nvae;
-                        }
-                        }
-                        break;
-                    case NULL:
-                        {
-                        int LA83_36 = input.LA(4);
-
-                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
-                            alt83=1;
-                        }
-                        else if ( (true) ) {
-                            alt83=2;
-                        }
-                        else {
-                            if (backtracking>0) {failed=true; return retval;}
-                            NoViableAltException nvae =
-                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 36, input);
-
-                            throw nvae;
-                        }
-                        }
-                        break;
-                    case LEFT_PAREN:
-                        {
-                        int LA83_37 = input.LA(4);
-
-                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
-                            alt83=1;
-                        }
-                        else if ( (true) ) {
-                            alt83=2;
-                        }
-                        else {
-                            if (backtracking>0) {failed=true; return retval;}
-                            NoViableAltException nvae =
-                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 37, input);
-
-                            throw nvae;
-                        }
-                        }
-                        break;
                     case VT_COMPILATION_UNIT:
                     case VT_FUNCTION_IMPORT:
                     case VT_FACT:
@@ -11029,6 +11226,101 @@
                         alt83=2;
                         }
                         break;
+                    case STRING:
+                        {
+                        int LA83_34 = input.LA(4);
+
+                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
+                            alt83=1;
+                        }
+                        else if ( (true) ) {
+                            alt83=2;
+                        }
+                        else {
+                            if (backtracking>0) {failed=true; return retval;}
+                            NoViableAltException nvae =
+                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 34, input);
+
+                            throw nvae;
+                        }
+                        }
+                        break;
+                    case INT:
+                        {
+                        int LA83_35 = input.LA(4);
+
+                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
+                            alt83=1;
+                        }
+                        else if ( (true) ) {
+                            alt83=2;
+                        }
+                        else {
+                            if (backtracking>0) {failed=true; return retval;}
+                            NoViableAltException nvae =
+                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 35, input);
+
+                            throw nvae;
+                        }
+                        }
+                        break;
+                    case FLOAT:
+                        {
+                        int LA83_36 = input.LA(4);
+
+                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
+                            alt83=1;
+                        }
+                        else if ( (true) ) {
+                            alt83=2;
+                        }
+                        else {
+                            if (backtracking>0) {failed=true; return retval;}
+                            NoViableAltException nvae =
+                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 36, input);
+
+                            throw nvae;
+                        }
+                        }
+                        break;
+                    case BOOL:
+                        {
+                        int LA83_37 = input.LA(4);
+
+                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
+                            alt83=1;
+                        }
+                        else if ( (true) ) {
+                            alt83=2;
+                        }
+                        else {
+                            if (backtracking>0) {failed=true; return retval;}
+                            NoViableAltException nvae =
+                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 37, input);
+
+                            throw nvae;
+                        }
+                        }
+                        break;
+                    case NULL:
+                        {
+                        int LA83_38 = input.LA(4);
+
+                        if ( ((validateIdentifierKey(DroolsSoftKeywords.IN))) ) {
+                            alt83=1;
+                        }
+                        else if ( (true) ) {
+                            alt83=2;
+                        }
+                        else {
+                            if (backtracking>0) {failed=true; return retval;}
+                            NoViableAltException nvae =
+                                new NoViableAltException("1182:1: constraint_expression options {k=3; } : ( compound_operator | simple_operator | LEFT_PAREN or_restr_connective RIGHT_PAREN );", 83, 38, input);
+
+                            throw nvae;
+                        }
+                        }
+                        break;
                     default:
                         if (backtracking>0) {failed=true; return retval;}
                         NoViableAltException nvae =
@@ -11080,7 +11372,7 @@
                     {
                     root_0 = (Object)adaptor.nil();
 
-                    pushFollow(FOLLOW_compound_operator_in_constraint_expression4071);
+                    pushFollow(FOLLOW_compound_operator_in_constraint_expression4057);
                     compound_operator238=compound_operator();
                     _fsp--;
                     if (failed) return retval;
@@ -11093,7 +11385,7 @@
                     {
                     root_0 = (Object)adaptor.nil();
 
-                    pushFollow(FOLLOW_simple_operator_in_constraint_expression4076);
+                    pushFollow(FOLLOW_simple_operator_in_constraint_expression4062);
                     simple_operator239=simple_operator();
                     _fsp--;
                     if (failed) return retval;
@@ -11107,17 +11399,17 @@
                     root_0 = (Object)adaptor.nil();
 
                     LEFT_PAREN240=(Token)input.LT(1);
-                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_constraint_expression4081); if (failed) return retval;
+                    match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_constraint_expression4067); if (failed) return retval;
                     if ( backtracking==0 ) {
                       	emit(LEFT_PAREN240, DroolsEditorType.SYMBOL);	
                     }
-                    pushFollow(FOLLOW_or_restr_connective_in_constraint_expression4090);
+                    pushFollow(FOLLOW_or_restr_connective_in_constraint_expression4076);
                     or_restr_connective241=or_restr_connective();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) adaptor.addChild(root_0, or_restr_connective241.getTree());
                     RIGHT_PAREN242=(Token)input.LT(1);
-                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_constraint_expression4095); if (failed) return retval;
+                    match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_constraint_expression4081); if (failed) return retval;
                     if ( backtracking==0 ) {
                     RIGHT_PAREN242_tree = (Object)adaptor.create(RIGHT_PAREN242);
                     adaptor.addChild(root_0, RIGHT_PAREN242_tree);
@@ -11344,7 +11636,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1234:4: EQUAL
                     {
                     EQUAL243=(Token)input.LT(1);
-                    match(input,EQUAL,FOLLOW_EQUAL_in_simple_operator4124); if (failed) return retval;
+                    match(input,EQUAL,FOLLOW_EQUAL_in_simple_operator4110); if (failed) return retval;
                     if ( backtracking==0 ) {
                     EQUAL243_tree = (Object)adaptor.create(EQUAL243);
                     root_0 = (Object)adaptor.becomeRoot(EQUAL243_tree, root_0);
@@ -11359,7 +11651,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1235:4: GREATER
                     {
                     GREATER244=(Token)input.LT(1);
-                    match(input,GREATER,FOLLOW_GREATER_in_simple_operator4132); if (failed) return retval;
+                    match(input,GREATER,FOLLOW_GREATER_in_simple_operator4118); if (failed) return retval;
                     if ( backtracking==0 ) {
                     GREATER244_tree = (Object)adaptor.create(GREATER244);
                     root_0 = (Object)adaptor.becomeRoot(GREATER244_tree, root_0);
@@ -11374,7 +11666,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1236:4: GREATER_EQUAL
                     {
                     GREATER_EQUAL245=(Token)input.LT(1);
-                    match(input,GREATER_EQUAL,FOLLOW_GREATER_EQUAL_in_simple_operator4140); if (failed) return retval;
+                    match(input,GREATER_EQUAL,FOLLOW_GREATER_EQUAL_in_simple_operator4126); if (failed) return retval;
                     if ( backtracking==0 ) {
                     GREATER_EQUAL245_tree = (Object)adaptor.create(GREATER_EQUAL245);
                     root_0 = (Object)adaptor.becomeRoot(GREATER_EQUAL245_tree, root_0);
@@ -11389,7 +11681,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1237:4: LESS
                     {
                     LESS246=(Token)input.LT(1);
-                    match(input,LESS,FOLLOW_LESS_in_simple_operator4148); if (failed) return retval;
+                    match(input,LESS,FOLLOW_LESS_in_simple_operator4134); if (failed) return retval;
                     if ( backtracking==0 ) {
                     LESS246_tree = (Object)adaptor.create(LESS246);
                     root_0 = (Object)adaptor.becomeRoot(LESS246_tree, root_0);
@@ -11404,7 +11696,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1238:4: LESS_EQUAL
                     {
                     LESS_EQUAL247=(Token)input.LT(1);
-                    match(input,LESS_EQUAL,FOLLOW_LESS_EQUAL_in_simple_operator4156); if (failed) return retval;
+                    match(input,LESS_EQUAL,FOLLOW_LESS_EQUAL_in_simple_operator4142); if (failed) return retval;
                     if ( backtracking==0 ) {
                     LESS_EQUAL247_tree = (Object)adaptor.create(LESS_EQUAL247);
                     root_0 = (Object)adaptor.becomeRoot(LESS_EQUAL247_tree, root_0);
@@ -11419,7 +11711,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1239:4: NOT_EQUAL
                     {
                     NOT_EQUAL248=(Token)input.LT(1);
-                    match(input,NOT_EQUAL,FOLLOW_NOT_EQUAL_in_simple_operator4164); if (failed) return retval;
+                    match(input,NOT_EQUAL,FOLLOW_NOT_EQUAL_in_simple_operator4150); if (failed) return retval;
                     if ( backtracking==0 ) {
                     NOT_EQUAL248_tree = (Object)adaptor.create(NOT_EQUAL248);
                     root_0 = (Object)adaptor.becomeRoot(NOT_EQUAL248_tree, root_0);
@@ -11433,7 +11725,7 @@
                 case 7 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1240:4: not_key ( contains_key | soundslike_key | matches_key | memberof_key | id1= ID | ga1= GRAVE_ACCENT id2= ID square_chunk )
                     {
-                    pushFollow(FOLLOW_not_key_in_simple_operator4172);
+                    pushFollow(FOLLOW_not_key_in_simple_operator4158);
                     not_key249=not_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11482,7 +11774,7 @@
                         case 1 :
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1241:5: contains_key
                             {
-                            pushFollow(FOLLOW_contains_key_in_simple_operator4179);
+                            pushFollow(FOLLOW_contains_key_in_simple_operator4165);
                             contains_key250=contains_key();
                             _fsp--;
                             if (failed) return retval;
@@ -11493,7 +11785,7 @@
                         case 2 :
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1242:5: soundslike_key
                             {
-                            pushFollow(FOLLOW_soundslike_key_in_simple_operator4186);
+                            pushFollow(FOLLOW_soundslike_key_in_simple_operator4172);
                             soundslike_key251=soundslike_key();
                             _fsp--;
                             if (failed) return retval;
@@ -11504,7 +11796,7 @@
                         case 3 :
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1243:5: matches_key
                             {
-                            pushFollow(FOLLOW_matches_key_in_simple_operator4193);
+                            pushFollow(FOLLOW_matches_key_in_simple_operator4179);
                             matches_key252=matches_key();
                             _fsp--;
                             if (failed) return retval;
@@ -11515,7 +11807,7 @@
                         case 4 :
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1244:5: memberof_key
                             {
-                            pushFollow(FOLLOW_memberof_key_in_simple_operator4200);
+                            pushFollow(FOLLOW_memberof_key_in_simple_operator4186);
                             memberof_key253=memberof_key();
                             _fsp--;
                             if (failed) return retval;
@@ -11527,7 +11819,7 @@
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1245:5: id1= ID
                             {
                             id1=(Token)input.LT(1);
-                            match(input,ID,FOLLOW_ID_in_simple_operator4209); if (failed) return retval;
+                            match(input,ID,FOLLOW_ID_in_simple_operator4195); if (failed) return retval;
                             if ( backtracking==0 ) {
                             id1_tree = (Object)adaptor.create(id1);
                             root_0 = (Object)adaptor.becomeRoot(id1_tree, root_0);
@@ -11542,12 +11834,12 @@
                             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1246:5: ga1= GRAVE_ACCENT id2= ID square_chunk
                             {
                             ga1=(Token)input.LT(1);
-                            match(input,GRAVE_ACCENT,FOLLOW_GRAVE_ACCENT_in_simple_operator4220); if (failed) return retval;
+                            match(input,GRAVE_ACCENT,FOLLOW_GRAVE_ACCENT_in_simple_operator4206); if (failed) return retval;
                             if ( backtracking==0 ) {
                               	emit(ga1, DroolsEditorType.SYMBOL);	
                             }
                             id2=(Token)input.LT(1);
-                            match(input,ID,FOLLOW_ID_in_simple_operator4228); if (failed) return retval;
+                            match(input,ID,FOLLOW_ID_in_simple_operator4214); if (failed) return retval;
                             if ( backtracking==0 ) {
                             id2_tree = (Object)adaptor.create(id2);
                             root_0 = (Object)adaptor.becomeRoot(id2_tree, root_0);
@@ -11555,7 +11847,7 @@
                             if ( backtracking==0 ) {
                               	emit(id2, DroolsEditorType.IDENTIFIER);	
                             }
-                            pushFollow(FOLLOW_square_chunk_in_simple_operator4234);
+                            pushFollow(FOLLOW_square_chunk_in_simple_operator4220);
                             square_chunk254=square_chunk();
                             _fsp--;
                             if (failed) return retval;
@@ -11572,7 +11864,7 @@
                 case 8 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1247:4: contains_key
                     {
-                    pushFollow(FOLLOW_contains_key_in_simple_operator4240);
+                    pushFollow(FOLLOW_contains_key_in_simple_operator4226);
                     contains_key255=contains_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11583,7 +11875,7 @@
                 case 9 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1248:4: excludes_key
                     {
-                    pushFollow(FOLLOW_excludes_key_in_simple_operator4246);
+                    pushFollow(FOLLOW_excludes_key_in_simple_operator4232);
                     excludes_key256=excludes_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11594,7 +11886,7 @@
                 case 10 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1249:4: matches_key
                     {
-                    pushFollow(FOLLOW_matches_key_in_simple_operator4252);
+                    pushFollow(FOLLOW_matches_key_in_simple_operator4238);
                     matches_key257=matches_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11605,7 +11897,7 @@
                 case 11 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1250:4: soundslike_key
                     {
-                    pushFollow(FOLLOW_soundslike_key_in_simple_operator4258);
+                    pushFollow(FOLLOW_soundslike_key_in_simple_operator4244);
                     soundslike_key258=soundslike_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11616,7 +11908,7 @@
                 case 12 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1251:4: memberof_key
                     {
-                    pushFollow(FOLLOW_memberof_key_in_simple_operator4264);
+                    pushFollow(FOLLOW_memberof_key_in_simple_operator4250);
                     memberof_key259=memberof_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11628,7 +11920,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1252:4: id3= ID
                     {
                     id3=(Token)input.LT(1);
-                    match(input,ID,FOLLOW_ID_in_simple_operator4272); if (failed) return retval;
+                    match(input,ID,FOLLOW_ID_in_simple_operator4258); if (failed) return retval;
                     if ( backtracking==0 ) {
                     id3_tree = (Object)adaptor.create(id3);
                     root_0 = (Object)adaptor.becomeRoot(id3_tree, root_0);
@@ -11643,12 +11935,12 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1253:4: ga2= GRAVE_ACCENT id4= ID square_chunk
                     {
                     ga2=(Token)input.LT(1);
-                    match(input,GRAVE_ACCENT,FOLLOW_GRAVE_ACCENT_in_simple_operator4282); if (failed) return retval;
+                    match(input,GRAVE_ACCENT,FOLLOW_GRAVE_ACCENT_in_simple_operator4268); if (failed) return retval;
                     if ( backtracking==0 ) {
                       	emit(ga2, DroolsEditorType.SYMBOL);	
                     }
                     id4=(Token)input.LT(1);
-                    match(input,ID,FOLLOW_ID_in_simple_operator4290); if (failed) return retval;
+                    match(input,ID,FOLLOW_ID_in_simple_operator4276); if (failed) return retval;
                     if ( backtracking==0 ) {
                     id4_tree = (Object)adaptor.create(id4);
                     root_0 = (Object)adaptor.becomeRoot(id4_tree, root_0);
@@ -11656,7 +11948,7 @@
                     if ( backtracking==0 ) {
                       	emit(id4, DroolsEditorType.IDENTIFIER);	
                     }
-                    pushFollow(FOLLOW_square_chunk_in_simple_operator4296);
+                    pushFollow(FOLLOW_square_chunk_in_simple_operator4282);
                     square_chunk260=square_chunk();
                     _fsp--;
                     if (failed) return retval;
@@ -11670,7 +11962,7 @@
             if ( backtracking==0 ) {
               	emit(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);	
             }
-            pushFollow(FOLLOW_expression_value_in_simple_operator4303);
+            pushFollow(FOLLOW_expression_value_in_simple_operator4289);
             expression_value261=expression_value();
             _fsp--;
             if (failed) return retval;
@@ -11739,15 +12031,15 @@
             int alt86=2;
             int LA86_0 = input.LA(1);
 
-            if ( (LA86_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.NOT))||(validateIdentifierKey(DroolsSoftKeywords.IN))))) {
+            if ( (LA86_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.IN))||(validateIdentifierKey(DroolsSoftKeywords.NOT))))) {
                 int LA86_1 = input.LA(2);
 
-                if ( (LA86_1==ID) && ((validateIdentifierKey(DroolsSoftKeywords.NOT)))) {
+                if ( (LA86_1==LEFT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.IN)))) {
+                    alt86=1;
+                }
+                else if ( (LA86_1==ID) && ((validateIdentifierKey(DroolsSoftKeywords.NOT)))) {
                     alt86=2;
                 }
-                else if ( (LA86_1==LEFT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.IN)))) {
-                    alt86=1;
-                }
                 else {
                     if (backtracking>0) {failed=true; return retval;}
                     NoViableAltException nvae =
@@ -11767,7 +12059,7 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1261:4: in_key
                     {
-                    pushFollow(FOLLOW_in_key_in_compound_operator4321);
+                    pushFollow(FOLLOW_in_key_in_compound_operator4307);
                     in_key262=in_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11778,12 +12070,12 @@
                 case 2 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1261:14: not_key in_key
                     {
-                    pushFollow(FOLLOW_not_key_in_compound_operator4326);
+                    pushFollow(FOLLOW_not_key_in_compound_operator4312);
                     not_key263=not_key();
                     _fsp--;
                     if (failed) return retval;
                     if ( backtracking==0 ) adaptor.addChild(root_0, not_key263.getTree());
-                    pushFollow(FOLLOW_in_key_in_compound_operator4328);
+                    pushFollow(FOLLOW_in_key_in_compound_operator4314);
                     in_key264=in_key();
                     _fsp--;
                     if (failed) return retval;
@@ -11798,11 +12090,11 @@
               	emit(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT);	
             }
             LEFT_PAREN265=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_compound_operator4339); if (failed) return retval;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_compound_operator4325); if (failed) return retval;
             if ( backtracking==0 ) {
               	emit(LEFT_PAREN265, DroolsEditorType.SYMBOL);	
             }
-            pushFollow(FOLLOW_expression_value_in_compound_operator4347);
+            pushFollow(FOLLOW_expression_value_in_compound_operator4333);
             expression_value266=expression_value();
             _fsp--;
             if (failed) return retval;
@@ -11823,11 +12115,11 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1264:23: COMMA expression_value
             	    {
             	    COMMA267=(Token)input.LT(1);
-            	    match(input,COMMA,FOLLOW_COMMA_in_compound_operator4351); if (failed) return retval;
+            	    match(input,COMMA,FOLLOW_COMMA_in_compound_operator4337); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	      	emit(COMMA267, DroolsEditorType.SYMBOL);	
             	    }
-            	    pushFollow(FOLLOW_expression_value_in_compound_operator4356);
+            	    pushFollow(FOLLOW_expression_value_in_compound_operator4342);
             	    expression_value268=expression_value();
             	    _fsp--;
             	    if (failed) return retval;
@@ -11842,7 +12134,7 @@
             } while (true);
 
             RIGHT_PAREN269=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_compound_operator4364); if (failed) return retval;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_compound_operator4350); if (failed) return retval;
             if ( backtracking==0 ) {
             RIGHT_PAREN269_tree = (Object)adaptor.create(RIGHT_PAREN269);
             adaptor.addChild(root_0, RIGHT_PAREN269_tree);
@@ -11940,7 +12232,7 @@
                 case 1 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1276:5: accessor_path
                     {
-                    pushFollow(FOLLOW_accessor_path_in_expression_value4385);
+                    pushFollow(FOLLOW_accessor_path_in_expression_value4371);
                     accessor_path270=accessor_path();
                     _fsp--;
                     if (failed) return retval;
@@ -11951,7 +12243,7 @@
                 case 2 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1277:4: literal_constraint
                     {
-                    pushFollow(FOLLOW_literal_constraint_in_expression_value4390);
+                    pushFollow(FOLLOW_literal_constraint_in_expression_value4376);
                     literal_constraint271=literal_constraint();
                     _fsp--;
                     if (failed) return retval;
@@ -11962,7 +12254,7 @@
                 case 3 :
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1278:4: paren_chunk
                     {
-                    pushFollow(FOLLOW_paren_chunk_in_expression_value4396);
+                    pushFollow(FOLLOW_paren_chunk_in_expression_value4382);
                     paren_chunk272=paren_chunk();
                     _fsp--;
                     if (failed) return retval;
@@ -12075,7 +12367,7 @@
                     root_0 = (Object)adaptor.nil();
 
                     STRING273=(Token)input.LT(1);
-                    match(input,STRING,FOLLOW_STRING_in_literal_constraint4415); if (failed) return retval;
+                    match(input,STRING,FOLLOW_STRING_in_literal_constraint4401); if (failed) return retval;
                     if ( backtracking==0 ) {
                     STRING273_tree = (Object)adaptor.create(STRING273);
                     adaptor.addChild(root_0, STRING273_tree);
@@ -12092,7 +12384,7 @@
                     root_0 = (Object)adaptor.nil();
 
                     INT274=(Token)input.LT(1);
-                    match(input,INT,FOLLOW_INT_in_literal_constraint4422); if (failed) return retval;
+                    match(input,INT,FOLLOW_INT_in_literal_constraint4408); if (failed) return retval;
                     if ( backtracking==0 ) {
                     INT274_tree = (Object)adaptor.create(INT274);
                     adaptor.addChild(root_0, INT274_tree);
@@ -12109,7 +12401,7 @@
                     root_0 = (Object)adaptor.nil();
 
                     FLOAT275=(Token)input.LT(1);
-                    match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint4429); if (failed) return retval;
+                    match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint4415); if (failed) return retval;
                     if ( backtracking==0 ) {
                     FLOAT275_tree = (Object)adaptor.create(FLOAT275);
                     adaptor.addChild(root_0, FLOAT275_tree);
@@ -12126,7 +12418,7 @@
                     root_0 = (Object)adaptor.nil();
 
                     BOOL276=(Token)input.LT(1);
-                    match(input,BOOL,FOLLOW_BOOL_in_literal_constraint4436); if (failed) return retval;
+                    match(input,BOOL,FOLLOW_BOOL_in_literal_constraint4422); if (failed) return retval;
                     if ( backtracking==0 ) {
                     BOOL276_tree = (Object)adaptor.create(BOOL276);
                     adaptor.addChild(root_0, BOOL276_tree);
@@ -12143,7 +12435,7 @@
                     root_0 = (Object)adaptor.nil();
 
                     NULL277=(Token)input.LT(1);
-                    match(input,NULL,FOLLOW_NULL_in_literal_constraint4443); if (failed) return retval;
+                    match(input,NULL,FOLLOW_NULL_in_literal_constraint4429); if (failed) return retval;
                     if ( backtracking==0 ) {
                     NULL277_tree = (Object)adaptor.create(NULL277);
                     adaptor.addChild(root_0, NULL277_tree);
@@ -12200,7 +12492,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1301:4: id+= ID (id+= DOT id+= ID )* ( dimension_definition )*
             {
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_pattern_type4458); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_pattern_type4444); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if (list_id==null) list_id=new ArrayList();
@@ -12222,14 +12514,14 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1301:13: id+= DOT id+= ID
             	    {
             	    id=(Token)input.LT(1);
-            	    match(input,DOT,FOLLOW_DOT_in_pattern_type4464); if (failed) return retval;
+            	    match(input,DOT,FOLLOW_DOT_in_pattern_type4450); if (failed) return retval;
             	    if ( backtracking==0 ) stream_DOT.add(id);
 
             	    if (list_id==null) list_id=new ArrayList();
             	    list_id.add(id);
 
             	    id=(Token)input.LT(1);
-            	    match(input,ID,FOLLOW_ID_in_pattern_type4468); if (failed) return retval;
+            	    match(input,ID,FOLLOW_ID_in_pattern_type4454); if (failed) return retval;
             	    if ( backtracking==0 ) stream_ID.add(id);
 
             	    if (list_id==null) list_id=new ArrayList();
@@ -12263,7 +12555,7 @@
             	case 1 :
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1304:6: dimension_definition
             	    {
-            	    pushFollow(FOLLOW_dimension_definition_in_pattern_type4483);
+            	    pushFollow(FOLLOW_dimension_definition_in_pattern_type4469);
             	    dimension_definition278=dimension_definition();
             	    _fsp--;
             	    if (failed) return retval;
@@ -12364,7 +12656,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1309:4: id+= ID (id+= DOT id+= ID )* ( dimension_definition )*
             {
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_data_type4511); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_data_type4497); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if (list_id==null) list_id=new ArrayList();
@@ -12386,14 +12678,14 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1309:13: id+= DOT id+= ID
             	    {
             	    id=(Token)input.LT(1);
-            	    match(input,DOT,FOLLOW_DOT_in_data_type4517); if (failed) return retval;
+            	    match(input,DOT,FOLLOW_DOT_in_data_type4503); if (failed) return retval;
             	    if ( backtracking==0 ) stream_DOT.add(id);
 
             	    if (list_id==null) list_id=new ArrayList();
             	    list_id.add(id);
 
             	    id=(Token)input.LT(1);
-            	    match(input,ID,FOLLOW_ID_in_data_type4521); if (failed) return retval;
+            	    match(input,ID,FOLLOW_ID_in_data_type4507); if (failed) return retval;
             	    if ( backtracking==0 ) stream_ID.add(id);
 
             	    if (list_id==null) list_id=new ArrayList();
@@ -12423,7 +12715,7 @@
             	case 1 :
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1309:31: dimension_definition
             	    {
-            	    pushFollow(FOLLOW_dimension_definition_in_data_type4526);
+            	    pushFollow(FOLLOW_dimension_definition_in_data_type4512);
             	    dimension_definition279=dimension_definition();
             	    _fsp--;
             	    if (failed) return retval;
@@ -12526,7 +12818,7 @@
             root_0 = (Object)adaptor.nil();
 
             LEFT_SQUARE280=(Token)input.LT(1);
-            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dimension_definition4555); if (failed) return retval;
+            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dimension_definition4541); if (failed) return retval;
             if ( backtracking==0 ) {
             LEFT_SQUARE280_tree = (Object)adaptor.create(LEFT_SQUARE280);
             adaptor.addChild(root_0, LEFT_SQUARE280_tree);
@@ -12535,7 +12827,7 @@
               	emit(LEFT_SQUARE280, DroolsEditorType.SYMBOL);	
             }
             RIGHT_SQUARE281=(Token)input.LT(1);
-            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dimension_definition4562); if (failed) return retval;
+            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dimension_definition4548); if (failed) return retval;
             if ( backtracking==0 ) {
             RIGHT_SQUARE281_tree = (Object)adaptor.create(RIGHT_SQUARE281);
             adaptor.addChild(root_0, RIGHT_SQUARE281_tree);
@@ -12589,7 +12881,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1320:2: ( accessor_element ( DOT accessor_element )* -> ^( VT_ACCESSOR_PATH ( accessor_element )+ ) )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1320:4: accessor_element ( DOT accessor_element )*
             {
-            pushFollow(FOLLOW_accessor_element_in_accessor_path4576);
+            pushFollow(FOLLOW_accessor_element_in_accessor_path4562);
             accessor_element282=accessor_element();
             _fsp--;
             if (failed) return retval;
@@ -12610,13 +12902,13 @@
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1320:23: DOT accessor_element
             	    {
             	    DOT283=(Token)input.LT(1);
-            	    match(input,DOT,FOLLOW_DOT_in_accessor_path4580); if (failed) return retval;
+            	    match(input,DOT,FOLLOW_DOT_in_accessor_path4566); if (failed) return retval;
             	    if ( backtracking==0 ) stream_DOT.add(DOT283);
 
             	    if ( backtracking==0 ) {
             	      	emit(DOT283, DroolsEditorType.IDENTIFIER);	
             	    }
-            	    pushFollow(FOLLOW_accessor_element_in_accessor_path4584);
+            	    pushFollow(FOLLOW_accessor_element_in_accessor_path4570);
             	    accessor_element284=accessor_element();
             	    _fsp--;
             	    if (failed) return retval;
@@ -12709,7 +13001,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1325:4: ID ( square_chunk )*
             {
             ID285=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_accessor_element4608); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_accessor_element4594); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(ID285);
 
             if ( backtracking==0 ) {
@@ -12730,7 +13022,7 @@
             	case 1 :
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1326:3: square_chunk
             	    {
-            	    pushFollow(FOLLOW_square_chunk_in_accessor_element4614);
+            	    pushFollow(FOLLOW_square_chunk_in_accessor_element4600);
             	    square_chunk286=square_chunk();
             	    _fsp--;
             	    if (failed) return retval;
@@ -12821,7 +13113,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1333:3: (rc= rhs_chunk_data -> VT_RHS_CHUNK[$rc.start,text] )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1333:5: rc= rhs_chunk_data
             {
-            pushFollow(FOLLOW_rhs_chunk_data_in_rhs_chunk4643);
+            pushFollow(FOLLOW_rhs_chunk_data_in_rhs_chunk4629);
             rc=rhs_chunk_data();
             _fsp--;
             if (failed) return retval;
@@ -12898,7 +13190,7 @@
             root_0 = (Object)adaptor.nil();
 
             THEN287=(Token)input.LT(1);
-            match(input,THEN,FOLLOW_THEN_in_rhs_chunk_data4662); if (failed) return retval;
+            match(input,THEN,FOLLOW_THEN_in_rhs_chunk_data4648); if (failed) return retval;
             if ( backtracking==0 ) {
             THEN287_tree = (Object)adaptor.create(THEN287);
             adaptor.addChild(root_0, THEN287_tree);
@@ -12934,7 +13226,7 @@
             	        if (backtracking>0) {failed=true; return retval;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_rhs_chunk_data4675);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_rhs_chunk_data4661);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
@@ -12950,7 +13242,7 @@
             } while (true);
 
             end1=(Token)input.LT(1);
-            match(input,END,FOLLOW_END_in_rhs_chunk_data4688); if (failed) return retval;
+            match(input,END,FOLLOW_END_in_rhs_chunk_data4674); if (failed) return retval;
             if ( backtracking==0 ) {
             end1_tree = (Object)adaptor.create(end1);
             adaptor.addChild(root_0, end1_tree);
@@ -12970,7 +13262,7 @@
                     // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1345:3: SEMICOLON
                     {
                     SEMICOLON288=(Token)input.LT(1);
-                    match(input,SEMICOLON,FOLLOW_SEMICOLON_in_rhs_chunk_data4694); if (failed) return retval;
+                    match(input,SEMICOLON,FOLLOW_SEMICOLON_in_rhs_chunk_data4680); if (failed) return retval;
                     if ( backtracking==0 ) {
                     SEMICOLON288_tree = (Object)adaptor.create(SEMICOLON288);
                     adaptor.addChild(root_0, SEMICOLON288_tree);
@@ -13028,7 +13320,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1351:3: (cc= curly_chunk_data[false] -> VT_CURLY_CHUNK[$cc.start,text] )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1351:5: cc= curly_chunk_data[false]
             {
-            pushFollow(FOLLOW_curly_chunk_data_in_curly_chunk4713);
+            pushFollow(FOLLOW_curly_chunk_data_in_curly_chunk4699);
             cc=curly_chunk_data(false);
             _fsp--;
             if (failed) return retval;
@@ -13105,7 +13397,7 @@
             root_0 = (Object)adaptor.nil();
 
             lc1=(Token)input.LT(1);
-            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_curly_chunk_data4736); if (failed) return retval;
+            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_curly_chunk_data4722); if (failed) return retval;
             if ( backtracking==0 ) {
             lc1_tree = (Object)adaptor.create(lc1);
             adaptor.addChild(root_0, lc1_tree);
@@ -13146,7 +13438,7 @@
             	        if (backtracking>0) {failed=true; return retval;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_curly_chunk_data4748);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_curly_chunk_data4734);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
@@ -13158,7 +13450,7 @@
             	case 2 :
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1363:87: curly_chunk_data[true]
             	    {
-            	    pushFollow(FOLLOW_curly_chunk_data_in_curly_chunk_data4764);
+            	    pushFollow(FOLLOW_curly_chunk_data_in_curly_chunk_data4750);
             	    curly_chunk_data289=curly_chunk_data(true);
             	    _fsp--;
             	    if (failed) return retval;
@@ -13173,7 +13465,7 @@
             } while (true);
 
             rc1=(Token)input.LT(1);
-            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_curly_chunk_data4775); if (failed) return retval;
+            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_curly_chunk_data4761); if (failed) return retval;
             if ( backtracking==0 ) {
             rc1_tree = (Object)adaptor.create(rc1);
             adaptor.addChild(root_0, rc1_tree);
@@ -13230,7 +13522,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1376:3: (pc= paren_chunk_data[false] -> VT_PAREN_CHUNK[$pc.start,text] )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1376:5: pc= paren_chunk_data[false]
             {
-            pushFollow(FOLLOW_paren_chunk_data_in_paren_chunk4796);
+            pushFollow(FOLLOW_paren_chunk_data_in_paren_chunk4782);
             pc=paren_chunk_data(false);
             _fsp--;
             if (failed) return retval;
@@ -13307,7 +13599,7 @@
             root_0 = (Object)adaptor.nil();
 
             lp1=(Token)input.LT(1);
-            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_paren_chunk_data4820); if (failed) return retval;
+            match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_paren_chunk_data4806); if (failed) return retval;
             if ( backtracking==0 ) {
             lp1_tree = (Object)adaptor.create(lp1);
             adaptor.addChild(root_0, lp1_tree);
@@ -13348,7 +13640,7 @@
             	        if (backtracking>0) {failed=true; return retval;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_paren_chunk_data4832);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_paren_chunk_data4818);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
@@ -13360,7 +13652,7 @@
             	case 2 :
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1388:87: paren_chunk_data[true]
             	    {
-            	    pushFollow(FOLLOW_paren_chunk_data_in_paren_chunk_data4848);
+            	    pushFollow(FOLLOW_paren_chunk_data_in_paren_chunk_data4834);
             	    paren_chunk_data290=paren_chunk_data(true);
             	    _fsp--;
             	    if (failed) return retval;
@@ -13375,7 +13667,7 @@
             } while (true);
 
             rp1=(Token)input.LT(1);
-            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_paren_chunk_data4859); if (failed) return retval;
+            match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_paren_chunk_data4845); if (failed) return retval;
             if ( backtracking==0 ) {
             rp1_tree = (Object)adaptor.create(rp1);
             adaptor.addChild(root_0, rp1_tree);
@@ -13432,7 +13724,7 @@
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1401:3: (sc= square_chunk_data[false] -> VT_SQUARE_CHUNK[$sc.start,text] )
             // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1401:5: sc= square_chunk_data[false]
             {
-            pushFollow(FOLLOW_square_chunk_data_in_square_chunk4880);
+            pushFollow(FOLLOW_square_chunk_data_in_square_chunk4866);
             sc=square_chunk_data(false);
             _fsp--;
             if (failed) return retval;
@@ -13509,7 +13801,7 @@
             root_0 = (Object)adaptor.nil();
 
             ls1=(Token)input.LT(1);
-            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk_data4903); if (failed) return retval;
+            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk_data4889); if (failed) return retval;
             if ( backtracking==0 ) {
             ls1_tree = (Object)adaptor.create(ls1);
             adaptor.addChild(root_0, ls1_tree);
@@ -13550,7 +13842,7 @@
             	        if (backtracking>0) {failed=true; return retval;}
             	        MismatchedSetException mse =
             	            new MismatchedSetException(null,input);
-            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk_data4915);    throw mse;
+            	        recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk_data4901);    throw mse;
             	    }
 
             	    if ( backtracking==0 ) {
@@ -13562,7 +13854,7 @@
             	case 2 :
             	    // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1413:88: square_chunk_data[true]
             	    {
-            	    pushFollow(FOLLOW_square_chunk_data_in_square_chunk_data4930);
+            	    pushFollow(FOLLOW_square_chunk_data_in_square_chunk_data4916);
             	    square_chunk_data291=square_chunk_data(true);
             	    _fsp--;
             	    if (failed) return retval;
@@ -13577,7 +13869,7 @@
             } while (true);
 
             rs1=(Token)input.LT(1);
-            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk_data4941); if (failed) return retval;
+            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk_data4927); if (failed) return retval;
             if ( backtracking==0 ) {
             rs1_tree = (Object)adaptor.create(rs1);
             adaptor.addChild(root_0, rs1_tree);
@@ -13649,23 +13941,23 @@
                 throw new FailedPredicateException(input, "lock_on_active_key", "(validateIdentifierKey(DroolsSoftKeywords.LOCK) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.ON) && validateLT(4, \"-\") && validateLT(5, DroolsSoftKeywords.ACTIVE))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_lock_on_active_key4965); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_lock_on_active_key4951); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_lock_on_active_key4969); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_lock_on_active_key4955); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_lock_on_active_key4973); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_lock_on_active_key4959); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             mis2=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_lock_on_active_key4977); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_lock_on_active_key4963); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis2);
 
             id3=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_lock_on_active_key4981); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_lock_on_active_key4967); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id3);
 
             if ( backtracking==0 ) {
@@ -13752,15 +14044,15 @@
                 throw new FailedPredicateException(input, "date_effective_key", "(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.EFFECTIVE))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_date_effective_key5013); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_date_effective_key4999); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_date_effective_key5017); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_date_effective_key5003); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_date_effective_key5021); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_date_effective_key5007); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -13845,15 +14137,15 @@
                 throw new FailedPredicateException(input, "date_expires_key", "(validateIdentifierKey(DroolsSoftKeywords.DATE) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.EXPIRES))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_date_expires_key5053); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_date_expires_key5039); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_date_expires_key5057); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_date_expires_key5043); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_date_expires_key5061); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_date_expires_key5047); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -13938,15 +14230,15 @@
                 throw new FailedPredicateException(input, "no_loop_key", "(validateIdentifierKey(DroolsSoftKeywords.NO) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.LOOP))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_no_loop_key5093); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_no_loop_key5079); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_no_loop_key5097); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_no_loop_key5083); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_no_loop_key5101); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_no_loop_key5087); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -14031,15 +14323,15 @@
                 throw new FailedPredicateException(input, "auto_focus_key", "(validateIdentifierKey(DroolsSoftKeywords.AUTO) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.FOCUS))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_auto_focus_key5133); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_auto_focus_key5119); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_auto_focus_key5137); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_auto_focus_key5123); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_auto_focus_key5141); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_auto_focus_key5127); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -14124,15 +14416,15 @@
                 throw new FailedPredicateException(input, "activation_group_key", "(validateIdentifierKey(DroolsSoftKeywords.ACTIVATION) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.GROUP))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_activation_group_key5173); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_activation_group_key5159); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_activation_group_key5177); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_activation_group_key5163); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_activation_group_key5181); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_activation_group_key5167); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -14217,15 +14509,15 @@
                 throw new FailedPredicateException(input, "agenda_group_key", "(validateIdentifierKey(DroolsSoftKeywords.AGENDA) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.GROUP))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_agenda_group_key5213); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_agenda_group_key5199); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_agenda_group_key5217); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_agenda_group_key5203); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_agenda_group_key5221); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_agenda_group_key5207); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -14310,15 +14602,15 @@
                 throw new FailedPredicateException(input, "ruleflow_group_key", "(validateIdentifierKey(DroolsSoftKeywords.RULEFLOW) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.GROUP))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_ruleflow_group_key5253); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_ruleflow_group_key5239); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_ruleflow_group_key5257); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_ruleflow_group_key5243); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_ruleflow_group_key5261); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_ruleflow_group_key5247); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -14403,15 +14695,15 @@
                 throw new FailedPredicateException(input, "entry_point_key", "(validateIdentifierKey(DroolsSoftKeywords.ENTRY) && validateLT(2, \"-\") && validateLT(3, DroolsSoftKeywords.POINT))");
             }
             id1=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_entry_point_key5293); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_entry_point_key5279); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id1);
 
             mis1=(Token)input.LT(1);
-            match(input,MISC,FOLLOW_MISC_in_entry_point_key5297); if (failed) return retval;
+            match(input,MISC,FOLLOW_MISC_in_entry_point_key5283); if (failed) return retval;
             if ( backtracking==0 ) stream_MISC.add(mis1);
 
             id2=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_entry_point_key5301); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_entry_point_key5287); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id2);
 
             if ( backtracking==0 ) {
@@ -14488,7 +14780,7 @@
                 throw new FailedPredicateException(input, "duration_key", "(validateIdentifierKey(DroolsSoftKeywords.DURATION))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_duration_key5330); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_duration_key5316); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14560,7 +14852,7 @@
                 throw new FailedPredicateException(input, "package_key", "(validateIdentifierKey(DroolsSoftKeywords.PACKAGE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_package_key5357); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_package_key5343); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14632,7 +14924,7 @@
                 throw new FailedPredicateException(input, "import_key", "(validateIdentifierKey(DroolsSoftKeywords.IMPORT))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_import_key5384); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_import_key5370); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14704,7 +14996,7 @@
                 throw new FailedPredicateException(input, "dialect_key", "(validateIdentifierKey(DroolsSoftKeywords.DIALECT))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_dialect_key5411); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_dialect_key5397); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14776,7 +15068,7 @@
                 throw new FailedPredicateException(input, "salience_key", "(validateIdentifierKey(DroolsSoftKeywords.SALIENCE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_salience_key5438); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_salience_key5424); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14848,7 +15140,7 @@
                 throw new FailedPredicateException(input, "enabled_key", "(validateIdentifierKey(DroolsSoftKeywords.ENABLED))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_enabled_key5465); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_enabled_key5451); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14920,7 +15212,7 @@
                 throw new FailedPredicateException(input, "attributes_key", "(validateIdentifierKey(DroolsSoftKeywords.ATTRIBUTES))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_attributes_key5492); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_attributes_key5478); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -14992,7 +15284,7 @@
                 throw new FailedPredicateException(input, "rule_key", "(validateIdentifierKey(DroolsSoftKeywords.RULE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_rule_key5519); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_rule_key5505); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15064,7 +15356,7 @@
                 throw new FailedPredicateException(input, "template_key", "(validateIdentifierKey(DroolsSoftKeywords.TEMPLATE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_template_key5546); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_template_key5532); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15136,7 +15428,7 @@
                 throw new FailedPredicateException(input, "query_key", "(validateIdentifierKey(DroolsSoftKeywords.QUERY))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_query_key5573); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_query_key5559); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15208,7 +15500,7 @@
                 throw new FailedPredicateException(input, "declare_key", "(validateIdentifierKey(DroolsSoftKeywords.DECLARE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_declare_key5600); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_declare_key5586); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15280,7 +15572,7 @@
                 throw new FailedPredicateException(input, "function_key", "(validateIdentifierKey(DroolsSoftKeywords.FUNCTION))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_function_key5627); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_function_key5613); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15352,7 +15644,7 @@
                 throw new FailedPredicateException(input, "global_key", "(validateIdentifierKey(DroolsSoftKeywords.GLOBAL))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_global_key5654); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_global_key5640); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15424,7 +15716,7 @@
                 throw new FailedPredicateException(input, "eval_key", "(validateIdentifierKey(DroolsSoftKeywords.EVAL))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_eval_key5681); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_eval_key5667); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15496,7 +15788,7 @@
                 throw new FailedPredicateException(input, "contains_key", "(validateIdentifierKey(DroolsSoftKeywords.CONTAINS))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_contains_key5708); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_contains_key5694); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15568,7 +15860,7 @@
                 throw new FailedPredicateException(input, "matches_key", "(validateIdentifierKey(DroolsSoftKeywords.MATCHES))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_matches_key5735); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_matches_key5721); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15640,7 +15932,7 @@
                 throw new FailedPredicateException(input, "excludes_key", "(validateIdentifierKey(DroolsSoftKeywords.EXCLUDES))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_excludes_key5762); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_excludes_key5748); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15712,7 +16004,7 @@
                 throw new FailedPredicateException(input, "soundslike_key", "(validateIdentifierKey(DroolsSoftKeywords.SOUNDSLIKE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_soundslike_key5789); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_soundslike_key5775); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15784,7 +16076,7 @@
                 throw new FailedPredicateException(input, "memberof_key", "(validateIdentifierKey(DroolsSoftKeywords.MEMBEROF))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_memberof_key5816); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_memberof_key5802); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15856,7 +16148,7 @@
                 throw new FailedPredicateException(input, "not_key", "(validateIdentifierKey(DroolsSoftKeywords.NOT))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_not_key5843); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_not_key5829); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -15928,7 +16220,7 @@
                 throw new FailedPredicateException(input, "in_key", "(validateIdentifierKey(DroolsSoftKeywords.IN))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_in_key5870); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_in_key5856); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16000,7 +16292,7 @@
                 throw new FailedPredicateException(input, "or_key", "(validateIdentifierKey(DroolsSoftKeywords.OR))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_or_key5897); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_or_key5883); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16072,7 +16364,7 @@
                 throw new FailedPredicateException(input, "and_key", "(validateIdentifierKey(DroolsSoftKeywords.AND))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_and_key5924); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_and_key5910); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16144,7 +16436,7 @@
                 throw new FailedPredicateException(input, "exists_key", "(validateIdentifierKey(DroolsSoftKeywords.EXISTS))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_exists_key5951); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_exists_key5937); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16216,7 +16508,7 @@
                 throw new FailedPredicateException(input, "forall_key", "(validateIdentifierKey(DroolsSoftKeywords.FORALL))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_forall_key5978); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_forall_key5964); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16288,7 +16580,7 @@
                 throw new FailedPredicateException(input, "action_key", "(validateIdentifierKey(DroolsSoftKeywords.ACTION))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_action_key6005); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_action_key5991); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16360,7 +16652,7 @@
                 throw new FailedPredicateException(input, "reverse_key", "(validateIdentifierKey(DroolsSoftKeywords.REVERSE))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_reverse_key6032); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_reverse_key6018); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16432,7 +16724,7 @@
                 throw new FailedPredicateException(input, "result_key", "(validateIdentifierKey(DroolsSoftKeywords.RESULT))");
             }
             id=(Token)input.LT(1);
-            match(input,ID,FOLLOW_ID_in_result_key6059); if (failed) return retval;
+            match(input,ID,FOLLOW_ID_in_result_key6045); if (failed) return retval;
             if ( backtracking==0 ) stream_ID.add(id);
 
             if ( backtracking==0 ) {
@@ -16737,28 +17029,6 @@
     }
     // $ANTLR end synpred8
 
-    // $ANTLR start synpred9
-    public final void synpred9_fragment() throws RecognitionException {   
-        // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1064:6: ( LEFT_SQUARE )
-        // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1064:8: LEFT_SQUARE
-        {
-        match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred93430); if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred9
-
-    // $ANTLR start synpred10
-    public final void synpred10_fragment() throws RecognitionException {   
-        // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1066:6: ( LEFT_PAREN )
-        // /Users/porcelli/Documents/dev/drools-trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1066:8: LEFT_PAREN
-        {
-        match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred103452); if (failed) return ;
-
-        }
-    }
-    // $ANTLR end synpred10
-
     public final boolean synpred4() {
         backtracking++;
         int start = input.mark();
@@ -16773,20 +17043,6 @@
         failed=false;
         return success;
     }
-    public final boolean synpred9() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred9_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();
@@ -16885,20 +17141,6 @@
         failed=false;
         return success;
     }
-    public final boolean synpred10() {
-        backtracking++;
-        int start = input.mark();
-        try {
-            synpred10_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 DFA12 dfa12 = new DFA12(this);
@@ -16906,7 +17148,7 @@
     protected DFA51 dfa51 = new DFA51(this);
     protected DFA52 dfa52 = new DFA52(this);
     protected DFA63 dfa63 = new DFA63(this);
-    protected DFA68 dfa68 = new DFA68(this);
+    protected DFA66 dfa66 = new DFA66(this);
     protected DFA81 dfa81 = new DFA81(this);
     protected DFA82 dfa82 = new DFA82(this);
     static final String DFA12_eotS =
@@ -16914,11 +17156,10 @@
     static final String DFA12_eofS =
         "\16\uffff";
     static final String DFA12_minS =
-        "\2\123\1\uffff\1\123\1\uffff\1\163\3\123\1\163\1\123\1\130\1\163"+
-        "\1\123";
+        "\2\123\1\uffff\1\123\1\uffff\2\123\2\163\2\123\1\130\1\163\1\123";
     static final String DFA12_maxS =
-        "\1\130\1\132\1\uffff\1\162\1\uffff\1\163\1\162\1\123\1\162\1\163"+
-        "\2\162\1\163\1\162";
+        "\1\130\1\132\1\uffff\1\162\1\uffff\1\162\1\123\2\163\3\162\1\163"+
+        "\1\162";
     static final String DFA12_acceptS =
         "\2\uffff\1\2\1\uffff\1\1\11\uffff";
     static final String DFA12_specialS =
@@ -16927,15 +17168,15 @@
             "\1\2\2\uffff\1\2\1\uffff\1\1",
             "\1\3\4\uffff\1\2\1\uffff\1\4",
             "",
-            "\1\6\1\7\3\uffff\1\2\2\4\1\uffff\1\2\25\uffff\1\5",
+            "\1\5\1\6\3\uffff\1\2\2\4\1\uffff\1\2\25\uffff\1\7",
             "",
-            "\1\10",
-            "\2\2\3\uffff\1\2\2\4\1\uffff\1\2\25\uffff\1\11",
+            "\2\2\3\uffff\1\2\2\4\1\uffff\1\2\25\uffff\1\10",
+            "\1\11",
             "\1\12",
-            "\1\4\4\uffff\1\2\2\4\27\uffff\1\5",
             "\1\13",
-            "\1\4\1\7\3\uffff\1\2\31\uffff\1\14",
-            "\1\2\2\4\27\uffff\1\11",
+            "\1\4\1\6\3\uffff\1\2\31\uffff\1\14",
+            "\1\4\4\uffff\1\2\2\4\27\uffff\1\7",
+            "\1\2\2\4\27\uffff\1\10",
             "\1\15",
             "\1\4\4\uffff\1\2\31\uffff\1\14"
     };
@@ -16978,20 +17219,20 @@
     static final String DFA17_eofS =
         "\6\uffff";
     static final String DFA17_minS =
-        "\2\123\1\163\2\uffff\1\123";
+        "\2\123\1\uffff\1\163\1\uffff\1\123";
     static final String DFA17_maxS =
-        "\1\123\1\162\1\163\2\uffff\1\162";
+        "\1\123\1\162\1\uffff\1\163\1\uffff\1\162";
     static final String DFA17_acceptS =
-        "\3\uffff\1\2\1\1\1\uffff";
+        "\2\uffff\1\1\1\uffff\1\2\1\uffff";
     static final String DFA17_specialS =
         "\6\uffff}>";
     static final String[] DFA17_transitionS = {
             "\1\1",
-            "\2\4\4\uffff\2\3\27\uffff\1\2",
+            "\2\2\4\uffff\2\4\27\uffff\1\3",
+            "",
             "\1\5",
             "",
-            "",
-            "\1\4\5\uffff\2\3\27\uffff\1\2"
+            "\1\2\5\uffff\2\4\27\uffff\1\3"
     };
 
     static final short[] DFA17_eot = DFA.unpackEncodedString(DFA17_eotS);
@@ -17034,24 +17275,24 @@
     static final String DFA51_minS =
         "\3\123\2\0\1\123\1\0\1\123\1\163\3\uffff\1\124\1\123\1\uffff\1\124"+
         "\1\130\1\123\1\163\1\123\1\124\1\123\1\124\1\130\1\123\2\0\1\123"+
-        "\1\163\2\123\2\0\1\123\1\0\1\4\11\123\2\uffff\1\124\1\130\1\123"+
-        "\1\0\2\123\1\0\1\4\11\123\1\uffff\1\123\1\uffff\1\4\32\0\1\uffff"+
-        "\4\0\1\uffff\36\0";
+        "\1\163\2\123\2\0\1\123\1\4\11\123\1\0\2\uffff\1\124\1\130\1\123"+
+        "\1\0\2\123\1\0\1\4\11\123\1\uffff\1\123\1\4\16\0\1\uffff\14\0\1"+
+        "\uffff\4\0\1\uffff\36\0";
     static final String DFA51_maxS =
         "\2\130\1\162\2\0\1\130\1\0\1\123\1\163\3\uffff\1\162\1\123\1\uffff"+
         "\2\162\1\123\1\163\1\132\1\162\1\132\3\162\2\0\1\123\1\163\1\132"+
-        "\1\162\2\0\1\123\1\0\1\u0080\1\123\7\161\1\123\2\uffff\3\162\1\0"+
-        "\1\141\1\123\1\0\1\u0080\1\123\7\161\1\123\1\uffff\1\162\1\uffff"+
-        "\1\u0080\32\0\1\uffff\4\0\1\uffff\36\0";
+        "\1\162\2\0\1\123\1\u0080\1\123\7\161\1\123\1\0\2\uffff\3\162\1\0"+
+        "\1\141\1\123\1\0\1\u0080\1\123\7\161\1\123\1\uffff\1\162\1\u0080"+
+        "\16\0\1\uffff\14\0\1\uffff\4\0\1\uffff\36\0";
     static final String DFA51_acceptS =
-        "\11\uffff\1\1\2\2\2\uffff\1\3\36\uffff\2\3\21\uffff\1\3\1\uffff"+
-        "\1\3\33\uffff\1\3\4\uffff\1\3\36\uffff";
+        "\11\uffff\1\1\2\2\2\uffff\1\3\36\uffff\2\3\21\uffff\1\3\20\uffff"+
+        "\1\3\14\uffff\1\3\4\uffff\1\3\36\uffff";
     static final String DFA51_specialS =
-        "\2\uffff\1\12\1\1\1\10\1\uffff\1\2\22\uffff\1\4\1\7\4\uffff\1\3"+
-        "\1\6\1\uffff\1\0\17\uffff\1\5\2\uffff\1\11\114\uffff}>";
+        "\2\uffff\1\3\1\7\1\11\1\uffff\1\6\22\uffff\1\5\1\10\4\uffff\1\4"+
+        "\1\0\13\uffff\1\2\5\uffff\1\12\2\uffff\1\1\114\uffff}>";
     static final String[] DFA51_transitionS = {
             "\1\2\4\uffff\1\1",
-            "\1\3\4\uffff\1\4",
+            "\1\4\4\uffff\1\3",
             "\1\11\1\7\3\uffff\1\6\3\uffff\1\5\25\uffff\1\10",
             "\1\uffff",
             "\1\uffff",
@@ -17074,8 +17315,8 @@
             "\1\36\4\uffff\1\37\1\uffff\1\40",
             "\1\21\3\uffff\1\23\31\uffff\1\22",
             "\1\23\31\uffff\1\22",
-            "\1\45\1\44\3\uffff\1\42\3\uffff\1\41\14\uffff\1\46\1\47\1\50"+
-            "\1\51\1\52\1\53\1\54\2\uffff\1\43",
+            "\1\44\1\43\3\uffff\1\54\3\uffff\1\41\14\uffff\1\45\1\46\1\47"+
+            "\1\50\1\51\1\52\1\53\2\uffff\1\42",
             "\1\uffff",
             "\1\uffff",
             "\1\57",
@@ -17086,30 +17327,30 @@
             "\1\uffff",
             "\1\uffff",
             "\1\101",
+            "\156\102\1\103\1\104\15\102",
+            "\1\105",
+            "\1\106\3\uffff\1\107\1\114\6\uffff\1\112\1\110\16\uffff\1\115"+
+            "\1\111\1\113",
+            "\1\116\3\uffff\1\107\1\117\6\uffff\1\112\1\110\17\uffff\1\111"+
+            "\1\113",
+            "\1\116\3\uffff\1\107\1\117\6\uffff\1\112\1\110\17\uffff\1\111"+
+            "\1\113",
+            "\1\116\3\uffff\1\107\1\117\6\uffff\1\112\1\110\17\uffff\1\111"+
+            "\1\113",
+            "\1\116\3\uffff\1\107\1\117\6\uffff\1\112\1\110\17\uffff\1\111"+
+            "\1\113",
+            "\1\116\3\uffff\1\107\1\117\6\uffff\1\112\1\110\17\uffff\1\111"+
+            "\1\113",
+            "\1\116\3\uffff\1\107\1\117\6\uffff\1\112\1\110\17\uffff\1\111"+
+            "\1\113",
+            "\1\120",
             "\1\uffff",
-            "\156\103\1\104\1\105\15\103",
-            "\1\106",
-            "\1\107\3\uffff\1\110\1\115\6\uffff\1\113\1\111\16\uffff\1\116"+
-            "\1\112\1\114",
-            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
-            "\1\114",
-            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
-            "\1\114",
-            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
-            "\1\114",
-            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
-            "\1\114",
-            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
-            "\1\114",
-            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
-            "\1\114",
-            "\1\121",
             "",
             "",
             "\1\33\3\uffff\1\35\31\uffff\1\34",
             "\1\35\31\uffff\1\34",
-            "\1\125\1\124\3\uffff\1\135\3\uffff\1\122\14\uffff\1\126\1\127"+
-            "\1\130\1\131\1\132\1\133\1\134\2\uffff\1\123",
+            "\1\126\1\125\3\uffff\1\123\3\uffff\1\122\14\uffff\1\127\1\130"+
+            "\1\131\1\132\1\133\1\134\1\135\2\uffff\1\124",
             "\1\uffff",
             "\1\137\6\uffff\1\141\6\uffff\1\140",
             "\1\142",
@@ -17135,8 +17376,7 @@
             "\1\165\1\164\3\uffff\1\175\1\u0081\1\32\6\uffff\1\u0080\1\177"+
             "\5\uffff\1\176\1\166\1\167\1\170\1\171\1\172\1\173\1\174\2\uffff"+
             "\1\163",
-            "",
-            "\156\103\1\104\1\105\15\103",
+            "\156\102\1\103\1\104\15\102",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -17151,6 +17391,7 @@
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
+            "",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -17237,51 +17478,72 @@
         	int _s = s;
             switch ( s ) {
                     case 0 : 
-                        int LA51_34 = input.LA(1);
+                        int LA51_32 = input.LA(1);
 
                          
-                        int index51_34 = input.index();
+                        int index51_32 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred6()) ) {s = 9;}
 
-                        else if ( (true) ) {s = 66;}
+                        else if ( (true) ) {s = 46;}
 
                          
-                        input.seek(index51_34);
+                        input.seek(index51_32);
                         if ( s>=0 ) return s;
                         break;
                     case 1 : 
-                        int LA51_3 = input.LA(1);
+                        int LA51_53 = input.LA(1);
 
                          
-                        int index51_3 = input.index();
+                        int index51_53 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred6()) ) {s = 9;}
 
-                        else if ( (true) ) {s = 10;}
+                        else if ( (true) ) {s = 99;}
 
                          
-                        input.seek(index51_3);
+                        input.seek(index51_53);
                         if ( s>=0 ) return s;
                         break;
                     case 2 : 
-                        int LA51_6 = input.LA(1);
+                        int LA51_44 = input.LA(1);
 
                          
-                        int index51_6 = input.index();
+                        int index51_44 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (((synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EVAL)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||synpred6()||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.FORALL))))) ) {s = 9;}
+                        if ( (synpred6()) ) {s = 9;}
 
-                        else if ( (true) ) {s = 14;}
+                        else if ( (true) ) {s = 81;}
 
                          
-                        input.seek(index51_6);
+                        input.seek(index51_44);
                         if ( s>=0 ) return s;
                         break;
                     case 3 : 
+                        int LA51_2 = input.LA(1);
+
+                         
+                        int index51_2 = input.index();
+                        input.rewind();
+                        s = -1;
+                        if ( (LA51_2==COLON) ) {s = 5;}
+
+                        else if ( (LA51_2==LEFT_PAREN) ) {s = 6;}
+
+                        else if ( (LA51_2==DOT) ) {s = 7;}
+
+                        else if ( (LA51_2==LEFT_SQUARE) ) {s = 8;}
+
+                        else if ( (LA51_2==ID) && (((synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(!
 DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||((synpred6()&&validateNotWithBinding())&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))))) {s = 9;}
+
+                         
+                        input.seek(index51_2);
+                        if ( s>=0 ) return s;
+                        break;
+                    case 4 : 
                         int LA51_31 = input.LA(1);
 
                          
@@ -17296,7 +17558,7 @@
                         input.seek(index51_31);
                         if ( s>=0 ) return s;
                         break;
-                    case 4 : 
+                    case 5 : 
                         int LA51_25 = input.LA(1);
 
                          
@@ -17311,37 +17573,37 @@
                         input.seek(index51_25);
                         if ( s>=0 ) return s;
                         break;
-                    case 5 : 
-                        int LA51_50 = input.LA(1);
+                    case 6 : 
+                        int LA51_6 = input.LA(1);
 
                          
-                        int index51_50 = input.index();
+                        int index51_6 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred6()) ) {s = 9;}
+                        if ( (((synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.FORALL)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EVAL)))||synpred6())) ) {s = 9;}
 
-                        else if ( (true) ) {s = 94;}
+                        else if ( (true) ) {s = 14;}
 
                          
-                        input.seek(index51_50);
+                        input.seek(index51_6);
                         if ( s>=0 ) return s;
                         break;
-                    case 6 : 
-                        int LA51_32 = input.LA(1);
+                    case 7 : 
+                        int LA51_3 = input.LA(1);
 
                          
-                        int index51_32 = input.index();
+                        int index51_3 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred6()) ) {s = 9;}
 
-                        else if ( (true) ) {s = 46;}
+                        else if ( (true) ) {s = 10;}
 
                          
-                        input.seek(index51_32);
+                        input.seek(index51_3);
                         if ( s>=0 ) return s;
                         break;
-                    case 7 : 
+                    case 8 : 
                         int LA51_26 = input.LA(1);
 
                          
@@ -17356,7 +17618,7 @@
                         input.seek(index51_26);
                         if ( s>=0 ) return s;
                         break;
-                    case 8 : 
+                    case 9 : 
                         int LA51_4 = input.LA(1);
 
                          
@@ -17371,42 +17633,21 @@
                         input.seek(index51_4);
                         if ( s>=0 ) return s;
                         break;
-                    case 9 : 
-                        int LA51_53 = input.LA(1);
+                    case 10 : 
+                        int LA51_50 = input.LA(1);
 
                          
-                        int index51_53 = input.index();
+                        int index51_50 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred6()) ) {s = 9;}
 
-                        else if ( (true) ) {s = 99;}
+                        else if ( (true) ) {s = 94;}
 
                          
-                        input.seek(index51_53);
+                        input.seek(index51_50);
                         if ( s>=0 ) return s;
                         break;
-                    case 10 : 
-                        int LA51_2 = input.LA(1);
-
-                         
-                        int index51_2 = input.index();
-                        input.rewind();
-                        s = -1;
-                        if ( (LA51_2==COLON) ) {s = 5;}
-
-                        else if ( (LA51_2==LEFT_PAREN) ) {s = 6;}
-
-                        else if ( (LA51_2==DOT) ) {s = 7;}
-
-                        else if ( (LA51_2==LEFT_SQUARE) ) {s = 8;}
-
-                        else if ( (LA51_2==ID) && (((synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||((synpred6()&&validateNotWithBinding())&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred!
 6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred6()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))))) {s = 9;}
-
-                         
-                        input.seek(index51_2);
-                        if ( s>=0 ) return s;
-                        break;
             }
             if (backtracking>0) {failed=true; return -1;}
             NoViableAltException nvae =
@@ -17422,24 +17663,24 @@
     static final String DFA52_minS =
         "\3\123\2\0\1\123\1\0\1\uffff\1\123\1\163\2\uffff\1\124\1\123\1\uffff"+
         "\1\124\1\130\1\123\1\163\1\123\1\124\1\123\1\124\1\130\1\123\2\0"+
-        "\1\123\1\163\2\123\2\0\1\123\1\4\11\123\1\0\2\uffff\1\124\1\130"+
-        "\1\123\1\0\2\123\1\0\1\4\11\123\1\uffff\1\123\1\4\16\0\1\uffff\14"+
-        "\0\1\uffff\4\0\1\uffff\36\0";
+        "\1\123\1\163\2\123\2\0\1\123\1\0\1\4\11\123\2\uffff\1\124\1\130"+
+        "\1\123\1\0\2\123\1\0\1\4\11\123\1\uffff\1\123\1\uffff\1\4\32\0\1"+
+        "\uffff\4\0\1\uffff\36\0";
     static final String DFA52_maxS =
         "\2\130\1\162\2\0\1\130\1\0\1\uffff\1\123\1\163\2\uffff\1\162\1\123"+
         "\1\uffff\2\162\1\123\1\163\1\132\1\162\1\132\3\162\2\0\1\123\1\163"+
-        "\1\132\1\162\2\0\1\123\1\u0080\1\123\7\161\1\123\1\0\2\uffff\3\162"+
-        "\1\0\1\141\1\123\1\0\1\u0080\1\123\7\161\1\123\1\uffff\1\162\1\u0080"+
-        "\16\0\1\uffff\14\0\1\uffff\4\0\1\uffff\36\0";
+        "\1\132\1\162\2\0\1\123\1\0\1\u0080\1\123\7\161\1\123\2\uffff\3\162"+
+        "\1\0\1\141\1\123\1\0\1\u0080\1\123\7\161\1\123\1\uffff\1\162\1\uffff"+
+        "\1\u0080\32\0\1\uffff\4\0\1\uffff\36\0";
     static final String DFA52_acceptS =
-        "\7\uffff\1\1\2\uffff\2\2\2\uffff\1\3\36\uffff\2\3\21\uffff\1\3\20"+
-        "\uffff\1\3\14\uffff\1\3\4\uffff\1\3\36\uffff";
+        "\7\uffff\1\1\2\uffff\2\2\2\uffff\1\3\36\uffff\2\3\21\uffff\1\3\1"+
+        "\uffff\1\3\33\uffff\1\3\4\uffff\1\3\36\uffff";
     static final String DFA52_specialS =
-        "\2\uffff\1\12\1\11\1\0\1\uffff\1\1\22\uffff\1\5\1\3\4\uffff\1\2"+
-        "\1\10\13\uffff\1\7\5\uffff\1\6\2\uffff\1\4\114\uffff}>";
+        "\2\uffff\1\4\1\10\1\11\1\uffff\1\7\22\uffff\1\5\1\2\4\uffff\1\12"+
+        "\1\3\1\uffff\1\1\17\uffff\1\6\2\uffff\1\0\114\uffff}>";
     static final String[] DFA52_transitionS = {
             "\1\2\4\uffff\1\1",
-            "\1\3\4\uffff\1\4",
+            "\1\4\4\uffff\1\3",
             "\1\7\1\10\3\uffff\1\6\3\uffff\1\5\25\uffff\1\11",
             "\1\uffff",
             "\1\uffff",
@@ -17462,8 +17703,8 @@
             "\1\36\4\uffff\1\37\1\uffff\1\40",
             "\1\21\3\uffff\1\23\31\uffff\1\22",
             "\1\23\31\uffff\1\22",
-            "\1\44\1\43\3\uffff\1\54\3\uffff\1\41\14\uffff\1\45\1\46\1\47"+
-            "\1\50\1\51\1\52\1\53\2\uffff\1\42",
+            "\1\45\1\44\3\uffff\1\42\3\uffff\1\41\14\uffff\1\46\1\47\1\50"+
+            "\1\51\1\52\1\53\1\54\2\uffff\1\43",
             "\1\uffff",
             "\1\uffff",
             "\1\57",
@@ -17474,30 +17715,30 @@
             "\1\uffff",
             "\1\uffff",
             "\1\101",
-            "\156\102\1\103\1\104\15\102",
-            "\1\105",
-            "\1\107\3\uffff\1\110\1\106\6\uffff\1\113\1\111\16\uffff\1\115"+
+            "\1\uffff",
+            "\156\103\1\104\1\105\15\103",
+            "\1\106",
+            "\1\107\3\uffff\1\110\1\115\6\uffff\1\113\1\111\16\uffff\1\116"+
             "\1\112\1\114",
-            "\1\116\3\uffff\1\110\1\117\6\uffff\1\113\1\111\17\uffff\1\112"+
+            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
             "\1\114",
-            "\1\116\3\uffff\1\110\1\117\6\uffff\1\113\1\111\17\uffff\1\112"+
+            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
             "\1\114",
-            "\1\116\3\uffff\1\110\1\117\6\uffff\1\113\1\111\17\uffff\1\112"+
+            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
             "\1\114",
-            "\1\116\3\uffff\1\110\1\117\6\uffff\1\113\1\111\17\uffff\1\112"+
+            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
             "\1\114",
-            "\1\116\3\uffff\1\110\1\117\6\uffff\1\113\1\111\17\uffff\1\112"+
+            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
             "\1\114",
-            "\1\116\3\uffff\1\110\1\117\6\uffff\1\113\1\111\17\uffff\1\112"+
+            "\1\117\3\uffff\1\110\1\120\6\uffff\1\113\1\111\17\uffff\1\112"+
             "\1\114",
-            "\1\120",
-            "\1\uffff",
+            "\1\121",
             "",
             "",
             "\1\33\3\uffff\1\35\31\uffff\1\34",
             "\1\35\31\uffff\1\34",
-            "\1\125\1\124\3\uffff\1\135\3\uffff\1\122\14\uffff\1\126\1\127"+
-            "\1\130\1\131\1\132\1\133\1\134\2\uffff\1\123",
+            "\1\126\1\125\3\uffff\1\123\3\uffff\1\122\14\uffff\1\127\1\130"+
+            "\1\131\1\132\1\133\1\134\1\135\2\uffff\1\124",
             "\1\uffff",
             "\1\137\6\uffff\1\141\6\uffff\1\140",
             "\1\142",
@@ -17523,7 +17764,8 @@
             "\1\165\1\164\3\uffff\1\175\1\u0081\1\32\6\uffff\1\u0080\1\177"+
             "\5\uffff\1\176\1\166\1\167\1\170\1\171\1\172\1\173\1\174\2\uffff"+
             "\1\163",
-            "\156\102\1\103\1\104\15\102",
+            "",
+            "\156\103\1\104\1\105\15\103",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -17538,7 +17780,6 @@
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
-            "",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -17625,55 +17866,55 @@
         	int _s = s;
             switch ( s ) {
                     case 0 : 
-                        int LA52_4 = input.LA(1);
+                        int LA52_53 = input.LA(1);
 
                          
-                        int index52_4 = input.index();
+                        int index52_53 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred7()) ) {s = 7;}
 
-                        else if ( (true) ) {s = 11;}
+                        else if ( (true) ) {s = 99;}
 
                          
-                        input.seek(index52_4);
+                        input.seek(index52_53);
                         if ( s>=0 ) return s;
                         break;
                     case 1 : 
-                        int LA52_6 = input.LA(1);
+                        int LA52_34 = input.LA(1);
 
                          
-                        int index52_6 = input.index();
+                        int index52_34 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (((synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EVAL)))||synpred7()||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.FORALL))))) ) {s = 7;}
+                        if ( (synpred7()) ) {s = 7;}
 
-                        else if ( (true) ) {s = 14;}
+                        else if ( (true) ) {s = 66;}
 
                          
-                        input.seek(index52_6);
+                        input.seek(index52_34);
                         if ( s>=0 ) return s;
                         break;
                     case 2 : 
-                        int LA52_31 = input.LA(1);
+                        int LA52_26 = input.LA(1);
 
                          
-                        int index52_31 = input.index();
+                        int index52_26 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred7()) ) {s = 7;}
 
-                        else if ( (true) ) {s = 64;}
+                        else if ( (true) ) {s = 46;}
 
                          
-                        input.seek(index52_31);
+                        input.seek(index52_26);
                         if ( s>=0 ) return s;
                         break;
                     case 3 : 
-                        int LA52_26 = input.LA(1);
+                        int LA52_32 = input.LA(1);
 
                          
-                        int index52_26 = input.index();
+                        int index52_32 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred7()) ) {s = 7;}
@@ -17681,22 +17922,28 @@
                         else if ( (true) ) {s = 46;}
 
                          
-                        input.seek(index52_26);
+                        input.seek(index52_32);
                         if ( s>=0 ) return s;
                         break;
                     case 4 : 
-                        int LA52_53 = input.LA(1);
+                        int LA52_2 = input.LA(1);
 
                          
-                        int index52_53 = input.index();
+                        int index52_2 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred7()) ) {s = 7;}
+                        if ( (LA52_2==COLON) ) {s = 5;}
 
-                        else if ( (true) ) {s = 99;}
+                        else if ( (LA52_2==LEFT_PAREN) ) {s = 6;}
 
+                        else if ( (LA52_2==ID) && (((synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||((synpred7()&&validateNotWithBinding())&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synp!
 red7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))))) {s = 7;}
+
+                        else if ( (LA52_2==DOT) ) {s = 8;}
+
+                        else if ( (LA52_2==LEFT_SQUARE) ) {s = 9;}
+
                          
-                        input.seek(index52_53);
+                        input.seek(index52_2);
                         if ( s>=0 ) return s;
                         break;
                     case 5 : 
@@ -17730,69 +17977,63 @@
                         if ( s>=0 ) return s;
                         break;
                     case 7 : 
-                        int LA52_44 = input.LA(1);
+                        int LA52_6 = input.LA(1);
 
                          
-                        int index52_44 = input.index();
+                        int index52_6 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred7()) ) {s = 7;}
+                        if ( (((synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.FORALL)))||synpred7()||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EVAL))))) ) {s = 7;}
 
-                        else if ( (true) ) {s = 81;}
+                        else if ( (true) ) {s = 14;}
 
                          
-                        input.seek(index52_44);
+                        input.seek(index52_6);
                         if ( s>=0 ) return s;
                         break;
                     case 8 : 
-                        int LA52_32 = input.LA(1);
+                        int LA52_3 = input.LA(1);
 
                          
-                        int index52_32 = input.index();
+                        int index52_3 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred7()) ) {s = 7;}
 
-                        else if ( (true) ) {s = 46;}
+                        else if ( (true) ) {s = 10;}
 
                          
-                        input.seek(index52_32);
+                        input.seek(index52_3);
                         if ( s>=0 ) return s;
                         break;
                     case 9 : 
-                        int LA52_3 = input.LA(1);
+                        int LA52_4 = input.LA(1);
 
                          
-                        int index52_3 = input.index();
+                        int index52_4 = input.index();
                         input.rewind();
                         s = -1;
                         if ( (synpred7()) ) {s = 7;}
 
-                        else if ( (true) ) {s = 10;}
+                        else if ( (true) ) {s = 11;}
 
                          
-                        input.seek(index52_3);
+                        input.seek(index52_4);
                         if ( s>=0 ) return s;
                         break;
                     case 10 : 
-                        int LA52_2 = input.LA(1);
+                        int LA52_31 = input.LA(1);
 
                          
-                        int index52_2 = input.index();
+                        int index52_31 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA52_2==COLON) ) {s = 5;}
+                        if ( (synpred7()) ) {s = 7;}
 
-                        else if ( (LA52_2==LEFT_PAREN) ) {s = 6;}
+                        else if ( (true) ) {s = 64;}
 
-                        else if ( (LA52_2==ID) && (((synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||((synpred7()&&validateNotWithBinding())&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synp!
 red7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.NOT)))||(synpred7()&&(validateIdentifierKey(DroolsSoftKeywords.EXISTS)))))) {s = 7;}
-
-                        else if ( (LA52_2==DOT) ) {s = 8;}
-
-                        else if ( (LA52_2==LEFT_SQUARE) ) {s = 9;}
-
                          
-                        input.seek(index52_2);
+                        input.seek(index52_31);
                         if ( s>=0 ) return s;
                         break;
             }
@@ -17812,16 +18053,16 @@
     static final String DFA63_maxS =
         "\1\123\1\130\2\u0080\1\0\1\132\1\0\4\uffff";
     static final String DFA63_acceptS =
-        "\7\uffff\1\1\2\2\1\1";
+        "\7\uffff\1\1\1\2\1\1\1\2";
     static final String DFA63_specialS =
-        "\1\5\1\6\1\2\1\1\1\4\1\3\1\0\4\uffff}>";
+        "\1\6\1\2\1\1\1\5\1\4\1\3\1\0\4\uffff}>";
     static final String[] DFA63_transitionS = {
             "\1\1",
             "\1\2",
             "\124\3\1\4\1\3\1\5\46\3",
             "\124\3\1\6\1\3\1\5\46\3",
             "\1\uffff",
-            "\1\12\5\uffff\1\12\1\11",
+            "\1\11\5\uffff\1\11\1\12",
             "\1\uffff",
             "",
             "",
@@ -17871,46 +18112,42 @@
                         int index63_6 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateIdentifierKey(DroolsSoftKeywords.REVERSE))) ) {s = 10;}
+                        if ( ((validateIdentifierKey(DroolsSoftKeywords.REVERSE))) ) {s = 9;}
 
-                        else if ( ((validateIdentifierKey(DroolsSoftKeywords.RESULT))) ) {s = 9;}
+                        else if ( ((validateIdentifierKey(DroolsSoftKeywords.RESULT))) ) {s = 10;}
 
                          
                         input.seek(index63_6);
                         if ( s>=0 ) return s;
                         break;
                     case 1 : 
-                        int LA63_3 = input.LA(1);
+                        int LA63_2 = input.LA(1);
 
                          
-                        int index63_3 = input.index();
+                        int index63_2 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA63_3==RIGHT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 5;}
+                        if ( ((LA63_2>=VT_COMPILATION_UNIT && LA63_2<=STRING)||LA63_2==COMMA||(LA63_2>=AT && LA63_2<=MULTI_LINE_COMMENT)) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 3;}
 
-                        else if ( ((LA63_3>=VT_COMPILATION_UNIT && LA63_3<=STRING)||LA63_3==COMMA||(LA63_3>=AT && LA63_3<=MULTI_LINE_COMMENT)) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 3;}
+                        else if ( (LA63_2==LEFT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 4;}
 
-                        else if ( (LA63_3==LEFT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 6;}
+                        else if ( (LA63_2==RIGHT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 5;}
 
                          
-                        input.seek(index63_3);
+                        input.seek(index63_2);
                         if ( s>=0 ) return s;
                         break;
                     case 2 : 
-                        int LA63_2 = input.LA(1);
+                        int LA63_1 = input.LA(1);
 
                          
-                        int index63_2 = input.index();
+                        int index63_1 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((LA63_2>=VT_COMPILATION_UNIT && LA63_2<=STRING)||LA63_2==COMMA||(LA63_2>=AT && LA63_2<=MULTI_LINE_COMMENT)) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 3;}
+                        if ( (LA63_1==LEFT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 2;}
 
-                        else if ( (LA63_2==LEFT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 4;}
-
-                        else if ( (LA63_2==RIGHT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 5;}
-
                          
-                        input.seek(index63_2);
+                        input.seek(index63_1);
                         if ( s>=0 ) return s;
                         break;
                     case 3 : 
@@ -17920,9 +18157,9 @@
                         int index63_5 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA63_5==RIGHT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.RESULT)))) {s = 9;}
+                        if ( (LA63_5==ID||LA63_5==COMMA) && ((validateIdentifierKey(DroolsSoftKeywords.REVERSE)))) {s = 9;}
 
-                        else if ( (LA63_5==ID||LA63_5==COMMA) && ((validateIdentifierKey(DroolsSoftKeywords.REVERSE)))) {s = 10;}
+                        else if ( (LA63_5==RIGHT_PAREN) && ((validateIdentifierKey(DroolsSoftKeywords.RESULT)))) {s = 10;}
 
                          
                         input.seek(index63_5);
@@ -17944,29 +18181,33 @@
                         if ( s>=0 ) return s;
                         break;
                     case 5 : 
-                        int LA63_0 = input.LA(1);
+                        int LA63_3 = input.LA(1);
 
                          
-                        int index63_0 = input.index();
+                        int index63_3 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA63_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 1;}
+                        if ( (LA63_3==RIGHT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 5;}
 
+                        else if ( ((LA63_3>=VT_COMPILATION_UNIT && LA63_3<=STRING)||LA63_3==COMMA||(LA63_3>=AT && LA63_3<=MULTI_LINE_COMMENT)) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 3;}
+
+                        else if ( (LA63_3==LEFT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 6;}
+
                          
-                        input.seek(index63_0);
+                        input.seek(index63_3);
                         if ( s>=0 ) return s;
                         break;
                     case 6 : 
-                        int LA63_1 = input.LA(1);
+                        int LA63_0 = input.LA(1);
 
                          
-                        int index63_1 = input.index();
+                        int index63_0 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA63_1==LEFT_PAREN) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 2;}
+                        if ( (LA63_0==ID) && (((validateIdentifierKey(DroolsSoftKeywords.REVERSE))||(validateIdentifierKey(DroolsSoftKeywords.RESULT))))) {s = 1;}
 
                          
-                        input.seek(index63_1);
+                        input.seek(index63_0);
                         if ( s>=0 ) return s;
                         break;
             }
@@ -17977,325 +18218,307 @@
             throw nvae;
         }
     }
-    static final String DFA68_eotS =
-        "\26\uffff";
-    static final String DFA68_eofS =
-        "\26\uffff";
-    static final String DFA68_minS =
-        "\1\122\1\uffff\1\4\1\uffff\1\4\1\0\2\uffff\3\4\2\0\1\4\1\0\1\4\1"+
+    static final String DFA66_eotS =
+        "\25\uffff";
+    static final String DFA66_eofS =
+        "\25\uffff";
+    static final String DFA66_minS =
+        "\1\122\1\4\1\uffff\1\4\1\uffff\1\0\1\uffff\1\4\2\0\3\4\1\0\1\4\1"+
         "\uffff\1\4\4\0";
-    static final String DFA68_maxS =
-        "\1\164\1\uffff\1\u0080\1\uffff\1\u0080\1\0\2\uffff\3\u0080\2\0\1"+
+    static final String DFA66_maxS =
+        "\1\164\1\u0080\1\uffff\1\u0080\1\uffff\1\0\1\uffff\1\u0080\2\0\3"+
         "\u0080\1\0\1\u0080\1\uffff\1\u0080\4\0";
-    static final String DFA68_acceptS =
-        "\1\uffff\1\1\1\uffff\1\3\2\uffff\2\2\10\uffff\1\2\5\uffff";
-    static final String DFA68_specialS =
-        "\1\1\1\uffff\1\7\1\uffff\1\2\1\5\2\uffff\1\6\1\13\1\10\1\4\1\12"+
-        "\1\11\1\3\1\0\1\uffff\1\14\4\uffff}>";
-    static final String[] DFA68_transitionS = {
-            "\3\3\1\uffff\1\3\1\uffff\1\2\2\3\6\uffff\2\3\3\uffff\1\3\13"+
-            "\uffff\1\1\1\uffff\1\3",
+    static final String DFA66_acceptS =
+        "\2\uffff\1\2\1\uffff\1\1\1\uffff\1\1\10\uffff\1\1\5\uffff";
+    static final String DFA66_specialS =
+        "\1\uffff\1\10\1\uffff\1\11\1\uffff\1\13\1\uffff\1\1\1\5\1\12\1\7"+
+        "\1\3\1\0\1\2\1\4\1\uffff\1\6\4\uffff}>";
+    static final String[] DFA66_transitionS = {
+            "\3\2\1\uffff\1\2\1\uffff\1\1\2\2\6\uffff\2\2\3\uffff\1\2\15"+
+            "\uffff\1\2",
+            "\117\4\1\3\4\4\1\5\1\4\1\6\46\4",
             "",
-            "\117\6\1\4\4\6\1\5\1\6\1\7\46\6",
+            "\117\4\1\11\1\12\3\4\1\10\1\4\1\6\1\4\1\7\25\4\1\13\16\4",
             "",
-            "\117\6\1\14\1\11\3\6\1\13\1\6\1\7\1\6\1\10\25\6\1\12\16\6",
             "\1\uffff",
             "",
-            "",
-            "\117\6\1\15\4\6\1\16\1\6\1\7\46\6",
-            "\117\6\1\17\4\6\1\20\1\6\1\7\46\6",
-            "\124\6\1\20\1\6\1\7\30\6\1\21\15\6",
+            "\117\4\1\14\4\4\1\15\1\4\1\6\46\4",
             "\1\uffff",
             "\1\uffff",
-            "\120\6\1\22\3\6\1\24\1\6\1\7\27\6\1\23\16\6",
+            "\117\4\1\16\4\4\1\17\1\4\1\6\46\4",
+            "\124\4\1\17\1\4\1\6\30\4\1\20\15\4",
+            "\120\4\1\21\3\4\1\23\1\4\1\6\27\4\1\22\16\4",
             "\1\uffff",
-            "\120\6\1\11\3\6\1\25\1\6\1\7\27\6\1\12\16\6",
+            "\120\4\1\12\3\4\1\24\1\4\1\6\27\4\1\13\16\4",
             "",
-            "\124\6\1\25\1\6\1\7\27\6\1\12\16\6",
+            "\124\4\1\24\1\4\1\6\27\4\1\13\16\4",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff"
     };
 
-    static final short[] DFA68_eot = DFA.unpackEncodedString(DFA68_eotS);
-    static final short[] DFA68_eof = DFA.unpackEncodedString(DFA68_eofS);
-    static final char[] DFA68_min = DFA.unpackEncodedStringToUnsignedChars(DFA68_minS);
-    static final char[] DFA68_max = DFA.unpackEncodedStringToUnsignedChars(DFA68_maxS);
-    static final short[] DFA68_accept = DFA.unpackEncodedString(DFA68_acceptS);
-    static final short[] DFA68_special = DFA.unpackEncodedString(DFA68_specialS);
-    static final short[][] DFA68_transition;
+    static final short[] DFA66_eot = DFA.unpackEncodedString(DFA66_eotS);
+    static final short[] DFA66_eof = DFA.unpackEncodedString(DFA66_eofS);
+    static final char[] DFA66_min = DFA.unpackEncodedStringToUnsignedChars(DFA66_minS);
+    static final char[] DFA66_max = DFA.unpackEncodedStringToUnsignedChars(DFA66_maxS);
+    static final short[] DFA66_accept = DFA.unpackEncodedString(DFA66_acceptS);
+    static final short[] DFA66_special = DFA.unpackEncodedString(DFA66_specialS);
+    static final short[][] DFA66_transition;
 
     static {
-        int numStates = DFA68_transitionS.length;
-        DFA68_transition = new short[numStates][];
+        int numStates = DFA66_transitionS.length;
+        DFA66_transition = new short[numStates][];
         for (int i=0; i<numStates; i++) {
-            DFA68_transition[i] = DFA.unpackEncodedString(DFA68_transitionS[i]);
+            DFA66_transition[i] = DFA.unpackEncodedString(DFA66_transitionS[i]);
         }
     }
 
-    class DFA68 extends DFA {
+    class DFA66 extends DFA {
 
-        public DFA68(BaseRecognizer recognizer) {
+        public DFA66(BaseRecognizer recognizer) {
             this.recognizer = recognizer;
-            this.decisionNumber = 68;
-            this.eot = DFA68_eot;
-            this.eof = DFA68_eof;
-            this.min = DFA68_min;
-            this.max = DFA68_max;
-            this.accept = DFA68_accept;
-            this.special = DFA68_special;
-            this.transition = DFA68_transition;
+            this.decisionNumber = 66;
+            this.eot = DFA66_eot;
+            this.eof = DFA66_eof;
+            this.min = DFA66_min;
+            this.max = DFA66_max;
+            this.accept = DFA66_accept;
+            this.special = DFA66_special;
+            this.transition = DFA66_transition;
         }
         public String getDescription() {
-            return "1063:4: ( ( LEFT_SQUARE )=> square_chunk | ( LEFT_PAREN )=> paren_chunk )?";
+            return "1049:3: ( ( LEFT_PAREN )=>args= paren_chunk )?";
         }
         public int specialStateTransition(int s, IntStream input) throws NoViableAltException {
         	int _s = s;
             switch ( s ) {
                     case 0 : 
-                        int LA68_15 = input.LA(1);
+                        int LA66_12 = input.LA(1);
 
                          
-                        int index68_15 = input.index();
+                        int index66_12 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_15==LEFT_SQUARE) ) {s = 10;}
+                        if ( (LA66_12==DOT) ) {s = 17;}
 
-                        else if ( (LA68_15==LEFT_PAREN) ) {s = 21;}
+                        else if ( (LA66_12==LEFT_SQUARE) ) {s = 18;}
 
-                        else if ( (LA68_15==DOT) ) {s = 9;}
+                        else if ( (LA66_12==LEFT_PAREN) ) {s = 19;}
 
-                        else if ( (LA68_15==RIGHT_PAREN) && (synpred10())) {s = 7;}
+                        else if ( (LA66_12==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
-                        else if ( ((LA68_15>=VT_COMPILATION_UNIT && LA68_15<=ID)||(LA68_15>=DOT_STAR && LA68_15<=STRING)||LA68_15==COMMA||(LA68_15>=AT && LA68_15<=NULL)||(LA68_15>=RIGHT_SQUARE && LA68_15<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
+                        else if ( ((LA66_12>=VT_COMPILATION_UNIT && LA66_12<=ID)||(LA66_12>=DOT_STAR && LA66_12<=STRING)||LA66_12==COMMA||(LA66_12>=AT && LA66_12<=NULL)||(LA66_12>=RIGHT_SQUARE && LA66_12<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
 
                          
-                        input.seek(index68_15);
+                        input.seek(index66_12);
                         if ( s>=0 ) return s;
                         break;
                     case 1 : 
-                        int LA68_0 = input.LA(1);
+                        int LA66_7 = input.LA(1);
 
                          
-                        int index68_0 = input.index();
+                        int index66_7 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_0==LEFT_SQUARE) && (synpred9())) {s = 1;}
+                        if ( (LA66_7==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
-                        else if ( (LA68_0==LEFT_PAREN) ) {s = 2;}
+                        else if ( (LA66_7==ID) ) {s = 12;}
 
-                        else if ( ((LA68_0>=SEMICOLON && LA68_0<=DOT)||LA68_0==END||(LA68_0>=COMMA && LA68_0<=RIGHT_PAREN)||(LA68_0>=DOUBLE_PIPE && LA68_0<=DOUBLE_AMPER)||LA68_0==INIT||LA68_0==THEN) ) {s = 3;}
+                        else if ( (LA66_7==LEFT_PAREN) ) {s = 13;}
 
+                        else if ( ((LA66_7>=VT_COMPILATION_UNIT && LA66_7<=SEMICOLON)||(LA66_7>=DOT && LA66_7<=STRING)||LA66_7==COMMA||(LA66_7>=AT && LA66_7<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
+
                          
-                        input.seek(index68_0);
+                        input.seek(index66_7);
                         if ( s>=0 ) return s;
                         break;
                     case 2 : 
-                        int LA68_4 = input.LA(1);
+                        int LA66_13 = input.LA(1);
 
                          
-                        int index68_4 = input.index();
+                        int index66_13 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_4==COLON) ) {s = 8;}
+                        if ( (synpred8()) ) {s = 15;}
 
-                        else if ( (LA68_4==DOT) ) {s = 9;}
+                        else if ( (true) ) {s = 2;}
 
-                        else if ( (LA68_4==LEFT_SQUARE) ) {s = 10;}
-
-                        else if ( (LA68_4==LEFT_PAREN) ) {s = 11;}
-
-                        else if ( (LA68_4==ID) ) {s = 12;}
-
-                        else if ( (LA68_4==RIGHT_PAREN) && (synpred10())) {s = 7;}
-
-                        else if ( ((LA68_4>=VT_COMPILATION_UNIT && LA68_4<=SEMICOLON)||(LA68_4>=DOT_STAR && LA68_4<=STRING)||LA68_4==COMMA||LA68_4==AT||(LA68_4>=EQUALS && LA68_4<=NULL)||(LA68_4>=RIGHT_SQUARE && LA68_4<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
-
                          
-                        input.seek(index68_4);
+                        input.seek(index66_13);
                         if ( s>=0 ) return s;
                         break;
                     case 3 : 
-                        int LA68_14 = input.LA(1);
+                        int LA66_11 = input.LA(1);
 
                          
-                        int index68_14 = input.index();
+                        int index66_11 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred10()) ) {s = 16;}
+                        if ( (LA66_11==RIGHT_SQUARE) ) {s = 16;}
 
-                        else if ( (true) ) {s = 3;}
+                        else if ( (LA66_11==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
+                        else if ( ((LA66_11>=VT_COMPILATION_UNIT && LA66_11<=STRING)||LA66_11==COMMA||(LA66_11>=AT && LA66_11<=LEFT_SQUARE)||(LA66_11>=THEN && LA66_11<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
+
+                        else if ( (LA66_11==LEFT_PAREN) && (synpred8())) {s = 15;}
+
                          
-                        input.seek(index68_14);
+                        input.seek(index66_11);
                         if ( s>=0 ) return s;
                         break;
                     case 4 : 
-                        int LA68_11 = input.LA(1);
+                        int LA66_14 = input.LA(1);
 
                          
-                        int index68_11 = input.index();
+                        int index66_14 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred10()) ) {s = 16;}
+                        if ( (LA66_14==LEFT_SQUARE) ) {s = 11;}
 
-                        else if ( (true) ) {s = 3;}
+                        else if ( (LA66_14==LEFT_PAREN) ) {s = 20;}
 
+                        else if ( (LA66_14==DOT) ) {s = 10;}
+
+                        else if ( (LA66_14==RIGHT_PAREN) && (synpred8())) {s = 6;}
+
+                        else if ( ((LA66_14>=VT_COMPILATION_UNIT && LA66_14<=ID)||(LA66_14>=DOT_STAR && LA66_14<=STRING)||LA66_14==COMMA||(LA66_14>=AT && LA66_14<=NULL)||(LA66_14>=RIGHT_SQUARE && LA66_14<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
+
                          
-                        input.seek(index68_11);
+                        input.seek(index66_14);
                         if ( s>=0 ) return s;
                         break;
                     case 5 : 
-                        int LA68_5 = input.LA(1);
+                        int LA66_8 = input.LA(1);
 
                          
-                        int index68_5 = input.index();
+                        int index66_8 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred10()) ) {s = 7;}
+                        if ( (synpred8()) ) {s = 6;}
 
-                        else if ( (true) ) {s = 3;}
+                        else if ( (true) ) {s = 2;}
 
                          
-                        input.seek(index68_5);
+                        input.seek(index66_8);
                         if ( s>=0 ) return s;
                         break;
                     case 6 : 
-                        int LA68_8 = input.LA(1);
+                        int LA66_16 = input.LA(1);
 
                          
-                        int index68_8 = input.index();
+                        int index66_16 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_8==ID) ) {s = 13;}
+                        if ( (LA66_16==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
-                        else if ( (LA68_8==LEFT_PAREN) ) {s = 14;}
+                        else if ( (LA66_16==LEFT_SQUARE) ) {s = 11;}
 
-                        else if ( (LA68_8==RIGHT_PAREN) && (synpred10())) {s = 7;}
+                        else if ( (LA66_16==LEFT_PAREN) ) {s = 20;}
 
-                        else if ( ((LA68_8>=VT_COMPILATION_UNIT && LA68_8<=SEMICOLON)||(LA68_8>=DOT && LA68_8<=STRING)||LA68_8==COMMA||(LA68_8>=AT && LA68_8<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
+                        else if ( ((LA66_16>=VT_COMPILATION_UNIT && LA66_16<=STRING)||LA66_16==COMMA||(LA66_16>=AT && LA66_16<=NULL)||(LA66_16>=RIGHT_SQUARE && LA66_16<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
 
                          
-                        input.seek(index68_8);
+                        input.seek(index66_16);
                         if ( s>=0 ) return s;
                         break;
                     case 7 : 
-                        int LA68_2 = input.LA(1);
+                        int LA66_10 = input.LA(1);
 
                          
-                        int index68_2 = input.index();
+                        int index66_10 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_2==ID) ) {s = 4;}
+                        if ( (LA66_10==ID) ) {s = 14;}
 
-                        else if ( (LA68_2==LEFT_PAREN) ) {s = 5;}
+                        else if ( (LA66_10==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
-                        else if ( ((LA68_2>=VT_COMPILATION_UNIT && LA68_2<=SEMICOLON)||(LA68_2>=DOT && LA68_2<=STRING)||LA68_2==COMMA||(LA68_2>=AT && LA68_2<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
+                        else if ( ((LA66_10>=VT_COMPILATION_UNIT && LA66_10<=SEMICOLON)||(LA66_10>=DOT && LA66_10<=STRING)||LA66_10==COMMA||(LA66_10>=AT && LA66_10<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
 
-                        else if ( (LA68_2==RIGHT_PAREN) && (synpred10())) {s = 7;}
+                        else if ( (LA66_10==LEFT_PAREN) && (synpred8())) {s = 15;}
 
                          
-                        input.seek(index68_2);
+                        input.seek(index66_10);
                         if ( s>=0 ) return s;
                         break;
                     case 8 : 
-                        int LA68_10 = input.LA(1);
+                        int LA66_1 = input.LA(1);
 
                          
-                        int index68_10 = input.index();
+                        int index66_1 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_10==RIGHT_SQUARE) ) {s = 17;}
+                        if ( (LA66_1==ID) ) {s = 3;}
 
-                        else if ( (LA68_10==RIGHT_PAREN) && (synpred10())) {s = 7;}
+                        else if ( ((LA66_1>=VT_COMPILATION_UNIT && LA66_1<=SEMICOLON)||(LA66_1>=DOT && LA66_1<=STRING)||LA66_1==COMMA||(LA66_1>=AT && LA66_1<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
 
-                        else if ( ((LA68_10>=VT_COMPILATION_UNIT && LA68_10<=STRING)||LA68_10==COMMA||(LA68_10>=AT && LA68_10<=LEFT_SQUARE)||(LA68_10>=THEN && LA68_10<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
+                        else if ( (LA66_1==LEFT_PAREN) ) {s = 5;}
 
-                        else if ( (LA68_10==LEFT_PAREN) && (synpred10())) {s = 16;}
+                        else if ( (LA66_1==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
                          
-                        input.seek(index68_10);
+                        input.seek(index66_1);
                         if ( s>=0 ) return s;
                         break;
                     case 9 : 
-                        int LA68_13 = input.LA(1);
+                        int LA66_3 = input.LA(1);
 
                          
-                        int index68_13 = input.index();
+                        int index66_3 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_13==DOT) ) {s = 18;}
+                        if ( (LA66_3==COLON) ) {s = 7;}
 
-                        else if ( (LA68_13==LEFT_SQUARE) ) {s = 19;}
+                        else if ( (LA66_3==LEFT_PAREN) ) {s = 8;}
 
-                        else if ( (LA68_13==LEFT_PAREN) ) {s = 20;}
+                        else if ( (LA66_3==ID) ) {s = 9;}
 
-                        else if ( (LA68_13==RIGHT_PAREN) && (synpred10())) {s = 7;}
+                        else if ( (LA66_3==RIGHT_PAREN) && (synpred8())) {s = 6;}
 
-                        else if ( ((LA68_13>=VT_COMPILATION_UNIT && LA68_13<=ID)||(LA68_13>=DOT_STAR && LA68_13<=STRING)||LA68_13==COMMA||(LA68_13>=AT && LA68_13<=NULL)||(LA68_13>=RIGHT_SQUARE && LA68_13<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
+                        else if ( (LA66_3==DOT) ) {s = 10;}
 
+                        else if ( (LA66_3==LEFT_SQUARE) ) {s = 11;}
+
+                        else if ( ((LA66_3>=VT_COMPILATION_UNIT && LA66_3<=SEMICOLON)||(LA66_3>=DOT_STAR && LA66_3<=STRING)||LA66_3==COMMA||LA66_3==AT||(LA66_3>=EQUALS && LA66_3<=NULL)||(LA66_3>=RIGHT_SQUARE && LA66_3<=MULTI_LINE_COMMENT)) && (synpred8())) {s = 4;}
+
                          
-                        input.seek(index68_13);
+                        input.seek(index66_3);
                         if ( s>=0 ) return s;
                         break;
                     case 10 : 
-                        int LA68_12 = input.LA(1);
+                        int LA66_9 = input.LA(1);
 
                          
-                        int index68_12 = input.index();
+                        int index66_9 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (synpred10()) ) {s = 16;}
+                        if ( (synpred8()) ) {s = 6;}
 
-                        else if ( (true) ) {s = 3;}
+                        else if ( (true) ) {s = 2;}
 
                          
-                        input.seek(index68_12);
+                        input.seek(index66_9);
                         if ( s>=0 ) return s;
                         break;
                     case 11 : 
-                        int LA68_9 = input.LA(1);
+                        int LA66_5 = input.LA(1);
 
                          
-                        int index68_9 = input.index();
+                        int index66_5 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA68_9==ID) ) {s = 15;}
+                        if ( (synpred8()) ) {s = 6;}
 
-                        else if ( (LA68_9==RIGHT_PAREN) && (synpred10())) {s = 7;}
+                        else if ( (true) ) {s = 2;}
 
-                        else if ( ((LA68_9>=VT_COMPILATION_UNIT && LA68_9<=SEMICOLON)||(LA68_9>=DOT && LA68_9<=STRING)||LA68_9==COMMA||(LA68_9>=AT && LA68_9<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
-
-                        else if ( (LA68_9==LEFT_PAREN) && (synpred10())) {s = 16;}
-
                          
-                        input.seek(index68_9);
+                        input.seek(index66_5);
                         if ( s>=0 ) return s;
                         break;
-                    case 12 : 
-                        int LA68_17 = input.LA(1);
-
-                         
-                        int index68_17 = input.index();
-                        input.rewind();
-                        s = -1;
-                        if ( (LA68_17==LEFT_PAREN) ) {s = 21;}
-
-                        else if ( (LA68_17==LEFT_SQUARE) ) {s = 10;}
-
-                        else if ( (LA68_17==RIGHT_PAREN) && (synpred10())) {s = 7;}
-
-                        else if ( ((LA68_17>=VT_COMPILATION_UNIT && LA68_17<=STRING)||LA68_17==COMMA||(LA68_17>=AT && LA68_17<=NULL)||(LA68_17>=RIGHT_SQUARE && LA68_17<=MULTI_LINE_COMMENT)) && (synpred10())) {s = 6;}
-
-                         
-                        input.seek(index68_17);
-                        if ( s>=0 ) return s;
-                        break;
             }
             if (backtracking>0) {failed=true; return -1;}
             NoViableAltException nvae =
-                new NoViableAltException(getDescription(), 68, _s, input);
+                new NoViableAltException(getDescription(), 66, _s, input);
             error(nvae);
             throw nvae;
         }
@@ -18305,27 +18528,27 @@
     static final String DFA81_eofS =
         "\40\uffff";
     static final String DFA81_minS =
-        "\1\131\1\uffff\2\123\1\uffff\1\0\1\123\1\0\1\123\6\0\1\4\1\162\1"+
-        "\4\2\0\1\4\13\0";
+        "\1\131\1\uffff\2\123\1\0\1\uffff\1\123\1\0\1\123\6\0\1\4\1\162\2"+
+        "\4\15\0";
     static final String DFA81_maxS =
-        "\1\142\1\uffff\1\157\1\162\1\uffff\1\0\1\162\1\0\1\123\6\0\1\u0080"+
-        "\1\162\1\u0080\2\0\1\u0080\13\0";
+        "\1\142\1\uffff\1\157\1\162\1\0\1\uffff\1\162\1\0\1\123\6\0\1\u0080"+
+        "\1\162\2\u0080\15\0";
     static final String DFA81_acceptS =
-        "\1\uffff\1\2\2\uffff\1\1\33\uffff";
+        "\1\uffff\1\2\3\uffff\1\1\32\uffff";
     static final String DFA81_specialS =
-        "\2\uffff\1\0\1\13\1\uffff\1\3\1\10\1\7\1\uffff\1\4\1\5\1\14\1\2"+
-        "\1\12\1\11\3\uffff\1\6\1\1\14\uffff}>";
+        "\2\uffff\1\6\1\11\1\12\1\uffff\1\10\1\5\1\uffff\1\3\1\1\1\2\1\7"+
+        "\1\0\1\4\21\uffff}>";
     static final String[] DFA81_transitionS = {
             "\2\1\6\uffff\1\2\1\1",
             "",
-            "\1\3\4\uffff\1\5\20\uffff\7\4",
-            "\1\6\1\1\2\uffff\1\4\1\7\3\uffff\1\1\2\uffff\2\4\10\uffff\6"+
-            "\1\1\10\2\4\1\1",
+            "\1\3\4\uffff\1\4\20\uffff\7\5",
+            "\1\6\1\1\2\uffff\1\5\1\7\3\uffff\1\1\2\uffff\2\5\10\uffff\6"+
+            "\1\1\10\2\5\1\1",
+            "\1\uffff",
             "",
+            "\1\11\1\5\2\uffff\1\12\1\17\2\5\4\uffff\1\15\1\13\2\5\14\uffff"+
+            "\1\1\1\14\1\16\1\5",
             "\1\uffff",
-            "\1\11\1\4\2\uffff\1\12\1\17\2\4\4\uffff\1\15\1\13\2\4\14\uffff"+
-            "\1\1\1\14\1\16\1\4",
-            "\1\uffff",
             "\1\20",
             "\1\uffff",
             "\1\uffff",
@@ -18333,13 +18556,13 @@
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
-            "\117\31\1\21\3\31\1\24\1\22\1\31\1\23\4\31\1\27\1\25\17\31\1"+
-            "\26\1\30\17\31",
+            "\117\30\1\21\3\30\1\22\1\27\1\30\1\31\4\30\1\25\1\23\17\30\1"+
+            "\24\1\26\17\30",
             "\1\32",
-            "\120\31\1\34\3\31\1\37\1\35\1\36\27\31\1\33\16\31",
+            "\120\30\1\36\3\30\1\35\1\37\1\33\27\30\1\34\16\30",
+            "\124\30\1\35\1\37\1\33\46\30",
             "\1\uffff",
             "\1\uffff",
-            "\124\31\1\37\1\35\1\36\46\31",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -18389,125 +18612,125 @@
         	int _s = s;
             switch ( s ) {
                     case 0 : 
-                        int LA81_2 = input.LA(1);
+                        int LA81_13 = input.LA(1);
 
                          
-                        int index81_2 = input.index();
+                        int index81_13 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA81_2==ID) ) {s = 3;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
-                        else if ( ((LA81_2>=EQUAL && LA81_2<=GRAVE_ACCENT)) && ((validateRestr()))) {s = 4;}
+                        else if ( (true) ) {s = 1;}
 
-                        else if ( (LA81_2==LEFT_PAREN) ) {s = 5;}
-
                          
-                        input.seek(index81_2);
+                        input.seek(index81_13);
                         if ( s>=0 ) return s;
                         break;
                     case 1 : 
-                        int LA81_19 = input.LA(1);
+                        int LA81_10 = input.LA(1);
 
                          
-                        int index81_19 = input.index();
+                        int index81_10 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_19);
+                        input.seek(index81_10);
                         if ( s>=0 ) return s;
                         break;
                     case 2 : 
-                        int LA81_12 = input.LA(1);
+                        int LA81_11 = input.LA(1);
 
                          
-                        int index81_12 = input.index();
+                        int index81_11 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_12);
+                        input.seek(index81_11);
                         if ( s>=0 ) return s;
                         break;
                     case 3 : 
-                        int LA81_5 = input.LA(1);
+                        int LA81_9 = input.LA(1);
 
                          
-                        int index81_5 = input.index();
+                        int index81_9 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_5);
+                        input.seek(index81_9);
                         if ( s>=0 ) return s;
                         break;
                     case 4 : 
-                        int LA81_9 = input.LA(1);
+                        int LA81_14 = input.LA(1);
 
                          
-                        int index81_9 = input.index();
+                        int index81_14 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_9);
+                        input.seek(index81_14);
                         if ( s>=0 ) return s;
                         break;
                     case 5 : 
-                        int LA81_10 = input.LA(1);
+                        int LA81_7 = input.LA(1);
 
                          
-                        int index81_10 = input.index();
+                        int index81_7 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_10);
+                        input.seek(index81_7);
                         if ( s>=0 ) return s;
                         break;
                     case 6 : 
-                        int LA81_18 = input.LA(1);
+                        int LA81_2 = input.LA(1);
 
                          
-                        int index81_18 = input.index();
+                        int index81_2 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( (LA81_2==ID) ) {s = 3;}
 
-                        else if ( (true) ) {s = 1;}
+                        else if ( (LA81_2==LEFT_PAREN) ) {s = 4;}
 
+                        else if ( ((LA81_2>=EQUAL && LA81_2<=GRAVE_ACCENT)) && ((validateRestr()))) {s = 5;}
+
                          
-                        input.seek(index81_18);
+                        input.seek(index81_2);
                         if ( s>=0 ) return s;
                         break;
                     case 7 : 
-                        int LA81_7 = input.LA(1);
+                        int LA81_12 = input.LA(1);
 
                          
-                        int index81_7 = input.index();
+                        int index81_12 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_7);
+                        input.seek(index81_12);
                         if ( s>=0 ) return s;
                         break;
                     case 8 : 
@@ -18531,7 +18754,7 @@
 
                         else if ( (LA81_6==LEFT_PAREN) ) {s = 15;}
 
-                        else if ( (LA81_6==DOT||(LA81_6>=COMMA && LA81_6<=RIGHT_PAREN)||(LA81_6>=DOUBLE_PIPE && LA81_6<=DOUBLE_AMPER)||LA81_6==LEFT_SQUARE) && ((validateRestr()))) {s = 4;}
+                        else if ( (LA81_6==DOT||(LA81_6>=COMMA && LA81_6<=RIGHT_PAREN)||(LA81_6>=DOUBLE_PIPE && LA81_6<=DOUBLE_AMPER)||LA81_6==LEFT_SQUARE) && ((validateRestr()))) {s = 5;}
 
                         else if ( (LA81_6==GRAVE_ACCENT) ) {s = 1;}
 
@@ -18540,36 +18763,6 @@
                         if ( s>=0 ) return s;
                         break;
                     case 9 : 
-                        int LA81_14 = input.LA(1);
-
-                         
-                        int index81_14 = input.index();
-                        input.rewind();
-                        s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
-
-                        else if ( (true) ) {s = 1;}
-
-                         
-                        input.seek(index81_14);
-                        if ( s>=0 ) return s;
-                        break;
-                    case 10 : 
-                        int LA81_13 = input.LA(1);
-
-                         
-                        int index81_13 = input.index();
-                        input.rewind();
-                        s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
-
-                        else if ( (true) ) {s = 1;}
-
-                         
-                        input.seek(index81_13);
-                        if ( s>=0 ) return s;
-                        break;
-                    case 11 : 
                         int LA81_3 = input.LA(1);
 
                          
@@ -18580,7 +18773,7 @@
 
                         else if ( (LA81_3==ID) ) {s = 6;}
 
-                        else if ( (LA81_3==STRING||(LA81_3>=BOOL && LA81_3<=INT)||(LA81_3>=FLOAT && LA81_3<=NULL)) && ((validateRestr()))) {s = 4;}
+                        else if ( (LA81_3==STRING||(LA81_3>=BOOL && LA81_3<=INT)||(LA81_3>=FLOAT && LA81_3<=NULL)) && ((validateRestr()))) {s = 5;}
 
                         else if ( (LA81_3==LEFT_PAREN) ) {s = 7;}
 
@@ -18590,19 +18783,19 @@
                         input.seek(index81_3);
                         if ( s>=0 ) return s;
                         break;
-                    case 12 : 
-                        int LA81_11 = input.LA(1);
+                    case 10 : 
+                        int LA81_4 = input.LA(1);
 
                          
-                        int index81_11 = input.index();
+                        int index81_4 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index81_11);
+                        input.seek(index81_4);
                         if ( s>=0 ) return s;
                         break;
             }
@@ -18614,35 +18807,34 @@
         }
     }
     static final String DFA82_eotS =
-        "\76\uffff";
+        "\74\uffff";
     static final String DFA82_eofS =
-        "\76\uffff";
+        "\74\uffff";
     static final String DFA82_minS =
-        "\1\131\1\uffff\2\123\1\uffff\3\123\1\4\1\123\7\0\1\4\1\162\1\4\2"+
-        "\0\2\4\46\0";
+        "\1\131\1\uffff\3\123\1\uffff\1\123\1\4\2\123\7\0\4\4\47\0";
     static final String DFA82_maxS =
-        "\1\142\1\uffff\1\157\1\162\1\uffff\1\157\1\162\1\123\1\u0080\1\162"+
-        "\7\0\1\u0080\1\162\1\u0080\2\0\2\u0080\46\0";
+        "\1\142\1\uffff\1\157\1\162\1\157\1\uffff\1\162\1\u0080\1\123\1\162"+
+        "\7\0\4\u0080\47\0";
     static final String DFA82_acceptS =
-        "\1\uffff\1\2\2\uffff\1\1\71\uffff";
+        "\1\uffff\1\2\3\uffff\1\1\66\uffff";
     static final String DFA82_specialS =
-        "\2\uffff\1\2\1\4\1\uffff\1\10\1\11\2\uffff\1\5\1\15\1\12\1\14\1"+
-        "\13\1\7\1\1\1\6\3\uffff\1\3\1\0\50\uffff}>";
+        "\2\uffff\1\6\1\11\1\4\1\uffff\1\2\2\uffff\1\12\1\5\1\0\1\13\1\1"+
+        "\1\10\1\7\1\3\53\uffff}>";
     static final String[] DFA82_transitionS = {
             "\2\1\6\uffff\1\1\1\2",
             "",
-            "\1\3\4\uffff\1\5\20\uffff\7\4",
-            "\1\6\1\1\2\uffff\1\4\1\10\3\uffff\1\1\2\uffff\2\4\10\uffff\6"+
-            "\1\1\7\2\4\1\1",
+            "\1\3\4\uffff\1\4\20\uffff\7\5",
+            "\1\6\1\1\2\uffff\1\5\1\7\3\uffff\1\1\2\uffff\2\5\10\uffff\6"+
+            "\1\1\10\2\5\1\1",
+            "\1\11\4\uffff\1\12\20\uffff\7\5",
             "",
-            "\1\11\4\uffff\1\12\20\uffff\7\4",
-            "\1\13\1\4\2\uffff\1\14\1\21\2\4\4\uffff\1\17\1\15\2\4\14\uffff"+
-            "\1\1\1\16\1\20\1\4",
-            "\1\22",
-            "\117\42\1\23\3\42\1\35\1\24\1\42\1\25\4\42\1\40\1\36\10\42\1"+
-            "\26\1\27\1\30\1\31\1\32\1\33\1\34\1\37\1\41\17\42",
-            "\1\43\1\1\2\uffff\1\4\1\44\3\uffff\1\1\2\uffff\2\4\10\uffff"+
-            "\6\1\1\45\2\4\1\1",
+            "\1\13\1\5\2\uffff\1\14\1\21\2\5\4\uffff\1\17\1\15\2\5\14\uffff"+
+            "\1\1\1\16\1\20\1\5",
+            "\117\40\1\22\3\40\1\23\1\30\1\40\1\41\4\40\1\26\1\24\10\40\1"+
+            "\31\1\32\1\33\1\34\1\35\1\36\1\37\1\25\1\27\17\40",
+            "\1\42",
+            "\1\43\1\1\2\uffff\1\5\1\44\3\uffff\1\1\2\uffff\2\5\10\uffff"+
+            "\6\1\1\45\2\5\1\1",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -18650,17 +18842,14 @@
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
-            "\117\56\1\46\3\56\1\51\1\47\1\56\1\50\4\56\1\54\1\52\17\56\1"+
-            "\53\1\55\17\56",
-            "\1\57",
-            "\117\42\1\60\1\71\2\42\1\61\1\66\1\72\1\67\4\42\1\64\1\62\16"+
-            "\42\1\73\1\63\1\65\1\70\16\42",
+            "\117\55\1\46\3\55\1\47\1\54\1\55\1\56\4\55\1\52\1\50\17\55\1"+
+            "\51\1\53\17\55",
+            "\117\40\1\60\1\70\2\40\1\62\1\61\1\71\1\57\4\40\1\65\1\63\16"+
+            "\40\1\72\1\64\1\66\1\67\16\40",
+            "\124\40\1\73\1\71\1\57\46\40",
+            "\124\40\1\73\1\71\1\57\46\40",
             "\1\uffff",
             "\1\uffff",
-            "\117\42\1\74\3\42\1\61\1\75\1\42\1\25\4\42\1\64\1\62\17\42\1"+
-            "\63\1\65\17\42",
-            "\117\42\1\74\3\42\1\61\1\75\1\42\1\25\4\42\1\64\1\62\17\42\1"+
-            "\63\1\65\17\42",
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
@@ -18697,7 +18886,6 @@
             "\1\uffff",
             "\1\uffff",
             "\1\uffff",
-            "\1\uffff",
             "\1\uffff"
     };
 
@@ -18737,223 +18925,208 @@
         	int _s = s;
             switch ( s ) {
                     case 0 : 
-                        int LA82_21 = input.LA(1);
+                        int LA82_11 = input.LA(1);
 
                          
-                        int index82_21 = input.index();
+                        int index82_11 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index82_21);
+                        input.seek(index82_11);
                         if ( s>=0 ) return s;
                         break;
                     case 1 : 
-                        int LA82_15 = input.LA(1);
+                        int LA82_13 = input.LA(1);
 
                          
-                        int index82_15 = input.index();
+                        int index82_13 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index82_15);
+                        input.seek(index82_13);
                         if ( s>=0 ) return s;
                         break;
                     case 2 : 
-                        int LA82_2 = input.LA(1);
+                        int LA82_6 = input.LA(1);
 
                          
-                        int index82_2 = input.index();
+                        int index82_6 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA82_2==ID) ) {s = 3;}
+                        if ( (LA82_6==ID) ) {s = 11;}
 
-                        else if ( ((LA82_2>=EQUAL && LA82_2<=GRAVE_ACCENT)) && ((validateRestr()))) {s = 4;}
+                        else if ( (LA82_6==STRING) ) {s = 12;}
 
-                        else if ( (LA82_2==LEFT_PAREN) ) {s = 5;}
+                        else if ( (LA82_6==INT) ) {s = 13;}
 
+                        else if ( (LA82_6==FLOAT) ) {s = 14;}
+
+                        else if ( (LA82_6==BOOL) ) {s = 15;}
+
+                        else if ( (LA82_6==NULL) ) {s = 16;}
+
+                        else if ( (LA82_6==LEFT_PAREN) ) {s = 17;}
+
+                        else if ( (LA82_6==GRAVE_ACCENT) ) {s = 1;}
+
+                        else if ( (LA82_6==DOT||(LA82_6>=COMMA && LA82_6<=RIGHT_PAREN)||(LA82_6>=DOUBLE_PIPE && LA82_6<=DOUBLE_AMPER)||LA82_6==LEFT_SQUARE) && ((validateRestr()))) {s = 5;}
+
                          
-                        input.seek(index82_2);
+                        input.seek(index82_6);
                         if ( s>=0 ) return s;
                         break;
                     case 3 : 
-                        int LA82_20 = input.LA(1);
+                        int LA82_16 = input.LA(1);
 
                          
-                        int index82_20 = input.index();
+                        int index82_16 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index82_20);
+                        input.seek(index82_16);
                         if ( s>=0 ) return s;
                         break;
                     case 4 : 
-                        int LA82_3 = input.LA(1);
+                        int LA82_4 = input.LA(1);
 
                          
-                        int index82_3 = input.index();
+                        int index82_4 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA82_3==DOT||LA82_3==COLON||(LA82_3>=EQUAL && LA82_3<=NOT_EQUAL)||LA82_3==LEFT_SQUARE) ) {s = 1;}
+                        if ( (LA82_4==ID) ) {s = 9;}
 
-                        else if ( (LA82_3==ID) ) {s = 6;}
+                        else if ( (LA82_4==LEFT_PAREN) ) {s = 10;}
 
-                        else if ( (LA82_3==GRAVE_ACCENT) ) {s = 7;}
+                        else if ( ((LA82_4>=EQUAL && LA82_4<=GRAVE_ACCENT)) && ((validateRestr()))) {s = 5;}
 
-                        else if ( (LA82_3==LEFT_PAREN) ) {s = 8;}
-
-                        else if ( (LA82_3==STRING||(LA82_3>=BOOL && LA82_3<=INT)||(LA82_3>=FLOAT && LA82_3<=NULL)) && ((validateRestr()))) {s = 4;}
-
                          
-                        input.seek(index82_3);
+                        input.seek(index82_4);
                         if ( s>=0 ) return s;
                         break;
                     case 5 : 
-                        int LA82_9 = input.LA(1);
+                        int LA82_10 = input.LA(1);
 
                          
-                        int index82_9 = input.index();
+                        int index82_10 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA82_9==DOT||LA82_9==COLON||(LA82_9>=EQUAL && LA82_9<=NOT_EQUAL)||LA82_9==LEFT_SQUARE) ) {s = 1;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
-                        else if ( (LA82_9==ID) ) {s = 35;}
+                        else if ( (true) ) {s = 1;}
 
-                        else if ( (LA82_9==STRING||(LA82_9>=BOOL && LA82_9<=INT)||(LA82_9>=FLOAT && LA82_9<=NULL)) && ((validateRestr()))) {s = 4;}
-
-                        else if ( (LA82_9==LEFT_PAREN) ) {s = 36;}
-
-                        else if ( (LA82_9==GRAVE_ACCENT) ) {s = 37;}
-
                          
-                        input.seek(index82_9);
+                        input.seek(index82_10);
                         if ( s>=0 ) return s;
                         break;
                     case 6 : 
-                        int LA82_16 = input.LA(1);
+                        int LA82_2 = input.LA(1);
 
                          
-                        int index82_16 = input.index();
+                        int index82_2 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( (LA82_2==ID) ) {s = 3;}
 
-                        else if ( (true) ) {s = 1;}
+                        else if ( (LA82_2==LEFT_PAREN) ) {s = 4;}
 
+                        else if ( ((LA82_2>=EQUAL && LA82_2<=GRAVE_ACCENT)) && ((validateRestr()))) {s = 5;}
+
                          
-                        input.seek(index82_16);
+                        input.seek(index82_2);
                         if ( s>=0 ) return s;
                         break;
                     case 7 : 
-                        int LA82_14 = input.LA(1);
+                        int LA82_15 = input.LA(1);
 
                          
-                        int index82_14 = input.index();
+                        int index82_15 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
                          
-                        input.seek(index82_14);
+                        input.seek(index82_15);
                         if ( s>=0 ) return s;
                         break;
                     case 8 : 
-                        int LA82_5 = input.LA(1);
+                        int LA82_14 = input.LA(1);
 
                          
-                        int index82_5 = input.index();
+                        int index82_14 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA82_5==ID) ) {s = 9;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
-                        else if ( (LA82_5==LEFT_PAREN) ) {s = 10;}
+                        else if ( (true) ) {s = 1;}
 
-                        else if ( ((LA82_5>=EQUAL && LA82_5<=GRAVE_ACCENT)) && ((validateRestr()))) {s = 4;}
-
                          
-                        input.seek(index82_5);
+                        input.seek(index82_14);
                         if ( s>=0 ) return s;
                         break;
                     case 9 : 
-                        int LA82_6 = input.LA(1);
+                        int LA82_3 = input.LA(1);
 
                          
-                        int index82_6 = input.index();
+                        int index82_3 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( (LA82_6==ID) ) {s = 11;}
+                        if ( (LA82_3==DOT||LA82_3==COLON||(LA82_3>=EQUAL && LA82_3<=NOT_EQUAL)||LA82_3==LEFT_SQUARE) ) {s = 1;}
 
-                        else if ( (LA82_6==STRING) ) {s = 12;}
+                        else if ( (LA82_3==ID) ) {s = 6;}
 
-                        else if ( (LA82_6==INT) ) {s = 13;}
+                        else if ( (LA82_3==STRING||(LA82_3>=BOOL && LA82_3<=INT)||(LA82_3>=FLOAT && LA82_3<=NULL)) && ((validateRestr()))) {s = 5;}
 
-                        else if ( (LA82_6==FLOAT) ) {s = 14;}
+                        else if ( (LA82_3==LEFT_PAREN) ) {s = 7;}
 
-                        else if ( (LA82_6==BOOL) ) {s = 15;}
+                        else if ( (LA82_3==GRAVE_ACCENT) ) {s = 8;}
 
-                        else if ( (LA82_6==NULL) ) {s = 16;}
-
-                        else if ( (LA82_6==LEFT_PAREN) ) {s = 17;}
-
-                        else if ( (LA82_6==GRAVE_ACCENT) ) {s = 1;}
-
-                        else if ( (LA82_6==DOT||(LA82_6>=COMMA && LA82_6<=RIGHT_PAREN)||(LA82_6>=DOUBLE_PIPE && LA82_6<=DOUBLE_AMPER)||LA82_6==LEFT_SQUARE) && ((validateRestr()))) {s = 4;}
-
                          
-                        input.seek(index82_6);
+                        input.seek(index82_3);
                         if ( s>=0 ) return s;
                         break;
                     case 10 : 
-                        int LA82_11 = input.LA(1);
+                        int LA82_9 = input.LA(1);
 
                          
-                        int index82_11 = input.index();
+                        int index82_9 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( (LA82_9==DOT||LA82_9==COLON||(LA82_9>=EQUAL && LA82_9<=NOT_EQUAL)||LA82_9==LEFT_SQUARE) ) {s = 1;}
 
-                        else if ( (true) ) {s = 1;}
+                        else if ( (LA82_9==ID) ) {s = 35;}
 
-                         
-                        input.seek(index82_11);
-                        if ( s>=0 ) return s;
-                        break;
-                    case 11 : 
-                        int LA82_13 = input.LA(1);
+                        else if ( (LA82_9==STRING||(LA82_9>=BOOL && LA82_9<=INT)||(LA82_9>=FLOAT && LA82_9<=NULL)) && ((validateRestr()))) {s = 5;}
 
-                         
-                        int index82_13 = input.index();
-                        input.rewind();
-                        s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        else if ( (LA82_9==LEFT_PAREN) ) {s = 36;}
 
-                        else if ( (true) ) {s = 1;}
+                        else if ( (LA82_9==GRAVE_ACCENT) ) {s = 37;}
 
                          
-                        input.seek(index82_13);
+                        input.seek(index82_9);
                         if ( s>=0 ) return s;
                         break;
-                    case 12 : 
+                    case 11 : 
                         int LA82_12 = input.LA(1);
 
                          
                         int index82_12 = input.index();
                         input.rewind();
                         s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
+                        if ( ((validateRestr())) ) {s = 5;}
 
                         else if ( (true) ) {s = 1;}
 
@@ -18961,21 +19134,6 @@
                         input.seek(index82_12);
                         if ( s>=0 ) return s;
                         break;
-                    case 13 : 
-                        int LA82_10 = input.LA(1);
-
-                         
-                        int index82_10 = input.index();
-                        input.rewind();
-                        s = -1;
-                        if ( ((validateRestr())) ) {s = 4;}
-
-                        else if ( (true) ) {s = 1;}
-
-                         
-                        input.seek(index82_10);
-                        if ( s>=0 ) return s;
-                        break;
             }
             if (backtracking>0) {failed=true; return -1;}
             NoViableAltException nvae =
@@ -19224,193 +19382,193 @@
     public static final BitSet FOLLOW_expression_chain_in_from_source3374 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_DOT_in_expression_chain3407 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
     public static final BitSet FOLLOW_ID_in_expression_chain3414 = new BitSet(new long[]{0x0000000000000002L,0x0004000001100000L});
-    public static final BitSet FOLLOW_square_chunk_in_expression_chain3436 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
-    public static final BitSet FOLLOW_paren_chunk_in_expression_chain3458 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
-    public static final BitSet FOLLOW_expression_chain_in_expression_chain3469 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_fact_binding_in_lhs_pattern3502 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_fact_in_lhs_pattern3515 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_label_in_fact_binding3535 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
-    public static final BitSet FOLLOW_fact_in_fact_binding3541 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_fact_binding3548 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_fact_binding_expression_in_fact_binding3556 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact_binding3564 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_fact_in_fact_binding_expression3605 = new BitSet(new long[]{0x0000000000000002L,0x0000000200080000L});
-    public static final BitSet FOLLOW_or_key_in_fact_binding_expression3617 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_DOUBLE_PIPE_in_fact_binding_expression3623 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_fact_in_fact_binding_expression3628 = new BitSet(new long[]{0x0000000000000002L,0x0000000200080000L});
-    public static final BitSet FOLLOW_pattern_type_in_fact3668 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_fact3673 = new BitSet(new long[]{0x0000000000000000L,0x0000000005080000L});
-    public static final BitSet FOLLOW_constraints_in_fact3684 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact3690 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_constraint_in_constraints3724 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
-    public static final BitSet FOLLOW_COMMA_in_constraints3728 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
-    public static final BitSet FOLLOW_constraint_in_constraints3735 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
-    public static final BitSet FOLLOW_or_constr_in_constraint3749 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_and_constr_in_or_constr3760 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
-    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_constr3764 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
-    public static final BitSet FOLLOW_and_constr_in_or_constr3771 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
-    public static final BitSet FOLLOW_unary_constr_in_and_constr3786 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
-    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_constr3790 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
-    public static final BitSet FOLLOW_unary_constr_in_and_constr3797 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
-    public static final BitSet FOLLOW_eval_key_in_unary_constr3830 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
-    public static final BitSet FOLLOW_paren_chunk_in_unary_constr3833 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_field_constraint_in_unary_constr3838 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_unary_constr3844 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
-    public static final BitSet FOLLOW_or_constr_in_unary_constr3854 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_unary_constr3859 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_label_in_field_constraint3879 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_accessor_path_in_field_constraint3881 = new BitSet(new long[]{0x0000000000000002L,0x0000FF0001080000L});
-    public static final BitSet FOLLOW_or_restr_connective_in_field_constraint3888 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ARROW_in_field_constraint3894 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
-    public static final BitSet FOLLOW_paren_chunk_in_field_constraint3898 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_accessor_path_in_field_constraint3952 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
-    public static final BitSet FOLLOW_or_restr_connective_in_field_constraint3954 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_label3979 = new BitSet(new long[]{0x0000000000000000L,0x0000000010000000L});
-    public static final BitSet FOLLOW_COLON_in_label3986 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_paren_chunk_in_expression_chain3430 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
+    public static final BitSet FOLLOW_square_chunk_in_expression_chain3444 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
+    public static final BitSet FOLLOW_expression_chain_in_expression_chain3455 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_fact_binding_in_lhs_pattern3488 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_fact_in_lhs_pattern3501 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_label_in_fact_binding3521 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
+    public static final BitSet FOLLOW_fact_in_fact_binding3527 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_fact_binding3534 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_fact_binding_expression_in_fact_binding3542 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact_binding3550 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_fact_in_fact_binding_expression3591 = new BitSet(new long[]{0x0000000000000002L,0x0000000200080000L});
+    public static final BitSet FOLLOW_or_key_in_fact_binding_expression3603 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_DOUBLE_PIPE_in_fact_binding_expression3609 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_fact_in_fact_binding_expression3614 = new BitSet(new long[]{0x0000000000000002L,0x0000000200080000L});
+    public static final BitSet FOLLOW_pattern_type_in_fact3654 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_fact3659 = new BitSet(new long[]{0x0000000000000000L,0x0000000005080000L});
+    public static final BitSet FOLLOW_constraints_in_fact3670 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_fact3676 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_constraint_in_constraints3710 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_COMMA_in_constraints3714 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
+    public static final BitSet FOLLOW_constraint_in_constraints3721 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_or_constr_in_constraint3735 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_constr_in_or_constr3746 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
+    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_constr3750 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
+    public static final BitSet FOLLOW_and_constr_in_or_constr3757 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
+    public static final BitSet FOLLOW_unary_constr_in_and_constr3772 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
+    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_constr3776 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
+    public static final BitSet FOLLOW_unary_constr_in_and_constr3783 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
+    public static final BitSet FOLLOW_eval_key_in_unary_constr3816 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
+    public static final BitSet FOLLOW_paren_chunk_in_unary_constr3819 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_field_constraint_in_unary_constr3824 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_unary_constr3830 = new BitSet(new long[]{0x0000000000000000L,0x0000000001080000L});
+    public static final BitSet FOLLOW_or_constr_in_unary_constr3840 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_unary_constr3845 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_label_in_field_constraint3865 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_accessor_path_in_field_constraint3867 = new BitSet(new long[]{0x0000000000000002L,0x0000FF0001080000L});
+    public static final BitSet FOLLOW_or_restr_connective_in_field_constraint3874 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ARROW_in_field_constraint3880 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
+    public static final BitSet FOLLOW_paren_chunk_in_field_constraint3884 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_accessor_path_in_field_constraint3938 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
+    public static final BitSet FOLLOW_or_restr_connective_in_field_constraint3940 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_label3965 = new BitSet(new long[]{0x0000000000000000L,0x0000000010000000L});
+    public static final BitSet FOLLOW_COLON_in_label3972 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective3993 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
+    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_restr_connective3999 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
     public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective4007 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
-    public static final BitSet FOLLOW_DOUBLE_PIPE_in_or_restr_connective4013 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
-    public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective4021 = new BitSet(new long[]{0x0000000000000002L,0x0000000200000000L});
-    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective4036 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
-    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_restr_connective4042 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
-    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective4049 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
-    public static final BitSet FOLLOW_compound_operator_in_constraint_expression4071 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_simple_operator_in_constraint_expression4076 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_constraint_expression4081 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
-    public static final BitSet FOLLOW_or_restr_connective_in_constraint_expression4090 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_constraint_expression4095 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EQUAL_in_simple_operator4124 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_GREATER_in_simple_operator4132 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_GREATER_EQUAL_in_simple_operator4140 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_LESS_in_simple_operator4148 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_LESS_EQUAL_in_simple_operator4156 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_NOT_EQUAL_in_simple_operator4164 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_not_key_in_simple_operator4172 = new BitSet(new long[]{0x0000000000000000L,0x0000800000080000L});
-    public static final BitSet FOLLOW_contains_key_in_simple_operator4179 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_soundslike_key_in_simple_operator4186 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_matches_key_in_simple_operator4193 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_memberof_key_in_simple_operator4200 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_ID_in_simple_operator4209 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_GRAVE_ACCENT_in_simple_operator4220 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_simple_operator4228 = new BitSet(new long[]{0x0000000000000000L,0x0004000000000000L});
-    public static final BitSet FOLLOW_square_chunk_in_simple_operator4234 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_contains_key_in_simple_operator4240 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_excludes_key_in_simple_operator4246 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_matches_key_in_simple_operator4252 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_soundslike_key_in_simple_operator4258 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_memberof_key_in_simple_operator4264 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_ID_in_simple_operator4272 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_GRAVE_ACCENT_in_simple_operator4282 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_simple_operator4290 = new BitSet(new long[]{0x0000000000000000L,0x0004000000000000L});
-    public static final BitSet FOLLOW_square_chunk_in_simple_operator4296 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_expression_value_in_simple_operator4303 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_in_key_in_compound_operator4321 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
-    public static final BitSet FOLLOW_not_key_in_compound_operator4326 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_in_key_in_compound_operator4328 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_compound_operator4339 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_expression_value_in_compound_operator4347 = new BitSet(new long[]{0x0000000000000000L,0x0000000006000000L});
-    public static final BitSet FOLLOW_COMMA_in_compound_operator4351 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
-    public static final BitSet FOLLOW_expression_value_in_compound_operator4356 = new BitSet(new long[]{0x0000000000000000L,0x0000000006000000L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_compound_operator4364 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_accessor_path_in_expression_value4385 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_constraint_in_expression_value4390 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_paren_chunk_in_expression_value4396 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_STRING_in_literal_constraint4415 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_INT_in_literal_constraint4422 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_FLOAT_in_literal_constraint4429 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_BOOL_in_literal_constraint4436 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_NULL_in_literal_constraint4443 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_pattern_type4458 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
-    public static final BitSet FOLLOW_DOT_in_pattern_type4464 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_pattern_type4468 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
-    public static final BitSet FOLLOW_dimension_definition_in_pattern_type4483 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
-    public static final BitSet FOLLOW_ID_in_data_type4511 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
-    public static final BitSet FOLLOW_DOT_in_data_type4517 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_data_type4521 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
-    public static final BitSet FOLLOW_dimension_definition_in_data_type4526 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_dimension_definition4555 = new BitSet(new long[]{0x0000000000000000L,0x0008000000000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_dimension_definition4562 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_accessor_element_in_accessor_path4576 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
-    public static final BitSet FOLLOW_DOT_in_accessor_path4580 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_accessor_element_in_accessor_path4584 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
-    public static final BitSet FOLLOW_ID_in_accessor_element4608 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
-    public static final BitSet FOLLOW_square_chunk_in_accessor_element4614 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
-    public static final BitSet FOLLOW_rhs_chunk_data_in_rhs_chunk4643 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_THEN_in_rhs_chunk_data4662 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_set_in_rhs_chunk_data4675 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_END_in_rhs_chunk_data4688 = new BitSet(new long[]{0x0000000000000002L,0x0000000000040000L});
-    public static final BitSet FOLLOW_SEMICOLON_in_rhs_chunk_data4694 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_curly_chunk_data_in_curly_chunk4713 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_curly_chunk_data4736 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_set_in_curly_chunk_data4748 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_curly_chunk_data_in_curly_chunk_data4764 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_curly_chunk_data4775 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_paren_chunk_data_in_paren_chunk4796 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_paren_chunk_data4820 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_set_in_paren_chunk_data4832 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_paren_chunk_data_in_paren_chunk_data4848 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_RIGHT_PAREN_in_paren_chunk_data4859 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_square_chunk_data_in_square_chunk4880 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_square_chunk_data4903 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_set_in_square_chunk_data4915 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_square_chunk_data_in_square_chunk_data4930 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_square_chunk_data4941 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_lock_on_active_key4965 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_lock_on_active_key4969 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_lock_on_active_key4973 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_lock_on_active_key4977 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_lock_on_active_key4981 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_date_effective_key5013 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_date_effective_key5017 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_date_effective_key5021 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_date_expires_key5053 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_date_expires_key5057 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_date_expires_key5061 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_no_loop_key5093 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_no_loop_key5097 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_no_loop_key5101 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_auto_focus_key5133 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_auto_focus_key5137 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_auto_focus_key5141 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_activation_group_key5173 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_activation_group_key5177 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_activation_group_key5181 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_agenda_group_key5213 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_agenda_group_key5217 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_agenda_group_key5221 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_ruleflow_group_key5253 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_ruleflow_group_key5257 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_ruleflow_group_key5261 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_entry_point_key5293 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
-    public static final BitSet FOLLOW_MISC_in_entry_point_key5297 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
-    public static final BitSet FOLLOW_ID_in_entry_point_key5301 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_duration_key5330 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_package_key5357 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_import_key5384 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_dialect_key5411 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_salience_key5438 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_enabled_key5465 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_attributes_key5492 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_rule_key5519 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_template_key5546 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_query_key5573 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_declare_key5600 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_function_key5627 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_global_key5654 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_eval_key5681 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_contains_key5708 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_matches_key5735 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_excludes_key5762 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_soundslike_key5789 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_memberof_key5816 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_not_key5843 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_in_key5870 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_or_key5897 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_and_key5924 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_exists_key5951 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_forall_key5978 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_action_key6005 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_reverse_key6032 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_ID_in_result_key6059 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective4022 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
+    public static final BitSet FOLLOW_DOUBLE_AMPER_in_and_restr_connective4028 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
+    public static final BitSet FOLLOW_constraint_expression_in_and_restr_connective4035 = new BitSet(new long[]{0x0000000000000002L,0x0000000400000000L});
+    public static final BitSet FOLLOW_compound_operator_in_constraint_expression4057 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_simple_operator_in_constraint_expression4062 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_constraint_expression4067 = new BitSet(new long[]{0x0000000000000000L,0x0000FE0001080000L});
+    public static final BitSet FOLLOW_or_restr_connective_in_constraint_expression4076 = new BitSet(new long[]{0x0000000000000000L,0x0000000004000000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_constraint_expression4081 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EQUAL_in_simple_operator4110 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_GREATER_in_simple_operator4118 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_GREATER_EQUAL_in_simple_operator4126 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_LESS_in_simple_operator4134 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_LESS_EQUAL_in_simple_operator4142 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_NOT_EQUAL_in_simple_operator4150 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_not_key_in_simple_operator4158 = new BitSet(new long[]{0x0000000000000000L,0x0000800000080000L});
+    public static final BitSet FOLLOW_contains_key_in_simple_operator4165 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_soundslike_key_in_simple_operator4172 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_matches_key_in_simple_operator4179 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_memberof_key_in_simple_operator4186 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_ID_in_simple_operator4195 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_GRAVE_ACCENT_in_simple_operator4206 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_simple_operator4214 = new BitSet(new long[]{0x0000000000000000L,0x0004000000000000L});
+    public static final BitSet FOLLOW_square_chunk_in_simple_operator4220 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_contains_key_in_simple_operator4226 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_excludes_key_in_simple_operator4232 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_matches_key_in_simple_operator4238 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_soundslike_key_in_simple_operator4244 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_memberof_key_in_simple_operator4250 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_ID_in_simple_operator4258 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_GRAVE_ACCENT_in_simple_operator4268 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_simple_operator4276 = new BitSet(new long[]{0x0000000000000000L,0x0004000000000000L});
+    public static final BitSet FOLLOW_square_chunk_in_simple_operator4282 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_expression_value_in_simple_operator4289 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_in_key_in_compound_operator4307 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
+    public static final BitSet FOLLOW_not_key_in_compound_operator4312 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_in_key_in_compound_operator4314 = new BitSet(new long[]{0x0000000000000000L,0x0000000001000000L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_compound_operator4325 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_expression_value_in_compound_operator4333 = new BitSet(new long[]{0x0000000000000000L,0x0000000006000000L});
+    public static final BitSet FOLLOW_COMMA_in_compound_operator4337 = new BitSet(new long[]{0x0000000000000000L,0x0003000181880000L});
+    public static final BitSet FOLLOW_expression_value_in_compound_operator4342 = new BitSet(new long[]{0x0000000000000000L,0x0000000006000000L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_compound_operator4350 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_accessor_path_in_expression_value4371 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_constraint_in_expression_value4376 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_paren_chunk_in_expression_value4382 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_STRING_in_literal_constraint4401 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_INT_in_literal_constraint4408 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_FLOAT_in_literal_constraint4415 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_BOOL_in_literal_constraint4422 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_NULL_in_literal_constraint4429 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_pattern_type4444 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
+    public static final BitSet FOLLOW_DOT_in_pattern_type4450 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_pattern_type4454 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
+    public static final BitSet FOLLOW_dimension_definition_in_pattern_type4469 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
+    public static final BitSet FOLLOW_ID_in_data_type4497 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
+    public static final BitSet FOLLOW_DOT_in_data_type4503 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_data_type4507 = new BitSet(new long[]{0x0000000000000002L,0x0004000000100000L});
+    public static final BitSet FOLLOW_dimension_definition_in_data_type4512 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_dimension_definition4541 = new BitSet(new long[]{0x0000000000000000L,0x0008000000000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_dimension_definition4548 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_accessor_element_in_accessor_path4562 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
+    public static final BitSet FOLLOW_DOT_in_accessor_path4566 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_accessor_element_in_accessor_path4570 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
+    public static final BitSet FOLLOW_ID_in_accessor_element4594 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
+    public static final BitSet FOLLOW_square_chunk_in_accessor_element4600 = new BitSet(new long[]{0x0000000000000002L,0x0004000000000000L});
+    public static final BitSet FOLLOW_rhs_chunk_data_in_rhs_chunk4629 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_THEN_in_rhs_chunk_data4648 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_set_in_rhs_chunk_data4661 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_END_in_rhs_chunk_data4674 = new BitSet(new long[]{0x0000000000000002L,0x0000000000040000L});
+    public static final BitSet FOLLOW_SEMICOLON_in_rhs_chunk_data4680 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_curly_chunk_data_in_curly_chunk4699 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_curly_chunk_data4722 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_set_in_curly_chunk_data4734 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_curly_chunk_data_in_curly_chunk_data4750 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_curly_chunk_data4761 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_paren_chunk_data_in_paren_chunk4782 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_PAREN_in_paren_chunk_data4806 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_set_in_paren_chunk_data4818 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_paren_chunk_data_in_paren_chunk_data4834 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_RIGHT_PAREN_in_paren_chunk_data4845 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_square_chunk_data_in_square_chunk4866 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_square_chunk_data4889 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_set_in_square_chunk_data4901 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_square_chunk_data_in_square_chunk_data4916 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0xFFFFFFFFFFFFFFFFL,0x0000000000000001L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_square_chunk_data4927 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_lock_on_active_key4951 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_lock_on_active_key4955 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_lock_on_active_key4959 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_lock_on_active_key4963 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_lock_on_active_key4967 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_date_effective_key4999 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_date_effective_key5003 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_date_effective_key5007 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_date_expires_key5039 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_date_expires_key5043 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_date_expires_key5047 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_no_loop_key5079 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_no_loop_key5083 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_no_loop_key5087 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_auto_focus_key5119 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_auto_focus_key5123 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_auto_focus_key5127 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_activation_group_key5159 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_activation_group_key5163 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_activation_group_key5167 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_agenda_group_key5199 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_agenda_group_key5203 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_agenda_group_key5207 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_ruleflow_group_key5239 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_ruleflow_group_key5243 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_ruleflow_group_key5247 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_entry_point_key5279 = new BitSet(new long[]{0x0000000000000000L,0x0080000000000000L});
+    public static final BitSet FOLLOW_MISC_in_entry_point_key5283 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_ID_in_entry_point_key5287 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_duration_key5316 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_package_key5343 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_import_key5370 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_dialect_key5397 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_salience_key5424 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_enabled_key5451 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_attributes_key5478 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_rule_key5505 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_template_key5532 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_query_key5559 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_declare_key5586 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_function_key5613 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_global_key5640 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_eval_key5667 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_contains_key5694 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_matches_key5721 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_excludes_key5748 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_soundslike_key5775 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_memberof_key5802 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_not_key5829 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_in_key5856 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_or_key5883 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_and_key5910 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_exists_key5937 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_forall_key5964 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_action_key5991 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_reverse_key6018 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ID_in_result_key6045 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_LEFT_PAREN_in_synpred12039 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
     public static final BitSet FOLLOW_or_key_in_synpred12041 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_or_key_in_synpred22108 = new BitSet(new long[]{0x0000000000000002L});
@@ -19427,7 +19585,5 @@
     public static final BitSet FOLLOW_or_key_in_synpred72530 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_and_key_in_synpred72532 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_LEFT_PAREN_in_synpred83361 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred93430 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_PAREN_in_synpred103452 = 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	2008-09-21 10:54:48 UTC (rev 22952)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g	2008-09-21 14:46:35 UTC (rev 22953)
@@ -1061,9 +1061,9 @@
 	 DOT {	emit($DOT, DroolsEditorType.IDENTIFIER);	} 
 	 ID {	emit($ID, DroolsEditorType.IDENTIFIER);	}
 	  (
-	    ( LEFT_SQUARE ) => square_chunk
+	    {input.LA(1) == LEFT_PAREN}? paren_chunk
 	    |
-	    ( LEFT_PAREN ) => paren_chunk
+	    square_chunk
 	  )?
 	  expression_chain?
 	  -> ^(VT_EXPRESSION_CHAIN[$DOT] ID square_chunk? paren_chunk? expression_chain?)

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	2008-09-21 10:54:48 UTC (rev 22952)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java	2008-09-21 14:46:35 UTC (rev 22953)
@@ -68,3731 +68,3095 @@
 
 public class RuleParserTest extends TestCase {
 
-    private DescrBuilderTree walker;
+	private DescrBuilderTree walker;
+	DRLParser parser;
 
-    protected void setUp() throws Exception {
-        super.setUp();
-        this.walker = null;
-    }
+	protected void setUp() throws Exception {
+		super.setUp();
+		this.walker = null;
+	}
 
-    protected void tearDown() throws Exception {
-        this.walker = null;
-        super.tearDown();
-    }
+	protected void tearDown() throws Exception {
+		this.walker = null;
+		super.tearDown();
+	}
 
-    public void testCompatibleRestriction() throws Exception {
-        String source = "package com.sample  rule test  when  Test( ( text == null || text2 matches \"\" ) )  then  end";
-        parse( "compilation_unit",
-               "compilation_unit",
-               source );
-        assertEquals( "com.sample",
-                      this.walker.getPackageDescr().getName() );
-        RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules().get( 0 );
-        assertEquals( "test",
-                      rule.getName() );
-        OrDescr or = (OrDescr) ((PatternDescr) rule.getLhs().getDescrs().get( 0 )).getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
-        assertEquals( "text",
-                      ((FieldConstraintDescr) or.getDescrs().get( 0 )).getFieldName() );
-        assertEquals( "text2",
-                      ((FieldConstraintDescr) or.getDescrs().get( 1 )).getFieldName() );
-    }
+	public void testFromComplexAcessor() throws Exception {
+		String source = "rule \"Invalid customer id\" ruleflow-group \"validate\" lock-on-active true \n"
+				+ " when \n"
+				+ " o: Order( ) \n"
+				+ " not( Customer( ) from customerService.getCustomer(o.getCustomerId()) ) \n"
+				+ " then \n"
+				+ " System.err.println(\"Invalid customer id found!\"); \n"
+				+ " o.addError(\"Invalid customer id\"); \n" + "end \n";
+		parse("compilation_unit", "compilation_unit", source);
 
-    public void testSimpleRestriction() throws Exception {
-        String source = "package com.sample  rule test  when  Test( ( text == null || matches \"\" ) )  then  end";
-        parse( "compilation_unit",
-               "compilation_unit",
-               source );
-        assertEquals( "com.sample",
-                      this.walker.getPackageDescr().getName() );
-        RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules().get( 0 );
-        assertEquals( "test",
-                      rule.getName() );
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) ((PatternDescr) rule.getLhs().getDescrs().get( 0 )).getDescrs().get( 0 );
-        RestrictionConnectiveDescr restConnective = (RestrictionConnectiveDescr) fieldConstr.getRestrictions().get( 0 );
-        assertEquals( 2,
-                      restConnective.getRestrictions().size() );
-    }
+		RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules()
+				.get(0);
+		assertEquals("Invalid customer id", rule.getName());
 
-    public void testPackage_OneSegment() throws Exception {
-        final String packageName = (String) parse( "package_statement",
-                                                   "package_statement",
-                                                   "package foo" );
-        assertEquals( "foo",
-                      packageName );
-    }
+		assertFalse(parser.hasErrors());
 
-    public void testPackage_MultipleSegments() throws Exception {
-        final String packageName = (String) parse( "package_statement",
-                                                   "package_statement",
-                                                   "package foo.bar.baz;" );
-        assertEquals( "foo.bar.baz",
-                      packageName );
-    }
+	}
 
-    public void testEmptyPackage() throws Exception {
-        final String source = "package foo.bar.baz";
-        final DrlParser parser = new DrlParser();
-        final PackageDescr pkg = parser.parse( new StringReader( source ) );
-        assertFalse( parser.hasErrors() );
-        assertEquals( "foo.bar.baz",
-                      pkg.getName() );
-    }
+	public void testCompatibleRestriction() throws Exception {
+		String source = "package com.sample  rule test  when  Test( ( text == null || text2 matches \"\" ) )  then  end";
+		parse("compilation_unit", "compilation_unit", source);
+		assertEquals("com.sample", this.walker.getPackageDescr().getName());
+		RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules()
+				.get(0);
+		assertEquals("test", rule.getName());
+		OrDescr or = (OrDescr) ((PatternDescr) rule.getLhs().getDescrs().get(0))
+				.getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
+		assertEquals("text", ((FieldConstraintDescr) or.getDescrs().get(0))
+				.getFieldName());
+		assertEquals("text2", ((FieldConstraintDescr) or.getDescrs().get(1))
+				.getFieldName());
+	}
 
-    public void testCompilationUnit() throws Exception {
-        final String source = "package foo; import com.foo.Bar; import com.foo.Baz;";
-        parse( "compilation_unit",
-               "compilation_unit",
-               source );
-        assertEquals( "foo",
-                      this.walker.getPackageDescr().getName() );
-        assertEquals( 2,
-                      this.walker.getPackageDescr().getImports().size() );
-        ImportDescr impdescr = (ImportDescr) this.walker.getPackageDescr().getImports().get( 0 );
-        assertEquals( "com.foo.Bar",
-                      impdescr.getTarget() );
-        assertEquals( source.indexOf( "import " + impdescr.getTarget() ),
-                      impdescr.getStartCharacter() );
-        assertEquals( source.indexOf( "import " + impdescr.getTarget() ) + ("import " + impdescr.getTarget()).length() - 1,
-                      impdescr.getEndCharacter() );
+	public void testSimpleRestriction() throws Exception {
+		String source = "package com.sample  rule test  when  Test( ( text == null || matches \"\" ) )  then  end";
+		parse("compilation_unit", "compilation_unit", source);
+		assertEquals("com.sample", this.walker.getPackageDescr().getName());
+		RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules()
+				.get(0);
+		assertEquals("test", rule.getName());
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) ((PatternDescr) rule
+				.getLhs().getDescrs().get(0)).getDescrs().get(0);
+		RestrictionConnectiveDescr restConnective = (RestrictionConnectiveDescr) fieldConstr
+				.getRestrictions().get(0);
+		assertEquals(2, restConnective.getRestrictions().size());
+	}
 
-        impdescr = (ImportDescr) this.walker.getPackageDescr().getImports().get( 1 );
-        assertEquals( "com.foo.Baz",
-                      impdescr.getTarget() );
-        assertEquals( source.indexOf( "import " + impdescr.getTarget() ),
-                      impdescr.getStartCharacter() );
-        assertEquals( source.indexOf( "import " + impdescr.getTarget() ) + ("import " + impdescr.getTarget()).length() - 1,
-                      impdescr.getEndCharacter() );
-    }
+	public void testPackage_OneSegment() throws Exception {
+		final String packageName = (String) parse("package_statement",
+				"package_statement", "package foo");
+		assertEquals("foo", packageName);
+	}
 
-    public void testDialect() throws Exception {
-        final String source = "dialect 'mvel'";
-        parse( "compilation_unit",
-               "compilation_unit",
-               source );
-        AttributeDescr attr = (AttributeDescr) this.walker.getPackageDescr().getAttributes().get( 0 );
-        assertEquals( "dialect",
-                      attr.getName() );
-        assertEquals( "mvel",
-                      attr.getValue() );
-    }
+	public void testPackage_MultipleSegments() throws Exception {
+		final String packageName = (String) parse("package_statement",
+				"package_statement", "package foo.bar.baz;");
+		assertEquals("foo.bar.baz", packageName);
+	}
 
-    public void testDialect2() throws Exception {
-        final String source = "dialect \"mvel\"";
-        parse( "compilation_unit",
-               "compilation_unit",
-               source );
-        AttributeDescr attr = (AttributeDescr) this.walker.getPackageDescr().getAttributes().get( 0 );
-        assertEquals( "dialect",
-                      attr.getName() );
-        assertEquals( "mvel",
-                      attr.getValue() );
-    }
+	public void testEmptyPackage() throws Exception {
+		final String source = "package foo.bar.baz";
+		final DrlParser parser = new DrlParser();
+		final PackageDescr pkg = parser.parse(new StringReader(source));
+		assertFalse(parser.hasErrors());
+		assertEquals("foo.bar.baz", pkg.getName());
+	}
 
-    public void testEmptyRule() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "empty_rule.drl" );
+	public void testCompilationUnit() throws Exception {
+		final String source = "package foo; import com.foo.Bar; import com.foo.Baz;";
+		parse("compilation_unit", "compilation_unit", source);
+		assertEquals("foo", this.walker.getPackageDescr().getName());
+		assertEquals(2, this.walker.getPackageDescr().getImports().size());
+		ImportDescr impdescr = (ImportDescr) this.walker.getPackageDescr()
+				.getImports().get(0);
+		assertEquals("com.foo.Bar", impdescr.getTarget());
+		assertEquals(source.indexOf("import " + impdescr.getTarget()), impdescr
+				.getStartCharacter());
+		assertEquals(source.indexOf("import " + impdescr.getTarget())
+				+ ("import " + impdescr.getTarget()).length() - 1, impdescr
+				.getEndCharacter());
 
-        assertNotNull( rule );
+		impdescr = (ImportDescr) this.walker.getPackageDescr().getImports()
+				.get(1);
+		assertEquals("com.foo.Baz", impdescr.getTarget());
+		assertEquals(source.indexOf("import " + impdescr.getTarget()), impdescr
+				.getStartCharacter());
+		assertEquals(source.indexOf("import " + impdescr.getTarget())
+				+ ("import " + impdescr.getTarget()).length() - 1, impdescr
+				.getEndCharacter());
+	}
 
-        assertEquals( "empty",
-                      rule.getName() );
-        assertNotNull( rule.getLhs() );
-        assertNotNull( rule.getConsequence() );
-    }
+	public void testDialect() throws Exception {
+		final String source = "dialect 'mvel'";
+		parse("compilation_unit", "compilation_unit", source);
+		AttributeDescr attr = (AttributeDescr) this.walker.getPackageDescr()
+				.getAttributes().get(0);
+		assertEquals("dialect", attr.getName());
+		assertEquals("mvel", attr.getValue());
+	}
 
-    // FIXME Keywords END and THEN should not be used as identifiers: try to
-    // enable it
-    public void FIXME_testKeywordCollisions() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "eol_funny_business.drl" );
+	public void testDialect2() throws Exception {
+		final String source = "dialect \"mvel\"";
+		parse("compilation_unit", "compilation_unit", source);
+		AttributeDescr attr = (AttributeDescr) this.walker.getPackageDescr()
+				.getAttributes().get(0);
+		assertEquals("dialect", attr.getName());
+		assertEquals("mvel", attr.getValue());
+	}
 
-        final PackageDescr pkg = walker.getPackageDescr();
+	public void testEmptyRule() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"empty_rule.drl");
 
-        assertEquals( 1,
-                      pkg.getRules().size() );
-    }
+		assertNotNull(rule);
 
-    public void testTemplates() throws Exception {
+		assertEquals("empty", rule.getName());
+		assertNotNull(rule.getLhs());
+		assertNotNull(rule.getConsequence());
+	}
 
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "test_Templates.drl" );
+	// FIXME Keywords END and THEN should not be used as identifiers: try to
+	// enable it
+	public void FIXME_testKeywordCollisions() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"eol_funny_business.drl");
 
-        final PackageDescr pkg = walker.getPackageDescr();
+		final PackageDescr pkg = walker.getPackageDescr();
 
-        assertEquals( 1,
-                      pkg.getRules().size() );
-        assertEquals( 2,
-                      pkg.getFactTemplates().size() );
+		assertEquals(1, pkg.getRules().size());
+	}
 
-        FactTemplateDescr fact1 = (FactTemplateDescr) pkg.getFactTemplates().get( 0 );
-        assertEquals( "Cheese",
-                      fact1.getName() );
-        assertEquals( 2,
-                      fact1.getFields().size() );
+	public void testTemplates() throws Exception {
 
-        assertEquals( "name",
-                      ((FieldTemplateDescr) fact1.getFields().get( 0 )).getName() );
-        assertEquals( "String",
-                      ((FieldTemplateDescr) fact1.getFields().get( 0 )).getClassType() );
+		parseResource("compilation_unit", "compilation_unit",
+				"test_Templates.drl");
 
-        assertEquals( "age",
-                      ((FieldTemplateDescr) fact1.getFields().get( 1 )).getName() );
-        assertEquals( "Integer",
-                      ((FieldTemplateDescr) fact1.getFields().get( 1 )).getClassType() );
+		final PackageDescr pkg = walker.getPackageDescr();
 
-        fact1 = null;
+		assertEquals(1, pkg.getRules().size());
+		assertEquals(2, pkg.getFactTemplates().size());
 
-        final FactTemplateDescr fact2 = (FactTemplateDescr) pkg.getFactTemplates().get( 1 );
-        assertEquals( "Wine",
-                      fact2.getName() );
-        assertEquals( 3,
-                      fact2.getFields().size() );
+		FactTemplateDescr fact1 = (FactTemplateDescr) pkg.getFactTemplates()
+				.get(0);
+		assertEquals("Cheese", fact1.getName());
+		assertEquals(2, fact1.getFields().size());
 
-        assertEquals( "name",
-                      ((FieldTemplateDescr) fact2.getFields().get( 0 )).getName() );
-        assertEquals( "String",
-                      ((FieldTemplateDescr) fact2.getFields().get( 0 )).getClassType() );
+		assertEquals("name", ((FieldTemplateDescr) fact1.getFields().get(0))
+				.getName());
+		assertEquals("String", ((FieldTemplateDescr) fact1.getFields().get(0))
+				.getClassType());
 
-        assertEquals( "year",
-                      ((FieldTemplateDescr) fact2.getFields().get( 1 )).getName() );
-        assertEquals( "String",
-                      ((FieldTemplateDescr) fact2.getFields().get( 1 )).getClassType() );
+		assertEquals("age", ((FieldTemplateDescr) fact1.getFields().get(1))
+				.getName());
+		assertEquals("Integer", ((FieldTemplateDescr) fact1.getFields().get(1))
+				.getClassType());
 
-        assertEquals( "accolades",
-                      ((FieldTemplateDescr) fact2.getFields().get( 2 )).getName() );
-        assertEquals( "String[]",
-                      ((FieldTemplateDescr) fact2.getFields().get( 2 )).getClassType() );
-    }
+		fact1 = null;
 
-    public void testTernaryExpression() throws Exception {
+		final FactTemplateDescr fact2 = (FactTemplateDescr) pkg
+				.getFactTemplates().get(1);
+		assertEquals("Wine", fact2.getName());
+		assertEquals(3, fact2.getFields().size());
 
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "ternary_expression.drl" );
+		assertEquals("name", ((FieldTemplateDescr) fact2.getFields().get(0))
+				.getName());
+		assertEquals("String", ((FieldTemplateDescr) fact2.getFields().get(0))
+				.getClassType());
 
-        final PackageDescr pkg = walker.getPackageDescr();
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( 1,
-                      pkg.getRules().size() );
+		assertEquals("year", ((FieldTemplateDescr) fact2.getFields().get(1))
+				.getName());
+		assertEquals("String", ((FieldTemplateDescr) fact2.getFields().get(1))
+				.getClassType());
 
-        assertEqualsIgnoreWhitespace( "if (speed > speedLimit ? true : false;) pullEmOver();",
-                                      (String) rule.getConsequence() );
-    }
+		assertEquals("accolades", ((FieldTemplateDescr) fact2.getFields()
+				.get(2)).getName());
+		assertEquals("String[]",
+				((FieldTemplateDescr) fact2.getFields().get(2)).getClassType());
+	}
 
-    public void FIXME_testLatinChars() throws Exception {
-        final DrlParser parser = new DrlParser();
-        final Reader drl = new InputStreamReader( this.getClass().getResourceAsStream( "latin-sample.dslr" ) );
-        final Reader dsl = new InputStreamReader( this.getClass().getResourceAsStream( "latin.dsl" ) );
+	public void testTernaryExpression() throws Exception {
 
-        final PackageDescr pkg = parser.parse( drl,
-                                               dsl );
+		parseResource("compilation_unit", "compilation_unit",
+				"ternary_expression.drl");
 
-        // MN: will get some errors due to the char encoding on my FC5 install
-        // others who use the right encoding may not see this, feel free to
-        // uncomment
-        // the following assertion.
-        assertFalse( parser.hasErrors() );
+		final PackageDescr pkg = walker.getPackageDescr();
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
+		assertEquals(1, pkg.getRules().size());
 
-        assertEquals( "br.com.auster.drools.sample",
-                      pkg.getName() );
-        assertEquals( 1,
-                      pkg.getRules().size() );
+		assertEqualsIgnoreWhitespace(
+				"if (speed > speedLimit ? true : false;) pullEmOver();",
+				(String) rule.getConsequence());
+	}
 
-    }
+	public void FIXME_testLatinChars() throws Exception {
+		final DrlParser parser = new DrlParser();
+		final Reader drl = new InputStreamReader(this.getClass()
+				.getResourceAsStream("latin-sample.dslr"));
+		final Reader dsl = new InputStreamReader(this.getClass()
+				.getResourceAsStream("latin.dsl"));
 
-    public void testFunctionWithArrays() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "function_arrays.drl" );
+		final PackageDescr pkg = parser.parse(drl, dsl);
 
-        final PackageDescr pkg = walker.getPackageDescr();
+		// MN: will get some errors due to the char encoding on my FC5 install
+		// others who use the right encoding may not see this, feel free to
+		// uncomment
+		// the following assertion.
+		assertFalse(parser.hasErrors());
 
-        assertEquals( "foo",
-                      pkg.getName() );
-        assertEquals( 1,
-                      pkg.getRules().size() );
+		assertEquals("br.com.auster.drools.sample", pkg.getName());
+		assertEquals(1, pkg.getRules().size());
 
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
+	}
 
-        assertEqualsIgnoreWhitespace( "yourFunction(new String[3] {\"a\",\"b\",\"c\"});",
-                                      (String) rule.getConsequence() );
-        final FunctionDescr func = (FunctionDescr) pkg.getFunctions().get( 0 );
+	public void testFunctionWithArrays() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"function_arrays.drl");
 
-        assertEquals( "String[]",
-                      func.getReturnType() );
-        assertEquals( "args[]",
-                      func.getParameterNames().get( 0 ) );
-        assertEquals( "String",
-                      func.getParameterTypes().get( 0 ) );
-    }
+		final PackageDescr pkg = walker.getPackageDescr();
 
-    public void testAlmostEmptyRule() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "almost_empty_rule.drl" );
+		assertEquals("foo", pkg.getName());
+		assertEquals(1, pkg.getRules().size());
 
-        assertNotNull( rule );
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
 
-        assertEquals( "almost_empty",
-                      rule.getName() );
-        assertNotNull( rule.getLhs() );
-        assertEquals( "",
-                      ((String) rule.getConsequence()).trim() );
-    }
+		assertEqualsIgnoreWhitespace(
+				"yourFunction(new String[3] {\"a\",\"b\",\"c\"});",
+				(String) rule.getConsequence());
+		final FunctionDescr func = (FunctionDescr) pkg.getFunctions().get(0);
 
-    public void testQuotedStringNameRule() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "quoted_string_name_rule.drl" );
+		assertEquals("String[]", func.getReturnType());
+		assertEquals("args[]", func.getParameterNames().get(0));
+		assertEquals("String", func.getParameterTypes().get(0));
+	}
 
-        assertNotNull( rule );
+	public void testAlmostEmptyRule() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"almost_empty_rule.drl");
 
-        assertEquals( "quoted string name",
-                      rule.getName() );
-        assertNotNull( rule.getLhs() );
-        assertEquals( "",
-                      ((String) rule.getConsequence()).trim() );
-    }
+		assertNotNull(rule);
 
-    public void testNoLoop() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "no-loop.drl" );
+		assertEquals("almost_empty", rule.getName());
+		assertNotNull(rule.getLhs());
+		assertEquals("", ((String) rule.getConsequence()).trim());
+	}
 
-        assertNotNull( rule );
+	public void testQuotedStringNameRule() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"quoted_string_name_rule.drl");
 
-        assertEquals( "rule1",
-                      rule.getName() );
-        final AttributeDescr att = (AttributeDescr) rule.getAttributes().get( 0 );
-        assertEquals( "false",
-                      att.getValue() );
-        assertEquals( "no-loop",
-                      att.getName() );
-    }
+		assertNotNull(rule);
 
-    public void testAutofocus() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "autofocus.drl" );
+		assertEquals("quoted string name", rule.getName());
+		assertNotNull(rule.getLhs());
+		assertEquals("", ((String) rule.getConsequence()).trim());
+	}
 
-        assertNotNull( rule );
+	public void testNoLoop() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"no-loop.drl");
 
-        assertEquals( "rule1",
-                      rule.getName() );
-        final AttributeDescr att = (AttributeDescr) rule.getAttributes().get( 0 );
-        assertEquals( "true",
-                      att.getValue() );
-        assertEquals( "auto-focus",
-                      att.getName() );
-    }
+		assertNotNull(rule);
 
-    public void testRuleFlowGroup() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "ruleflowgroup.drl" );
+		assertEquals("rule1", rule.getName());
+		final AttributeDescr att = (AttributeDescr) rule.getAttributes().get(0);
+		assertEquals("false", att.getValue());
+		assertEquals("no-loop", att.getName());
+	}
 
-        assertNotNull( rule );
+	public void testAutofocus() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"autofocus.drl");
 
-        assertEquals( "rule1",
-                      rule.getName() );
-        final AttributeDescr att = (AttributeDescr) rule.getAttributes().get( 0 );
-        assertEquals( "a group",
-                      att.getValue() );
-        assertEquals( "ruleflow-group",
-                      att.getName() );
-    }
+		assertNotNull(rule);
 
-    public void testConsequenceWithDeclaration() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "declaration-in-consequence.drl" );
+		assertEquals("rule1", rule.getName());
+		final AttributeDescr att = (AttributeDescr) rule.getAttributes().get(0);
+		assertEquals("true", att.getValue());
+		assertEquals("auto-focus", att.getName());
+	}
 
-        assertNotNull( rule );
+	public void testRuleFlowGroup() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"ruleflowgroup.drl");
 
-        assertEquals( "myrule",
-                      rule.getName() );
+		assertNotNull(rule);
 
-        final String expected = "int i = 0; i = 1; i / 1; i == 1; i(i); i = 'i'; i.i.i; i\\i; i<i; i>i; i=\"i\";  ++i;" + "i++; --i; i--; i += i; i -= i; i *= i; i /= i;" + "int i = 5;" + "for(int j; j<i; ++j) {" + "System.out.println(j);}"
-                                + "Object o = new String(\"Hello\");" + "String s = (String) o;";
+		assertEquals("rule1", rule.getName());
+		final AttributeDescr att = (AttributeDescr) rule.getAttributes().get(0);
+		assertEquals("a group", att.getValue());
+		assertEquals("ruleflow-group", att.getName());
+	}
 
-        assertEqualsIgnoreWhitespace( expected,
-                                      (String) rule.getConsequence() );
-        assertTrue( ((String) rule.getConsequence()).indexOf( "++" ) > 0 );
-        assertTrue( ((String) rule.getConsequence()).indexOf( "--" ) > 0 );
-        assertTrue( ((String) rule.getConsequence()).indexOf( "+=" ) > 0 );
-        assertTrue( ((String) rule.getConsequence()).indexOf( "==" ) > 0 );
+	public void testConsequenceWithDeclaration() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"declaration-in-consequence.drl");
 
-        // System.out.println(( String ) rule.getConsequence());
-        // note, need to assert that "i++" is preserved as is, no extra spaces.
-    }
+		assertNotNull(rule);
 
-    public void testRuleParseLhs() throws Exception {
-        final String text = "Person(age < 42, location==\"atlanta\") \nor\nPerson(name==\"bob\") \n";
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
-    }
+		assertEquals("myrule", rule.getName());
 
-    public void testLiteralBoolAndNegativeNumbersRule() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "literal_bool_and_negative.drl" );
+		final String expected = "int i = 0; i = 1; i / 1; i == 1; i(i); i = 'i'; i.i.i; i\\i; i<i; i>i; i=\"i\";  ++i;"
+				+ "i++; --i; i--; i += i; i -= i; i *= i; i /= i;"
+				+ "int i = 5;"
+				+ "for(int j; j<i; ++j) {"
+				+ "System.out.println(j);}"
+				+ "Object o = new String(\"Hello\");"
+				+ "String s = (String) o;";
 
-        assertNotNull( rule );
+		assertEqualsIgnoreWhitespace(expected, (String) rule.getConsequence());
+		assertTrue(((String) rule.getConsequence()).indexOf("++") > 0);
+		assertTrue(((String) rule.getConsequence()).indexOf("--") > 0);
+		assertTrue(((String) rule.getConsequence()).indexOf("+=") > 0);
+		assertTrue(((String) rule.getConsequence()).indexOf("==") > 0);
 
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertNotNull( rule.getLhs() );
-        assertEqualsIgnoreWhitespace( "cons();",
-                                      (String) rule.getConsequence() );
+		// System.out.println(( String ) rule.getConsequence());
+		// note, need to assert that "i++" is preserved as is, no extra spaces.
+	}
 
-        final AndDescr lhs = rule.getLhs();
-        assertEquals( 3,
-                      lhs.getDescrs().size() );
+	public void testRuleParseLhs() throws Exception {
+		final String text = "Person(age < 42, location==\"atlanta\") \nor\nPerson(name==\"bob\") \n";
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
+		assertNotNull(pattern);
+	}
 
-        PatternDescr pattern = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
-        AndDescr fieldAnd = (AndDescr) pattern.getConstraint();
-        FieldConstraintDescr fld = (FieldConstraintDescr) fieldAnd.getDescrs().get( 0 );
-        LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+	public void testLiteralBoolAndNegativeNumbersRule() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"literal_bool_and_negative.drl");
 
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "false",
-                      lit.getText() );
-        assertEquals( "bar",
-                      fld.getFieldName() );
+		assertNotNull(rule);
 
-        pattern = (PatternDescr) lhs.getDescrs().get( 1 );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
+		assertEquals("simple_rule", rule.getName());
+		assertNotNull(rule.getLhs());
+		assertEqualsIgnoreWhitespace("cons();", (String) rule.getConsequence());
 
-        fieldAnd = (AndDescr) pattern.getConstraint();
-        fld = (FieldConstraintDescr) fieldAnd.getDescrs().get( 0 );
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		final AndDescr lhs = rule.getLhs();
+		assertEquals(3, lhs.getDescrs().size());
 
-        assertEquals( ">",
-                      lit.getEvaluator() );
-        assertEquals( "-42",
-                      lit.getText() );
-        assertEquals( "boo",
-                      fld.getFieldName() );
+		PatternDescr pattern = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
+		AndDescr fieldAnd = (AndDescr) pattern.getConstraint();
+		FieldConstraintDescr fld = (FieldConstraintDescr) fieldAnd.getDescrs()
+				.get(0);
+		LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        pattern = (PatternDescr) lhs.getDescrs().get( 2 );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("false", lit.getText());
+		assertEquals("bar", fld.getFieldName());
 
-        // lit = (LiteralDescr) col.getDescrs().get( 0 );
+		pattern = (PatternDescr) lhs.getDescrs().get(1);
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
 
-        fieldAnd = (AndDescr) pattern.getConstraint();
-        fld = (FieldConstraintDescr) fieldAnd.getDescrs().get( 0 );
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( ">",
-                      lit.getEvaluator() );
-        assertEquals( "-42.42",
-                      lit.getText() );
-        assertEquals( "boo",
-                      fld.getFieldName() );
-    }
+		fieldAnd = (AndDescr) pattern.getConstraint();
+		fld = (FieldConstraintDescr) fieldAnd.getDescrs().get(0);
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-    public void testChunkWithoutParens() throws Exception {
-        String input = "( foo )";
-        ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse( "paren_chunk",
-                                                                                      "fact_expression",
-                                                                                      input );
+		assertEquals(">", lit.getEvaluator());
+		assertEquals("-42", lit.getText());
+		assertEquals("boo", fld.getFieldName());
 
-        assertEquals( "( foo )",
-                      input.substring( returnData.getStartCharacter(),
-                                       returnData.getEndCharacter() ) );
-    }
+		pattern = (PatternDescr) lhs.getDescrs().get(2);
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
 
-    public void testChunkWithParens() throws Exception {
-        String input = "(fnord())";
-        ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse( "paren_chunk",
-                                                                                      "fact_expression",
-                                                                                      input );
+		// lit = (LiteralDescr) col.getDescrs().get( 0 );
 
-        assertEquals( "(fnord())",
-                      input.substring( returnData.getStartCharacter(),
-                                       returnData.getEndCharacter() ) );
-    }
+		fieldAnd = (AndDescr) pattern.getConstraint();
+		fld = (FieldConstraintDescr) fieldAnd.getDescrs().get(0);
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+		assertEquals(">", lit.getEvaluator());
+		assertEquals("-42.42", lit.getText());
+		assertEquals("boo", fld.getFieldName());
+	}
 
-    public void testChunkWithParensAndQuotedString() throws Exception {
-        String input = "( fnord( \"cheese\" ) )";
-        ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse( "paren_chunk",
-                                                                                      "fact_expression",
-                                                                                      input );
+	public void testChunkWithoutParens() throws Exception {
+		String input = "( foo )";
+		ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse(
+				"paren_chunk", "fact_expression", input);
 
-        assertEquals( "( fnord( \"cheese\" ) )",
-                      input.substring( returnData.getStartCharacter(),
-                                       returnData.getEndCharacter() ) );
-    }
+		assertEquals("( foo )", input.substring(returnData.getStartCharacter(),
+				returnData.getEndCharacter()));
+	}
 
-    public void testChunkWithRandomCharac5ters() throws Exception {
-        String input = "( %*9dkj)";
-        ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse( "paren_chunk",
-                                                                                      "fact_expression",
-                                                                                      input );
+	public void testChunkWithParens() throws Exception {
+		String input = "(fnord())";
+		ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse(
+				"paren_chunk", "fact_expression", input);
 
-        assertEquals( "( %*9dkj)",
-                      input.substring( returnData.getStartCharacter(),
-                                       returnData.getEndCharacter() ) );
-    }
+		assertEquals("(fnord())", input.substring(returnData
+				.getStartCharacter(), returnData.getEndCharacter()));
+	}
 
-    public void testEmptyPattern() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "test_EmptyPattern.drl" );
+	public void testChunkWithParensAndQuotedString() throws Exception {
+		String input = "( fnord( \"cheese\" ) )";
+		ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse(
+				"paren_chunk", "fact_expression", input);
 
-        final PackageDescr packageDescr = this.walker.getPackageDescr();
-        assertEquals( 1,
-                      packageDescr.getRules().size() );
-        final RuleDescr ruleDescr = (RuleDescr) packageDescr.getRules().get( 0 );
-        assertEquals( "simple rule",
-                      ruleDescr.getName() );
-        assertNotNull( ruleDescr.getLhs() );
-        assertEquals( 1,
-                      ruleDescr.getLhs().getDescrs().size() );
-        final PatternDescr patternDescr = (PatternDescr) ruleDescr.getLhs().getDescrs().get( 0 );
-        assertEquals( 0,
-                      patternDescr.getConstraint().getDescrs().size() ); // this
-        // may
-        // be
-        // null,
-        // not
-        // sure
-        // as
-        // the
-        // test
-        // doesn't
-        // get
-        // this
-        // far...
-        assertEquals( "Cheese",
-                      patternDescr.getObjectType() );
+		assertEquals("( fnord( \"cheese\" ) )", input.substring(returnData
+				.getStartCharacter(), returnData.getEndCharacter()));
+	}
 
-    }
+	public void testChunkWithRandomCharac5ters() throws Exception {
+		String input = "( %*9dkj)";
+		ReturnValueRestrictionDescr returnData = (ReturnValueRestrictionDescr) parse(
+				"paren_chunk", "fact_expression", input);
 
-    public void testSimpleMethodCallWithFrom() throws Exception {
+		assertEquals("( %*9dkj)", input.substring(returnData
+				.getStartCharacter(), returnData.getEndCharacter()));
+	}
 
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "test_SimpleMethodCallWithFrom.drl" );
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final FromDescr from = (FromDescr) pattern.getSource();
-        final AccessorDescr method = (AccessorDescr) from.getDataSource();
+	public void testEmptyPattern() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"test_EmptyPattern.drl");
 
-        assertEquals( "something.doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
-                      method.toString() );
-    }
+		final PackageDescr packageDescr = this.walker.getPackageDescr();
+		assertEquals(1, packageDescr.getRules().size());
+		final RuleDescr ruleDescr = (RuleDescr) packageDescr.getRules().get(0);
+		assertEquals("simple rule", ruleDescr.getName());
+		assertNotNull(ruleDescr.getLhs());
+		assertEquals(1, ruleDescr.getLhs().getDescrs().size());
+		final PatternDescr patternDescr = (PatternDescr) ruleDescr.getLhs()
+				.getDescrs().get(0);
+		assertEquals(0, patternDescr.getConstraint().getDescrs().size()); // this
+		// may
+		// be
+		// null,
+		// not
+		// sure
+		// as
+		// the
+		// test
+		// doesn't
+		// get
+		// this
+		// far...
+		assertEquals("Cheese", patternDescr.getObjectType());
 
-    public void testSimpleFunctionCallWithFrom() throws Exception {
+	}
 
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "test_SimpleFunctionCallWithFrom.drl" );
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final FromDescr from = (FromDescr) pattern.getSource();
-        final AccessorDescr func = (AccessorDescr) from.getDataSource();
+	public void testSimpleMethodCallWithFrom() throws Exception {
 
-        assertEquals( "doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
-                      func.toString() );
-    }
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"test_SimpleMethodCallWithFrom.drl");
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final FromDescr from = (FromDescr) pattern.getSource();
+		final AccessorDescr method = (AccessorDescr) from.getDataSource();
 
-    public void testSimpleAccessorWithFrom() throws Exception {
+		assertEquals(
+				"something.doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
+				method.toString());
+	}
 
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "test_SimpleAccessorWithFrom.drl" );
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final FromDescr from = (FromDescr) pattern.getSource();
-        final AccessorDescr accessor = (AccessorDescr) from.getDataSource();
+	public void testSimpleFunctionCallWithFrom() throws Exception {
 
-        assertNull( ((FieldAccessDescr) accessor.getInvokers().get( 0 )).getArgument() );
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"test_SimpleFunctionCallWithFrom.drl");
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final FromDescr from = (FromDescr) pattern.getSource();
+		final AccessorDescr func = (AccessorDescr) from.getDataSource();
 
-        assertEquals( "something.doIt",
-                      accessor.toString() );
-    }
+		assertEquals(
+				"doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
+				func.toString());
+	}
 
-    public void testSimpleAccessorAndArgWithFrom() throws Exception {
+	public void testSimpleAccessorWithFrom() throws Exception {
 
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "test_SimpleAccessorArgWithFrom.drl" );
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final FromDescr from = (FromDescr) pattern.getSource();
-        final AccessorDescr accessor = (AccessorDescr) from.getDataSource();
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"test_SimpleAccessorWithFrom.drl");
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final FromDescr from = (FromDescr) pattern.getSource();
+		final AccessorDescr accessor = (AccessorDescr) from.getDataSource();
 
-        assertNotNull( ((FieldAccessDescr) accessor.getInvokers().get( 0 )).getArgument() );
+		assertNull(((FieldAccessDescr) accessor.getInvokers().get(0))
+				.getArgument());
 
-        assertEquals( "something.doIt[\"key\"]",
-                      accessor.toString() );
-    }
+		assertEquals("something.doIt", accessor.toString());
+	}
 
-    public void testComplexChainedAcessor() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "test_ComplexChainedCallWithFrom.drl" );
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final FromDescr from = (FromDescr) pattern.getSource();
-        final AccessorDescr accessor = (AccessorDescr) from.getDataSource();
+	public void testSimpleAccessorAndArgWithFrom() throws Exception {
 
-        assertEquals( "doIt1( foo,bar,42,\"hello\",{ a => \"b\"}, [a, \"b\", 42] ).doIt2(bar, [a, \"b\", 42]).field[\"key\"]",
-                      accessor.toString() );
-    }
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"test_SimpleAccessorArgWithFrom.drl");
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final FromDescr from = (FromDescr) pattern.getSource();
+		final AccessorDescr accessor = (AccessorDescr) from.getDataSource();
 
-    // public void testFrom() throws Exception {
-    // final RuleDescr rule = parseResource( "from.drl" ).rule();
-    //
-    // if(parser.hasErrors()) {
-    // System.err.println(parser.getErrorMessages());
-    // }
-    // assertFalse(parser.hasErrors());
-    //
-    // assertNotNull( rule );
-    //
-    // assertEquals( "using_from",
-    // rule.getName() );
-    //
-    // assertEquals(9, rule.getLhs().getDescrs().size());
-    //
-    // FromDescr from = (FromDescr) rule.getLhs().getDescrs().get(0);
-    //
-    // assertEquals(3, from.getLine());
-    //
-    // assertEquals("Foo", from.getReturnedPattern().getObjectType());
-    // assertTrue(from.getDataSource() instanceof FieldAccessDescr);
-    // assertEquals("baz", ((FieldAccessDescr)
-    // from.getDataSource()).getFieldName());
-    // assertEquals("bar", ((FieldAccessDescr)
-    // from.getDataSource()).getVariableName());
-    //
-    //
-    // ArgumentValueDescr arg = null;
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(1);
-    // assertEquals("Foo", from.getReturnedPattern().getObjectType());
-    // assertEquals(0, from.getReturnedPattern().getDescrs().size());
-    // FieldAccessDescr fieldAccess = ( FieldAccessDescr ) from.getDataSource();
-    // arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
-    // assertEquals(ArgumentValueDescr.STRING, arg.getType() );
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(2);
-    // fieldAccess = ( FieldAccessDescr ) from.getDataSource();
-    // arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
-    // assertEquals(ArgumentValueDescr.VARIABLE, arg.getType() );
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(3);
-    // fieldAccess = ( FieldAccessDescr ) from.getDataSource();
-    // arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
-    // assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType() );
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(4);
-    // assertEquals("Whee", from.getReturnedColumn().getObjectType());
-    // assertEquals(1, from.getReturnedColumn().getDescrs().size());
-    // assertTrue(from.getDataSource() instanceof FunctionCallDescr);
-    // assertEquals("whee", ((FunctionCallDescr)
-    // from.getDataSource()).getName());
-    // assertEquals(1, ((FunctionCallDescr)
-    // from.getDataSource()).getArguments().size());
-    // arg = ( (ArgumentValueDescr )((FunctionCallDescr)
-    // from.getDataSource()).getArguments().get(0));
-    // assertEquals("y", arg.getValue());
-    // assertEquals(ArgumentValueDescr.STRING, arg.getType());
-    //
-    // assertEquals(7, from.getLine());
-    // assertEquals(7, from.getReturnedColumn().getLine());
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(5);
-    // assertEquals("Foo", from.getReturnedColumn().getObjectType());
-    // assertEquals(1, from.getReturnedColumn().getDescrs().size());
-    // assertEquals("f", from.getReturnedColumn().getIdentifier());
-    // assertTrue(from.getDataSource() instanceof MethodAccessDescr);
-    // assertEquals("bar", ((MethodAccessDescr)
-    // from.getDataSource()).getVariableName());
-    // assertEquals("la", ((MethodAccessDescr)
-    // from.getDataSource()).getMethodName());
-    // assertEquals(1, ((MethodAccessDescr)
-    // from.getDataSource()).getArguments().size());
-    // arg = (ArgumentValueDescr) ((MethodAccessDescr)
-    // from.getDataSource()).getArguments().get(0);
-    //
-    //
-    // assertEquals("x", arg.getValue());
-    // assertEquals(ArgumentValueDescr.VARIABLE, arg.getType());
-    //
-    // assertEqualsIgnoreWhitespace("whee();", ( String )
-    // rule.getConsequence());
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(6);
-    // assertEquals("wa", ((FunctionCallDescr)from.getDataSource()).getName());
-    //
-    // from = (FromDescr) rule.getLhs().getDescrs().get(7);
-    // MethodAccessDescr meth = (MethodAccessDescr)from.getDataSource();
-    // assertEquals("wa", meth.getMethodName());
-    // assertEquals("la", meth.getVariableName());
-    //
-    // arg = (ArgumentValueDescr) meth.getArguments().get(0);
-    // assertEquals("42", arg.getValue());
-    // assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType());
-    //
-    // arg = (ArgumentValueDescr) meth.getArguments().get(1);
-    // assertEquals("42.42", arg.getValue());
-    // assertEquals(ArgumentValueDescr.DECIMAL, arg.getType());
-    //
-    // arg = (ArgumentValueDescr) meth.getArguments().get(2);
-    // assertEquals("false", arg.getValue());
-    // assertEquals(ArgumentValueDescr.BOOLEAN, arg.getType());
-    //
-    // arg = (ArgumentValueDescr) meth.getArguments().get(3);
-    // assertEquals("null", arg.getValue());
-    // assertEquals(ArgumentValueDescr.NULL, arg.getType());
-    //
-    // assertEquals("Bam",
-    // ((PatternDescr)rule.getLhs().getDescrs().get(8)).getObjectType());
-    // }
+		assertNotNull(((FieldAccessDescr) accessor.getInvokers().get(0))
+				.getArgument());
 
-    public void testSimpleRule() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "simple_rule.drl" );
+		assertEquals("something.doIt[\"key\"]", accessor.toString());
+	}
 
-        assertNotNull( rule );
+	public void testComplexChainedAcessor() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"test_ComplexChainedCallWithFrom.drl");
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final FromDescr from = (FromDescr) pattern.getSource();
+		final AccessorDescr accessor = (AccessorDescr) from.getDataSource();
 
-        assertEquals( "simple_rule",
-                      rule.getName() );
+		assertEquals(
+				"doIt1( foo,bar,42,\"hello\",{ a => \"b\"}, [a, \"b\", 42] ).doIt2(bar, [a, \"b\", 42]).field[\"key\"]",
+				accessor.toString());
+	}
 
-        assertEquals( 7,
-                      rule.getConsequenceLine() );
-        assertEquals( 2,
-                      rule.getConsequencePattern() );
+	// public void testFrom() throws Exception {
+	// final RuleDescr rule = parseResource( "from.drl" ).rule();
+	//
+	// if(parser.hasErrors()) {
+	// System.err.println(parser.getErrorMessages());
+	// }
+	// assertFalse(parser.hasErrors());
+	//
+	// assertNotNull( rule );
+	//
+	// assertEquals( "using_from",
+	// rule.getName() );
+	//
+	// assertEquals(9, rule.getLhs().getDescrs().size());
+	//
+	// FromDescr from = (FromDescr) rule.getLhs().getDescrs().get(0);
+	//
+	// assertEquals(3, from.getLine());
+	//
+	// assertEquals("Foo", from.getReturnedPattern().getObjectType());
+	// assertTrue(from.getDataSource() instanceof FieldAccessDescr);
+	// assertEquals("baz", ((FieldAccessDescr)
+	// from.getDataSource()).getFieldName());
+	// assertEquals("bar", ((FieldAccessDescr)
+	// from.getDataSource()).getVariableName());
+	//
+	//
+	// ArgumentValueDescr arg = null;
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(1);
+	// assertEquals("Foo", from.getReturnedPattern().getObjectType());
+	// assertEquals(0, from.getReturnedPattern().getDescrs().size());
+	// FieldAccessDescr fieldAccess = ( FieldAccessDescr ) from.getDataSource();
+	// arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
+	// assertEquals(ArgumentValueDescr.STRING, arg.getType() );
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(2);
+	// fieldAccess = ( FieldAccessDescr ) from.getDataSource();
+	// arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
+	// assertEquals(ArgumentValueDescr.VARIABLE, arg.getType() );
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(3);
+	// fieldAccess = ( FieldAccessDescr ) from.getDataSource();
+	// arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
+	// assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType() );
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(4);
+	// assertEquals("Whee", from.getReturnedColumn().getObjectType());
+	// assertEquals(1, from.getReturnedColumn().getDescrs().size());
+	// assertTrue(from.getDataSource() instanceof FunctionCallDescr);
+	// assertEquals("whee", ((FunctionCallDescr)
+	// from.getDataSource()).getName());
+	// assertEquals(1, ((FunctionCallDescr)
+	// from.getDataSource()).getArguments().size());
+	// arg = ( (ArgumentValueDescr )((FunctionCallDescr)
+	// from.getDataSource()).getArguments().get(0));
+	// assertEquals("y", arg.getValue());
+	// assertEquals(ArgumentValueDescr.STRING, arg.getType());
+	//
+	// assertEquals(7, from.getLine());
+	// assertEquals(7, from.getReturnedColumn().getLine());
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(5);
+	// assertEquals("Foo", from.getReturnedColumn().getObjectType());
+	// assertEquals(1, from.getReturnedColumn().getDescrs().size());
+	// assertEquals("f", from.getReturnedColumn().getIdentifier());
+	// assertTrue(from.getDataSource() instanceof MethodAccessDescr);
+	// assertEquals("bar", ((MethodAccessDescr)
+	// from.getDataSource()).getVariableName());
+	// assertEquals("la", ((MethodAccessDescr)
+	// from.getDataSource()).getMethodName());
+	// assertEquals(1, ((MethodAccessDescr)
+	// from.getDataSource()).getArguments().size());
+	// arg = (ArgumentValueDescr) ((MethodAccessDescr)
+	// from.getDataSource()).getArguments().get(0);
+	//
+	//
+	// assertEquals("x", arg.getValue());
+	// assertEquals(ArgumentValueDescr.VARIABLE, arg.getType());
+	//
+	// assertEqualsIgnoreWhitespace("whee();", ( String )
+	// rule.getConsequence());
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(6);
+	// assertEquals("wa", ((FunctionCallDescr)from.getDataSource()).getName());
+	//
+	// from = (FromDescr) rule.getLhs().getDescrs().get(7);
+	// MethodAccessDescr meth = (MethodAccessDescr)from.getDataSource();
+	// assertEquals("wa", meth.getMethodName());
+	// assertEquals("la", meth.getVariableName());
+	//
+	// arg = (ArgumentValueDescr) meth.getArguments().get(0);
+	// assertEquals("42", arg.getValue());
+	// assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType());
+	//
+	// arg = (ArgumentValueDescr) meth.getArguments().get(1);
+	// assertEquals("42.42", arg.getValue());
+	// assertEquals(ArgumentValueDescr.DECIMAL, arg.getType());
+	//
+	// arg = (ArgumentValueDescr) meth.getArguments().get(2);
+	// assertEquals("false", arg.getValue());
+	// assertEquals(ArgumentValueDescr.BOOLEAN, arg.getType());
+	//
+	// arg = (ArgumentValueDescr) meth.getArguments().get(3);
+	// assertEquals("null", arg.getValue());
+	// assertEquals(ArgumentValueDescr.NULL, arg.getType());
+	//
+	// assertEquals("Bam",
+	// ((PatternDescr)rule.getLhs().getDescrs().get(8)).getObjectType());
+	// }
 
-        final AndDescr lhs = rule.getLhs();
+	public void testSimpleRule() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"simple_rule.drl");
 
-        assertNotNull( lhs );
+		assertNotNull(rule);
 
-        assertEquals( 3,
-                      lhs.getDescrs().size() );
+		assertEquals("simple_rule", rule.getName());
 
-        // System.err.println( lhs.getDescrs() );
+		assertEquals(7, rule.getConsequenceLine());
+		assertEquals(2, rule.getConsequencePattern());
 
-        // Check first pattern
-        final PatternDescr first = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "foo3",
-                      first.getIdentifier() );
-        assertEquals( "Bar",
-                      first.getObjectType() );
+		final AndDescr lhs = rule.getLhs();
 
-        assertEquals( 1,
-                      first.getConstraint().getDescrs().size() );
+		assertNotNull(lhs);
 
-        AndDescr fieldAnd = (AndDescr) first.getConstraint();
-        FieldConstraintDescr fld = (FieldConstraintDescr) fieldAnd.getDescrs().get( 0 );
-        LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		assertEquals(3, lhs.getDescrs().size());
 
-        assertNotNull( constraint );
+		// System.err.println( lhs.getDescrs() );
 
-        assertEquals( "a",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      constraint.getEvaluator() );
-        assertEquals( "3",
-                      constraint.getText() );
+		// Check first pattern
+		final PatternDescr first = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("foo3", first.getIdentifier());
+		assertEquals("Bar", first.getObjectType());
 
-        // Check second pattern
-        final PatternDescr second = (PatternDescr) lhs.getDescrs().get( 1 );
-        assertEquals( "foo4",
-                      second.getIdentifier() );
-        assertEquals( "Bar",
-                      second.getObjectType() );
+		assertEquals(1, first.getConstraint().getDescrs().size());
 
-        // System.err.println( second.getDescrs() );
+		AndDescr fieldAnd = (AndDescr) first.getConstraint();
+		FieldConstraintDescr fld = (FieldConstraintDescr) fieldAnd.getDescrs()
+				.get(0);
+		LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        fieldAnd = (AndDescr) second.getConstraint();
-        assertEquals( 2,
-                      fieldAnd.getDescrs().size() );
+		assertNotNull(constraint);
 
-        final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) fieldAnd.getDescrs().get( 0 );
-        assertEquals( "a",
-                      fieldBindingDescr.getFieldName() );
-        assertEquals( "a4",
-                      fieldBindingDescr.getIdentifier() );
+		assertEquals("a", fld.getFieldName());
+		assertEquals("==", constraint.getEvaluator());
+		assertEquals("3", constraint.getText());
 
-        fld = (FieldConstraintDescr) fieldAnd.getDescrs().get( 1 );
-        constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		// Check second pattern
+		final PatternDescr second = (PatternDescr) lhs.getDescrs().get(1);
+		assertEquals("foo4", second.getIdentifier());
+		assertEquals("Bar", second.getObjectType());
 
-        assertNotNull( constraint );
+		// System.err.println( second.getDescrs() );
 
-        assertEquals( "a",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      constraint.getEvaluator() );
-        assertEquals( "4",
-                      constraint.getText() );
+		fieldAnd = (AndDescr) second.getConstraint();
+		assertEquals(2, fieldAnd.getDescrs().size());
 
-        // Check third pattern
-        final PatternDescr third = (PatternDescr) lhs.getDescrs().get( 2 );
-        assertNull( third.getIdentifier() );
-        assertEquals( "Baz",
-                      third.getObjectType() );
+		final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) fieldAnd
+				.getDescrs().get(0);
+		assertEquals("a", fieldBindingDescr.getFieldName());
+		assertEquals("a4", fieldBindingDescr.getIdentifier());
 
-        assertEqualsIgnoreWhitespace( "if ( a == b ) { " + "  assert( foo3 );" + "} else {" + "  retract( foo4 );" + "}" + "  System.out.println( a4 );",
-                                      (String) rule.getConsequence() );
-    }
+		fld = (FieldConstraintDescr) fieldAnd.getDescrs().get(1);
+		constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-    public void testRestrictionsMultiple() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "restrictions_test.drl" );
+		assertNotNull(constraint);
 
-        assertNotNull( rule );
+		assertEquals("a", fld.getFieldName());
+		assertEquals("==", constraint.getEvaluator());
+		assertEquals("4", constraint.getText());
 
-        assertEqualsIgnoreWhitespace( "consequence();",
-                                      (String) rule.getConsequence() );
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		// Check third pattern
+		final PatternDescr third = (PatternDescr) lhs.getDescrs().get(2);
+		assertNull(third.getIdentifier());
+		assertEquals("Baz", third.getObjectType());
 
-        // The first pattern, with 2 restrictions on a single field (plus a
-        // connective)
-        PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
+		assertEqualsIgnoreWhitespace("if ( a == b ) { " + "  assert( foo3 );"
+				+ "} else {" + "  retract( foo4 );" + "}"
+				+ "  System.out.println( a4 );", (String) rule.getConsequence());
+	}
 
-        AndDescr and = (AndDescr) pattern.getConstraint();
-        FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        assertEquals( RestrictionConnectiveDescr.AND,
-                      ((RestrictionConnectiveDescr) fld.getRestriction()).getConnective() );
-        assertEquals( 2,
-                      fld.getRestrictions().size() );
-        assertEquals( "age",
-                      fld.getFieldName() );
+	public void testRestrictionsMultiple() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"restrictions_test.drl");
 
-        LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( ">",
-                      lit.getEvaluator() );
-        assertEquals( "30",
-                      lit.getText() );
+		assertNotNull(rule);
 
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 1 );
-        assertEquals( "<",
-                      lit.getEvaluator() );
-        assertEquals( "40",
-                      lit.getText() );
+		assertEqualsIgnoreWhitespace("consequence();", (String) rule
+				.getConsequence());
+		assertEquals("simple_rule", rule.getName());
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-        // the second col, with 2 fields, the first with 2 restrictions, the
-        // second field with one
-        pattern = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Vehicle",
-                      pattern.getObjectType() );
-        assertEquals( 2,
-                      pattern.getConstraint().getDescrs().size() );
+		// The first pattern, with 2 restrictions on a single field (plus a
+		// connective)
+		PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals("Person", pattern.getObjectType());
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
 
-        and = (AndDescr) pattern.getConstraint();
-        fld = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( 1,
-                      fld.getRestrictions().size() );
-        RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fld.getRestrictions().get( 0 );
-        assertEquals( RestrictionConnectiveDescr.OR,
-                      or.getConnective() );
-        assertEquals( 2,
-                      or.getRestrictions().size() );
-        lit = (LiteralRestrictionDescr) or.getRestrictions().get( 0 );
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "sedan",
-                      lit.getText() );
+		AndDescr and = (AndDescr) pattern.getConstraint();
+		FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs()
+				.get(0);
+		assertEquals(RestrictionConnectiveDescr.AND,
+				((RestrictionConnectiveDescr) fld.getRestriction())
+						.getConnective());
+		assertEquals(2, fld.getRestrictions().size());
+		assertEquals("age", fld.getFieldName());
 
-        lit = (LiteralRestrictionDescr) or.getRestrictions().get( 1 );
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "wagon",
-                      lit.getText() );
+		LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
+		assertEquals(">", lit.getEvaluator());
+		assertEquals("30", lit.getText());
 
-        // now the second field
-        fld = (FieldConstraintDescr) and.getDescrs().get( 1 );
-        assertEquals( 1,
-                      fld.getRestrictions().size() );
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( "<",
-                      lit.getEvaluator() );
-        assertEquals( "3",
-                      lit.getText() );
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(1);
+		assertEquals("<", lit.getEvaluator());
+		assertEquals("40", lit.getText());
 
-    }
+		// the second col, with 2 fields, the first with 2 restrictions, the
+		// second field with one
+		pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
+		assertEquals("Vehicle", pattern.getObjectType());
+		assertEquals(2, pattern.getConstraint().getDescrs().size());
 
-    public void testLineNumberInAST() throws Exception {
-        // also see testSimpleExpander to see how this works with an expander
-        // (should be the same).
+		and = (AndDescr) pattern.getConstraint();
+		fld = (FieldConstraintDescr) and.getDescrs().get(0);
+		assertEquals("type", fld.getFieldName());
+		assertEquals(1, fld.getRestrictions().size());
+		RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fld
+				.getRestrictions().get(0);
+		assertEquals(RestrictionConnectiveDescr.OR, or.getConnective());
+		assertEquals(2, or.getRestrictions().size());
+		lit = (LiteralRestrictionDescr) or.getRestrictions().get(0);
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("sedan", lit.getText());
 
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "simple_rule.drl" );
+		lit = (LiteralRestrictionDescr) or.getRestrictions().get(1);
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("wagon", lit.getText());
 
-        assertNotNull( rule );
+		// now the second field
+		fld = (FieldConstraintDescr) and.getDescrs().get(1);
+		assertEquals(1, fld.getRestrictions().size());
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+		assertEquals("<", lit.getEvaluator());
+		assertEquals("3", lit.getText());
 
-        assertEquals( "simple_rule",
-                      rule.getName() );
+	}
 
-        assertEquals( 7,
-                      rule.getConsequenceLine() );
-        assertEquals( 2,
-                      rule.getConsequencePattern() );
+	public void testLineNumberInAST() throws Exception {
+		// also see testSimpleExpander to see how this works with an expander
+		// (should be the same).
 
-        final AndDescr lhs = rule.getLhs();
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"simple_rule.drl");
 
-        assertNotNull( lhs );
+		assertNotNull(rule);
 
-        assertEquals( 3,
-                      lhs.getDescrs().size() );
+		assertEquals("simple_rule", rule.getName());
 
-        // Check first pattern
-        final PatternDescr first = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "foo3",
-                      first.getIdentifier() );
-        assertEquals( "Bar",
-                      first.getObjectType() );
-        assertEquals( 1,
-                      first.getConstraint().getDescrs().size() );
+		assertEquals(7, rule.getConsequenceLine());
+		assertEquals(2, rule.getConsequencePattern());
 
-        // Check second pattern
-        final PatternDescr second = (PatternDescr) lhs.getDescrs().get( 1 );
-        assertEquals( "foo4",
-                      second.getIdentifier() );
-        assertEquals( "Bar",
-                      second.getObjectType() );
+		final AndDescr lhs = rule.getLhs();
 
-        final PatternDescr third = (PatternDescr) lhs.getDescrs().get( 2 );
-        assertEquals( "Baz",
-                      third.getObjectType() );
+		assertNotNull(lhs);
 
-        assertEquals( 4,
-                      first.getLine() );
-        assertEquals( 5,
-                      second.getLine() );
-        assertEquals( 6,
-                      third.getLine() );
-    }
+		assertEquals(3, lhs.getDescrs().size());
 
-    public void testLineNumberIncludingCommentsInRHS() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "test_CommentLineNumbersInConsequence.drl" );
+		// Check first pattern
+		final PatternDescr first = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("foo3", first.getIdentifier());
+		assertEquals("Bar", first.getObjectType());
+		assertEquals(1, first.getConstraint().getDescrs().size());
 
-        final String rhs = (String) ((RuleDescr) this.walker.getPackageDescr().getRules().get( 0 )).getConsequence();
-        String expected = "  \t//woot\n  \tfirst\n  \t\n  \t//\n  \t\n  \t/* lala\n  \t\n  \t*/\n  \tsecond  \n";
-        assertEquals( expected,
-                      rhs );
-    }
+		// Check second pattern
+		final PatternDescr second = (PatternDescr) lhs.getDescrs().get(1);
+		assertEquals("foo4", second.getIdentifier());
+		assertEquals("Bar", second.getObjectType());
 
-    public void testLhsSemicolonDelim() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "lhs_semicolon_delim.drl" );
+		final PatternDescr third = (PatternDescr) lhs.getDescrs().get(2);
+		assertEquals("Baz", third.getObjectType());
 
-        assertNotNull( rule );
+		assertEquals(4, first.getLine());
+		assertEquals(5, second.getLine());
+		assertEquals(6, third.getLine());
+	}
 
-        assertEquals( "simple_rule",
-                      rule.getName() );
+	public void testLineNumberIncludingCommentsInRHS() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"test_CommentLineNumbersInConsequence.drl");
 
-        final AndDescr lhs = rule.getLhs();
+		final String rhs = (String) ((RuleDescr) this.walker.getPackageDescr()
+				.getRules().get(0)).getConsequence();
+		String expected = "  \t//woot\n  \tfirst\n  \t\n  \t//\n  \t\n  \t/* lala\n  \t\n  \t*/\n  \tsecond  \n";
+		assertEquals(expected, rhs);
+	}
 
-        assertNotNull( lhs );
+	public void testLhsSemicolonDelim() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"lhs_semicolon_delim.drl");
 
-        assertEquals( 3,
-                      lhs.getDescrs().size() );
+		assertNotNull(rule);
 
-        // System.err.println( lhs.getDescrs() );
+		assertEquals("simple_rule", rule.getName());
 
-        // Check first pattern
-        final PatternDescr first = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "foo3",
-                      first.getIdentifier() );
-        assertEquals( "Bar",
-                      first.getObjectType() );
+		final AndDescr lhs = rule.getLhs();
 
-        assertEquals( 1,
-                      first.getConstraint().getDescrs().size() );
+		assertNotNull(lhs);
 
-        // LiteralDescr constraint = (LiteralDescr) first.getDescrs().get( 0 );
-        AndDescr and = (AndDescr) first.getConstraint();
-        FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		assertEquals(3, lhs.getDescrs().size());
 
-        assertNotNull( constraint );
+		// System.err.println( lhs.getDescrs() );
 
-        assertEquals( "a",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      constraint.getEvaluator() );
-        assertEquals( "3",
-                      constraint.getText() );
+		// Check first pattern
+		final PatternDescr first = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("foo3", first.getIdentifier());
+		assertEquals("Bar", first.getObjectType());
 
-        // Check second pattern
-        final PatternDescr second = (PatternDescr) lhs.getDescrs().get( 1 );
-        assertEquals( "foo4",
-                      second.getIdentifier() );
-        assertEquals( "Bar",
-                      second.getObjectType() );
+		assertEquals(1, first.getConstraint().getDescrs().size());
 
-        and = (AndDescr) second.getConstraint();
-        assertEquals( 2,
-                      and.getDescrs().size() );
+		// LiteralDescr constraint = (LiteralDescr) first.getDescrs().get( 0 );
+		AndDescr and = (AndDescr) first.getConstraint();
+		FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs()
+				.get(0);
+		LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        // System.err.println( second.getDescrs() );
+		assertNotNull(constraint);
 
-        final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) and.getDescrs().get( 0 );
-        assertEquals( "a",
-                      fieldBindingDescr.getFieldName() );
-        assertEquals( "a4",
-                      fieldBindingDescr.getIdentifier() );
+		assertEquals("a", fld.getFieldName());
+		assertEquals("==", constraint.getEvaluator());
+		assertEquals("3", constraint.getText());
 
-        fld = (FieldConstraintDescr) and.getDescrs().get( 1 );
+		// Check second pattern
+		final PatternDescr second = (PatternDescr) lhs.getDescrs().get(1);
+		assertEquals("foo4", second.getIdentifier());
+		assertEquals("Bar", second.getObjectType());
 
-        constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		and = (AndDescr) second.getConstraint();
+		assertEquals(2, and.getDescrs().size());
 
-        assertNotNull( constraint );
+		// System.err.println( second.getDescrs() );
 
-        assertEquals( "a",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      constraint.getEvaluator() );
-        assertEquals( "4",
-                      constraint.getText() );
+		final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) and
+				.getDescrs().get(0);
+		assertEquals("a", fieldBindingDescr.getFieldName());
+		assertEquals("a4", fieldBindingDescr.getIdentifier());
 
-        // Check third pattern
-        final PatternDescr third = (PatternDescr) lhs.getDescrs().get( 2 );
-        assertNull( third.getIdentifier() );
-        assertEquals( "Baz",
-                      third.getObjectType() );
+		fld = (FieldConstraintDescr) and.getDescrs().get(1);
 
-        assertEqualsIgnoreWhitespace( "if ( a == b ) { " + "  assert( foo3 );" + "} else {" + "  retract( foo4 );" + "}" + "  System.out.println( a4 );",
-                                      (String) rule.getConsequence() );
-    }
+		constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-    public void testNotNode() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "rule_not.drl" );
+		assertNotNull(constraint);
 
-        assertNotNull( rule );
-        assertEquals( "simple_rule",
-                      rule.getName() );
+		assertEquals("a", fld.getFieldName());
+		assertEquals("==", constraint.getEvaluator());
+		assertEquals("4", constraint.getText());
 
-        final AndDescr lhs = rule.getLhs();
-        assertEquals( 1,
-                      lhs.getDescrs().size() );
-        final NotDescr not = (NotDescr) lhs.getDescrs().get( 0 );
-        assertEquals( 1,
-                      not.getDescrs().size() );
-        final PatternDescr pattern = (PatternDescr) not.getDescrs().get( 0 );
+		// Check third pattern
+		final PatternDescr third = (PatternDescr) lhs.getDescrs().get(2);
+		assertNull(third.getIdentifier());
+		assertEquals("Baz", third.getObjectType());
 
-        assertEquals( "Cheese",
-                      pattern.getObjectType() );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
+		assertEqualsIgnoreWhitespace("if ( a == b ) { " + "  assert( foo3 );"
+				+ "} else {" + "  retract( foo4 );" + "}"
+				+ "  System.out.println( a4 );", (String) rule.getConsequence());
+	}
 
-        final AndDescr and = (AndDescr) pattern.getConstraint();
-        final FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        final LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+	public void testNotNode() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"rule_not.drl");
 
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "stilton",
-                      lit.getText() );
-        assertEquals( "type",
-                      fld.getFieldName() );
-    }
+		assertNotNull(rule);
+		assertEquals("simple_rule", rule.getName());
 
-    public void testFunctionImport() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "test_FunctionImport.drl" );
+		final AndDescr lhs = rule.getLhs();
+		assertEquals(1, lhs.getDescrs().size());
+		final NotDescr not = (NotDescr) lhs.getDescrs().get(0);
+		assertEquals(1, not.getDescrs().size());
+		final PatternDescr pattern = (PatternDescr) not.getDescrs().get(0);
 
-        final PackageDescr pkg = walker.getPackageDescr();
-        assertEquals( 2,
-                      pkg.getFunctionImports().size() );
+		assertEquals("Cheese", pattern.getObjectType());
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
 
-        assertEquals( "abd.def.x",
-                      ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getTarget() );
-        assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getStartCharacter() == -1 );
-        assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getEndCharacter() == -1 );
-        assertEquals( "qed.wah.*",
-                      ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getTarget() );
-        assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getStartCharacter() == -1 );
-        assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getEndCharacter() == -1 );
-    }
+		final AndDescr and = (AndDescr) pattern.getConstraint();
+		final FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs()
+				.get(0);
+		final LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-    public void testNotExistWithBrackets() throws Exception {
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("stilton", lit.getText());
+		assertEquals("type", fld.getFieldName());
+	}
 
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "not_exist_with_brackets.drl" );
+	public void testFunctionImport() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"test_FunctionImport.drl");
 
-        final PackageDescr pkg = walker.getPackageDescr();
+		final PackageDescr pkg = walker.getPackageDescr();
+		assertEquals(2, pkg.getFunctionImports().size());
 
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
+		assertEquals("abd.def.x", ((FunctionImportDescr) pkg
+				.getFunctionImports().get(0)).getTarget());
+		assertFalse(((FunctionImportDescr) pkg.getFunctionImports().get(0))
+				.getStartCharacter() == -1);
+		assertFalse(((FunctionImportDescr) pkg.getFunctionImports().get(0))
+				.getEndCharacter() == -1);
+		assertEquals("qed.wah.*", ((FunctionImportDescr) pkg
+				.getFunctionImports().get(1)).getTarget());
+		assertFalse(((FunctionImportDescr) pkg.getFunctionImports().get(1))
+				.getStartCharacter() == -1);
+		assertFalse(((FunctionImportDescr) pkg.getFunctionImports().get(1))
+				.getEndCharacter() == -1);
+	}
 
-        assertNotNull( rule );
-        assertEquals( "simple_rule",
-                      rule.getName() );
+	public void testNotExistWithBrackets() throws Exception {
 
-        final AndDescr lhs = rule.getLhs();
-        assertEquals( 2,
-                      lhs.getDescrs().size() );
-        final NotDescr not = (NotDescr) lhs.getDescrs().get( 0 );
-        assertEquals( 1,
-                      not.getDescrs().size() );
-        final PatternDescr pattern = (PatternDescr) not.getDescrs().get( 0 );
+		parseResource("compilation_unit", "compilation_unit",
+				"not_exist_with_brackets.drl");
 
-        assertEquals( "Cheese",
-                      pattern.getObjectType() );
+		final PackageDescr pkg = walker.getPackageDescr();
 
-        final ExistsDescr ex = (ExistsDescr) lhs.getDescrs().get( 1 );
-        assertEquals( 1,
-                      ex.getDescrs().size() );
-        final PatternDescr exPattern = (PatternDescr) ex.getDescrs().get( 0 );
-        assertEquals( "Foo",
-                      exPattern.getObjectType() );
-    }
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
 
-    public void testSimpleQuery() throws Exception {
-        final QueryDescr query = (QueryDescr) parseResource( "query",
-                                                             "query",
-                                                             "simple_query.drl" );
+		assertNotNull(rule);
+		assertEquals("simple_rule", rule.getName());
 
-        assertNotNull( query );
+		final AndDescr lhs = rule.getLhs();
+		assertEquals(2, lhs.getDescrs().size());
+		final NotDescr not = (NotDescr) lhs.getDescrs().get(0);
+		assertEquals(1, not.getDescrs().size());
+		final PatternDescr pattern = (PatternDescr) not.getDescrs().get(0);
 
-        assertEquals( "simple_query",
-                      query.getName() );
+		assertEquals("Cheese", pattern.getObjectType());
 
-        final AndDescr lhs = query.getLhs();
+		final ExistsDescr ex = (ExistsDescr) lhs.getDescrs().get(1);
+		assertEquals(1, ex.getDescrs().size());
+		final PatternDescr exPattern = (PatternDescr) ex.getDescrs().get(0);
+		assertEquals("Foo", exPattern.getObjectType());
+	}
 
-        assertNotNull( lhs );
+	public void testSimpleQuery() throws Exception {
+		final QueryDescr query = (QueryDescr) parseResource("query", "query",
+				"simple_query.drl");
 
-        assertEquals( 3,
-                      lhs.getDescrs().size() );
+		assertNotNull(query);
 
-        // Check first pattern
-        final PatternDescr first = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "foo3",
-                      first.getIdentifier() );
-        assertEquals( "Bar",
-                      first.getObjectType() );
+		assertEquals("simple_query", query.getName());
 
-        assertEquals( 1,
-                      first.getConstraint().getDescrs().size() );
+		final AndDescr lhs = query.getLhs();
 
-        AndDescr and = (AndDescr) first.getConstraint();
-        FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        // LiteralDescr constraint = (LiteralDescr) first.getDescrs().get( 0 );
+		assertNotNull(lhs);
 
-        assertNotNull( constraint );
+		assertEquals(3, lhs.getDescrs().size());
 
-        assertEquals( "a",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      constraint.getEvaluator() );
-        assertEquals( "3",
-                      constraint.getText() );
+		// Check first pattern
+		final PatternDescr first = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("foo3", first.getIdentifier());
+		assertEquals("Bar", first.getObjectType());
 
-        // Check second pattern
-        final PatternDescr second = (PatternDescr) lhs.getDescrs().get( 1 );
-        assertEquals( "foo4",
-                      second.getIdentifier() );
-        assertEquals( "Bar",
-                      second.getObjectType() );
+		assertEquals(1, first.getConstraint().getDescrs().size());
 
-        and = (AndDescr) second.getConstraint();
-        assertEquals( 2,
-                      and.getDescrs().size() );
-        // check it has field bindings.
-        final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) and.getDescrs().get( 0 );
-        assertEquals( "a",
-                      fieldBindingDescr.getFieldName() );
-        assertEquals( "a4",
-                      fieldBindingDescr.getIdentifier() );
+		AndDescr and = (AndDescr) first.getConstraint();
+		FieldConstraintDescr fld = (FieldConstraintDescr) and.getDescrs()
+				.get(0);
+		LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
+		// LiteralDescr constraint = (LiteralDescr) first.getDescrs().get( 0 );
 
-        fld = (FieldConstraintDescr) and.getDescrs().get( 1 );
+		assertNotNull(constraint);
 
-        constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		assertEquals("a", fld.getFieldName());
+		assertEquals("==", constraint.getEvaluator());
+		assertEquals("3", constraint.getText());
 
-        assertNotNull( constraint );
+		// Check second pattern
+		final PatternDescr second = (PatternDescr) lhs.getDescrs().get(1);
+		assertEquals("foo4", second.getIdentifier());
+		assertEquals("Bar", second.getObjectType());
 
-        assertEquals( "a",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      constraint.getEvaluator() );
-        assertEquals( "4",
-                      constraint.getText() );
-    }
+		and = (AndDescr) second.getConstraint();
+		assertEquals(2, and.getDescrs().size());
+		// check it has field bindings.
+		final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) and
+				.getDescrs().get(0);
+		assertEquals("a", fieldBindingDescr.getFieldName());
+		assertEquals("a4", fieldBindingDescr.getIdentifier());
 
-    public void testQueryRuleMixed() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "query_and_rule.drl" );
+		fld = (FieldConstraintDescr) and.getDescrs().get(1);
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 4,
-                      pack.getRules().size() ); // as queries are rules
-        RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( "bar",
-                      rule.getName() );
+		constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-        QueryDescr query = (QueryDescr) pack.getRules().get( 1 );
-        assertEquals( "simple_query",
-                      query.getName() );
+		assertNotNull(constraint);
 
-        rule = (RuleDescr) pack.getRules().get( 2 );
-        assertEquals( "bar2",
-                      rule.getName() );
+		assertEquals("a", fld.getFieldName());
+		assertEquals("==", constraint.getEvaluator());
+		assertEquals("4", constraint.getText());
+	}
 
-        query = (QueryDescr) pack.getRules().get( 3 );
-        assertEquals( "simple_query2",
-                      query.getName() );
-    }
+	public void testQueryRuleMixed() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"query_and_rule.drl");
 
-    public void testMultipleRules() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "multiple_rules.drl" );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(4, pack.getRules().size()); // as queries are rules
+		RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals("bar", rule.getName());
 
-        final PackageDescr pkg = walker.getPackageDescr();
-        final List rules = pkg.getRules();
+		QueryDescr query = (QueryDescr) pack.getRules().get(1);
+		assertEquals("simple_query", query.getName());
 
-        assertEquals( 2,
-                      rules.size() );
+		rule = (RuleDescr) pack.getRules().get(2);
+		assertEquals("bar2", rule.getName());
 
-        final RuleDescr rule0 = (RuleDescr) rules.get( 0 );
-        assertEquals( "Like Stilton",
-                      rule0.getName() );
+		query = (QueryDescr) pack.getRules().get(3);
+		assertEquals("simple_query2", query.getName());
+	}
 
-        final RuleDescr rule1 = (RuleDescr) rules.get( 1 );
-        assertEquals( "Like Cheddar",
-                      rule1.getName() );
+	public void testMultipleRules() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"multiple_rules.drl");
 
-        // checkout the first rule
-        AndDescr lhs = rule1.getLhs();
-        assertNotNull( lhs );
-        assertEquals( 1,
-                      lhs.getDescrs().size() );
-        assertEqualsIgnoreWhitespace( "System.out.println(\"I like \" + t);",
-                                      (String) rule0.getConsequence() );
+		final PackageDescr pkg = walker.getPackageDescr();
+		final List rules = pkg.getRules();
 
-        // Check first pattern
-        PatternDescr first = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "Cheese",
-                      first.getObjectType() );
+		assertEquals(2, rules.size());
 
-        // checkout the second rule
-        lhs = rule1.getLhs();
-        assertNotNull( lhs );
-        assertEquals( 1,
-                      lhs.getDescrs().size() );
-        assertEqualsIgnoreWhitespace( "System.out.println(\"I like \" + t);",
-                                      (String) rule1.getConsequence() );
+		final RuleDescr rule0 = (RuleDescr) rules.get(0);
+		assertEquals("Like Stilton", rule0.getName());
 
-        // Check first pattern
-        first = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "Cheese",
-                      first.getObjectType() );
-    }
+		final RuleDescr rule1 = (RuleDescr) rules.get(1);
+		assertEquals("Like Cheddar", rule1.getName());
 
-    public void testExpanderLineSpread() throws Exception {
-        final DrlParser parser = new DrlParser();
-        final PackageDescr pkg = parser.parse( this.getReader( "expander_spread_lines.dslr" ),
-                                               this.getReader( "complex.dsl" ) );
+		// checkout the first rule
+		AndDescr lhs = rule1.getLhs();
+		assertNotNull(lhs);
+		assertEquals(1, lhs.getDescrs().size());
+		assertEqualsIgnoreWhitespace("System.out.println(\"I like \" + t);",
+				(String) rule0.getConsequence());
 
-        assertFalse( parser.getErrors().toString(),
-                     parser.hasErrors() );
+		// Check first pattern
+		PatternDescr first = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("Cheese", first.getObjectType());
 
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		// checkout the second rule
+		lhs = rule1.getLhs();
+		assertNotNull(lhs);
+		assertEquals(1, lhs.getDescrs().size());
+		assertEqualsIgnoreWhitespace("System.out.println(\"I like \" + t);",
+				(String) rule1.getConsequence());
 
-        final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
-        assertNotNull( (String) rule.getConsequence() );
+		// Check first pattern
+		first = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("Cheese", first.getObjectType());
+	}
 
-    }
+	public void testExpanderLineSpread() throws Exception {
+		final DrlParser parser = new DrlParser();
+		final PackageDescr pkg = parser.parse(this
+				.getReader("expander_spread_lines.dslr"), this
+				.getReader("complex.dsl"));
 
-    public void testExpanderMultipleConstraints() throws Exception {
-        final DrlParser parser = new DrlParser();
-        final PackageDescr pkg = parser.parse( this.getReader( "expander_multiple_constraints.dslr" ),
-                                               this.getReader( "multiple_constraints.dsl" ) );
+		assertFalse(parser.getErrors().toString(), parser.hasErrors());
 
-        assertFalse( parser.getErrors().toString(),
-                     parser.hasErrors() );
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
+		assertNotNull((String) rule.getConsequence());
 
-        PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Person",
-                      pattern.getObjectType() );
+	}
 
-        assertEquals( 2,
-                      pattern.getConstraint().getDescrs().size() );
-        assertEquals( "age",
-                      ((FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 )).getFieldName() );
-        assertEquals( "location",
-                      ((FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 1 )).getFieldName() );
+	public void testExpanderMultipleConstraints() throws Exception {
+		final DrlParser parser = new DrlParser();
+		final PackageDescr pkg = parser.parse(this
+				.getReader("expander_multiple_constraints.dslr"), this
+				.getReader("multiple_constraints.dsl"));
 
-        pattern = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Bar",
-                      pattern.getObjectType() );
+		assertFalse(parser.getErrors().toString(), parser.hasErrors());
 
-        assertNotNull( (String) rule.getConsequence() );
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-    }
+		PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals("Person", pattern.getObjectType());
 
-    public void testExpanderMultipleConstraintsFlush() throws Exception {
-        final DrlParser parser = new DrlParser();
-        // this is similar to the other test, but it requires a flush to add the
-        // constraints
-        final PackageDescr pkg = parser.parse( this.getReader( "expander_multiple_constraints_flush.dslr" ),
-                                               this.getReader( "multiple_constraints.dsl" ) );
+		assertEquals(2, pattern.getConstraint().getDescrs().size());
+		assertEquals("age", ((FieldConstraintDescr) pattern.getConstraint()
+				.getDescrs().get(0)).getFieldName());
+		assertEquals("location", ((FieldConstraintDescr) pattern
+				.getConstraint().getDescrs().get(1)).getFieldName());
 
-        assertFalse( parser.getErrors().toString(),
-                     parser.hasErrors() );
+		pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
+		assertEquals("Bar", pattern.getObjectType());
 
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		assertNotNull((String) rule.getConsequence());
 
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Person",
-                      pattern.getObjectType() );
+	}
 
-        assertEquals( 2,
-                      pattern.getConstraint().getDescrs().size() );
-        assertEquals( "age",
-                      ((FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 )).getFieldName() );
-        assertEquals( "location",
-                      ((FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 1 )).getFieldName() );
+	public void testExpanderMultipleConstraintsFlush() throws Exception {
+		final DrlParser parser = new DrlParser();
+		// this is similar to the other test, but it requires a flush to add the
+		// constraints
+		final PackageDescr pkg = parser.parse(this
+				.getReader("expander_multiple_constraints_flush.dslr"), this
+				.getReader("multiple_constraints.dsl"));
 
-        assertNotNull( (String) rule.getConsequence() );
+		assertFalse(parser.getErrors().toString(), parser.hasErrors());
 
-    }
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-    // public void testExpanderUnExpandableErrorLines() throws Exception {
-    //
-    // //stubb expander
-    // final ExpanderResolver res = new ExpanderResolver() {
-    // public Expander get(String name,
-    // String config) {
-    // return new Expander() {
-    // public String expand(String scope,
-    // String pattern) {
-    // if ( pattern.startsWith( "Good" ) ) {
-    // return pattern;
-    // } else {
-    // throw new IllegalArgumentException( "whoops" );
-    // }
-    //
-    // }
-    // };
-    // }
-    // };
-    //
-    // final DRLParser parser = parseResource( "expander_line_errors.dslr" );
-    // parser.setExpanderResolver( res );
-    // parser.compilation_unit();
-    // assertTrue( parser.hasErrors() );
-    //
-    // final List messages = parser.getErrorMessages();
-    // assertEquals( messages.size(),
-    // parser.getErrors().size() );
-    //
-    // assertEquals( 4,
-    // parser.getErrors().size() );
-    // assertEquals( ExpanderException.class,
-    // parser.getErrors().get( 0 ).getClass() );
-    // assertEquals( 8,
-    // ((RecognitionException) parser.getErrors().get( 0 )).line );
-    // assertEquals( 10,
-    // ((RecognitionException) parser.getErrors().get( 1 )).line );
-    // assertEquals( 12,
-    // ((RecognitionException) parser.getErrors().get( 2 )).line );
-    // assertEquals( 13,
-    // ((RecognitionException) parser.getErrors().get( 3 )).line );
-    //
-    // final PackageDescr pack = parser.getPackageDescr();
-    // assertNotNull( pack );
-    //
-    // final ExpanderException ex = (ExpanderException) parser.getErrors().get(
-    // 0 );
-    // assertTrue( ex.getMessage().indexOf( "whoops" ) > -1 );
-    //
-    // }
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		assertEquals("Person", pattern.getObjectType());
 
-    public void testBasicBinding() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "basic_binding.drl" );
+		assertEquals(2, pattern.getConstraint().getDescrs().size());
+		assertEquals("age", ((FieldConstraintDescr) pattern.getConstraint()
+				.getDescrs().get(0)).getFieldName());
+		assertEquals("location", ((FieldConstraintDescr) pattern
+				.getConstraint().getDescrs().get(1)).getFieldName());
 
-        final PackageDescr pkg = walker.getPackageDescr();
-        final RuleDescr ruleDescr = (RuleDescr) pkg.getRules().get( 0 );
+		assertNotNull((String) rule.getConsequence());
 
-        final AndDescr lhs = ruleDescr.getLhs();
-        assertEquals( 1,
-                      lhs.getDescrs().size() );
-        final PatternDescr cheese = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( 1,
-                      cheese.getConstraint().getDescrs().size() );
-        assertEquals( "Cheese",
-                      cheese.getObjectType() );
-        assertEquals( 1,
-                      lhs.getDescrs().size() );
-        final FieldBindingDescr fieldBinding = (FieldBindingDescr) cheese.getConstraint().getDescrs().get( 0 );
-        assertEquals( "type",
-                      fieldBinding.getFieldName() );
-    }
+	}
 
-    public void testBoundVariables() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "bindings.drl" );
+	// public void testExpanderUnExpandableErrorLines() throws Exception {
+	//
+	// //stubb expander
+	// final ExpanderResolver res = new ExpanderResolver() {
+	// public Expander get(String name,
+	// String config) {
+	// return new Expander() {
+	// public String expand(String scope,
+	// String pattern) {
+	// if ( pattern.startsWith( "Good" ) ) {
+	// return pattern;
+	// } else {
+	// throw new IllegalArgumentException( "whoops" );
+	// }
+	//
+	// }
+	// };
+	// }
+	// };
+	//
+	// final DRLParser parser = parseResource( "expander_line_errors.dslr" );
+	// parser.setExpanderResolver( res );
+	// parser.compilation_unit();
+	// assertTrue( parser.hasErrors() );
+	//
+	// final List messages = parser.getErrorMessages();
+	// assertEquals( messages.size(),
+	// parser.getErrors().size() );
+	//
+	// assertEquals( 4,
+	// parser.getErrors().size() );
+	// assertEquals( ExpanderException.class,
+	// parser.getErrors().get( 0 ).getClass() );
+	// assertEquals( 8,
+	// ((RecognitionException) parser.getErrors().get( 0 )).line );
+	// assertEquals( 10,
+	// ((RecognitionException) parser.getErrors().get( 1 )).line );
+	// assertEquals( 12,
+	// ((RecognitionException) parser.getErrors().get( 2 )).line );
+	// assertEquals( 13,
+	// ((RecognitionException) parser.getErrors().get( 3 )).line );
+	//
+	// final PackageDescr pack = parser.getPackageDescr();
+	// assertNotNull( pack );
+	//
+	// final ExpanderException ex = (ExpanderException) parser.getErrors().get(
+	// 0 );
+	// assertTrue( ex.getMessage().indexOf( "whoops" ) > -1 );
+	//
+	// }
 
-        final PackageDescr pkg = walker.getPackageDescr();
-        final RuleDescr ruleDescr = (RuleDescr) pkg.getRules().get( 0 );
+	public void testBasicBinding() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"basic_binding.drl");
 
-        final AndDescr lhs = ruleDescr.getLhs();
-        assertEquals( 2,
-                      lhs.getDescrs().size() );
-        final PatternDescr cheese = (PatternDescr) lhs.getDescrs().get( 0 );
-        assertEquals( "Cheese",
-                      cheese.getObjectType() );
-        assertEquals( 2,
-                      lhs.getDescrs().size() );
-        FieldBindingDescr fieldBinding = (FieldBindingDescr) cheese.getConstraint().getDescrs().get( 0 );
-        assertEquals( "type",
-                      fieldBinding.getFieldName() );
+		final PackageDescr pkg = walker.getPackageDescr();
+		final RuleDescr ruleDescr = (RuleDescr) pkg.getRules().get(0);
 
-        FieldConstraintDescr fld = (FieldConstraintDescr) cheese.getConstraint().getDescrs().get( 1 );
-        LiteralRestrictionDescr literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        // LiteralDescr literalDescr = (LiteralDescr) cheese.getDescrs().get( 1
-        // );
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      literalDescr.getEvaluator() );
-        assertEquals( "stilton",
-                      literalDescr.getText() );
+		final AndDescr lhs = ruleDescr.getLhs();
+		assertEquals(1, lhs.getDescrs().size());
+		final PatternDescr cheese = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals(1, cheese.getConstraint().getDescrs().size());
+		assertEquals("Cheese", cheese.getObjectType());
+		assertEquals(1, lhs.getDescrs().size());
+		final FieldBindingDescr fieldBinding = (FieldBindingDescr) cheese
+				.getConstraint().getDescrs().get(0);
+		assertEquals("type", fieldBinding.getFieldName());
+	}
 
-        final PatternDescr person = (PatternDescr) lhs.getDescrs().get( 1 );
-        fieldBinding = (FieldBindingDescr) person.getConstraint().getDescrs().get( 0 );
-        assertEquals( "name",
-                      fieldBinding.getFieldName() );
+	public void testBoundVariables() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "bindings.drl");
 
-        fld = (FieldConstraintDescr) person.getConstraint().getDescrs().get( 1 );
-        literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		final PackageDescr pkg = walker.getPackageDescr();
+		final RuleDescr ruleDescr = (RuleDescr) pkg.getRules().get(0);
 
-        assertEquals( "name",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      literalDescr.getEvaluator() );
-        assertEquals( "bob",
-                      literalDescr.getText() );
+		final AndDescr lhs = ruleDescr.getLhs();
+		assertEquals(2, lhs.getDescrs().size());
+		final PatternDescr cheese = (PatternDescr) lhs.getDescrs().get(0);
+		assertEquals("Cheese", cheese.getObjectType());
+		assertEquals(2, lhs.getDescrs().size());
+		FieldBindingDescr fieldBinding = (FieldBindingDescr) cheese
+				.getConstraint().getDescrs().get(0);
+		assertEquals("type", fieldBinding.getFieldName());
 
-        fld = (FieldConstraintDescr) person.getConstraint().getDescrs().get( 2 );
-        final VariableRestrictionDescr variableDescr = (VariableRestrictionDescr) fld.getRestrictions().get( 0 );
+		FieldConstraintDescr fld = (FieldConstraintDescr) cheese
+				.getConstraint().getDescrs().get(1);
+		LiteralRestrictionDescr literalDescr = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
+		// LiteralDescr literalDescr = (LiteralDescr) cheese.getDescrs().get( 1
+		// );
+		assertEquals("type", fld.getFieldName());
+		assertEquals("==", literalDescr.getEvaluator());
+		assertEquals("stilton", literalDescr.getText());
 
-        assertEquals( "likes",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      variableDescr.getEvaluator() );
-        assertEquals( "$type",
-                      variableDescr.getIdentifier() );
-    }
+		final PatternDescr person = (PatternDescr) lhs.getDescrs().get(1);
+		fieldBinding = (FieldBindingDescr) person.getConstraint().getDescrs()
+				.get(0);
+		assertEquals("name", fieldBinding.getFieldName());
 
-    public void testOrNesting() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "or_nesting.drl" );
+		fld = (FieldConstraintDescr) person.getConstraint().getDescrs().get(1);
+		literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertNotNull( pack );
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( "simple_rule",
-                      rule.getName() );
+		assertEquals("name", fld.getFieldName());
+		assertEquals("==", literalDescr.getEvaluator());
+		assertEquals("bob", literalDescr.getText());
 
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		fld = (FieldConstraintDescr) person.getConstraint().getDescrs().get(2);
+		final VariableRestrictionDescr variableDescr = (VariableRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
+		assertEquals("likes", fld.getFieldName());
+		assertEquals("==", variableDescr.getEvaluator());
+		assertEquals("$type", variableDescr.getIdentifier());
+	}
 
-        final PatternDescr first = (PatternDescr) or.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      first.getObjectType() );
+	public void testOrNesting() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "or_nesting.drl");
 
-        final AndDescr and = (AndDescr) or.getDescrs().get( 1 );
-        assertEquals( 2,
-                      and.getDescrs().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertNotNull(pack);
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals("simple_rule", rule.getName());
 
-        final PatternDescr left = (PatternDescr) and.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      left.getObjectType() );
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final PatternDescr right = (PatternDescr) and.getDescrs().get( 1 );
-        assertEquals( "Cheese",
-                      right.getObjectType() );
-    }
+		final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
 
-    /** Test that explicit "&&", "||" works as expected */
-    public void testAndOrRules() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "and_or_rule.drl" );
+		final PatternDescr first = (PatternDescr) or.getDescrs().get(0);
+		assertEquals("Person", first.getObjectType());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertNotNull( pack );
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( "simple_rule",
-                      rule.getName() );
+		final AndDescr and = (AndDescr) or.getDescrs().get(1);
+		assertEquals(2, and.getDescrs().size());
 
-        // we will have 2 children under the main And node
-        final AndDescr and = rule.getLhs();
-        assertEquals( 2,
-                      and.getDescrs().size() );
+		final PatternDescr left = (PatternDescr) and.getDescrs().get(0);
+		assertEquals("Person", left.getObjectType());
 
-        // check the "&&" part
-        final AndDescr join = (AndDescr) and.getDescrs().get( 0 );
-        assertEquals( 2,
-                      join.getDescrs().size() );
+		final PatternDescr right = (PatternDescr) and.getDescrs().get(1);
+		assertEquals("Cheese", right.getObjectType());
+	}
 
-        PatternDescr left = (PatternDescr) join.getDescrs().get( 0 );
-        PatternDescr right = (PatternDescr) join.getDescrs().get( 1 );
-        assertEquals( "Person",
-                      left.getObjectType() );
-        assertEquals( "Cheese",
-                      right.getObjectType() );
+	/** Test that explicit "&&", "||" works as expected */
+	public void testAndOrRules() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "and_or_rule.drl");
 
-        assertEquals( 1,
-                      left.getConstraint().getDescrs().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertNotNull(pack);
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals("simple_rule", rule.getName());
 
-        FieldConstraintDescr fld = (FieldConstraintDescr) left.getConstraint().getDescrs().get( 0 );
-        LiteralRestrictionDescr literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		// we will have 2 children under the main And node
+		final AndDescr and = rule.getLhs();
+		assertEquals(2, and.getDescrs().size());
 
-        assertEquals( "==",
-                      literal.getEvaluator() );
-        assertEquals( "name",
-                      fld.getFieldName() );
-        assertEquals( "mark",
-                      literal.getText() );
+		// check the "&&" part
+		final AndDescr join = (AndDescr) and.getDescrs().get(0);
+		assertEquals(2, join.getDescrs().size());
 
-        assertEquals( 1,
-                      right.getConstraint().getDescrs().size() );
+		PatternDescr left = (PatternDescr) join.getDescrs().get(0);
+		PatternDescr right = (PatternDescr) join.getDescrs().get(1);
+		assertEquals("Person", left.getObjectType());
+		assertEquals("Cheese", right.getObjectType());
 
-        fld = (FieldConstraintDescr) right.getConstraint().getDescrs().get( 0 );
-        literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		assertEquals(1, left.getConstraint().getDescrs().size());
 
-        assertEquals( "==",
-                      literal.getEvaluator() );
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( "stilton",
-                      literal.getText() );
+		FieldConstraintDescr fld = (FieldConstraintDescr) left.getConstraint()
+				.getDescrs().get(0);
+		LiteralRestrictionDescr literal = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        // now the "||" part
-        final OrDescr or = (OrDescr) and.getDescrs().get( 1 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
-        left = (PatternDescr) or.getDescrs().get( 0 );
-        right = (PatternDescr) or.getDescrs().get( 1 );
-        assertEquals( "Person",
-                      left.getObjectType() );
-        assertEquals( "Cheese",
-                      right.getObjectType() );
-        assertEquals( 1,
-                      left.getConstraint().getDescrs().size() );
+		assertEquals("==", literal.getEvaluator());
+		assertEquals("name", fld.getFieldName());
+		assertEquals("mark", literal.getText());
 
-        fld = (FieldConstraintDescr) left.getConstraint().getDescrs().get( 0 );
-        literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		assertEquals(1, right.getConstraint().getDescrs().size());
 
-        assertEquals( "==",
-                      literal.getEvaluator() );
-        assertEquals( "name",
-                      fld.getFieldName() );
-        assertEquals( "mark",
-                      literal.getText() );
+		fld = (FieldConstraintDescr) right.getConstraint().getDescrs().get(0);
+		literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-        assertEquals( 1,
-                      right.getConstraint().getDescrs().size() );
+		assertEquals("==", literal.getEvaluator());
+		assertEquals("type", fld.getFieldName());
+		assertEquals("stilton", literal.getText());
 
-        fld = (FieldConstraintDescr) right.getConstraint().getDescrs().get( 0 );
-        literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+		// now the "||" part
+		final OrDescr or = (OrDescr) and.getDescrs().get(1);
+		assertEquals(2, or.getDescrs().size());
+		left = (PatternDescr) or.getDescrs().get(0);
+		right = (PatternDescr) or.getDescrs().get(1);
+		assertEquals("Person", left.getObjectType());
+		assertEquals("Cheese", right.getObjectType());
+		assertEquals(1, left.getConstraint().getDescrs().size());
 
-        assertEquals( "==",
-                      literal.getEvaluator() );
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( "stilton",
-                      literal.getText() );
+		fld = (FieldConstraintDescr) left.getConstraint().getDescrs().get(0);
+		literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-        assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" );",
-                                      (String) rule.getConsequence() );
-    }
+		assertEquals("==", literal.getEvaluator());
+		assertEquals("name", fld.getFieldName());
+		assertEquals("mark", literal.getText());
 
-    /** test basic foo : Fact() || Fact() stuff */
-    public void testOrWithBinding() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "or_binding.drl" );
+		assertEquals(1, right.getConstraint().getDescrs().size());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		fld = (FieldConstraintDescr) right.getConstraint().getDescrs().get(0);
+		literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
 
-        final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
+		assertEquals("==", literal.getEvaluator());
+		assertEquals("type", fld.getFieldName());
+		assertEquals("stilton", literal.getText());
 
-        final PatternDescr leftPattern = (PatternDescr) or.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      leftPattern.getObjectType() );
-        assertEquals( "foo",
-                      leftPattern.getIdentifier() );
+		assertEqualsIgnoreWhitespace(
+				"System.out.println( \"Mark and Michael\" );", (String) rule
+						.getConsequence());
+	}
 
-        final PatternDescr rightPattern = (PatternDescr) or.getDescrs().get( 1 );
-        assertEquals( "Person",
-                      rightPattern.getObjectType() );
-        assertEquals( "foo",
-                      rightPattern.getIdentifier() );
+	/** test basic foo : Fact() || Fact() stuff */
+	public void testOrWithBinding() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "or_binding.drl");
 
-        final PatternDescr cheeseDescr = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Cheese",
-                      cheeseDescr.getObjectType() );
-        assertEquals( null,
-                      cheeseDescr.getIdentifier() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-        assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" + bar );",
-                                      (String) rule.getConsequence() );
-    }
+		final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
 
-    /** test basic foo : Fact() || Fact() stuff binding to an "or" */
-    public void testOrBindingComplex() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "or_binding_complex.drl" );
+		final PatternDescr leftPattern = (PatternDescr) or.getDescrs().get(0);
+		assertEquals("Person", leftPattern.getObjectType());
+		assertEquals("foo", leftPattern.getIdentifier());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PatternDescr rightPattern = (PatternDescr) or.getDescrs().get(1);
+		assertEquals("Person", rightPattern.getObjectType());
+		assertEquals("foo", rightPattern.getIdentifier());
 
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PatternDescr cheeseDescr = (PatternDescr) rule.getLhs()
+				.getDescrs().get(1);
+		assertEquals("Cheese", cheeseDescr.getObjectType());
+		assertEquals(null, cheeseDescr.getIdentifier());
 
-        final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
+		assertEqualsIgnoreWhitespace(
+				"System.out.println( \"Mark and Michael\" + bar );",
+				(String) rule.getConsequence());
+	}
 
-        // first fact
-        final PatternDescr firstFact = (PatternDescr) or.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      firstFact.getObjectType() );
-        assertEquals( "foo",
-                      firstFact.getIdentifier() );
+	/** test basic foo : Fact() || Fact() stuff binding to an "or" */
+	public void testOrBindingComplex() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"or_binding_complex.drl");
 
-        // second "option"
-        final PatternDescr secondFact = (PatternDescr) or.getDescrs().get( 1 );
-        assertEquals( "Person",
-                      secondFact.getObjectType() );
-        assertEquals( 1,
-                      secondFact.getConstraint().getDescrs().size() );
-        assertEquals( "foo",
-                      secondFact.getIdentifier() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" + bar );",
-                                      (String) rule.getConsequence() );
-    }
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-    public void testOrBindingWithBrackets() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "or_binding_with_brackets.drl" );
+		final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		// first fact
+		final PatternDescr firstFact = (PatternDescr) or.getDescrs().get(0);
+		assertEquals("Person", firstFact.getObjectType());
+		assertEquals("foo", firstFact.getIdentifier());
 
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		// second "option"
+		final PatternDescr secondFact = (PatternDescr) or.getDescrs().get(1);
+		assertEquals("Person", secondFact.getObjectType());
+		assertEquals(1, secondFact.getConstraint().getDescrs().size());
+		assertEquals("foo", secondFact.getIdentifier());
 
-        final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
+		assertEqualsIgnoreWhitespace(
+				"System.out.println( \"Mark and Michael\" + bar );",
+				(String) rule.getConsequence());
+	}
 
-        // first fact
-        final PatternDescr firstFact = (PatternDescr) or.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      firstFact.getObjectType() );
-        assertEquals( "foo",
-                      firstFact.getIdentifier() );
+	public void testOrBindingWithBrackets() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"or_binding_with_brackets.drl");
 
-        // second "option"
-        final PatternDescr secondFact = (PatternDescr) or.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      secondFact.getObjectType() );
-        assertEquals( "foo",
-                      secondFact.getIdentifier() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" + bar );",
-                                      (String) rule.getConsequence() );
-    }
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-    /** */
-    public void testBracketsPrecedence() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "brackets_precedence.drl" );
+		final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
+		// first fact
+		final PatternDescr firstFact = (PatternDescr) or.getDescrs().get(0);
+		assertEquals("Person", firstFact.getObjectType());
+		assertEquals("foo", firstFact.getIdentifier());
 
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		// second "option"
+		final PatternDescr secondFact = (PatternDescr) or.getDescrs().get(0);
+		assertEquals("Person", secondFact.getObjectType());
+		assertEquals("foo", secondFact.getIdentifier());
 
-        final AndDescr rootAnd = (AndDescr) rule.getLhs().getDescrs().get( 0 );
+		assertEqualsIgnoreWhitespace(
+				"System.out.println( \"Mark and Michael\" + bar );",
+				(String) rule.getConsequence());
+	}
 
-        assertEquals( 2,
-                      rootAnd.getDescrs().size() );
+	/** */
+	public void testBracketsPrecedence() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"brackets_precedence.drl");
 
-        final OrDescr leftOr = (OrDescr) rootAnd.getDescrs().get( 0 );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
 
-        assertEquals( 2,
-                      leftOr.getDescrs().size() );
-        final NotDescr not = (NotDescr) leftOr.getDescrs().get( 0 );
-        final PatternDescr foo1 = (PatternDescr) not.getDescrs().get( 0 );
-        assertEquals( "Foo",
-                      foo1.getObjectType() );
-        final PatternDescr foo2 = (PatternDescr) leftOr.getDescrs().get( 1 );
-        assertEquals( "Foo",
-                      foo2.getObjectType() );
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final OrDescr rightOr = (OrDescr) rootAnd.getDescrs().get( 1 );
+		final AndDescr rootAnd = (AndDescr) rule.getLhs().getDescrs().get(0);
 
-        assertEquals( 2,
-                      rightOr.getDescrs().size() );
-        final PatternDescr shoes = (PatternDescr) rightOr.getDescrs().get( 0 );
-        assertEquals( "Shoes",
-                      shoes.getObjectType() );
-        final PatternDescr butt = (PatternDescr) rightOr.getDescrs().get( 1 );
-        assertEquals( "Butt",
-                      butt.getObjectType() );
-    }
+		assertEquals(2, rootAnd.getDescrs().size());
 
-    public void testEvalMultiple() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "eval_multiple.drl" );
+		final OrDescr leftOr = (OrDescr) rootAnd.getDescrs().get(0);
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 4,
-                      rule.getLhs().getDescrs().size() );
+		assertEquals(2, leftOr.getDescrs().size());
+		final NotDescr not = (NotDescr) leftOr.getDescrs().get(0);
+		final PatternDescr foo1 = (PatternDescr) not.getDescrs().get(0);
+		assertEquals("Foo", foo1.getObjectType());
+		final PatternDescr foo2 = (PatternDescr) leftOr.getDescrs().get(1);
+		assertEquals("Foo", foo2.getObjectType());
 
-        final EvalDescr eval = (EvalDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEqualsIgnoreWhitespace( "abc(\"foo\") + 5",
-                                      (String) eval.getContent() );
+		final OrDescr rightOr = (OrDescr) rootAnd.getDescrs().get(1);
 
-        final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Foo",
-                      pattern.getObjectType() );
+		assertEquals(2, rightOr.getDescrs().size());
+		final PatternDescr shoes = (PatternDescr) rightOr.getDescrs().get(0);
+		assertEquals("Shoes", shoes.getObjectType());
+		final PatternDescr butt = (PatternDescr) rightOr.getDescrs().get(1);
+		assertEquals("Butt", butt.getObjectType());
+	}
 
-    }
+	public void testEvalMultiple() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"eval_multiple.drl");
 
-    public void testWithEval() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "with_eval.drl" );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(4, rule.getLhs().getDescrs().size());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 3,
-                      rule.getLhs().getDescrs().size() );
-        PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Foo",
-                      pattern.getObjectType() );
-        pattern = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Bar",
-                      pattern.getObjectType() );
+		final EvalDescr eval = (EvalDescr) rule.getLhs().getDescrs().get(0);
+		assertEqualsIgnoreWhitespace("abc(\"foo\") + 5", (String) eval
+				.getContent());
 
-        final EvalDescr eval = (EvalDescr) rule.getLhs().getDescrs().get( 2 );
-        assertEqualsIgnoreWhitespace( "abc(\"foo\")",
-                                      (String) eval.getContent() );
-        assertEqualsIgnoreWhitespace( "Kapow",
-                                      (String) rule.getConsequence() );
-    }
+		final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs()
+				.get(1);
+		assertEquals("Foo", pattern.getObjectType());
 
-    public void testWithRetval() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "with_retval.drl" );
+	}
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
+	public void testWithEval() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "with_eval.drl");
 
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
-        final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( 1,
-                      col.getConstraint().getDescrs().size() );
-        assertEquals( "Foo",
-                      col.getObjectType() );
-        final FieldConstraintDescr fld = (FieldConstraintDescr) col.getConstraint().getDescrs().get( 0 );
-        final ReturnValueRestrictionDescr retval = (ReturnValueRestrictionDescr) fld.getRestrictions().get( 0 );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(3, rule.getLhs().getDescrs().size());
+		PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals("Foo", pattern.getObjectType());
+		pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
+		assertEquals("Bar", pattern.getObjectType());
 
-        assertEquals( "a + b",
-                      retval.getContent() );
-        assertEquals( "name",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      retval.getEvaluator() );
-    }
+		final EvalDescr eval = (EvalDescr) rule.getLhs().getDescrs().get(2);
+		assertEqualsIgnoreWhitespace("abc(\"foo\")", (String) eval.getContent());
+		assertEqualsIgnoreWhitespace("Kapow", (String) rule.getConsequence());
+	}
 
-    public void testWithPredicate() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "with_predicate.drl" );
+	public void testWithRetval() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "with_retval.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
 
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
-        final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        AndDescr and = (AndDescr) col.getConstraint();
-        assertEquals( 2,
-                      and.getDescrs().size() );
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
+		final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		assertEquals(1, col.getConstraint().getDescrs().size());
+		assertEquals("Foo", col.getObjectType());
+		final FieldConstraintDescr fld = (FieldConstraintDescr) col
+				.getConstraint().getDescrs().get(0);
+		final ReturnValueRestrictionDescr retval = (ReturnValueRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        final FieldBindingDescr field = (FieldBindingDescr) and.getDescrs().get( 0 );
-        final PredicateDescr pred = (PredicateDescr) and.getDescrs().get( 1 );
-        assertEquals( "age",
-                      field.getFieldName() );
-        assertEquals( "$age2",
-                      field.getIdentifier() );
-        assertEqualsIgnoreWhitespace( "$age2 == $age1+2",
-                                      (String) pred.getContent() );
-    }
+		assertEquals("a + b", retval.getContent());
+		assertEquals("name", fld.getFieldName());
+		assertEquals("==", retval.getEvaluator());
+	}
 
-    public void testNotWithConstraint() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "not_with_constraint.drl" );
+	public void testWithPredicate() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"with_predicate.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
 
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
+		final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		AndDescr and = (AndDescr) col.getConstraint();
+		assertEquals(2, and.getDescrs().size());
 
-        PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final FieldBindingDescr fieldBinding = (FieldBindingDescr) pattern.getConstraint().getDescrs().get( 0 );
-        assertEquals( "$likes",
-                      fieldBinding.getIdentifier() );
+		final FieldBindingDescr field = (FieldBindingDescr) and.getDescrs()
+				.get(0);
+		final PredicateDescr pred = (PredicateDescr) and.getDescrs().get(1);
+		assertEquals("age", field.getFieldName());
+		assertEquals("$age2", field.getIdentifier());
+		assertEqualsIgnoreWhitespace("$age2 == $age1+2", (String) pred
+				.getContent());
+	}
 
-        final NotDescr not = (NotDescr) rule.getLhs().getDescrs().get( 1 );
-        pattern = (PatternDescr) not.getDescrs().get( 0 );
+	public void testNotWithConstraint() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"not_with_constraint.drl");
 
-        final FieldConstraintDescr fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
-        final VariableRestrictionDescr boundVariable = (VariableRestrictionDescr) fld.getRestrictions().get( 0 );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
 
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      boundVariable.getEvaluator() );
-        assertEquals( "$likes",
-                      boundVariable.getIdentifier() );
-    }
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-    public void testGlobal() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "globals.drl" );
+		PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+		final FieldBindingDescr fieldBinding = (FieldBindingDescr) pattern
+				.getConstraint().getDescrs().get(0);
+		assertEquals("$likes", fieldBinding.getIdentifier());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
+		final NotDescr not = (NotDescr) rule.getLhs().getDescrs().get(1);
+		pattern = (PatternDescr) not.getDescrs().get(0);
 
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final FieldConstraintDescr fld = (FieldConstraintDescr) pattern
+				.getConstraint().getDescrs().get(0);
+		final VariableRestrictionDescr boundVariable = (VariableRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        assertEquals( 1,
-                      pack.getImports().size() );
-        assertEquals( 2,
-                      pack.getGlobals().size() );
+		assertEquals("type", fld.getFieldName());
+		assertEquals("==", boundVariable.getEvaluator());
+		assertEquals("$likes", boundVariable.getIdentifier());
+	}
 
-        final GlobalDescr foo = (GlobalDescr) pack.getGlobals().get( 0 );
-        assertEquals( "java.lang.String",
-                      foo.getType() );
-        assertEquals( "foo",
-                      foo.getIdentifier() );
-        final GlobalDescr bar = (GlobalDescr) pack.getGlobals().get( 1 );
-        assertEquals( "java.lang.Integer",
-                      bar.getType() );
-        assertEquals( "bar",
-                      bar.getIdentifier() );
-    }
+	public void testGlobal() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "globals.drl");
 
-    public void testFunctions() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "functions.drl" );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 2,
-                      pack.getRules().size() );
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final List functions = pack.getFunctions();
-        assertEquals( 2,
-                      functions.size() );
+		assertEquals(1, pack.getImports().size());
+		assertEquals(2, pack.getGlobals().size());
 
-        FunctionDescr func = (FunctionDescr) functions.get( 0 );
-        assertEquals( "functionA",
-                      func.getName() );
-        assertEquals( "String",
-                      func.getReturnType() );
-        assertEquals( 2,
-                      func.getParameterNames().size() );
-        assertEquals( 2,
-                      func.getParameterTypes().size() );
-        assertEquals( 4,
-                      func.getLine() );
-        assertEquals( 0,
-                      func.getColumn() );
+		final GlobalDescr foo = (GlobalDescr) pack.getGlobals().get(0);
+		assertEquals("java.lang.String", foo.getType());
+		assertEquals("foo", foo.getIdentifier());
+		final GlobalDescr bar = (GlobalDescr) pack.getGlobals().get(1);
+		assertEquals("java.lang.Integer", bar.getType());
+		assertEquals("bar", bar.getIdentifier());
+	}
 
-        assertEquals( "String",
-                      func.getParameterTypes().get( 0 ) );
-        assertEquals( "s",
-                      func.getParameterNames().get( 0 ) );
+	public void testFunctions() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "functions.drl");
 
-        assertEquals( "Integer",
-                      func.getParameterTypes().get( 1 ) );
-        assertEquals( "i",
-                      func.getParameterNames().get( 1 ) );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(2, pack.getRules().size());
 
-        assertEqualsIgnoreWhitespace( "foo();",
-                                      func.getText() );
+		final List functions = pack.getFunctions();
+		assertEquals(2, functions.size());
 
-        func = (FunctionDescr) functions.get( 1 );
-        assertEquals( "functionB",
-                      func.getName() );
-        assertEqualsIgnoreWhitespace( "bar();",
-                                      func.getText() );
-    }
+		FunctionDescr func = (FunctionDescr) functions.get(0);
+		assertEquals("functionA", func.getName());
+		assertEquals("String", func.getReturnType());
+		assertEquals(2, func.getParameterNames().size());
+		assertEquals(2, func.getParameterTypes().size());
+		assertEquals(4, func.getLine());
+		assertEquals(0, func.getColumn());
 
-    public void testComment() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "comment.drl" );
+		assertEquals("String", func.getParameterTypes().get(0));
+		assertEquals("s", func.getParameterNames().get(0));
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertNotNull( pack );
+		assertEquals("Integer", func.getParameterTypes().get(1));
+		assertEquals("i", func.getParameterNames().get(1));
 
-        assertEquals( "foo.bar",
-                      pack.getName() );
-    }
+		assertEqualsIgnoreWhitespace("foo();", func.getText());
 
-    public void testAttributes() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "rule_attributes.drl" );
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertEqualsIgnoreWhitespace( "bar();",
-                                      (String) rule.getConsequence() );
+		func = (FunctionDescr) functions.get(1);
+		assertEquals("functionB", func.getName());
+		assertEqualsIgnoreWhitespace("bar();", func.getText());
+	}
 
-        final List attrs = rule.getAttributes();
-        assertEquals( 6,
-                      attrs.size() );
+	public void testComment() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "comment.drl");
 
-        AttributeDescr at = (AttributeDescr) attrs.get( 0 );
-        assertEquals( "salience",
-                      at.getName() );
-        assertEquals( "42",
-                      at.getValue() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertNotNull(pack);
 
-        at = (AttributeDescr) attrs.get( 1 );
-        assertEquals( "agenda-group",
-                      at.getName() );
-        assertEquals( "my_group",
-                      at.getValue() );
+		assertEquals("foo.bar", pack.getName());
+	}
 
-        at = (AttributeDescr) attrs.get( 2 );
-        assertEquals( "no-loop",
-                      at.getName() );
-        assertEquals( "true",
-                      at.getValue() );
+	public void testAttributes() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"rule_attributes.drl");
+		assertEquals("simple_rule", rule.getName());
+		assertEqualsIgnoreWhitespace("bar();", (String) rule.getConsequence());
 
-        at = (AttributeDescr) attrs.get( 3 );
-        assertEquals( "duration",
-                      at.getName() );
-        assertEquals( "42",
-                      at.getValue() );
+		final List attrs = rule.getAttributes();
+		assertEquals(6, attrs.size());
 
-        at = (AttributeDescr) attrs.get( 4 );
-        assertEquals( "activation-group",
-                      at.getName() );
-        assertEquals( "my_activation_group",
-                      at.getValue() );
+		AttributeDescr at = (AttributeDescr) attrs.get(0);
+		assertEquals("salience", at.getName());
+		assertEquals("42", at.getValue());
 
-        at = (AttributeDescr) attrs.get( 5 );
-        assertEquals( "lock-on-active",
-                      at.getName() );
-        assertEquals( "true",
-                      at.getValue() );
-    }
+		at = (AttributeDescr) attrs.get(1);
+		assertEquals("agenda-group", at.getName());
+		assertEquals("my_group", at.getValue());
 
-    public void testAttributes_alternateSyntax() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "rule_attributes_alt.drl" );
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertEqualsIgnoreWhitespace( "bar();",
-                                      (String) rule.getConsequence() );
+		at = (AttributeDescr) attrs.get(2);
+		assertEquals("no-loop", at.getName());
+		assertEquals("true", at.getValue());
 
-        final List attrs = rule.getAttributes();
-        assertEquals( 6,
-                      attrs.size() );
+		at = (AttributeDescr) attrs.get(3);
+		assertEquals("duration", at.getName());
+		assertEquals("42", at.getValue());
 
-        AttributeDescr at = (AttributeDescr) attrs.get( 0 );
-        assertEquals( "salience",
-                      at.getName() );
-        assertEquals( "42",
-                      at.getValue() );
+		at = (AttributeDescr) attrs.get(4);
+		assertEquals("activation-group", at.getName());
+		assertEquals("my_activation_group", at.getValue());
 
-        at = (AttributeDescr) attrs.get( 1 );
-        assertEquals( "agenda-group",
-                      at.getName() );
-        assertEquals( "my_group",
-                      at.getValue() );
+		at = (AttributeDescr) attrs.get(5);
+		assertEquals("lock-on-active", at.getName());
+		assertEquals("true", at.getValue());
+	}
 
-        at = (AttributeDescr) attrs.get( 2 );
-        assertEquals( "no-loop",
-                      at.getName() );
-        assertEquals( "true",
-                      at.getValue() );
+	public void testAttributes_alternateSyntax() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"rule_attributes_alt.drl");
+		assertEquals("simple_rule", rule.getName());
+		assertEqualsIgnoreWhitespace("bar();", (String) rule.getConsequence());
 
-        at = (AttributeDescr) attrs.get( 3 );
-        assertEquals( "lock-on-active",
-                      at.getName() );
-        assertEquals( "true",
-                      at.getValue() );
+		final List attrs = rule.getAttributes();
+		assertEquals(6, attrs.size());
 
-        at = (AttributeDescr) attrs.get( 4 );
-        assertEquals( "duration",
-                      at.getName() );
-        assertEquals( "42",
-                      at.getValue() );
+		AttributeDescr at = (AttributeDescr) attrs.get(0);
+		assertEquals("salience", at.getName());
+		assertEquals("42", at.getValue());
 
-        at = (AttributeDescr) attrs.get( 5 );
-        assertEquals( "activation-group",
-                      at.getName() );
-        assertEquals( "my_activation_group",
-                      at.getValue() );
-    }
+		at = (AttributeDescr) attrs.get(1);
+		assertEquals("agenda-group", at.getName());
+		assertEquals("my_group", at.getValue());
 
-    public void testEnumeration() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "enumeration.drl" );
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
-        final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Foo",
-                      col.getObjectType() );
-        assertEquals( 1,
-                      col.getConstraint().getDescrs().size() );
-        final FieldConstraintDescr fld = (FieldConstraintDescr) col.getConstraint().getDescrs().get( 0 );
-        final QualifiedIdentifierRestrictionDescr lit = (QualifiedIdentifierRestrictionDescr) fld.getRestrictions().get( 0 );
+		at = (AttributeDescr) attrs.get(2);
+		assertEquals("no-loop", at.getName());
+		assertEquals("true", at.getValue());
 
-        assertEquals( "bar",
-                      fld.getFieldName() );
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "Foo.BAR",
-                      lit.getText() );
-    }
+		at = (AttributeDescr) attrs.get(3);
+		assertEquals("lock-on-active", at.getName());
+		assertEquals("true", at.getValue());
 
-    public void testExtraLhsNewline() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "extra_lhs_newline.drl" );
-    }
+		at = (AttributeDescr) attrs.get(4);
+		assertEquals("duration", at.getName());
+		assertEquals("42", at.getValue());
 
-    public void testSoundsLike() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "soundslike_operator.drl" );
+		at = (AttributeDescr) attrs.get(5);
+		assertEquals("activation-group", at.getName());
+		assertEquals("my_activation_group", at.getValue());
+	}
 
-        RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules().get( 0 );
-        PatternDescr pat = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
+	public void testEnumeration() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"enumeration.drl");
+		assertEquals("simple_rule", rule.getName());
+		assertEquals(1, rule.getLhs().getDescrs().size());
+		final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		assertEquals("Foo", col.getObjectType());
+		assertEquals(1, col.getConstraint().getDescrs().size());
+		final FieldConstraintDescr fld = (FieldConstraintDescr) col
+				.getConstraint().getDescrs().get(0);
+		final QualifiedIdentifierRestrictionDescr lit = (QualifiedIdentifierRestrictionDescr) fld
+				.getRestrictions().get(0);
 
-        pat.getConstraint();
-    }
+		assertEquals("bar", fld.getFieldName());
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("Foo.BAR", lit.getText());
+	}
 
-    public void testPackageAttributes() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "package_attributes.drl" );
+	public void testExtraLhsNewline() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"extra_lhs_newline.drl");
+	}
 
-        PackageDescr pkg = this.walker.getPackageDescr();
-        AttributeDescr at = (AttributeDescr) pkg.getAttributes().get( 0 );
-        assertEquals( "agenda-group",
-                      at.getName() );
-        assertEquals( "x",
-                      at.getValue() );
-        at = (AttributeDescr) pkg.getAttributes().get( 1 );
-        assertEquals( "dialect",
-                      at.getName() );
-        assertEquals( "java",
-                      at.getValue() );
+	public void testSoundsLike() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"soundslike_operator.drl");
 
-        assertEquals( 2,
-                      pkg.getRules().size() );
+		RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules()
+				.get(0);
+		PatternDescr pat = (PatternDescr) rule.getLhs().getDescrs().get(0);
 
-        assertEquals( 2,
-                      pkg.getImports().size() );
+		pat.getConstraint();
+	}
 
-        RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( "bar",
-                      rule.getName() );
-        at = (AttributeDescr) rule.getAttributes().get( 0 );
-        assertEquals( "agenda-group",
-                      at.getName() );
-        assertEquals( "x",
-                      at.getValue() );
-        at = (AttributeDescr) rule.getAttributes().get( 1 );
-        assertEquals( "dialect",
-                      at.getName() );
-        assertEquals( "java",
-                      at.getValue() );
+	public void testPackageAttributes() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"package_attributes.drl");
 
-        rule = (RuleDescr) pkg.getRules().get( 1 );
-        assertEquals( "baz",
-                      rule.getName() );
-        at = (AttributeDescr) rule.getAttributes().get( 0 );
-        assertEquals( "dialect",
-                      at.getName() );
-        assertEquals( "mvel",
-                      at.getValue() );
-        at = (AttributeDescr) rule.getAttributes().get( 1 );
-        assertEquals( "agenda-group",
-                      at.getName() );
-        assertEquals( "x",
-                      at.getValue() );
+		PackageDescr pkg = this.walker.getPackageDescr();
+		AttributeDescr at = (AttributeDescr) pkg.getAttributes().get(0);
+		assertEquals("agenda-group", at.getName());
+		assertEquals("x", at.getValue());
+		at = (AttributeDescr) pkg.getAttributes().get(1);
+		assertEquals("dialect", at.getName());
+		assertEquals("java", at.getValue());
 
-    }
+		assertEquals(2, pkg.getRules().size());
 
-    public void testStatementOrdering1() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "statement_ordering_1.drl" );
+		assertEquals(2, pkg.getImports().size());
 
-        final PackageDescr pkg = this.walker.getPackageDescr();
+		RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
+		assertEquals("bar", rule.getName());
+		at = (AttributeDescr) rule.getAttributes().get(0);
+		assertEquals("agenda-group", at.getName());
+		assertEquals("x", at.getValue());
+		at = (AttributeDescr) rule.getAttributes().get(1);
+		assertEquals("dialect", at.getName());
+		assertEquals("java", at.getValue());
 
-        assertEquals( 2,
-                      pkg.getRules().size() );
+		rule = (RuleDescr) pkg.getRules().get(1);
+		assertEquals("baz", rule.getName());
+		at = (AttributeDescr) rule.getAttributes().get(0);
+		assertEquals("dialect", at.getName());
+		assertEquals("mvel", at.getValue());
+		at = (AttributeDescr) rule.getAttributes().get(1);
+		assertEquals("agenda-group", at.getName());
+		assertEquals("x", at.getValue());
 
-        assertEquals( "foo",
-                      ((RuleDescr) pkg.getRules().get( 0 )).getName() );
-        assertEquals( "bar",
-                      ((RuleDescr) pkg.getRules().get( 1 )).getName() );
+	}
 
-        assertEquals( 2,
-                      pkg.getFunctions().size() );
+	public void testStatementOrdering1() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"statement_ordering_1.drl");
 
-        assertEquals( "cheeseIt",
-                      ((FunctionDescr) pkg.getFunctions().get( 0 )).getName() );
-        assertEquals( "uncheeseIt",
-                      ((FunctionDescr) pkg.getFunctions().get( 1 )).getName() );
+		final PackageDescr pkg = this.walker.getPackageDescr();
 
-        assertEquals( 4,
-                      pkg.getImports().size() );
-        assertEquals( "im.one",
-                      ((ImportDescr) pkg.getImports().get( 0 )).getTarget() );
-        assertEquals( "im.two",
-                      ((ImportDescr) pkg.getImports().get( 1 )).getTarget() );
-        assertEquals( "im.three",
-                      ((ImportDescr) pkg.getImports().get( 2 )).getTarget() );
-        assertEquals( "im.four",
-                      ((ImportDescr) pkg.getImports().get( 3 )).getTarget() );
-    }
+		assertEquals(2, pkg.getRules().size());
 
-    public void testRuleNamesStartingWithNumbers() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "rule_names_number_prefix.drl" );
+		assertEquals("foo", ((RuleDescr) pkg.getRules().get(0)).getName());
+		assertEquals("bar", ((RuleDescr) pkg.getRules().get(1)).getName());
 
-        final PackageDescr pkg = this.walker.getPackageDescr();
+		assertEquals(2, pkg.getFunctions().size());
 
-        assertEquals( 2,
-                      pkg.getRules().size() );
+		assertEquals("cheeseIt", ((FunctionDescr) pkg.getFunctions().get(0))
+				.getName());
+		assertEquals("uncheeseIt", ((FunctionDescr) pkg.getFunctions().get(1))
+				.getName());
 
-        assertEquals( "1. Do Stuff!",
-                      ((RuleDescr) pkg.getRules().get( 0 )).getName() );
-        assertEquals( "2. Do More Stuff!",
-                      ((RuleDescr) pkg.getRules().get( 1 )).getName() );
-    }
+		assertEquals(4, pkg.getImports().size());
+		assertEquals("im.one", ((ImportDescr) pkg.getImports().get(0))
+				.getTarget());
+		assertEquals("im.two", ((ImportDescr) pkg.getImports().get(1))
+				.getTarget());
+		assertEquals("im.three", ((ImportDescr) pkg.getImports().get(2))
+				.getTarget());
+		assertEquals("im.four", ((ImportDescr) pkg.getImports().get(3))
+				.getTarget());
+	}
 
-    public void testEvalWithNewline() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "eval_with_newline.drl" );
-    }
+	public void testRuleNamesStartingWithNumbers() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"rule_names_number_prefix.drl");
 
-    public void testEndPosition() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "test_EndPosition.drl" );
-        final RuleDescr rule = (RuleDescr) this.walker.getPackageDescr().getRules().get( 0 );
-        final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        // assertEquals( 6,
-        // col.getLine() );
-        //
-        // assertEquals( 8,
-        // col.getEndLine() );
-    }
+		final PackageDescr pkg = this.walker.getPackageDescr();
 
-    public void testQualifiedClassname() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "qualified_classname.drl" );
+		assertEquals(2, pkg.getRules().size());
 
-        final PackageDescr pkg = this.walker.getPackageDescr();
-        final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
+		assertEquals("1. Do Stuff!", ((RuleDescr) pkg.getRules().get(0))
+				.getName());
+		assertEquals("2. Do More Stuff!", ((RuleDescr) pkg.getRules().get(1))
+				.getName());
+	}
 
-        final PatternDescr p = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
+	public void testEvalWithNewline() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"eval_with_newline.drl");
+	}
 
-        assertEquals( "com.cheeseco.Cheese",
-                      p.getObjectType() );
-    }
+	public void testEndPosition() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"test_EndPosition.drl");
+		final RuleDescr rule = (RuleDescr) this.walker.getPackageDescr()
+				.getRules().get(0);
+		final PatternDescr col = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		// assertEquals( 6,
+		// col.getLine() );
+		//
+		// assertEquals( 8,
+		// col.getEndLine() );
+	}
 
-    public void testAccumulate() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "accumulate.drl" );
+	public void testQualifiedClassname() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"qualified_classname.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PackageDescr pkg = this.walker.getPackageDescr();
+		final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
 
-        final PatternDescr outPattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final AccumulateDescr accum = (AccumulateDescr) outPattern.getSource();
-        assertEqualsIgnoreWhitespace( "int x = 0 ;",
-                                      accum.getInitCode() );
-        assertEqualsIgnoreWhitespace( "x++;",
-                                      accum.getActionCode() );
-        assertNull( accum.getReverseCode() );
-        assertEqualsIgnoreWhitespace( "new Integer(x)",
-                                      accum.getResultCode() );
+		final PatternDescr p = (PatternDescr) rule.getLhs().getDescrs().get(0);
 
-        assertFalse( accum.isExternalFunction() );
+		assertEquals("com.cheeseco.Cheese", p.getObjectType());
+	}
 
-        final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-    }
+	public void testAccumulate() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "accumulate.drl");
 
-    public void testAccumulateWithBindings() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "accumulate_with_bindings.drl" );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PatternDescr outPattern = (PatternDescr) rule.getLhs()
+				.getDescrs().get(0);
+		final AccumulateDescr accum = (AccumulateDescr) outPattern.getSource();
+		assertEqualsIgnoreWhitespace("int x = 0 ;", accum.getInitCode());
+		assertEqualsIgnoreWhitespace("x++;", accum.getActionCode());
+		assertNull(accum.getReverseCode());
+		assertEqualsIgnoreWhitespace("new Integer(x)", accum.getResultCode());
 
-        final PatternDescr outPattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final AccumulateDescr accum = (AccumulateDescr) outPattern.getSource();
-        assertEqualsIgnoreWhitespace( "$counter",
-                                      outPattern.getIdentifier() );
-        assertEqualsIgnoreWhitespace( "int x = 0 ;",
-                                      accum.getInitCode() );
-        assertEqualsIgnoreWhitespace( "x++;",
-                                      accum.getActionCode() );
-        assertEqualsIgnoreWhitespace( "new Integer(x)",
-                                      accum.getResultCode() );
+		assertFalse(accum.isExternalFunction());
 
-        final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-    }
+		final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
+		assertEquals("Person", pattern.getObjectType());
+	}
 
-    public void testCollect() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "collect.drl" );
+	public void testAccumulateWithBindings() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"accumulate_with_bindings.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final PatternDescr outPattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final CollectDescr collect = (CollectDescr) outPattern.getSource();
+		final PatternDescr outPattern = (PatternDescr) rule.getLhs()
+				.getDescrs().get(0);
+		final AccumulateDescr accum = (AccumulateDescr) outPattern.getSource();
+		assertEqualsIgnoreWhitespace("$counter", outPattern.getIdentifier());
+		assertEqualsIgnoreWhitespace("int x = 0 ;", accum.getInitCode());
+		assertEqualsIgnoreWhitespace("x++;", accum.getActionCode());
+		assertEqualsIgnoreWhitespace("new Integer(x)", accum.getResultCode());
 
-        final PatternDescr pattern = (PatternDescr) collect.getInputPattern();
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-    }
+		final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
+		assertEquals("Person", pattern.getObjectType());
+	}
 
-    public void testPredicate() throws Exception {
-        final PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                           "lhs_pattern",
-                                                           "Foo ($var : attr -> ( $var.equals(\"xyz\") ))" );
+	public void testCollect() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "collect.drl");
 
-        final List constraints = pattern.getConstraint().getDescrs();
-        assertEquals( 2,
-                      constraints.size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final FieldBindingDescr field = (FieldBindingDescr) constraints.get( 0 );
-        final PredicateDescr predicate = (PredicateDescr) constraints.get( 1 );
-        assertEquals( "$var",
-                      field.getIdentifier() );
-        assertEquals( "attr",
-                      field.getFieldName() );
-        assertEquals( " $var.equals(\"xyz\") ",
-                      predicate.getContent() );
-    }
+		final PatternDescr outPattern = (PatternDescr) rule.getLhs()
+				.getDescrs().get(0);
+		final CollectDescr collect = (CollectDescr) outPattern.getSource();
 
-    public void testPredicate2() throws Exception {
-        // predicates are also prefixed by the eval keyword
-        final PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                           "lhs_pattern",
-                                                           "Foo(eval( $var.equals(\"xyz\") ))" );
+		final PatternDescr pattern = (PatternDescr) collect.getInputPattern();
+		assertEquals("Person", pattern.getObjectType());
+	}
 
-        final List constraints = pattern.getConstraint().getDescrs();
-        assertEquals( 1,
-                      constraints.size() );
+	public void testPredicate() throws Exception {
+		final PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", "Foo ($var : attr -> ( $var.equals(\"xyz\") ))");
 
-        final PredicateDescr predicate = (PredicateDescr) constraints.get( 0 );
-        assertEquals( " $var.equals(\"xyz\") ",
-                      predicate.getContent() );
-    }
+		final List constraints = pattern.getConstraint().getDescrs();
+		assertEquals(2, constraints.size());
 
-    public void testEscapedStrings() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "escaped-string.drl" );
+		final FieldBindingDescr field = (FieldBindingDescr) constraints.get(0);
+		final PredicateDescr predicate = (PredicateDescr) constraints.get(1);
+		assertEquals("$var", field.getIdentifier());
+		assertEquals("attr", field.getFieldName());
+		assertEquals(" $var.equals(\"xyz\") ", predicate.getContent());
+	}
 
-        assertNotNull( rule );
+	public void testPredicate2() throws Exception {
+		// predicates are also prefixed by the eval keyword
+		final PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", "Foo(eval( $var.equals(\"xyz\") ))");
 
-        assertEquals( "test_Quotes",
-                      rule.getName() );
+		final List constraints = pattern.getConstraint().getDescrs();
+		assertEquals(1, constraints.size());
 
-        final String expected = "String s = \"\\\"\\n\\t\\\\\";";
+		final PredicateDescr predicate = (PredicateDescr) constraints.get(0);
+		assertEquals(" $var.equals(\"xyz\") ", predicate.getContent());
+	}
 
-        assertEqualsIgnoreWhitespace( expected,
-                                      (String) rule.getConsequence() );
-    }
+	public void testEscapedStrings() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"escaped-string.drl");
 
-    public void testNestedCEs() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "nested_conditional_elements.drl" );
+		assertNotNull(rule);
 
-        assertNotNull( rule );
+		assertEquals("test_Quotes", rule.getName());
 
-        final AndDescr root = rule.getLhs();
-        final NotDescr not1 = (NotDescr) root.getDescrs().get( 0 );
-        final AndDescr and1 = (AndDescr) not1.getDescrs().get( 0 );
+		final String expected = "String s = \"\\\"\\n\\t\\\\\";";
 
-        final PatternDescr state = (PatternDescr) and1.getDescrs().get( 0 );
-        final NotDescr not2 = (NotDescr) and1.getDescrs().get( 1 );
-        final AndDescr and2 = (AndDescr) not2.getDescrs().get( 0 );
-        final PatternDescr person = (PatternDescr) and2.getDescrs().get( 0 );
-        final PatternDescr cheese = (PatternDescr) and2.getDescrs().get( 1 );
+		assertEqualsIgnoreWhitespace(expected, (String) rule.getConsequence());
+	}
 
-        final PatternDescr person2 = (PatternDescr) root.getDescrs().get( 1 );
-        final OrDescr or = (OrDescr) root.getDescrs().get( 2 );
-        final PatternDescr cheese2 = (PatternDescr) or.getDescrs().get( 0 );
-        final PatternDescr cheese3 = (PatternDescr) or.getDescrs().get( 1 );
+	public void testNestedCEs() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"nested_conditional_elements.drl");
 
-        assertEquals( state.getObjectType(),
-                      "State" );
-        assertEquals( person.getObjectType(),
-                      "Person" );
-        assertEquals( cheese.getObjectType(),
-                      "Cheese" );
-        assertEquals( person2.getObjectType(),
-                      "Person" );
-        assertEquals( cheese2.getObjectType(),
-                      "Cheese" );
-        assertEquals( cheese3.getObjectType(),
-                      "Cheese" );
-    }
+		assertNotNull(rule);
 
-    public void testForall() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "forall.drl" );
+		final AndDescr root = rule.getLhs();
+		final NotDescr not1 = (NotDescr) root.getDescrs().get(0);
+		final AndDescr and1 = (AndDescr) not1.getDescrs().get(0);
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PatternDescr state = (PatternDescr) and1.getDescrs().get(0);
+		final NotDescr not2 = (NotDescr) and1.getDescrs().get(1);
+		final AndDescr and2 = (AndDescr) not2.getDescrs().get(0);
+		final PatternDescr person = (PatternDescr) and2.getDescrs().get(0);
+		final PatternDescr cheese = (PatternDescr) and2.getDescrs().get(1);
 
-        final ForallDescr forall = (ForallDescr) rule.getLhs().getDescrs().get( 0 );
+		final PatternDescr person2 = (PatternDescr) root.getDescrs().get(1);
+		final OrDescr or = (OrDescr) root.getDescrs().get(2);
+		final PatternDescr cheese2 = (PatternDescr) or.getDescrs().get(0);
+		final PatternDescr cheese3 = (PatternDescr) or.getDescrs().get(1);
 
-        assertEquals( 2,
-                      forall.getDescrs().size() );
-        final PatternDescr pattern = forall.getBasePattern();
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-        final List remaining = forall.getRemainingPatterns();
-        assertEquals( 1,
-                      remaining.size() );
-        final PatternDescr cheese = (PatternDescr) remaining.get( 0 );
-        assertEquals( "Cheese",
-                      cheese.getObjectType() );
-    }
+		assertEquals(state.getObjectType(), "State");
+		assertEquals(person.getObjectType(), "Person");
+		assertEquals(cheese.getObjectType(), "Cheese");
+		assertEquals(person2.getObjectType(), "Person");
+		assertEquals(cheese2.getObjectType(), "Cheese");
+		assertEquals(cheese3.getObjectType(), "Cheese");
+	}
 
-    public void testMemberof() throws Exception {
-        final String text = "Country( $cities : city )\nPerson( city memberOf $cities )\n";
-        AndDescr descrs = (AndDescr) parse( "normal_lhs_block",
-                                            "lhs_block",
-                                            text );
+	public void testForall() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "forall.drl");
 
-        assertEquals( 2,
-                      descrs.getDescrs().size() );
-        PatternDescr pat = (PatternDescr) descrs.getDescrs().get( 1 );
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat.getConstraint().getDescrs().get( 0 );
-        VariableRestrictionDescr restr = (VariableRestrictionDescr) fieldConstr.getRestrictions().get( 0 );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        assertEquals( "memberOf",
-                      restr.getEvaluator() );
-        assertFalse( restr.isNegated() );
-        assertEquals( "$cities",
-                      restr.getIdentifier() );
-    }
+		final ForallDescr forall = (ForallDescr) rule.getLhs().getDescrs().get(
+				0);
 
-    public void testNotMemberof() throws Exception {
-        final String text = "Country( $cities : city )\nPerson( city not memberOf $cities )\n";
-        AndDescr descrs = (AndDescr) parse( "normal_lhs_block",
-                                            "lhs_block",
-                                            text );
+		assertEquals(2, forall.getDescrs().size());
+		final PatternDescr pattern = forall.getBasePattern();
+		assertEquals("Person", pattern.getObjectType());
+		final List remaining = forall.getRemainingPatterns();
+		assertEquals(1, remaining.size());
+		final PatternDescr cheese = (PatternDescr) remaining.get(0);
+		assertEquals("Cheese", cheese.getObjectType());
+	}
 
-        assertEquals( 2,
-                      descrs.getDescrs().size() );
-        PatternDescr pat = (PatternDescr) descrs.getDescrs().get( 1 );
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat.getConstraint().getDescrs().get( 0 );
-        VariableRestrictionDescr restr = (VariableRestrictionDescr) fieldConstr.getRestrictions().get( 0 );
+	public void testMemberof() throws Exception {
+		final String text = "Country( $cities : city )\nPerson( city memberOf $cities )\n";
+		AndDescr descrs = (AndDescr) parse("normal_lhs_block", "lhs_block",
+				text);
 
-        assertEquals( "memberOf",
-                      restr.getEvaluator() );
-        assertTrue( restr.isNegated() );
-        assertEquals( "$cities",
-                      restr.getIdentifier() );
-    }
+		assertEquals(2, descrs.getDescrs().size());
+		PatternDescr pat = (PatternDescr) descrs.getDescrs().get(1);
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat
+				.getConstraint().getDescrs().get(0);
+		VariableRestrictionDescr restr = (VariableRestrictionDescr) fieldConstr
+				.getRestrictions().get(0);
 
-    public void testInOperator() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "in_operator_test.drl" );
+		assertEquals("memberOf", restr.getEvaluator());
+		assertFalse(restr.isNegated());
+		assertEquals("$cities", restr.getIdentifier());
+	}
 
-        assertNotNull( rule );
+	public void testNotMemberof() throws Exception {
+		final String text = "Country( $cities : city )\nPerson( city not memberOf $cities )\n";
+		AndDescr descrs = (AndDescr) parse("normal_lhs_block", "lhs_block",
+				text);
 
-        assertEqualsIgnoreWhitespace( "consequence();",
-                                      (String) rule.getConsequence() );
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		assertEquals(2, descrs.getDescrs().size());
+		PatternDescr pat = (PatternDescr) descrs.getDescrs().get(1);
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat
+				.getConstraint().getDescrs().get(0);
+		VariableRestrictionDescr restr = (VariableRestrictionDescr) fieldConstr
+				.getRestrictions().get(0);
 
-        // The first pattern, with 2 restrictions on a single field (plus a
-        // connective)
-        PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
+		assertEquals("memberOf", restr.getEvaluator());
+		assertTrue(restr.isNegated());
+		assertEquals("$cities", restr.getIdentifier());
+	}
 
-        FieldConstraintDescr fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
-        assertEquals( RestrictionConnectiveDescr.AND,
-                      fld.getRestriction().getConnective() );
-        assertEquals( 2,
-                      fld.getRestrictions().size() );
-        assertEquals( "age",
-                      fld.getFieldName() );
+	public void testInOperator() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"in_operator_test.drl");
 
-        LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( ">",
-                      lit.getEvaluator() );
-        assertEquals( "30",
-                      lit.getText() );
+		assertNotNull(rule);
 
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 1 );
-        assertEquals( "<",
-                      lit.getEvaluator() );
-        assertEquals( "40",
-                      lit.getText() );
+		assertEqualsIgnoreWhitespace("consequence();", (String) rule
+				.getConsequence());
+		assertEquals("simple_rule", rule.getName());
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-        // the second col, with 2 fields, the first with 2 restrictions, the
-        // second field with one
-        pattern = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Vehicle",
-                      pattern.getObjectType() );
-        assertEquals( 2,
-                      pattern.getConstraint().getDescrs().size() );
+		// The first pattern, with 2 restrictions on a single field (plus a
+		// connective)
+		PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals("Person", pattern.getObjectType());
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
 
-        fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( 1,
-                      fld.getRestrictions().size() );
+		FieldConstraintDescr fld = (FieldConstraintDescr) pattern
+				.getConstraint().getDescrs().get(0);
+		assertEquals(RestrictionConnectiveDescr.AND, fld.getRestriction()
+				.getConnective());
+		assertEquals(2, fld.getRestrictions().size());
+		assertEquals("age", fld.getFieldName());
 
-        RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fld.getRestrictions().get( 0 );
-        assertEquals( RestrictionConnectiveDescr.OR,
-                      or.getConnective() );
-        assertEquals( 2,
-                      or.getRestrictions().size() );
+		LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
+		assertEquals(">", lit.getEvaluator());
+		assertEquals("30", lit.getText());
 
-        lit = (LiteralRestrictionDescr) or.getRestrictions().get( 0 );
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "sedan",
-                      lit.getText() );
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(1);
+		assertEquals("<", lit.getEvaluator());
+		assertEquals("40", lit.getText());
 
-        lit = (LiteralRestrictionDescr) or.getRestrictions().get( 1 );
-        assertEquals( "==",
-                      lit.getEvaluator() );
-        assertEquals( "wagon",
-                      lit.getText() );
+		// the second col, with 2 fields, the first with 2 restrictions, the
+		// second field with one
+		pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
+		assertEquals("Vehicle", pattern.getObjectType());
+		assertEquals(2, pattern.getConstraint().getDescrs().size());
 
-        // now the second field
-        fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 1 );
-        assertEquals( 1,
-                      fld.getRestrictions().size() );
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( "<",
-                      lit.getEvaluator() );
-        assertEquals( "3",
-                      lit.getText() );
+		fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get(0);
+		assertEquals("type", fld.getFieldName());
+		assertEquals(1, fld.getRestrictions().size());
 
-    }
+		RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fld
+				.getRestrictions().get(0);
+		assertEquals(RestrictionConnectiveDescr.OR, or.getConnective());
+		assertEquals(2, or.getRestrictions().size());
 
-    public void testNotInOperator() throws Exception {
-        final RuleDescr rule = (RuleDescr) parseResource( "rule",
-                                                          "rule",
-                                                          "notin_operator_test.drl" );
+		lit = (LiteralRestrictionDescr) or.getRestrictions().get(0);
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("sedan", lit.getText());
 
-        assertNotNull( rule );
+		lit = (LiteralRestrictionDescr) or.getRestrictions().get(1);
+		assertEquals("==", lit.getEvaluator());
+		assertEquals("wagon", lit.getText());
 
-        assertEqualsIgnoreWhitespace( "consequence();",
-                                      (String) rule.getConsequence() );
-        assertEquals( "simple_rule",
-                      rule.getName() );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		// now the second field
+		fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get(1);
+		assertEquals(1, fld.getRestrictions().size());
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+		assertEquals("<", lit.getEvaluator());
+		assertEquals("3", lit.getText());
 
-        // The first pattern, with 2 restrictions on a single field (plus a
-        // connective)
-        PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-        assertEquals( 1,
-                      pattern.getConstraint().getDescrs().size() );
+	}
 
-        FieldConstraintDescr fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
-        assertEquals( 2,
-                      fld.getRestrictions().size() );
-        assertEquals( "age",
-                      fld.getFieldName() );
+	public void testNotInOperator() throws Exception {
+		final RuleDescr rule = (RuleDescr) parseResource("rule", "rule",
+				"notin_operator_test.drl");
 
-        LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( ">",
-                      lit.getEvaluator() );
-        assertEquals( "30",
-                      lit.getText() );
+		assertNotNull(rule);
 
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 1 );
-        assertEquals( "<",
-                      lit.getEvaluator() );
-        assertEquals( "40",
-                      lit.getText() );
+		assertEqualsIgnoreWhitespace("consequence();", (String) rule
+				.getConsequence());
+		assertEquals("simple_rule", rule.getName());
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-        // the second col, with 2 fields, the first with 2 restrictions, the
-        // second field with one
-        pattern = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "Vehicle",
-                      pattern.getObjectType() );
-        assertEquals( 2,
-                      pattern.getConstraint().getDescrs().size() );
+		// The first pattern, with 2 restrictions on a single field (plus a
+		// connective)
+		PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
+		assertEquals("Person", pattern.getObjectType());
+		assertEquals(1, pattern.getConstraint().getDescrs().size());
 
-        fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
-        assertEquals( 2,
-                      fld.getRestrictions().size() );
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( "type",
-                      fld.getFieldName() );
-        assertEquals( "!=",
-                      lit.getEvaluator() );
-        assertEquals( "sedan",
-                      lit.getText() );
+		FieldConstraintDescr fld = (FieldConstraintDescr) pattern
+				.getConstraint().getDescrs().get(0);
+		assertEquals(2, fld.getRestrictions().size());
+		assertEquals("age", fld.getFieldName());
 
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 1 );
-        assertEquals( "!=",
-                      lit.getEvaluator() );
-        assertEquals( "wagon",
-                      lit.getText() );
+		LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld
+				.getRestrictions().get(0);
+		assertEquals(">", lit.getEvaluator());
+		assertEquals("30", lit.getText());
 
-        // now the second field
-        fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 1 );
-        assertEquals( 1,
-                      fld.getRestrictions().size() );
-        lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-        assertEquals( "<",
-                      lit.getEvaluator() );
-        assertEquals( "3",
-                      lit.getText() );
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(1);
+		assertEquals("<", lit.getEvaluator());
+		assertEquals("40", lit.getText());
 
-    }
+		// the second col, with 2 fields, the first with 2 restrictions, the
+		// second field with one
+		pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
+		assertEquals("Vehicle", pattern.getObjectType());
+		assertEquals(2, pattern.getConstraint().getDescrs().size());
 
-    public void testCheckOrDescr() throws Exception {
-        final String text = "Person( eval( age == 25 ) || ( eval( name.equals( \"bob\" ) ) && eval( age == 30 ) ) )";
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get(0);
+		assertEquals(2, fld.getRestrictions().size());
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+		assertEquals("type", fld.getFieldName());
+		assertEquals("!=", lit.getEvaluator());
+		assertEquals("sedan", lit.getText());
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        assertEquals( pattern.getConstraint().getClass(),
-                      org.drools.lang.descr.AndDescr.class );
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(1);
+		assertEquals("!=", lit.getEvaluator());
+		assertEquals("wagon", lit.getText());
 
-        assertEquals( pattern.getConstraint().getDescrs().get( 0 ).getClass(),
-                      org.drools.lang.descr.OrDescr.class );
+		// now the second field
+		fld = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get(1);
+		assertEquals(1, fld.getRestrictions().size());
+		lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+		assertEquals("<", lit.getEvaluator());
+		assertEquals("3", lit.getText());
 
-        OrDescr orDescr = (OrDescr) pattern.getConstraint().getDescrs().get( 0 );
-        assertEquals( orDescr.getDescrs().get( 0 ).getClass(),
-                      org.drools.lang.descr.PredicateDescr.class );
-    }
+	}
 
-    public void testConstraintAndConnective() throws Exception {
-        final String text = "Person( age < 42 && location==\"atlanta\")";
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+	public void testCheckOrDescr() throws Exception {
+		final String text = "Person( eval( age == 25 ) || ( eval( name.equals( \"bob\" ) ) && eval( age == 30 ) ) )";
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        assertEquals( 2,
-                      pattern.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        fcd = (FieldConstraintDescr) pattern.getDescrs().get( 1 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-    }
+		assertEquals(1, pattern.getDescrs().size());
+		assertEquals(pattern.getConstraint().getClass(),
+				org.drools.lang.descr.AndDescr.class);
 
-    public void testConstraintOrConnective() throws Exception {
-        final String text = "Person( age < 42 || location==\"atlanta\")";
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		assertEquals(pattern.getConstraint().getDescrs().get(0).getClass(),
+				org.drools.lang.descr.OrDescr.class);
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        OrDescr or = (OrDescr) pattern.getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) or.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        fcd = (FieldConstraintDescr) or.getDescrs().get( 1 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-    }
+		OrDescr orDescr = (OrDescr) pattern.getConstraint().getDescrs().get(0);
+		assertEquals(orDescr.getDescrs().get(0).getClass(),
+				org.drools.lang.descr.PredicateDescr.class);
+	}
 
-    public void testConstraintConnectivesPrecedence() throws Exception {
-        final String text = "Person( age < 42 && location==\"atlanta\" || age > 20 && location==\"Seatle\" || location == \"Chicago\")";
+	public void testConstraintAndConnective() throws Exception {
+		final String text = "Person( age < 42 && location==\"atlanta\")";
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		assertEquals(2, pattern.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs()
+				.get(0);
+		assertEquals("age", fcd.getFieldName());
+		fcd = (FieldConstraintDescr) pattern.getDescrs().get(1);
+		assertEquals("location", fcd.getFieldName());
+	}
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        OrDescr or = (OrDescr) pattern.getDescrs().get( 0 );
-        assertEquals( 3,
-                      or.getDescrs().size() );
+	public void testConstraintOrConnective() throws Exception {
+		final String text = "Person( age < 42 || location==\"atlanta\")";
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        AndDescr and = (AndDescr) or.getDescrs().get( 0 );
-        assertEquals( 2,
-                      and.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( "<",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "42",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        fcd = (FieldConstraintDescr) and.getDescrs().get( 1 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "atlanta",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		assertEquals(1, pattern.getDescrs().size());
+		OrDescr or = (OrDescr) pattern.getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) or.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
+		fcd = (FieldConstraintDescr) or.getDescrs().get(1);
+		assertEquals("location", fcd.getFieldName());
+	}
 
-        and = (AndDescr) or.getDescrs().get( 1 );
-        assertEquals( 2,
-                      and.getDescrs().size() );
-        fcd = (FieldConstraintDescr) and.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( ">",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "20",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        fcd = (FieldConstraintDescr) and.getDescrs().get( 1 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "Seatle",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+	public void testConstraintConnectivesPrecedence() throws Exception {
+		final String text = "Person( age < 42 && location==\"atlanta\" || age > 20 && location==\"Seatle\" || location == \"Chicago\")";
 
-        fcd = (FieldConstraintDescr) or.getDescrs().get( 2 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "Chicago",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-    }
+		assertEquals(1, pattern.getDescrs().size());
+		OrDescr or = (OrDescr) pattern.getDescrs().get(0);
+		assertEquals(3, or.getDescrs().size());
 
-    public void testConstraintConnectivesPrecedenceWithBracks() throws Exception {
-        final String text = "Person( age < 42 && ( location==\"atlanta\" || age > 20 && location==\"Seatle\") || location == \"Chicago\")";
+		AndDescr and = (AndDescr) or.getDescrs().get(0);
+		assertEquals(2, and.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) and.getDescrs()
+				.get(0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals("<", ((LiteralRestrictionDescr) fcd.getRestrictions().get(
+				0)).getEvaluator());
+		assertEquals("42", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		fcd = (FieldConstraintDescr) and.getDescrs().get(1);
+		assertEquals("location", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("atlanta", ((LiteralRestrictionDescr) fcd
+				.getRestrictions().get(0)).getText());
 
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		and = (AndDescr) or.getDescrs().get(1);
+		assertEquals(2, and.getDescrs().size());
+		fcd = (FieldConstraintDescr) and.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals(">", ((LiteralRestrictionDescr) fcd.getRestrictions().get(
+				0)).getEvaluator());
+		assertEquals("20", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		fcd = (FieldConstraintDescr) and.getDescrs().get(1);
+		assertEquals("location", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("Seatle", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        OrDescr or1 = (OrDescr) pattern.getDescrs().get( 0 );
-        assertEquals( 2,
-                      or1.getDescrs().size() );
+		fcd = (FieldConstraintDescr) or.getDescrs().get(2);
+		assertEquals("location", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("Chicago", ((LiteralRestrictionDescr) fcd
+				.getRestrictions().get(0)).getText());
 
-        AndDescr and1 = (AndDescr) or1.getDescrs().get( 0 );
-        assertEquals( 2,
-                      and1.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) and1.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( "<",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "42",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+	}
 
-        OrDescr or2 = (OrDescr) and1.getDescrs().get( 1 );
-        fcd = (FieldConstraintDescr) or2.getDescrs().get( 0 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "atlanta",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+	public void testConstraintConnectivesPrecedenceWithBracks()
+			throws Exception {
+		final String text = "Person( age < 42 && ( location==\"atlanta\" || age > 20 && location==\"Seatle\") || location == \"Chicago\")";
 
-        AndDescr and2 = (AndDescr) or2.getDescrs().get( 1 );
-        assertEquals( 2,
-                      and2.getDescrs().size() );
-        fcd = (FieldConstraintDescr) and2.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( ">",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "20",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        fcd = (FieldConstraintDescr) and2.getDescrs().get( 1 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "Seatle",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        fcd = (FieldConstraintDescr) or1.getDescrs().get( 1 );
-        assertEquals( "location",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "Chicago",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-    }
+		assertEquals(1, pattern.getDescrs().size());
+		OrDescr or1 = (OrDescr) pattern.getDescrs().get(0);
+		assertEquals(2, or1.getDescrs().size());
 
-    public void testConstraintConnectivesPrecedenceWithBracks2() throws Exception {
-        final String text = "Person( ( age == 70 && hair == \"black\" ) || ( age == 40 && hair == \"pink\" ) || ( age == 12 && ( hair == \"yellow\" || hair == \"blue\" ) ) )";
+		AndDescr and1 = (AndDescr) or1.getDescrs().get(0);
+		assertEquals(2, and1.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) and1.getDescrs().get(
+				0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals("<", ((LiteralRestrictionDescr) fcd.getRestrictions().get(
+				0)).getEvaluator());
+		assertEquals("42", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		OrDescr or2 = (OrDescr) and1.getDescrs().get(1);
+		fcd = (FieldConstraintDescr) or2.getDescrs().get(0);
+		assertEquals("location", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("atlanta", ((LiteralRestrictionDescr) fcd
+				.getRestrictions().get(0)).getText());
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        OrDescr or1 = (OrDescr) pattern.getDescrs().get( 0 );
-        assertEquals( 3,
-                      or1.getDescrs().size() );
+		AndDescr and2 = (AndDescr) or2.getDescrs().get(1);
+		assertEquals(2, and2.getDescrs().size());
+		fcd = (FieldConstraintDescr) and2.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals(">", ((LiteralRestrictionDescr) fcd.getRestrictions().get(
+				0)).getEvaluator());
+		assertEquals("20", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		fcd = (FieldConstraintDescr) and2.getDescrs().get(1);
+		assertEquals("location", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("Seatle", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        AndDescr and1 = (AndDescr) or1.getDescrs().get( 0 );
-        AndDescr and2 = (AndDescr) or1.getDescrs().get( 1 );
-        AndDescr and3 = (AndDescr) or1.getDescrs().get( 2 );
+		fcd = (FieldConstraintDescr) or1.getDescrs().get(1);
+		assertEquals("location", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("Chicago", ((LiteralRestrictionDescr) fcd
+				.getRestrictions().get(0)).getText());
+	}
 
-        assertEquals( 2,
-                      and1.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) and1.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "70",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        fcd = (FieldConstraintDescr) and1.getDescrs().get( 1 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "black",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+	public void testConstraintConnectivesPrecedenceWithBracks2()
+			throws Exception {
+		final String text = "Person( ( age == 70 && hair == \"black\" ) || ( age == 40 && hair == \"pink\" ) || ( age == 12 && ( hair == \"yellow\" || hair == \"blue\" ) ) )";
 
-        assertEquals( 2,
-                      and2.getDescrs().size() );
-        fcd = (FieldConstraintDescr) and2.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "40",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        fcd = (FieldConstraintDescr) and2.getDescrs().get( 1 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "pink",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        assertEquals( 2,
-                      and3.getDescrs().size() );
-        fcd = (FieldConstraintDescr) and3.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "12",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        OrDescr or2 = (OrDescr) and3.getDescrs().get( 1 );
-        fcd = (FieldConstraintDescr) or2.getDescrs().get( 0 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "yellow",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-        fcd = (FieldConstraintDescr) or2.getDescrs().get( 1 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "blue",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
-    }
+		assertEquals(1, pattern.getDescrs().size());
+		OrDescr or1 = (OrDescr) pattern.getDescrs().get(0);
+		assertEquals(3, or1.getDescrs().size());
 
-    public void testRestrictionConnectives() throws Exception {
+		AndDescr and1 = (AndDescr) or1.getDescrs().get(0);
+		AndDescr and2 = (AndDescr) or1.getDescrs().get(1);
+		AndDescr and3 = (AndDescr) or1.getDescrs().get(2);
 
-        // the expression bellow must generate the following tree:
-        //
-        // AND
-        // |
-        // OR
-        // /---------------+-------------------\
-        // AND AND AND
-        // /---+---\ /---+---\ /---+---\
-        // FC FC FC FC FC OR
-        // /---+---\
-        // FC FC
-        //
-        final String text = "Person( ( age ( > 60 && < 70 ) || ( > 50 && < 55 ) && hair == \"black\" ) || ( age == 40 && hair == \"pink\" ) || ( age == 12 && ( hair == \"yellow\" || hair == \"blue\" ) ))";
+		assertEquals(2, and1.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) and1.getDescrs().get(
+				0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("70", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		fcd = (FieldConstraintDescr) and1.getDescrs().get(1);
+		assertEquals("hair", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("black", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		assertEquals(2, and2.getDescrs().size());
+		fcd = (FieldConstraintDescr) and2.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("40", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		fcd = (FieldConstraintDescr) and2.getDescrs().get(1);
+		assertEquals("hair", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("pink", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
+		assertEquals(2, and3.getDescrs().size());
+		fcd = (FieldConstraintDescr) and3.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("12", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		OrDescr or2 = (OrDescr) and3.getDescrs().get(1);
+		fcd = (FieldConstraintDescr) or2.getDescrs().get(0);
+		assertEquals("hair", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("yellow", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+		fcd = (FieldConstraintDescr) or2.getDescrs().get(1);
+		assertEquals("hair", fcd.getFieldName());
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("blue", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
+	}
 
-        OrDescr orConstr = (OrDescr) pattern.getDescrs().get( 0 );
+	public void testRestrictionConnectives() throws Exception {
 
-        assertEquals( 3,
-                      orConstr.getDescrs().size() );
+		// the expression bellow must generate the following tree:
+		//
+		// AND
+		// |
+		// OR
+		// /---------------+-------------------\
+		// AND AND AND
+		// /---+---\ /---+---\ /---+---\
+		// FC FC FC FC FC OR
+		// /---+---\
+		// FC FC
+		//
+		final String text = "Person( ( age ( > 60 && < 70 ) || ( > 50 && < 55 ) && hair == \"black\" ) || ( age == 40 && hair == \"pink\" ) || ( age == 12 && ( hair == \"yellow\" || hair == \"blue\" ) ))";
 
-        AndDescr andConstr1 = (AndDescr) orConstr.getDescrs().get( 0 );
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        FieldConstraintDescr fcd = (FieldConstraintDescr) andConstr1.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
-        RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fcd.getRestriction().getRestrictions().get( 0 );
-        RestrictionConnectiveDescr and1 = (RestrictionConnectiveDescr) or.getRestrictions().get( 0 );
-        RestrictionConnectiveDescr and2 = (RestrictionConnectiveDescr) or.getRestrictions().get( 1 );
+		assertEquals(1, pattern.getDescrs().size());
 
-        assertEquals( ">",
-                      ((LiteralRestrictionDescr) and1.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "60",
-                      ((LiteralRestrictionDescr) and1.getRestrictions().get( 0 )).getText() );
+		OrDescr orConstr = (OrDescr) pattern.getDescrs().get(0);
 
-        assertEquals( "<",
-                      ((LiteralRestrictionDescr) and1.getRestrictions().get( 1 )).getEvaluator() );
-        assertEquals( "70",
-                      ((LiteralRestrictionDescr) and1.getRestrictions().get( 1 )).getText() );
+		assertEquals(3, orConstr.getDescrs().size());
 
-        assertEquals( ">",
-                      ((LiteralRestrictionDescr) and2.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "50",
-                      ((LiteralRestrictionDescr) and2.getRestrictions().get( 0 )).getText() );
+		AndDescr andConstr1 = (AndDescr) orConstr.getDescrs().get(0);
 
-        assertEquals( "<",
-                      ((LiteralRestrictionDescr) and2.getRestrictions().get( 1 )).getEvaluator() );
-        assertEquals( "55",
-                      ((LiteralRestrictionDescr) and2.getRestrictions().get( 1 )).getText() );
+		FieldConstraintDescr fcd = (FieldConstraintDescr) andConstr1
+				.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
+		RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fcd
+				.getRestriction().getRestrictions().get(0);
+		RestrictionConnectiveDescr and1 = (RestrictionConnectiveDescr) or
+				.getRestrictions().get(0);
+		RestrictionConnectiveDescr and2 = (RestrictionConnectiveDescr) or
+				.getRestrictions().get(1);
 
-        fcd = (FieldConstraintDescr) andConstr1.getDescrs().get( 1 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
+		assertEquals(">", ((LiteralRestrictionDescr) and1.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("60", ((LiteralRestrictionDescr) and1.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "black",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		assertEquals("<", ((LiteralRestrictionDescr) and1.getRestrictions()
+				.get(1)).getEvaluator());
+		assertEquals("70", ((LiteralRestrictionDescr) and1.getRestrictions()
+				.get(1)).getText());
 
-        AndDescr andConstr2 = (AndDescr) orConstr.getDescrs().get( 1 );
-        assertEquals( 2,
-                      andConstr2.getDescrs().size() );
-        fcd = (FieldConstraintDescr) andConstr2.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
+		assertEquals(">", ((LiteralRestrictionDescr) and2.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("50", ((LiteralRestrictionDescr) and2.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "40",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		assertEquals("<", ((LiteralRestrictionDescr) and2.getRestrictions()
+				.get(1)).getEvaluator());
+		assertEquals("55", ((LiteralRestrictionDescr) and2.getRestrictions()
+				.get(1)).getText());
 
-        fcd = (FieldConstraintDescr) andConstr2.getDescrs().get( 1 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
+		fcd = (FieldConstraintDescr) andConstr1.getDescrs().get(1);
+		assertEquals("hair", fcd.getFieldName());
 
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "pink",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("black", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        AndDescr andConstr3 = (AndDescr) orConstr.getDescrs().get( 2 );
-        assertEquals( 2,
-                      andConstr3.getDescrs().size() );
-        fcd = (FieldConstraintDescr) andConstr3.getDescrs().get( 0 );
-        assertEquals( "age",
-                      fcd.getFieldName() );
+		AndDescr andConstr2 = (AndDescr) orConstr.getDescrs().get(1);
+		assertEquals(2, andConstr2.getDescrs().size());
+		fcd = (FieldConstraintDescr) andConstr2.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
 
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "12",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("40", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        OrDescr orConstr2 = (OrDescr) andConstr3.getDescrs().get( 1 );
+		fcd = (FieldConstraintDescr) andConstr2.getDescrs().get(1);
+		assertEquals("hair", fcd.getFieldName());
 
-        fcd = (FieldConstraintDescr) orConstr2.getDescrs().get( 0 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("pink", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "yellow",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		AndDescr andConstr3 = (AndDescr) orConstr.getDescrs().get(2);
+		assertEquals(2, andConstr3.getDescrs().size());
+		fcd = (FieldConstraintDescr) andConstr3.getDescrs().get(0);
+		assertEquals("age", fcd.getFieldName());
 
-        fcd = (FieldConstraintDescr) orConstr2.getDescrs().get( 1 );
-        assertEquals( "hair",
-                      fcd.getFieldName() );
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("12", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( "==",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "blue",
-                      ((LiteralRestrictionDescr) fcd.getRestrictions().get( 0 )).getText() );
+		OrDescr orConstr2 = (OrDescr) andConstr3.getDescrs().get(1);
 
-    }
+		fcd = (FieldConstraintDescr) orConstr2.getDescrs().get(0);
+		assertEquals("hair", fcd.getFieldName());
 
-    public void testConstraintConnectivesMatches() throws Exception {
-        final String text = "Person( name matches \"mark\" || matches \"bob\" )";
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("yellow", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs().get( 0 );
-        assertEquals( "name",
-                      fcd.getFieldName() );
+		fcd = (FieldConstraintDescr) orConstr2.getDescrs().get(1);
+		assertEquals("hair", fcd.getFieldName());
 
-        RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fcd.getRestrictions().get( 0 );
+		assertEquals("==", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("blue", ((LiteralRestrictionDescr) fcd.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( 2,
-                      or.getRestrictions().size() );
+	}
 
-        assertEquals( "matches",
-                      ((LiteralRestrictionDescr) or.getRestrictions().get( 0 )).getEvaluator() );
-        assertEquals( "mark",
-                      ((LiteralRestrictionDescr) or.getRestrictions().get( 0 )).getText() );
+	public void testConstraintConnectivesMatches() throws Exception {
+		final String text = "Person( name matches \"mark\" || matches \"bob\" )";
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        assertEquals( "matches",
-                      ((LiteralRestrictionDescr) or.getRestrictions().get( 1 )).getEvaluator() );
-        assertEquals( "bob",
-                      ((LiteralRestrictionDescr) or.getRestrictions().get( 1 )).getText() );
+		assertEquals(1, pattern.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs()
+				.get(0);
+		assertEquals("name", fcd.getFieldName());
 
-    }
+		RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fcd
+				.getRestrictions().get(0);
 
-    public void testNotContains() throws Exception {
-        final String text = "City( $city : city )\nCountry( cities not contains $city )\n";
-        AndDescr descrs = (AndDescr) parse( "normal_lhs_block",
-                                            "lhs_block",
-                                            text );
+		assertEquals(2, or.getRestrictions().size());
 
-        assertEquals( 2,
-                      descrs.getDescrs().size() );
-        PatternDescr pat = (PatternDescr) descrs.getDescrs().get( 1 );
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat.getConstraint().getDescrs().get( 0 );
-        VariableRestrictionDescr restr = (VariableRestrictionDescr) fieldConstr.getRestrictions().get( 0 );
+		assertEquals("matches", ((LiteralRestrictionDescr) or.getRestrictions()
+				.get(0)).getEvaluator());
+		assertEquals("mark", ((LiteralRestrictionDescr) or.getRestrictions()
+				.get(0)).getText());
 
-        assertEquals( "contains",
-                      restr.getEvaluator() );
-        assertTrue( restr.isNegated() );
-        assertEquals( "$city",
-                      restr.getIdentifier() );
-    }
+		assertEquals("matches", ((LiteralRestrictionDescr) or.getRestrictions()
+				.get(1)).getEvaluator());
+		assertEquals("bob", ((LiteralRestrictionDescr) or.getRestrictions()
+				.get(1)).getText());
 
-    public void testNotMatches() throws Exception {
-        final String text = "Message( text not matches '[abc]*' )\n";
-        AndDescr descrs = (AndDescr) parse( "normal_lhs_block",
-                                            "lhs_block",
-                                            text );
+	}
 
-        assertEquals( 1,
-                      descrs.getDescrs().size() );
-        PatternDescr pat = (PatternDescr) descrs.getDescrs().get( 0 );
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat.getConstraint().getDescrs().get( 0 );
-        LiteralRestrictionDescr restr = (LiteralRestrictionDescr) fieldConstr.getRestrictions().get( 0 );
+	public void testNotContains() throws Exception {
+		final String text = "City( $city : city )\nCountry( cities not contains $city )\n";
+		AndDescr descrs = (AndDescr) parse("normal_lhs_block", "lhs_block",
+				text);
 
-        assertEquals( "matches",
-                      restr.getEvaluator() );
-        assertTrue( restr.isNegated() );
-        assertEquals( "[abc]*",
-                      restr.getText() );
-    }
+		assertEquals(2, descrs.getDescrs().size());
+		PatternDescr pat = (PatternDescr) descrs.getDescrs().get(1);
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat
+				.getConstraint().getDescrs().get(0);
+		VariableRestrictionDescr restr = (VariableRestrictionDescr) fieldConstr
+				.getRestrictions().get(0);
 
-    public void testRestrictions() throws Exception {
-        final String text = "Foo( bar > 1 || == 1 )\n";
+		assertEquals("contains", restr.getEvaluator());
+		assertTrue(restr.isNegated());
+		assertEquals("$city", restr.getIdentifier());
+	}
 
-        AndDescr descrs = (AndDescr) parse( "normal_lhs_block",
-                                            "lhs_block",
-                                            text );
+	public void testNotMatches() throws Exception {
+		final String text = "Message( text not matches '[abc]*' )\n";
+		AndDescr descrs = (AndDescr) parse("normal_lhs_block", "lhs_block",
+				text);
 
-        assertEquals( 1,
-                      descrs.getDescrs().size() );
-        PatternDescr pat = (PatternDescr) descrs.getDescrs().get( 0 );
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat.getConstraint().getDescrs().get( 0 );
-        RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fieldConstr.getRestrictions().get( 0 );
-        LiteralRestrictionDescr gt1 = (LiteralRestrictionDescr) or.getRestrictions().get( 0 );
-        LiteralRestrictionDescr eq1 = (LiteralRestrictionDescr) or.getRestrictions().get( 1 );
+		assertEquals(1, descrs.getDescrs().size());
+		PatternDescr pat = (PatternDescr) descrs.getDescrs().get(0);
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat
+				.getConstraint().getDescrs().get(0);
+		LiteralRestrictionDescr restr = (LiteralRestrictionDescr) fieldConstr
+				.getRestrictions().get(0);
 
-        assertEquals( ">",
-                      gt1.getEvaluator() );
-        assertEquals( false,
-                      gt1.isNegated() );
-        assertEquals( 1,
-                      ((Number) eq1.getValue()).intValue() );
-        assertEquals( "==",
-                      eq1.getEvaluator() );
-        assertEquals( false,
-                      eq1.isNegated() );
-        assertEquals( 1,
-                      ((Number) eq1.getValue()).intValue() );
+		assertEquals("matches", restr.getEvaluator());
+		assertTrue(restr.isNegated());
+		assertEquals("[abc]*", restr.getText());
+	}
 
-    }
+	public void testRestrictions() throws Exception {
+		final String text = "Foo( bar > 1 || == 1 )\n";
 
-    public void testSemicolon() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "semicolon.drl" );
+		AndDescr descrs = (AndDescr) parse("normal_lhs_block", "lhs_block",
+				text);
 
-        final PackageDescr pkg = this.walker.getPackageDescr();
-        assertEquals( "org.drools",
-                      pkg.getName() );
-        assertEquals( 1,
-                      pkg.getGlobals().size() );
-        assertEquals( 3,
-                      pkg.getRules().size() );
+		assertEquals(1, descrs.getDescrs().size());
+		PatternDescr pat = (PatternDescr) descrs.getDescrs().get(0);
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pat
+				.getConstraint().getDescrs().get(0);
+		RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fieldConstr
+				.getRestrictions().get(0);
+		LiteralRestrictionDescr gt1 = (LiteralRestrictionDescr) or
+				.getRestrictions().get(0);
+		LiteralRestrictionDescr eq1 = (LiteralRestrictionDescr) or
+				.getRestrictions().get(1);
 
-        final RuleDescr rule1 = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( 2,
-                      rule1.getLhs().getDescrs().size() );
+		assertEquals(">", gt1.getEvaluator());
+		assertEquals(false, gt1.isNegated());
+		assertEquals(1, ((Number) eq1.getValue()).intValue());
+		assertEquals("==", eq1.getEvaluator());
+		assertEquals(false, eq1.isNegated());
+		assertEquals(1, ((Number) eq1.getValue()).intValue());
 
-        final RuleDescr query1 = (RuleDescr) pkg.getRules().get( 1 );
-        assertEquals( 3,
-                      query1.getLhs().getDescrs().size() );
+	}
 
-        final RuleDescr rule2 = (RuleDescr) pkg.getRules().get( 2 );
-        assertEquals( 2,
-                      rule2.getLhs().getDescrs().size() );
-    }
+	public void testSemicolon() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "semicolon.drl");
 
-    public void testEval() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "eval_parsing.drl" );
+		final PackageDescr pkg = this.walker.getPackageDescr();
+		assertEquals("org.drools", pkg.getName());
+		assertEquals(1, pkg.getGlobals().size());
+		assertEquals(3, pkg.getRules().size());
 
-        final PackageDescr pkg = this.walker.getPackageDescr();
-        assertEquals( "org.drools",
-                      pkg.getName() );
-        assertEquals( 1,
-                      pkg.getRules().size() );
+		final RuleDescr rule1 = (RuleDescr) pkg.getRules().get(0);
+		assertEquals(2, rule1.getLhs().getDescrs().size());
 
-        final RuleDescr rule1 = (RuleDescr) pkg.getRules().get( 0 );
-        assertEquals( 1,
-                      rule1.getLhs().getDescrs().size() );
-    }
+		final RuleDescr query1 = (RuleDescr) pkg.getRules().get(1);
+		assertEquals(3, query1.getLhs().getDescrs().size());
 
-    public void testAccumulateReverse() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "accumulateReverse.drl" );
+		final RuleDescr rule2 = (RuleDescr) pkg.getRules().get(2);
+		assertEquals(2, rule2.getLhs().getDescrs().size());
+	}
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+	public void testEval() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"eval_parsing.drl");
 
-        final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final AccumulateDescr accum = (AccumulateDescr) out.getSource();
-        assertEqualsIgnoreWhitespace( "int x = 0 ;",
-                                      accum.getInitCode() );
-        assertEqualsIgnoreWhitespace( "x++;",
-                                      accum.getActionCode() );
-        assertEqualsIgnoreWhitespace( "x--;",
-                                      accum.getReverseCode() );
-        assertEqualsIgnoreWhitespace( "new Integer(x)",
-                                      accum.getResultCode() );
-        assertFalse( accum.isExternalFunction() );
+		final PackageDescr pkg = this.walker.getPackageDescr();
+		assertEquals("org.drools", pkg.getName());
+		assertEquals(1, pkg.getRules().size());
 
-        final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-    }
+		final RuleDescr rule1 = (RuleDescr) pkg.getRules().get(0);
+		assertEquals(1, rule1.getLhs().getDescrs().size());
+	}
 
-    public void testAccumulateExternalFunction() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "accumulateExternalFunction.drl" );
+	public void testAccumulateReverse() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"accumulateReverse.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final AccumulateDescr accum = (AccumulateDescr) out.getSource();
-        assertEqualsIgnoreWhitespace( "$age",
-                                      accum.getExpression() );
-        assertEqualsIgnoreWhitespace( "average",
-                                      accum.getFunctionIdentifier() );
-        assertTrue( accum.isExternalFunction() );
+		final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final AccumulateDescr accum = (AccumulateDescr) out.getSource();
+		assertEqualsIgnoreWhitespace("int x = 0 ;", accum.getInitCode());
+		assertEqualsIgnoreWhitespace("x++;", accum.getActionCode());
+		assertEqualsIgnoreWhitespace("x--;", accum.getReverseCode());
+		assertEqualsIgnoreWhitespace("new Integer(x)", accum.getResultCode());
+		assertFalse(accum.isExternalFunction());
 
-        final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
-        assertEquals( "Person",
-                      pattern.getObjectType() );
-    }
+		final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
+		assertEquals("Person", pattern.getObjectType());
+	}
 
-    public void testCollectWithNestedFrom() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "collect_with_nested_from.drl" );
+	public void testAccumulateExternalFunction() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"accumulateExternalFunction.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final CollectDescr collect = (CollectDescr) out.getSource();
+		final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final AccumulateDescr accum = (AccumulateDescr) out.getSource();
+		assertEqualsIgnoreWhitespace("$age", accum.getExpression());
+		assertEqualsIgnoreWhitespace("average", accum.getFunctionIdentifier());
+		assertTrue(accum.isExternalFunction());
 
-        PatternDescr person = (PatternDescr) collect.getInputPattern();
-        assertEquals( "Person",
-                      person.getObjectType() );
+		final PatternDescr pattern = (PatternDescr) accum.getInputPattern();
+		assertEquals("Person", pattern.getObjectType());
+	}
 
-        final CollectDescr collect2 = (CollectDescr) person.getSource();
+	public void testCollectWithNestedFrom() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"collect_with_nested_from.drl");
 
-        final PatternDescr people = collect2.getInputPattern();
-        assertEquals( "People",
-                      people.getObjectType() );
-    }
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-    public void testAccumulateWithNestedFrom() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "accumulate_with_nested_from.drl" );
+		final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final CollectDescr collect = (CollectDescr) out.getSource();
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+		PatternDescr person = (PatternDescr) collect.getInputPattern();
+		assertEquals("Person", person.getObjectType());
 
-        final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final AccumulateDescr accumulate = (AccumulateDescr) out.getSource();
+		final CollectDescr collect2 = (CollectDescr) person.getSource();
 
-        PatternDescr person = (PatternDescr) accumulate.getInputPattern();
-        assertEquals( "Person",
-                      person.getObjectType() );
+		final PatternDescr people = collect2.getInputPattern();
+		assertEquals("People", people.getObjectType());
+	}
 
-        final CollectDescr collect2 = (CollectDescr) person.getSource();
+	public void testAccumulateWithNestedFrom() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"accumulate_with_nested_from.drl");
 
-        final PatternDescr people = collect2.getInputPattern();
-        assertEquals( "People",
-                      people.getObjectType() );
-    }
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-    public void testAccessorPaths() throws Exception {
-        final String text = "org   .   drools/*comment*/\t  .Message( text not matches $c#comment\n. property )\n";
+		final PatternDescr out = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		final AccumulateDescr accumulate = (AccumulateDescr) out.getSource();
 
-        PatternDescr pattern = (PatternDescr) parse( "lhs_pattern",
-                                                     "lhs_pattern",
-                                                     text );
+		PatternDescr person = (PatternDescr) accumulate.getInputPattern();
+		assertEquals("Person", person.getObjectType());
 
-        assertEquals( "org.drools.Message",
-                      pattern.getObjectType() );
+		final CollectDescr collect2 = (CollectDescr) person.getSource();
 
-        FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
-        QualifiedIdentifierRestrictionDescr restr = (QualifiedIdentifierRestrictionDescr) fieldConstr.getRestrictions().get( 0 );
+		final PatternDescr people = collect2.getInputPattern();
+		assertEquals("People", people.getObjectType());
+	}
 
-        assertEquals( "matches",
-                      restr.getEvaluator() );
-        assertTrue( restr.isNegated() );
-        assertEquals( "$c.property",
-                      restr.getText() );
-    }
+	public void testAccessorPaths() throws Exception {
+		final String text = "org   .   drools/*comment*/\t  .Message( text not matches $c#comment\n. property )\n";
 
-    public void testOrCE() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "or_ce.drl" );
+		PatternDescr pattern = (PatternDescr) parse("lhs_pattern",
+				"lhs_pattern", text);
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 2,
-                      rule.getLhs().getDescrs().size() );
+		assertEquals("org.drools.Message", pattern.getObjectType());
 
-        final PatternDescr person = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "Person",
-                      person.getObjectType() );
-        assertEquals( "$p",
-                      person.getIdentifier() );
+		FieldConstraintDescr fieldConstr = (FieldConstraintDescr) pattern
+				.getConstraint().getDescrs().get(0);
+		QualifiedIdentifierRestrictionDescr restr = (QualifiedIdentifierRestrictionDescr) fieldConstr
+				.getRestrictions().get(0);
 
-        final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
+		assertEquals("matches", restr.getEvaluator());
+		assertTrue(restr.isNegated());
+		assertEquals("$c.property", restr.getText());
+	}
 
-        final PatternDescr cheese1 = (PatternDescr) or.getDescrs().get( 0 );
-        assertEquals( "Cheese",
-                      cheese1.getObjectType() );
-        assertEquals( "$c",
-                      cheese1.getIdentifier() );
-        final PatternDescr cheese2 = (PatternDescr) or.getDescrs().get( 1 );
-        assertEquals( "Cheese",
-                      cheese2.getObjectType() );
-        assertNull( cheese2.getIdentifier() );
-    }
+	public void testOrCE() throws Exception {
+		parseResource("compilation_unit", "compilation_unit", "or_ce.drl");
 
-    public void testRuleSingleLine() throws Exception {
-        final String text = "rule \"another test\" salience 10 when eval( true ) then System.out.println(1); end";
-        RuleDescr rule = (RuleDescr) parse( "rule",
-                                            "rule",
-                                            text );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(2, rule.getLhs().getDescrs().size());
 
-        assertEquals( "another test",
-                      rule.getName() );
-        assertEquals( "System.out.println(1); ",
-                      rule.getConsequence() );
-    }
+		final PatternDescr person = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		assertEquals("Person", person.getObjectType());
+		assertEquals("$p", person.getIdentifier());
 
-    public void testRuleTwoLines() throws Exception {
-        final String text = "rule \"another test\" salience 10 when eval( true ) then System.out.println(1);\n end";
-        RuleDescr rule = (RuleDescr) parse( "rule",
-                                            "rule",
-                                            text );
+		final OrDescr or = (OrDescr) rule.getLhs().getDescrs().get(1);
+		assertEquals(2, or.getDescrs().size());
 
-        assertEquals( "another test",
-                      rule.getName() );
-        assertEquals( "System.out.println(1);\n ",
-                      rule.getConsequence() );
-    }
+		final PatternDescr cheese1 = (PatternDescr) or.getDescrs().get(0);
+		assertEquals("Cheese", cheese1.getObjectType());
+		assertEquals("$c", cheese1.getIdentifier());
+		final PatternDescr cheese2 = (PatternDescr) or.getDescrs().get(1);
+		assertEquals("Cheese", cheese2.getObjectType());
+		assertNull(cheese2.getIdentifier());
+	}
 
-    public void testRuleParseLhs3() throws Exception {
-        final String text = "(or\nnot Person()\n(and Cheese()\nMeat()\nWine()))";
-        AndDescr pattern = (AndDescr) parse( "normal_lhs_block",
-                                             "lhs_block",
-                                             text );
+	public void testRuleSingleLine() throws Exception {
+		final String text = "rule \"another test\" salience 10 when eval( true ) then System.out.println(1); end";
+		RuleDescr rule = (RuleDescr) parse("rule", "rule", text);
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        OrDescr or = (OrDescr) pattern.getDescrs().get( 0 );
-        assertEquals( 2,
-                      or.getDescrs().size() );
-        NotDescr not = (NotDescr) or.getDescrs().get( 0 );
-        AndDescr and = (AndDescr) or.getDescrs().get( 1 );
-        assertEquals( 1,
-                      not.getDescrs().size() );
-        PatternDescr person = (PatternDescr) not.getDescrs().get( 0 );
-        assertEquals( "Person",
-                      person.getObjectType() );
-        assertEquals( 3,
-                      and.getDescrs().size() );
-        PatternDescr cheese = (PatternDescr) and.getDescrs().get( 0 );
-        assertEquals( "Cheese",
-                      cheese.getObjectType() );
-        PatternDescr meat = (PatternDescr) and.getDescrs().get( 1 );
-        assertEquals( "Meat",
-                      meat.getObjectType() );
-        PatternDescr wine = (PatternDescr) and.getDescrs().get( 2 );
-        assertEquals( "Wine",
-                      wine.getObjectType() );
+		assertEquals("another test", rule.getName());
+		assertEquals("System.out.println(1); ", rule.getConsequence());
+	}
 
-    }
+	public void testRuleTwoLines() throws Exception {
+		final String text = "rule \"another test\" salience 10 when eval( true ) then System.out.println(1);\n end";
+		RuleDescr rule = (RuleDescr) parse("rule", "rule", text);
 
-    public void testAccumulateMultiPattern() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "accumulate_multi_pattern.drl" );
+		assertEquals("another test", rule.getName());
+		assertEquals("System.out.println(1);\n ", rule.getConsequence());
+	}
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 1,
-                      rule.getLhs().getDescrs().size() );
+	public void testRuleParseLhs3() throws Exception {
+		final String text = "(or\nnot Person()\n(and Cheese()\nMeat()\nWine()))";
+		AndDescr pattern = (AndDescr) parse("normal_lhs_block", "lhs_block",
+				text);
 
-        final PatternDescr outPattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        final AccumulateDescr accum = (AccumulateDescr) outPattern.getSource();
-        assertEqualsIgnoreWhitespace( "$counter",
-                                      outPattern.getIdentifier() );
-        assertEqualsIgnoreWhitespace( "int x = 0 ;",
-                                      accum.getInitCode() );
-        assertEqualsIgnoreWhitespace( "x++;",
-                                      accum.getActionCode() );
-        assertEqualsIgnoreWhitespace( "new Integer(x)",
-                                      accum.getResultCode() );
+		assertEquals(1, pattern.getDescrs().size());
+		OrDescr or = (OrDescr) pattern.getDescrs().get(0);
+		assertEquals(2, or.getDescrs().size());
+		NotDescr not = (NotDescr) or.getDescrs().get(0);
+		AndDescr and = (AndDescr) or.getDescrs().get(1);
+		assertEquals(1, not.getDescrs().size());
+		PatternDescr person = (PatternDescr) not.getDescrs().get(0);
+		assertEquals("Person", person.getObjectType());
+		assertEquals(3, and.getDescrs().size());
+		PatternDescr cheese = (PatternDescr) and.getDescrs().get(0);
+		assertEquals("Cheese", cheese.getObjectType());
+		PatternDescr meat = (PatternDescr) and.getDescrs().get(1);
+		assertEquals("Meat", meat.getObjectType());
+		PatternDescr wine = (PatternDescr) and.getDescrs().get(2);
+		assertEquals("Wine", wine.getObjectType());
 
-        final AndDescr and = (AndDescr) accum.getInput();
-        assertEquals( 2,
-                      and.getDescrs().size() );
-        final PatternDescr person = (PatternDescr) and.getDescrs().get( 0 );
-        final PatternDescr cheese = (PatternDescr) and.getDescrs().get( 1 );
-        assertEquals( "Person",
-                      person.getObjectType() );
-        assertEquals( "Cheese",
-                      cheese.getObjectType() );
-    }
+	}
 
-    public void testPluggableOperators() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "pluggable_operators.drl" );
+	public void testAccumulateMultiPattern() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"accumulate_multi_pattern.drl");
 
-        final PackageDescr pack = walker.getPackageDescr();
-        assertEquals( 1,
-                      pack.getRules().size() );
-        final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
-        assertEquals( 5,
-                      rule.getLhs().getDescrs().size() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(1, rule.getLhs().getDescrs().size());
 
-        final PatternDescr eventA = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
-        assertEquals( "$a",
-                      eventA.getIdentifier() );
-        assertEquals( "EventA",
-                      eventA.getObjectType() );
+		final PatternDescr outPattern = (PatternDescr) rule.getLhs()
+				.getDescrs().get(0);
+		final AccumulateDescr accum = (AccumulateDescr) outPattern.getSource();
+		assertEqualsIgnoreWhitespace("$counter", outPattern.getIdentifier());
+		assertEqualsIgnoreWhitespace("int x = 0 ;", accum.getInitCode());
+		assertEqualsIgnoreWhitespace("x++;", accum.getActionCode());
+		assertEqualsIgnoreWhitespace("new Integer(x)", accum.getResultCode());
 
-        final PatternDescr eventB = (PatternDescr) rule.getLhs().getDescrs().get( 1 );
-        assertEquals( "$b",
-                      eventB.getIdentifier() );
-        assertEquals( "EventB",
-                      eventB.getObjectType() );
-        assertEquals( 1,
-                      eventB.getConstraint().getDescrs().size() );
-        final FieldConstraintDescr fcdB = (FieldConstraintDescr) eventB.getConstraint().getDescrs().get( 0 );
-        assertEquals( 1,
-                      fcdB.getRestrictions().size() );
-        assertTrue( fcdB.getRestrictions().get( 0 ) instanceof VariableRestrictionDescr );
-        final VariableRestrictionDescr rb = (VariableRestrictionDescr) fcdB.getRestrictions().get( 0 );
-        assertEquals( "after",
-                      rb.getEvaluator() );
-        assertEquals( "$a",
-                      rb.getText() );
-        assertEquals( "1,10",
-                      rb.getParameterText() );
-        assertFalse( rb.isNegated() );
+		final AndDescr and = (AndDescr) accum.getInput();
+		assertEquals(2, and.getDescrs().size());
+		final PatternDescr person = (PatternDescr) and.getDescrs().get(0);
+		final PatternDescr cheese = (PatternDescr) and.getDescrs().get(1);
+		assertEquals("Person", person.getObjectType());
+		assertEquals("Cheese", cheese.getObjectType());
+	}
 
-        final PatternDescr eventC = (PatternDescr) rule.getLhs().getDescrs().get( 2 );
-        assertEquals( "$c",
-                      eventC.getIdentifier() );
-        assertEquals( "EventC",
-                      eventC.getObjectType() );
-        assertEquals( 1,
-                      eventC.getConstraint().getDescrs().size() );
-        final FieldConstraintDescr fcdC = (FieldConstraintDescr) eventC.getConstraint().getDescrs().get( 0 );
-        assertEquals( 1,
-                      fcdC.getRestrictions().size() );
-        assertTrue( fcdC.getRestrictions().get( 0 ) instanceof VariableRestrictionDescr );
-        final VariableRestrictionDescr rc = (VariableRestrictionDescr) fcdC.getRestrictions().get( 0 );
-        assertEquals( "finishes",
-                      rc.getEvaluator() );
-        assertEquals( "$b",
-                      rc.getText() );
-        assertNull( rc.getParameterText() );
-        assertFalse( rc.isNegated() );
+	public void testPluggableOperators() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"pluggable_operators.drl");
 
-        final PatternDescr eventD = (PatternDescr) rule.getLhs().getDescrs().get( 3 );
-        assertEquals( "$d",
-                      eventD.getIdentifier() );
-        assertEquals( "EventD",
-                      eventD.getObjectType() );
-        assertEquals( 1,
-                      eventD.getConstraint().getDescrs().size() );
-        final FieldConstraintDescr fcdD = (FieldConstraintDescr) eventD.getConstraint().getDescrs().get( 0 );
-        assertEquals( 1,
-                      fcdD.getRestrictions().size() );
-        assertTrue( fcdD.getRestrictions().get( 0 ) instanceof VariableRestrictionDescr );
-        final VariableRestrictionDescr rd = (VariableRestrictionDescr) fcdD.getRestrictions().get( 0 );
-        assertEquals( "starts",
-                      rd.getEvaluator() );
-        assertEquals( "$a",
-                      rd.getText() );
-        assertNull( rd.getParameterText() );
-        assertTrue( rd.isNegated() );
+		final PackageDescr pack = walker.getPackageDescr();
+		assertEquals(1, pack.getRules().size());
+		final RuleDescr rule = (RuleDescr) pack.getRules().get(0);
+		assertEquals(5, rule.getLhs().getDescrs().size());
 
-        final PatternDescr eventE = (PatternDescr) rule.getLhs().getDescrs().get( 4 );
-        assertEquals( "$e",
-                      eventE.getIdentifier() );
-        assertEquals( "EventE",
-                      eventE.getObjectType() );
-        assertEquals( 1,
-                      eventE.getConstraint().getDescrs().size() );
-        final FieldConstraintDescr fcdE = (FieldConstraintDescr) eventE.getConstraint().getDescrs().get( 0 );
-        assertEquals( 1,
-                      fcdE.getRestrictions().size() );
-        assertTrue( fcdE.getRestrictions().get( 0 ) instanceof VariableRestrictionDescr );
-        final VariableRestrictionDescr re = (VariableRestrictionDescr) fcdE.getRestrictions().get( 0 );
-        assertEquals( "before",
-                      re.getEvaluator() );
-        assertEquals( "$b",
-                      re.getText() );
-        assertEquals( "1, 10",
-                      re.getParameterText() );
-        assertTrue( re.isNegated() );
-    }
+		final PatternDescr eventA = (PatternDescr) rule.getLhs().getDescrs()
+				.get(0);
+		assertEquals("$a", eventA.getIdentifier());
+		assertEquals("EventA", eventA.getObjectType());
 
-    public void testTypeDeclaration() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "declare_type.drl" );
-        final PackageDescr pack = walker.getPackageDescr();
+		final PatternDescr eventB = (PatternDescr) rule.getLhs().getDescrs()
+				.get(1);
+		assertEquals("$b", eventB.getIdentifier());
+		assertEquals("EventB", eventB.getObjectType());
+		assertEquals(1, eventB.getConstraint().getDescrs().size());
+		final FieldConstraintDescr fcdB = (FieldConstraintDescr) eventB
+				.getConstraint().getDescrs().get(0);
+		assertEquals(1, fcdB.getRestrictions().size());
+		assertTrue(fcdB.getRestrictions().get(0) instanceof VariableRestrictionDescr);
+		final VariableRestrictionDescr rb = (VariableRestrictionDescr) fcdB
+				.getRestrictions().get(0);
+		assertEquals("after", rb.getEvaluator());
+		assertEquals("$a", rb.getText());
+		assertEquals("1,10", rb.getParameterText());
+		assertFalse(rb.isNegated());
 
-        final List<TypeDeclarationDescr> declarations = pack.getTypeDeclarations();
+		final PatternDescr eventC = (PatternDescr) rule.getLhs().getDescrs()
+				.get(2);
+		assertEquals("$c", eventC.getIdentifier());
+		assertEquals("EventC", eventC.getObjectType());
+		assertEquals(1, eventC.getConstraint().getDescrs().size());
+		final FieldConstraintDescr fcdC = (FieldConstraintDescr) eventC
+				.getConstraint().getDescrs().get(0);
+		assertEquals(1, fcdC.getRestrictions().size());
+		assertTrue(fcdC.getRestrictions().get(0) instanceof VariableRestrictionDescr);
+		final VariableRestrictionDescr rc = (VariableRestrictionDescr) fcdC
+				.getRestrictions().get(0);
+		assertEquals("finishes", rc.getEvaluator());
+		assertEquals("$b", rc.getText());
+		assertNull(rc.getParameterText());
+		assertFalse(rc.isNegated());
 
-        assertEquals( 1,
-                      declarations.size() );
+		final PatternDescr eventD = (PatternDescr) rule.getLhs().getDescrs()
+				.get(3);
+		assertEquals("$d", eventD.getIdentifier());
+		assertEquals("EventD", eventD.getObjectType());
+		assertEquals(1, eventD.getConstraint().getDescrs().size());
+		final FieldConstraintDescr fcdD = (FieldConstraintDescr) eventD
+				.getConstraint().getDescrs().get(0);
+		assertEquals(1, fcdD.getRestrictions().size());
+		assertTrue(fcdD.getRestrictions().get(0) instanceof VariableRestrictionDescr);
+		final VariableRestrictionDescr rd = (VariableRestrictionDescr) fcdD
+				.getRestrictions().get(0);
+		assertEquals("starts", rd.getEvaluator());
+		assertEquals("$a", rd.getText());
+		assertNull(rd.getParameterText());
+		assertTrue(rd.isNegated());
 
-        final TypeDeclarationDescr descr = declarations.get( 0 );
-        assertEquals( "event",
-                      descr.getMetaAttribute( "role" ) );
-        assertEquals( "org.drools.events.Call",
-                      descr.getMetaAttribute( "class" ) );
-        assertEquals( "duration",
-                      descr.getMetaAttribute( "duration" ) );
-        assertEquals( "timestamp",
-                      descr.getMetaAttribute( "timestamp" ) );
-    }
+		final PatternDescr eventE = (PatternDescr) rule.getLhs().getDescrs()
+				.get(4);
+		assertEquals("$e", eventE.getIdentifier());
+		assertEquals("EventE", eventE.getObjectType());
+		assertEquals(1, eventE.getConstraint().getDescrs().size());
+		final FieldConstraintDescr fcdE = (FieldConstraintDescr) eventE
+				.getConstraint().getDescrs().get(0);
+		assertEquals(1, fcdE.getRestrictions().size());
+		assertTrue(fcdE.getRestrictions().get(0) instanceof VariableRestrictionDescr);
+		final VariableRestrictionDescr re = (VariableRestrictionDescr) fcdE
+				.getRestrictions().get(0);
+		assertEquals("before", re.getEvaluator());
+		assertEquals("$b", re.getText());
+		assertEquals("1, 10", re.getParameterText());
+		assertTrue(re.isNegated());
+	}
 
-    public void testTypeDeclarationWithFields() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "declare_type_with_fields.drl" );
-        final PackageDescr pack = walker.getPackageDescr();
+	public void testTypeDeclaration() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"declare_type.drl");
+		final PackageDescr pack = walker.getPackageDescr();
 
-        List<TypeDeclarationDescr> td = pack.getTypeDeclarations();
-        assertEquals( 2,
-                      td.size() );
+		final List<TypeDeclarationDescr> declarations = pack
+				.getTypeDeclarations();
 
-        TypeDeclarationDescr d = td.get( 0 );
-        assertEquals( "SomeFact",
-                      d.getTypeName() );
-        assertEquals( 2,
-                      d.getFields().size() );
-        assertTrue( d.getFields().containsKey( "name" ) );
-        assertTrue( d.getFields().containsKey( "age" ) );
+		assertEquals(1, declarations.size());
 
-        TypeFieldDescr f = d.getFields().get( "name" );
-        assertEquals( "String",
-                      f.getPattern().getObjectType() );
+		final TypeDeclarationDescr descr = declarations.get(0);
+		assertEquals("event", descr.getMetaAttribute("role"));
+		assertEquals("org.drools.events.Call", descr.getMetaAttribute("class"));
+		assertEquals("duration", descr.getMetaAttribute("duration"));
+		assertEquals("timestamp", descr.getMetaAttribute("timestamp"));
+	}
 
-        f = d.getFields().get( "age" );
-        assertEquals( "Integer",
-                      f.getPattern().getObjectType() );
+	public void testTypeDeclarationWithFields() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"declare_type_with_fields.drl");
+		final PackageDescr pack = walker.getPackageDescr();
 
-        d = td.get( 1 );
-        assertEquals( "AnotherFact",
-                      d.getTypeName() );
+		List<TypeDeclarationDescr> td = pack.getTypeDeclarations();
+		assertEquals(2, td.size());
 
-    }
+		TypeDeclarationDescr d = td.get(0);
+		assertEquals("SomeFact", d.getTypeName());
+		assertEquals(2, d.getFields().size());
+		assertTrue(d.getFields().containsKey("name"));
+		assertTrue(d.getFields().containsKey("age"));
 
-    public void testEntryPoint() throws Exception {
-        final String text = "StockTick( symbol==\"ACME\") from entry-point StreamA";
+		TypeFieldDescr f = d.getFields().get("name");
+		assertEquals("String", f.getPattern().getObjectType());
 
-        PatternDescr pattern = (PatternDescr) parse( "pattern_source",
-                                                     "lhs",
-                                                     text );
+		f = d.getFields().get("age");
+		assertEquals("Integer", f.getPattern().getObjectType());
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs().get( 0 );
-        assertEquals( "symbol",
-                      fcd.getFieldName() );
+		d = td.get(1);
+		assertEquals("AnotherFact", d.getTypeName());
 
-        assertNotNull( pattern.getSource() );
-        EntryPointDescr entry = (EntryPointDescr) pattern.getSource();
-        assertEquals( "StreamA",
-                      entry.getEntryId() );
-    }
+	}
 
-    public void testEntryPoint2() throws Exception {
-        final String text = "StockTick( symbol==\"ACME\") from entry-point \"StreamA\"";
+	public void testEntryPoint() throws Exception {
+		final String text = "StockTick( symbol==\"ACME\") from entry-point StreamA";
 
-        PatternDescr pattern = (PatternDescr) parse( "pattern_source",
-                                                     "lhs",
-                                                     text );
+		PatternDescr pattern = (PatternDescr) parse("pattern_source", "lhs",
+				text);
 
-        assertEquals( 1,
-                      pattern.getDescrs().size() );
-        FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs().get( 0 );
-        assertEquals( "symbol",
-                      fcd.getFieldName() );
+		assertEquals(1, pattern.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs()
+				.get(0);
+		assertEquals("symbol", fcd.getFieldName());
 
-        assertNotNull( pattern.getSource() );
-        EntryPointDescr entry = (EntryPointDescr) pattern.getSource();
-        assertEquals( "StreamA",
-                      entry.getEntryId() );
-    }
+		assertNotNull(pattern.getSource());
+		EntryPointDescr entry = (EntryPointDescr) pattern.getSource();
+		assertEquals("StreamA", entry.getEntryId());
+	}
 
-    public void testNesting() throws Exception {
-        parseResource( "compilation_unit",
-                       "compilation_unit",
-                       "not_pluggable_operator.drl" );
+	public void testEntryPoint2() throws Exception {
+		final String text = "StockTick( symbol==\"ACME\") from entry-point \"StreamA\"";
 
-        assertNotNull( walker );
-    }
+		PatternDescr pattern = (PatternDescr) parse("pattern_source", "lhs",
+				text);
 
-    private Object parse(String parserRuleName,
-                         String treeRuleName,
-                         final String text) throws Exception {
-        return newParser( parserRuleName,
-                          treeRuleName,
-                          newCharStream( text ) );
-    }
+		assertEquals(1, pattern.getDescrs().size());
+		FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs()
+				.get(0);
+		assertEquals("symbol", fcd.getFieldName());
 
-    private Object parse(String parserRuleName,
-                         String treeRuleName,
-                         final String source,
-                         final String text) throws Exception {
-        return newParser( parserRuleName,
-                          treeRuleName,
-                          newCharStream( text ) );
-        // this.parser.setSource( source );
-    }
+		assertNotNull(pattern.getSource());
+		EntryPointDescr entry = (EntryPointDescr) pattern.getSource();
+		assertEquals("StreamA", entry.getEntryId());
+	}
 
-    private Reader getReader(final String name) throws Exception {
-        final InputStream in = getClass().getResourceAsStream( name );
-        return new InputStreamReader( in );
-    }
+	public void testNesting() throws Exception {
+		parseResource("compilation_unit", "compilation_unit",
+				"not_pluggable_operator.drl");
 
-    private Object parseResource(String parserRuleName,
-                                 String treeRuleName,
-                                 final String name) throws Exception {
+		assertNotNull(walker);
+	}
 
-        // System.err.println( getClass().getResource( name ) );
-        final Reader reader = getReader( name );
+	private Object parse(String parserRuleName, String treeRuleName,
+			final String text) throws Exception {
+		return newParser(parserRuleName, treeRuleName, newCharStream(text));
+	}
 
-        final StringBuffer text = new StringBuffer();
+	private Object parse(String parserRuleName, String treeRuleName,
+			final String source, final String text) throws Exception {
+		return newParser(parserRuleName, treeRuleName, newCharStream(text));
+		// this.parser.setSource( source );
+	}
 
-        final char[] buf = new char[1024];
-        int len = 0;
+	private Reader getReader(final String name) throws Exception {
+		final InputStream in = getClass().getResourceAsStream(name);
+		return new InputStreamReader(in);
+	}
 
-        while ( (len = reader.read( buf )) >= 0 ) {
-            text.append( buf,
-                         0,
-                         len );
-        }
+	private Object parseResource(String parserRuleName, String treeRuleName,
+			final String name) throws Exception {
 
-        return parse( parserRuleName,
-                      treeRuleName,
-                      name,
-                      text.toString() );
-    }
+		// System.err.println( getClass().getResource( name ) );
+		final Reader reader = getReader(name);
 
-    private CharStream newCharStream(final String text) {
-        return new ANTLRStringStream( text );
-    }
+		final StringBuffer text = new StringBuffer();
 
-    private Object newParser(String parserRuleName,
-                             String treeRuleName,
-                             final CharStream charStream) {
-        return execTreeParser( parserRuleName,
-                               treeRuleName,
-                               charStream );
-    }
+		final char[] buf = new char[1024];
+		int len = 0;
 
-    public Object execTreeParser(String testRuleName,
-                                 String testTreeRuleName,
-                                 CharStream charStream) {
-        Object treeRuleReturn = null;
-        try {
-            DRLLexer lexer = new DRLLexer( charStream );
-            CommonTokenStream tokens = new CommonTokenStream( lexer );
-            DRLParser parser = new DRLParser( tokens );
-            parser.setTreeAdaptor( new DroolsTreeAdaptor() );
-            /** Use Reflection to get rule method from parser */
-            Method ruleName = Class.forName( "org.drools.lang.DRLParser" ).getMethod( testRuleName );
+		while ((len = reader.read(buf)) >= 0) {
+			text.append(buf, 0, len);
+		}
 
-            /** Invoke grammar rule, and get the return value */
-            Object ruleReturn = ruleName.invoke( parser );
+		return parse(parserRuleName, treeRuleName, name, text.toString());
+	}
 
-            if ( !parser.hasErrors() ) {
-                Class _return = Class.forName( "org.drools.lang.DRLParser" + "$" + testRuleName + "_return" );
-                Method returnName = _return.getMethod( "getTree" );
-                DroolsTree tree = (DroolsTree) returnName.invoke( ruleReturn );
+	private CharStream newCharStream(final String text) {
+		return new ANTLRStringStream(text);
+	}
 
-                // Walk resulting tree; create tree nodes stream first
-                CommonTreeNodeStream nodes = new CommonTreeNodeStream( tree );
-                // AST nodes have payload that point into token stream
-                nodes.setTokenStream( tokens );
-                // Create a tree walker attached to the nodes stream
-                this.walker = new DescrBuilderTree( nodes );
-                /** Invoke the tree rule, and store the return value if there is */
-                Method treeRuleName = Class.forName( "org.drools.lang.DescrBuilderTree" ).getMethod( testTreeRuleName );
-                treeRuleReturn = treeRuleName.invoke( walker );
-            } else {
-                System.out.println( parser.getErrorMessages() );
-            }
+	private Object newParser(String parserRuleName, String treeRuleName,
+			final CharStream charStream) {
+		return execTreeParser(parserRuleName, treeRuleName, charStream);
+	}
 
-            if ( treeRuleReturn != null ) {
-                /** If return object is instanceof AST, get the toStringTree */
-                if ( treeRuleReturn.toString().indexOf( testTreeRuleName + "_return" ) > 0 ) {
-                    try { // NullPointerException may happen here...
-                        Class _treeReturn = Class.forName( "org.drools.lang.DescrBuilderTree" + "$" + testTreeRuleName + "_return" );
-                        Field[] fields = _treeReturn.getDeclaredFields();
-                        for ( Field field : fields ) {
-                            if ( field.getType().getName().contains( "org.drools.lang.descr." ) ) {
-                                return field.get( treeRuleReturn );
-                            }
-                        }
-                    } catch ( Exception e ) {
-                        System.err.println( e );
-                    }
-                }
-            }
-        } catch ( ClassNotFoundException e ) {
-            e.printStackTrace();
-        } catch ( SecurityException e ) {
-            e.printStackTrace();
-        } catch ( NoSuchMethodException e ) {
-            e.printStackTrace();
-        } catch ( IllegalAccessException e ) {
-            e.printStackTrace();
-        } catch ( InvocationTargetException e ) {
-            e.printStackTrace();
-        } catch ( Exception e ) {
-            e.printStackTrace();
-        }
-        return treeRuleReturn;
-    }
+	public Object execTreeParser(String testRuleName, String testTreeRuleName,
+			CharStream charStream) {
+		Object treeRuleReturn = null;
+		try {
+			DRLLexer lexer = new DRLLexer(charStream);
+			CommonTokenStream tokens = new CommonTokenStream(lexer);
+			parser = new DRLParser(tokens);
+			parser.setTreeAdaptor(new DroolsTreeAdaptor());
+			/** Use Reflection to get rule method from parser */
+			Method ruleName = Class.forName("org.drools.lang.DRLParser")
+					.getMethod(testRuleName);
 
-    private void assertEqualsIgnoreWhitespace(final String expected,
-                                              final String actual) {
-        final String cleanExpected = expected.replaceAll( "\\s+",
-                                                          "" );
-        final String cleanActual = actual.replaceAll( "\\s+",
-                                                      "" );
+			/** Invoke grammar rule, and get the return value */
+			Object ruleReturn = ruleName.invoke(parser);
 
-        assertEquals( cleanExpected,
-                      cleanActual );
-    }
+			if (!parser.hasErrors()) {
+				Class _return = Class.forName("org.drools.lang.DRLParser" + "$"
+						+ testRuleName + "_return");
+				Method returnName = _return.getMethod("getTree");
+				DroolsTree tree = (DroolsTree) returnName.invoke(ruleReturn);
+
+				// Walk resulting tree; create tree nodes stream first
+				CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
+				// AST nodes have payload that point into token stream
+				nodes.setTokenStream(tokens);
+				// Create a tree walker attached to the nodes stream
+				this.walker = new DescrBuilderTree(nodes);
+				/** Invoke the tree rule, and store the return value if there is */
+				Method treeRuleName = Class.forName(
+						"org.drools.lang.DescrBuilderTree").getMethod(
+						testTreeRuleName);
+				treeRuleReturn = treeRuleName.invoke(walker);
+			} else {
+				System.out.println(parser.getErrorMessages());
+			}
+
+			if (treeRuleReturn != null) {
+				/** If return object is instanceof AST, get the toStringTree */
+				if (treeRuleReturn.toString().indexOf(
+						testTreeRuleName + "_return") > 0) {
+					try { // NullPointerException may happen here...
+						Class _treeReturn = Class
+								.forName("org.drools.lang.DescrBuilderTree"
+										+ "$" + testTreeRuleName + "_return");
+						Field[] fields = _treeReturn.getDeclaredFields();
+						for (Field field : fields) {
+							if (field.getType().getName().contains(
+									"org.drools.lang.descr.")) {
+								return field.get(treeRuleReturn);
+							}
+						}
+					} catch (Exception e) {
+						System.err.println(e);
+					}
+				}
+			}
+		} catch (ClassNotFoundException e) {
+			e.printStackTrace();
+		} catch (SecurityException e) {
+			e.printStackTrace();
+		} catch (NoSuchMethodException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		} catch (InvocationTargetException e) {
+			e.printStackTrace();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return treeRuleReturn;
+	}
+
+	private void assertEqualsIgnoreWhitespace(final String expected,
+			final String actual) {
+		final String cleanExpected = expected.replaceAll("\\s+", "");
+		final String cleanActual = actual.replaceAll("\\s+", "");
+
+		assertEquals(cleanExpected, cleanActual);
+	}
 }




More information about the jboss-svn-commits mailing list