[jboss-svn-commits] JBL Code SVN: r20115 - labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu May 22 19:06:09 EDT 2008


Author: mattgeis
Date: 2008-05-22 19:06:09 -0400 (Thu, 22 May 2008)
New Revision: 20115

Modified:
   labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java
   labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java
   labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java
   labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java
   labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
Log:
continues progress on dsl parsing

Modified: labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java
===================================================================
--- labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java	2008-05-22 18:32:46 UTC (rev 20114)
+++ labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/AntlrDSLMappingEntry.java	2008-05-22 23:06:09 UTC (rev 20115)
@@ -65,6 +65,7 @@
 			if (!key.startsWith("^")) {
 				// making it start with a space char or a line start
 				buf.append("(\\W|^)").append(key);
+				redistributeVariables();
 			}
 
 
@@ -79,8 +80,8 @@
 			// setting the key pattern and making it space insensitive
 			String pat = buf.toString();
 			//first, look to see if it's 
-			if (pat.substring(substr).trim().startsWith("-")
-					&& (!pat.substring(substr).trim().startsWith("-\\s*"))) {
+			if (key.substring(substr).trim().startsWith("-")
+					&& (!key.substring(substr).trim().startsWith("-\\s*"))) {
 				pat = pat.substring(0, pat.indexOf('-') + 1) + "\\s*"
 						+ pat.substring(pat.indexOf('-') + 1).trim();
 			}
@@ -93,8 +94,21 @@
 			this.keyPattern = null;
 		}
 		// update value mapping
-		this.setMappingValue(this.value);
+		//this.setMappingValue(this.value);
 	}
+	
+	/**
+	 * The keys for this map are integers, starting at 1.  However,
+	 * in certain cases we insert a matching group at the start of the
+	 * pattern, which means that 1 should become 2, 2 become 3, etc.
+	 */
+	private void redistributeVariables(){
+		for (Iterator it = variables.entrySet().iterator(); it.hasNext();) {
+			Map.Entry entry = (Map.Entry) it.next();
+			Integer i = (Integer)entry.getValue();
+			variables.put(entry.getKey(), new Integer(i.intValue() + 1));
+		}
+	}
 
 	
 	/**
@@ -104,19 +118,6 @@
 	public void setMappingValue(final String value) {
 		this.valuePattern = value;
 		this.value = value;
-		if (value != null) {
-//			this.valuePattern = this.valuePattern.replaceAll("\\\\n", "\n")
-//					.replaceAll("\\$", "\\\\\\$");
-			for (final Iterator it = this.variables.entrySet().iterator(); it
-					.hasNext();) {
-				final Map.Entry entry = (Map.Entry) it.next();
-				final String var = (String) entry.getKey();
-				final int pos = ((Integer) entry.getValue()).intValue();
-
-				this.valuePattern = this.valuePattern.replaceAll("\\{" + var
-						+ "\\}", "\\$" + pos);
-			}
-		}
 	}
 
 	

Modified: labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java
===================================================================
--- labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java	2008-05-22 18:32:46 UTC (rev 20114)
+++ labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapLexer.java	2008-05-22 23:06:09 UTC (rev 20115)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 DSLMap.g 2008-05-20 17:54:40
+// $ANTLR 3.0.1 DSLMap.g 2008-05-22 16:02:42
 
 	package org.drools.lang.dsl;
 
@@ -10,42 +10,43 @@
 import java.util.Map;
 import java.util.HashMap;
 public class DSLMapLexer extends Lexer {
-    public static final int RIGHT_CURLY=28;
+    public static final int COMMA=26;
+    public static final int RIGHT_CURLY=29;
     public static final int VT_ENTRY_VAL=14;
-    public static final int WS=29;
-    public static final int MISC=33;
+    public static final int WS=30;
+    public static final int MISC=34;
     public static final int VT_META=12;
     public static final int VT_CONSEQUENCE=9;
     public static final int VT_SPACE=19;
     public static final int LINE_COMMENT=21;
     public static final int VT_ANY=11;
     public static final int VT_LITERAL=17;
-    public static final int DOT=31;
+    public static final int DOT=32;
     public static final int EQUALS=22;
     public static final int VT_DSL_GRAMMAR=4;
     public static final int VT_CONDITION=8;
+    public static final int VT_VAR_DEF=15;
     public static final int VT_ENTRY=6;
-    public static final int VT_VAR_DEF=15;
     public static final int VT_PATTERN=18;
     public static final int LITERAL=25;
-    public static final int EscapeSequence=30;
+    public static final int EscapeSequence=31;
     public static final int VT_COMMENT=5;
     public static final int EOF=-1;
     public static final int EOL=20;
     public static final int LEFT_SQUARE=23;
-    public static final int Tokens=34;
+    public static final int Tokens=35;
     public static final int VT_ENTRY_KEY=13;
     public static final int VT_SCOPE=7;
-    public static final int COLON=26;
+    public static final int COLON=27;
     public static final int VT_KEYWORD=10;
     public static final int VT_VAR_REF=16;
-    public static final int LEFT_CURLY=27;
-    public static final int POUND=32;
+    public static final int LEFT_CURLY=28;
+    public static final int POUND=33;
     public static final int RIGHT_SQUARE=24;
     public DSLMapLexer() {;} 
     public DSLMapLexer(CharStream input) {
         super(input);
-        ruleMemo = new HashMap[16+1];
+        ruleMemo = new HashMap[17+1];
      }
     public String getGrammarFileName() { return "DSLMap.g"; }
 
@@ -53,10 +54,10 @@
     public final void mWS() throws RecognitionException {
         try {
             int _type = WS;
-            // DSLMap.g:243:9: ( ( ' ' | '\\t' | '\\f' )+ )
-            // DSLMap.g:243:17: ( ' ' | '\\t' | '\\f' )+
+            // DSLMap.g:260:9: ( ( ' ' | '\\t' | '\\f' )+ )
+            // DSLMap.g:260:17: ( ' ' | '\\t' | '\\f' )+
             {
-            // DSLMap.g:243:17: ( ' ' | '\\t' | '\\f' )+
+            // DSLMap.g:260:17: ( ' ' | '\\t' | '\\f' )+
             int cnt1=0;
             loop1:
             do {
@@ -114,10 +115,10 @@
     public final void mEOL() throws RecognitionException {
         try {
             int _type = EOL;
-            // DSLMap.g:250:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
-            // DSLMap.g:251:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // DSLMap.g:267:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+            // DSLMap.g:268:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             {
-            // DSLMap.g:251:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+            // DSLMap.g:268:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
             int alt2=3;
             int LA2_0 = input.LA(1);
 
@@ -136,13 +137,13 @@
             else {
                 if (backtracking>0) {failed=true; return ;}
                 NoViableAltException nvae =
-                    new NoViableAltException("251:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+                    new NoViableAltException("268:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
 
                 throw nvae;
             }
             switch (alt2) {
                 case 1 :
-                    // DSLMap.g:251:14: ( '\\r\\n' )=> '\\r\\n'
+                    // DSLMap.g:268:14: ( '\\r\\n' )=> '\\r\\n'
                     {
                     match("\r\n"); if (failed) return ;
 
@@ -150,14 +151,14 @@
                     }
                     break;
                 case 2 :
-                    // DSLMap.g:252:25: '\\r'
+                    // DSLMap.g:269:25: '\\r'
                     {
                     match('\r'); if (failed) return ;
 
                     }
                     break;
                 case 3 :
-                    // DSLMap.g:253:25: '\\n'
+                    // DSLMap.g:270:25: '\\n'
                     {
                     match('\n'); if (failed) return ;
 
@@ -179,8 +180,8 @@
     // $ANTLR start EscapeSequence
     public final void mEscapeSequence() throws RecognitionException {
         try {
-            // DSLMap.g:259:5: ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' ) )
-            // DSLMap.g:259:9: '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' )
+            // DSLMap.g:276:5: ( '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' ) )
+            // DSLMap.g:276:9: '\\\\' ( 'b' | 'B' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' | '.' | 'o' | 'x' | 'a' | 'e' | 'c' | 'd' | 'D' | 's' | 'S' | 'w' | 'W' | 'p' | 'A' | 'G' | 'Z' | 'z' | 'Q' | 'E' | '*' | '[' | ']' | '(' | ')' | '$' | '^' | '{' | '}' | '?' | '+' | '-' | '&' | '|' | '=' | 'u' | '0' | '#' )
             {
             match('\\'); if (failed) return ;
             if ( (input.LA(1)>='\"' && input.LA(1)<='$')||(input.LA(1)>='&' && input.LA(1)<='+')||(input.LA(1)>='-' && input.LA(1)<='.')||input.LA(1)=='0'||input.LA(1)=='='||input.LA(1)=='?'||(input.LA(1)>='A' && input.LA(1)<='B')||(input.LA(1)>='D' && input.LA(1)<='E')||input.LA(1)=='G'||input.LA(1)=='Q'||input.LA(1)=='S'||input.LA(1)=='W'||(input.LA(1)>='Z' && input.LA(1)<='^')||(input.LA(1)>='a' && input.LA(1)<='f')||(input.LA(1)>='n' && input.LA(1)<='p')||(input.LA(1)>='r' && input.LA(1)<='u')||(input.LA(1)>='w' && input.LA(1)<='x')||(input.LA(1)>='z' && input.LA(1)<='}') ) {
@@ -207,8 +208,8 @@
     public final void mLEFT_SQUARE() throws RecognitionException {
         try {
             int _type = LEFT_SQUARE;
-            // DSLMap.g:266:9: ( '[' )
-            // DSLMap.g:266:11: '['
+            // DSLMap.g:283:9: ( '[' )
+            // DSLMap.g:283:11: '['
             {
             match('['); if (failed) return ;
 
@@ -225,8 +226,8 @@
     public final void mRIGHT_SQUARE() throws RecognitionException {
         try {
             int _type = RIGHT_SQUARE;
-            // DSLMap.g:270:9: ( ']' )
-            // DSLMap.g:270:11: ']'
+            // DSLMap.g:287:9: ( ']' )
+            // DSLMap.g:287:11: ']'
             {
             match(']'); if (failed) return ;
 
@@ -243,8 +244,8 @@
     public final void mLEFT_CURLY() throws RecognitionException {
         try {
             int _type = LEFT_CURLY;
-            // DSLMap.g:274:9: ( '{' )
-            // DSLMap.g:274:11: '{'
+            // DSLMap.g:291:9: ( '{' )
+            // DSLMap.g:291:11: '{'
             {
             match('{'); if (failed) return ;
 
@@ -261,8 +262,8 @@
     public final void mRIGHT_CURLY() throws RecognitionException {
         try {
             int _type = RIGHT_CURLY;
-            // DSLMap.g:278:9: ( '}' )
-            // DSLMap.g:278:11: '}'
+            // DSLMap.g:295:9: ( '}' )
+            // DSLMap.g:295:11: '}'
             {
             match('}'); if (failed) return ;
 
@@ -279,8 +280,8 @@
     public final void mEQUALS() throws RecognitionException {
         try {
             int _type = EQUALS;
-            // DSLMap.g:281:8: ( '=' )
-            // DSLMap.g:281:10: '='
+            // DSLMap.g:298:8: ( '=' )
+            // DSLMap.g:298:10: '='
             {
             match('='); if (failed) return ;
 
@@ -297,8 +298,8 @@
     public final void mDOT() throws RecognitionException {
         try {
             int _type = DOT;
-            // DSLMap.g:284:5: ( '.' )
-            // DSLMap.g:284:7: '.'
+            // DSLMap.g:301:5: ( '.' )
+            // DSLMap.g:301:7: '.'
             {
             match('.'); if (failed) return ;
 
@@ -315,8 +316,8 @@
     public final void mPOUND() throws RecognitionException {
         try {
             int _type = POUND;
-            // DSLMap.g:287:9: ( '#' )
-            // DSLMap.g:287:11: '#'
+            // DSLMap.g:304:9: ( '#' )
+            // DSLMap.g:304:11: '#'
             {
             match('#'); if (failed) return ;
 
@@ -333,8 +334,8 @@
     public final void mCOLON() throws RecognitionException {
         try {
             int _type = COLON;
-            // DSLMap.g:290:7: ( ':' )
-            // DSLMap.g:290:9: ':'
+            // DSLMap.g:307:7: ( ':' )
+            // DSLMap.g:307:9: ':'
             {
             match(':'); if (failed) return ;
 
@@ -347,15 +348,33 @@
     }
     // $ANTLR end COLON
 
+    // $ANTLR start COMMA
+    public final void mCOMMA() throws RecognitionException {
+        try {
+            int _type = COMMA;
+            // DSLMap.g:310:7: ( ',' )
+            // DSLMap.g:310:9: ','
+            {
+            match(','); if (failed) return ;
+
+            }
+
+            this.type = _type;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end COMMA
+
     // $ANTLR start LINE_COMMENT
     public final void mLINE_COMMENT() throws RecognitionException {
         try {
             int _type = LINE_COMMENT;
-            // DSLMap.g:298:2: ( POUND ( options {greedy=false; } : . )* EOL )
-            // DSLMap.g:298:4: POUND ( options {greedy=false; } : . )* EOL
+            // DSLMap.g:318:2: ( POUND ( options {greedy=false; } : . )* EOL )
+            // DSLMap.g:318:4: POUND ( options {greedy=false; } : . )* EOL
             {
             mPOUND(); if (failed) return ;
-            // DSLMap.g:298:10: ( options {greedy=false; } : . )*
+            // DSLMap.g:318:10: ( options {greedy=false; } : . )*
             loop3:
             do {
                 int alt3=2;
@@ -374,7 +393,7 @@
 
                 switch (alt3) {
             	case 1 :
-            	    // DSLMap.g:298:37: .
+            	    // DSLMap.g:318:37: .
             	    {
             	    matchAny(); if (failed) return ;
 
@@ -401,10 +420,10 @@
     public final void mLITERAL() throws RecognitionException {
         try {
             int _type = LITERAL;
-            // DSLMap.g:306:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+ )
-            // DSLMap.g:306:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
+            // DSLMap.g:326:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+ )
+            // DSLMap.g:326:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
             {
-            // DSLMap.g:306:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
+            // DSLMap.g:326:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' | '\\u00c0' .. '\\u00ff' | MISC | EscapeSequence | DOT )+
             int cnt4=0;
             loop4:
             do {
@@ -570,6 +589,8 @@
                 case '-':
                 case '/':
                 case ';':
+                case '<':
+                case '>':
                 case '?':
                 case '@':
                 case '^':
@@ -593,56 +614,56 @@
 
                 switch (alt4) {
             	case 1 :
-            	    // DSLMap.g:306:5: 'a' .. 'z'
+            	    // DSLMap.g:326:5: 'a' .. 'z'
             	    {
             	    matchRange('a','z'); if (failed) return ;
 
             	    }
             	    break;
             	case 2 :
-            	    // DSLMap.g:306:14: 'A' .. 'Z'
+            	    // DSLMap.g:326:14: 'A' .. 'Z'
             	    {
             	    matchRange('A','Z'); if (failed) return ;
 
             	    }
             	    break;
             	case 3 :
-            	    // DSLMap.g:306:23: '_'
+            	    // DSLMap.g:326:23: '_'
             	    {
             	    match('_'); if (failed) return ;
 
             	    }
             	    break;
             	case 4 :
-            	    // DSLMap.g:306:27: '0' .. '9'
+            	    // DSLMap.g:326:27: '0' .. '9'
             	    {
             	    matchRange('0','9'); if (failed) return ;
 
             	    }
             	    break;
             	case 5 :
-            	    // DSLMap.g:306:36: '\\u00c0' .. '\\u00ff'
+            	    // DSLMap.g:326:36: '\\u00c0' .. '\\u00ff'
             	    {
             	    matchRange('\u00C0','\u00FF'); if (failed) return ;
 
             	    }
             	    break;
             	case 6 :
-            	    // DSLMap.g:306:55: MISC
+            	    // DSLMap.g:326:55: MISC
             	    {
             	    mMISC(); if (failed) return ;
 
             	    }
             	    break;
             	case 7 :
-            	    // DSLMap.g:306:60: EscapeSequence
+            	    // DSLMap.g:326:60: EscapeSequence
             	    {
             	    mEscapeSequence(); if (failed) return ;
 
             	    }
             	    break;
             	case 8 :
-            	    // DSLMap.g:306:75: DOT
+            	    // DSLMap.g:326:75: DOT
             	    {
             	    mDOT(); if (failed) return ;
 
@@ -672,10 +693,10 @@
     // $ANTLR start MISC
     public final void mMISC() throws RecognitionException {
         try {
-            // DSLMap.g:310:7: ( '!' | '@' | '$' | '%' | '^' | '*' | '-' | '+' | '?' | '/' | '\\'' | '\"' | '|' | '&' | '(' | ')' | ';' )
+            // DSLMap.g:330:7: ( '>' | '<' | '!' | '@' | '$' | '%' | '^' | '*' | '-' | '+' | '?' | '/' | '\\'' | '\"' | '|' | '&' | '(' | ')' | ';' )
             // DSLMap.g:
             {
-            if ( (input.LA(1)>='!' && input.LA(1)<='\"')||(input.LA(1)>='$' && input.LA(1)<='+')||input.LA(1)=='-'||input.LA(1)=='/'||input.LA(1)==';'||(input.LA(1)>='?' && input.LA(1)<='@')||input.LA(1)=='^'||input.LA(1)=='|' ) {
+            if ( (input.LA(1)>='!' && input.LA(1)<='\"')||(input.LA(1)>='$' && input.LA(1)<='+')||input.LA(1)=='-'||input.LA(1)=='/'||(input.LA(1)>=';' && input.LA(1)<='<')||(input.LA(1)>='>' && input.LA(1)<='@')||input.LA(1)=='^'||input.LA(1)=='|' ) {
                 input.consume();
             failed=false;
             }
@@ -696,8 +717,8 @@
     // $ANTLR end MISC
 
     public void mTokens() throws RecognitionException {
-        // DSLMap.g:1:8: ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | LINE_COMMENT | LITERAL )
-        int alt5=12;
+        // DSLMap.g:1:8: ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | COMMA | LINE_COMMENT | LITERAL )
+        int alt5=13;
         switch ( input.LA(1) ) {
         case '\t':
         case '\f':
@@ -741,8 +762,8 @@
             {
             int LA5_8 = input.LA(2);
 
-            if ( ((LA5_8>='!' && LA5_8<='\"')||(LA5_8>='$' && LA5_8<='+')||(LA5_8>='-' && LA5_8<='9')||LA5_8==';'||(LA5_8>='?' && LA5_8<='Z')||LA5_8=='\\'||(LA5_8>='^' && LA5_8<='_')||(LA5_8>='a' && LA5_8<='z')||LA5_8=='|'||(LA5_8>='\u00C0' && LA5_8<='\u00FF')) ) {
-                alt5=12;
+            if ( ((LA5_8>='!' && LA5_8<='\"')||(LA5_8>='$' && LA5_8<='+')||(LA5_8>='-' && LA5_8<='9')||(LA5_8>=';' && LA5_8<='<')||(LA5_8>='>' && LA5_8<='Z')||LA5_8=='\\'||(LA5_8>='^' && LA5_8<='_')||(LA5_8>='a' && LA5_8<='z')||LA5_8=='|'||(LA5_8>='\u00C0' && LA5_8<='\u00FF')) ) {
+                alt5=13;
             }
             else {
                 alt5=8;}
@@ -753,7 +774,7 @@
             int LA5_9 = input.LA(2);
 
             if ( ((LA5_9>='\u0000' && LA5_9<='\uFFFE')) ) {
-                alt5=11;
+                alt5=12;
             }
             else {
                 alt5=9;}
@@ -764,6 +785,11 @@
             alt5=10;
             }
             break;
+        case ',':
+            {
+            alt5=11;
+            }
+            break;
         case '!':
         case '\"':
         case '$':
@@ -787,6 +813,8 @@
         case '8':
         case '9':
         case ';':
+        case '<':
+        case '>':
         case '?':
         case '@':
         case 'A':
@@ -910,13 +938,13 @@
         case '\u00FE':
         case '\u00FF':
             {
-            alt5=12;
+            alt5=13;
             }
             break;
         default:
             if (backtracking>0) {failed=true; return ;}
             NoViableAltException nvae =
-                new NoViableAltException("1:1: Tokens : ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | LINE_COMMENT | LITERAL );", 5, 0, input);
+                new NoViableAltException("1:1: Tokens : ( WS | EOL | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | EQUALS | DOT | POUND | COLON | COMMA | LINE_COMMENT | LITERAL );", 5, 0, input);
 
             throw nvae;
         }
@@ -993,15 +1021,22 @@
                 }
                 break;
             case 11 :
-                // DSLMap.g:1:88: LINE_COMMENT
+                // DSLMap.g:1:88: COMMA
                 {
-                mLINE_COMMENT(); if (failed) return ;
+                mCOMMA(); if (failed) return ;
 
                 }
                 break;
             case 12 :
-                // DSLMap.g:1:101: LITERAL
+                // DSLMap.g:1:94: LINE_COMMENT
                 {
+                mLINE_COMMENT(); if (failed) return ;
+
+                }
+                break;
+            case 13 :
+                // DSLMap.g:1:107: LITERAL
+                {
                 mLITERAL(); if (failed) return ;
 
                 }
@@ -1013,8 +1048,8 @@
 
     // $ANTLR start synpred1
     public final void synpred1_fragment() throws RecognitionException {   
-        // DSLMap.g:251:14: ( '\\r\\n' )
-        // DSLMap.g:251:16: '\\r\\n'
+        // DSLMap.g:268:14: ( '\\r\\n' )
+        // DSLMap.g:268:16: '\\r\\n'
         {
         match("\r\n"); if (failed) return ;
 

Modified: labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java
===================================================================
--- labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java	2008-05-22 18:32:46 UTC (rev 20114)
+++ labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapParser.java	2008-05-22 23:06:09 UTC (rev 20115)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 DSLMap.g 2008-05-20 17:54:39
+// $ANTLR 3.0.1 DSLMap.g 2008-05-22 16:02:41
 
 	package org.drools.lang.dsl;
 
@@ -14,19 +14,20 @@
 
 public class DSLMapParser extends Parser {
     public static final String[] tokenNames = new String[] {
-        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_DSL_GRAMMAR", "VT_COMMENT", "VT_ENTRY", "VT_SCOPE", "VT_CONDITION", "VT_CONSEQUENCE", "VT_KEYWORD", "VT_ANY", "VT_META", "VT_ENTRY_KEY", "VT_ENTRY_VAL", "VT_VAR_DEF", "VT_VAR_REF", "VT_LITERAL", "VT_PATTERN", "VT_SPACE", "EOL", "LINE_COMMENT", "EQUALS", "LEFT_SQUARE", "RIGHT_SQUARE", "LITERAL", "COLON", "LEFT_CURLY", "RIGHT_CURLY", "WS", "EscapeSequence", "DOT", "POUND", "MISC"
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "VT_DSL_GRAMMAR", "VT_COMMENT", "VT_ENTRY", "VT_SCOPE", "VT_CONDITION", "VT_CONSEQUENCE", "VT_KEYWORD", "VT_ANY", "VT_META", "VT_ENTRY_KEY", "VT_ENTRY_VAL", "VT_VAR_DEF", "VT_VAR_REF", "VT_LITERAL", "VT_PATTERN", "VT_SPACE", "EOL", "LINE_COMMENT", "EQUALS", "LEFT_SQUARE", "RIGHT_SQUARE", "LITERAL", "COMMA", "COLON", "LEFT_CURLY", "RIGHT_CURLY", "WS", "EscapeSequence", "DOT", "POUND", "MISC"
     };
-    public static final int RIGHT_CURLY=28;
+    public static final int COMMA=26;
+    public static final int RIGHT_CURLY=29;
     public static final int VT_ENTRY_VAL=14;
-    public static final int WS=29;
-    public static final int MISC=33;
+    public static final int WS=30;
+    public static final int MISC=34;
     public static final int VT_META=12;
     public static final int VT_CONSEQUENCE=9;
     public static final int VT_SPACE=19;
     public static final int LINE_COMMENT=21;
     public static final int VT_ANY=11;
     public static final int VT_LITERAL=17;
-    public static final int DOT=31;
+    public static final int DOT=32;
     public static final int EQUALS=22;
     public static final int VT_DSL_GRAMMAR=4;
     public static final int VT_CONDITION=8;
@@ -34,23 +35,23 @@
     public static final int VT_VAR_DEF=15;
     public static final int LITERAL=25;
     public static final int VT_PATTERN=18;
-    public static final int EscapeSequence=30;
+    public static final int EscapeSequence=31;
     public static final int VT_COMMENT=5;
     public static final int EOF=-1;
     public static final int EOL=20;
     public static final int LEFT_SQUARE=23;
     public static final int VT_ENTRY_KEY=13;
-    public static final int COLON=26;
+    public static final int COLON=27;
     public static final int VT_SCOPE=7;
     public static final int VT_KEYWORD=10;
-    public static final int POUND=32;
-    public static final int LEFT_CURLY=27;
+    public static final int POUND=33;
+    public static final int LEFT_CURLY=28;
     public static final int VT_VAR_REF=16;
     public static final int RIGHT_SQUARE=24;
 
         public DSLMapParser(TokenStream input) {
             super(input);
-            ruleMemo = new HashMap[45+1];
+            ruleMemo = new HashMap[47+1];
          }
         
     protected TreeAdaptor adaptor = new CommonTreeAdaptor();
@@ -382,7 +383,7 @@
     };
 
     // $ANTLR start entry
-    // DSLMap.g:94:1: entry : scope_section meta_section key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section meta_section key_section value_section ) ;
+    // DSLMap.g:94:1: entry : scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) ;
     public final entry_return entry() throws RecognitionException {
         entry_return retval = new entry_return();
         retval.start = input.LT(1);
@@ -412,66 +413,102 @@
         RewriteRuleSubtreeStream stream_scope_section=new RewriteRuleSubtreeStream(adaptor,"rule scope_section");
         RewriteRuleSubtreeStream stream_meta_section=new RewriteRuleSubtreeStream(adaptor,"rule meta_section");
         try {
-            // DSLMap.g:94:8: ( scope_section meta_section key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section meta_section key_section value_section ) )
-            // DSLMap.g:94:10: scope_section meta_section key_section EQUALS value_section ( EOL | EOF )
+            // DSLMap.g:94:8: ( scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) )
+            // DSLMap.g:94:10: scope_section ( meta_section )? key_section EQUALS value_section ( EOL | EOF )
             {
             pushFollow(FOLLOW_scope_section_in_entry339);
             scope_section6=scope_section();
             _fsp--;
             if (failed) return retval;
             if ( backtracking==0 ) stream_scope_section.add(scope_section6.getTree());
-            pushFollow(FOLLOW_meta_section_in_entry341);
-            meta_section7=meta_section();
-            _fsp--;
-            if (failed) return retval;
-            if ( backtracking==0 ) stream_meta_section.add(meta_section7.getTree());
-            pushFollow(FOLLOW_key_section_in_entry343);
+            // DSLMap.g:94:24: ( meta_section )?
+            int alt3=2;
+            int LA3_0 = input.LA(1);
+
+            if ( (LA3_0==LEFT_SQUARE) ) {
+                int LA3_1 = input.LA(2);
+
+                if ( (LA3_1==LITERAL) ) {
+                    int LA3_3 = input.LA(3);
+
+                    if ( (LA3_3==RIGHT_SQUARE) ) {
+                        int LA3_4 = input.LA(4);
+
+                        if ( (synpred4()) ) {
+                            alt3=1;
+                        }
+                    }
+                }
+                else if ( (LA3_1==RIGHT_SQUARE) ) {
+                    int LA3_4 = input.LA(3);
+
+                    if ( (synpred4()) ) {
+                        alt3=1;
+                    }
+                }
+            }
+            switch (alt3) {
+                case 1 :
+                    // DSLMap.g:0:0: meta_section
+                    {
+                    pushFollow(FOLLOW_meta_section_in_entry341);
+                    meta_section7=meta_section();
+                    _fsp--;
+                    if (failed) return retval;
+                    if ( backtracking==0 ) stream_meta_section.add(meta_section7.getTree());
+
+                    }
+                    break;
+
+            }
+
+            pushFollow(FOLLOW_key_section_in_entry344);
             key_section8=key_section();
             _fsp--;
             if (failed) return retval;
             if ( backtracking==0 ) stream_key_section.add(key_section8.getTree());
             EQUALS9=(Token)input.LT(1);
-            match(input,EQUALS,FOLLOW_EQUALS_in_entry345); if (failed) return retval;
+            match(input,EQUALS,FOLLOW_EQUALS_in_entry346); if (failed) return retval;
             if ( backtracking==0 ) stream_EQUALS.add(EQUALS9);
 
-            pushFollow(FOLLOW_value_section_in_entry347);
+            pushFollow(FOLLOW_value_section_in_entry348);
             value_section10=value_section();
             _fsp--;
             if (failed) return retval;
             if ( backtracking==0 ) stream_value_section.add(value_section10.getTree());
-            // DSLMap.g:94:70: ( EOL | EOF )
-            int alt3=2;
-            int LA3_0 = input.LA(1);
+            // DSLMap.g:94:71: ( EOL | EOF )
+            int alt4=2;
+            int LA4_0 = input.LA(1);
 
-            if ( (LA3_0==EOL) ) {
-                alt3=1;
+            if ( (LA4_0==EOL) ) {
+                alt4=1;
             }
-            else if ( (LA3_0==EOF) ) {
-                alt3=2;
+            else if ( (LA4_0==EOF) ) {
+                alt4=2;
             }
             else {
                 if (backtracking>0) {failed=true; return retval;}
                 NoViableAltException nvae =
-                    new NoViableAltException("94:70: ( EOL | EOF )", 3, 0, input);
+                    new NoViableAltException("94:71: ( EOL | EOF )", 4, 0, input);
 
                 throw nvae;
             }
-            switch (alt3) {
+            switch (alt4) {
                 case 1 :
-                    // DSLMap.g:94:71: EOL
+                    // DSLMap.g:94:72: EOL
                     {
                     EOL11=(Token)input.LT(1);
-                    match(input,EOL,FOLLOW_EOL_in_entry350); if (failed) return retval;
+                    match(input,EOL,FOLLOW_EOL_in_entry351); if (failed) return retval;
                     if ( backtracking==0 ) stream_EOL.add(EOL11);
 
 
                     }
                     break;
                 case 2 :
-                    // DSLMap.g:94:75: EOF
+                    // DSLMap.g:94:76: EOF
                     {
                     EOF12=(Token)input.LT(1);
-                    match(input,EOF,FOLLOW_EOF_in_entry352); if (failed) return retval;
+                    match(input,EOF,FOLLOW_EOF_in_entry353); if (failed) return retval;
                     if ( backtracking==0 ) stream_EOF.add(EOF12);
 
 
@@ -482,7 +519,7 @@
 
 
             // AST REWRITE
-            // elements: value_section, meta_section, scope_section, key_section
+            // elements: key_section, value_section, scope_section, meta_section
             // token labels: 
             // rule labels: retval
             // token list labels: 
@@ -492,15 +529,20 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 95:2: -> ^( VT_ENTRY scope_section meta_section key_section value_section )
+            // 95:2: -> ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
             {
-                // DSLMap.g:95:5: ^( VT_ENTRY scope_section meta_section key_section value_section )
+                // DSLMap.g:95:5: ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_ENTRY, "VT_ENTRY"), root_1);
 
                 adaptor.addChild(root_1, stream_scope_section.next());
-                adaptor.addChild(root_1, stream_meta_section.next());
+                // DSLMap.g:95:30: ( meta_section )?
+                if ( stream_meta_section.hasNext() ) {
+                    adaptor.addChild(root_1, stream_meta_section.next());
+
+                }
+                stream_meta_section.reset();
                 adaptor.addChild(root_1, stream_key_section.next());
                 adaptor.addChild(root_1, stream_value_section.next());
 
@@ -567,32 +609,32 @@
             // DSLMap.g:101:4: LEFT_SQUARE (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key ) RIGHT_SQUARE
             {
             LEFT_SQUARE13=(Token)input.LT(1);
-            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_scope_section382); if (failed) return retval;
+            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_scope_section384); if (failed) return retval;
             if ( backtracking==0 ) stream_LEFT_SQUARE.add(LEFT_SQUARE13);
 
             // DSLMap.g:102:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )
-            int alt4=4;
-            int LA4_0 = input.LA(1);
+            int alt5=4;
+            int LA5_0 = input.LA(1);
 
-            if ( (LA4_0==LITERAL) ) {
-                int LA4_1 = input.LA(2);
+            if ( (LA5_0==LITERAL) ) {
+                int LA5_1 = input.LA(2);
 
-                if ( ((synpred5()&&validateIdentifierKey("condition")||validateIdentifierKey("when"))) ) {
-                    alt4=1;
+                if ( ((synpred6()&&validateIdentifierKey("condition")||validateIdentifierKey("when"))) ) {
+                    alt5=1;
                 }
-                else if ( ((synpred6()&&validateIdentifierKey("consequence")||validateIdentifierKey("then"))) ) {
-                    alt4=2;
+                else if ( ((synpred7()&&validateIdentifierKey("consequence")||validateIdentifierKey("then"))) ) {
+                    alt5=2;
                 }
-                else if ( ((synpred7()&&validateIdentifierKey("keyword"))) ) {
-                    alt4=3;
+                else if ( ((synpred8()&&validateIdentifierKey("keyword"))) ) {
+                    alt5=3;
                 }
                 else if ( (validateIdentifierKey("*")) ) {
-                    alt4=4;
+                    alt5=4;
                 }
                 else {
                     if (backtracking>0) {failed=true; return retval;}
                     NoViableAltException nvae =
-                        new NoViableAltException("102:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )", 4, 1, input);
+                        new NoViableAltException("102:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )", 5, 1, input);
 
                     throw nvae;
                 }
@@ -600,15 +642,15 @@
             else {
                 if (backtracking>0) {failed=true; return retval;}
                 NoViableAltException nvae =
-                    new NoViableAltException("102:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )", 4, 0, input);
+                    new NoViableAltException("102:3: (value1= condition_key | value2= consequence_key | value3= keyword_key | value4= any_key )", 5, 0, input);
 
                 throw nvae;
             }
-            switch (alt4) {
+            switch (alt5) {
                 case 1 :
                     // DSLMap.g:102:4: value1= condition_key
                     {
-                    pushFollow(FOLLOW_condition_key_in_scope_section390);
+                    pushFollow(FOLLOW_condition_key_in_scope_section392);
                     value1=condition_key();
                     _fsp--;
                     if (failed) return retval;
@@ -619,7 +661,7 @@
                 case 2 :
                     // DSLMap.g:103:5: value2= consequence_key
                     {
-                    pushFollow(FOLLOW_consequence_key_in_scope_section399);
+                    pushFollow(FOLLOW_consequence_key_in_scope_section401);
                     value2=consequence_key();
                     _fsp--;
                     if (failed) return retval;
@@ -630,7 +672,7 @@
                 case 3 :
                     // DSLMap.g:104:5: value3= keyword_key
                     {
-                    pushFollow(FOLLOW_keyword_key_in_scope_section407);
+                    pushFollow(FOLLOW_keyword_key_in_scope_section409);
                     value3=keyword_key();
                     _fsp--;
                     if (failed) return retval;
@@ -641,7 +683,7 @@
                 case 4 :
                     // DSLMap.g:105:5: value4= any_key
                     {
-                    pushFollow(FOLLOW_any_key_in_scope_section415);
+                    pushFollow(FOLLOW_any_key_in_scope_section417);
                     value4=any_key();
                     _fsp--;
                     if (failed) return retval;
@@ -653,12 +695,12 @@
             }
 
             RIGHT_SQUARE14=(Token)input.LT(1);
-            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_scope_section423); if (failed) return retval;
+            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_scope_section425); if (failed) return retval;
             if ( backtracking==0 ) stream_RIGHT_SQUARE.add(RIGHT_SQUARE14);
 
 
             // AST REWRITE
-            // elements: value3, value1, value4, value2
+            // elements: value1, value2, value4, value3
             // token labels: 
             // rule labels: value1, value4, value2, retval, value3
             // token list labels: 
@@ -759,22 +801,22 @@
             // DSLMap.g:114:4: LEFT_SQUARE ( LITERAL )? RIGHT_SQUARE
             {
             LEFT_SQUARE15=(Token)input.LT(1);
-            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_meta_section461); if (failed) return retval;
+            match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_meta_section463); if (failed) return retval;
             if ( backtracking==0 ) stream_LEFT_SQUARE.add(LEFT_SQUARE15);
 
             // DSLMap.g:114:16: ( LITERAL )?
-            int alt5=2;
-            int LA5_0 = input.LA(1);
+            int alt6=2;
+            int LA6_0 = input.LA(1);
 
-            if ( (LA5_0==LITERAL) ) {
-                alt5=1;
+            if ( (LA6_0==LITERAL) ) {
+                alt6=1;
             }
-            switch (alt5) {
+            switch (alt6) {
                 case 1 :
                     // DSLMap.g:0:0: LITERAL
                     {
                     LITERAL16=(Token)input.LT(1);
-                    match(input,LITERAL,FOLLOW_LITERAL_in_meta_section463); if (failed) return retval;
+                    match(input,LITERAL,FOLLOW_LITERAL_in_meta_section465); if (failed) return retval;
                     if ( backtracking==0 ) stream_LITERAL.add(LITERAL16);
 
 
@@ -784,7 +826,7 @@
             }
 
             RIGHT_SQUARE17=(Token)input.LT(1);
-            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_meta_section466); if (failed) return retval;
+            match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_meta_section468); if (failed) return retval;
             if ( backtracking==0 ) stream_RIGHT_SQUARE.add(RIGHT_SQUARE17);
 
 
@@ -861,22 +903,22 @@
             // DSLMap.g:119:4: ( key_sentence )+
             {
             // DSLMap.g:119:4: ( key_sentence )+
-            int cnt6=0;
-            loop6:
+            int cnt7=0;
+            loop7:
             do {
-                int alt6=2;
-                int LA6_0 = input.LA(1);
+                int alt7=2;
+                int LA7_0 = input.LA(1);
 
-                if ( ((LA6_0>=LEFT_SQUARE && LA6_0<=LEFT_CURLY)) ) {
-                    alt6=1;
+                if ( ((LA7_0>=LEFT_SQUARE && LA7_0<=LITERAL)||(LA7_0>=COLON && LA7_0<=LEFT_CURLY)) ) {
+                    alt7=1;
                 }
 
 
-                switch (alt6) {
+                switch (alt7) {
             	case 1 :
             	    // DSLMap.g:0:0: key_sentence
             	    {
-            	    pushFollow(FOLLOW_key_sentence_in_key_section488);
+            	    pushFollow(FOLLOW_key_sentence_in_key_section490);
             	    key_sentence18=key_sentence();
             	    _fsp--;
             	    if (failed) return retval;
@@ -886,13 +928,13 @@
             	    break;
 
             	default :
-            	    if ( cnt6 >= 1 ) break loop6;
+            	    if ( cnt7 >= 1 ) break loop7;
             	    if (backtracking>0) {failed=true; return retval;}
                         EarlyExitException eee =
-                            new EarlyExitException(6, input);
+                            new EarlyExitException(7, input);
                         throw eee;
                 }
-                cnt6++;
+                cnt7++;
             } while (true);
 
 
@@ -973,29 +1015,29 @@
 
         try {
             // DSLMap.g:127:2: ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] )
-            int alt7=2;
-            int LA7_0 = input.LA(1);
+            int alt8=2;
+            int LA8_0 = input.LA(1);
 
-            if ( (LA7_0==LEFT_CURLY) ) {
-                alt7=1;
+            if ( (LA8_0==LEFT_CURLY) ) {
+                alt8=1;
             }
-            else if ( ((LA7_0>=LEFT_SQUARE && LA7_0<=COLON)) ) {
-                alt7=2;
+            else if ( ((LA8_0>=LEFT_SQUARE && LA8_0<=LITERAL)||LA8_0==COLON) ) {
+                alt8=2;
             }
             else {
                 if (backtracking>0) {failed=true; return retval;}
                 NoViableAltException nvae =
-                    new NoViableAltException("123:1: key_sentence : ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] );", 7, 0, input);
+                    new NoViableAltException("123:1: key_sentence : ( variable_definition | cb= key_chunk -> VT_LITERAL[$cb.start, text] );", 8, 0, input);
 
                 throw nvae;
             }
-            switch (alt7) {
+            switch (alt8) {
                 case 1 :
                     // DSLMap.g:127:4: variable_definition
                     {
                     root_0 = (Object)adaptor.nil();
 
-                    pushFollow(FOLLOW_variable_definition_in_key_sentence519);
+                    pushFollow(FOLLOW_variable_definition_in_key_sentence521);
                     variable_definition19=variable_definition();
                     _fsp--;
                     if (failed) return retval;
@@ -1006,7 +1048,7 @@
                 case 2 :
                     // DSLMap.g:128:4: cb= key_chunk
                     {
-                    pushFollow(FOLLOW_key_chunk_in_key_sentence526);
+                    pushFollow(FOLLOW_key_chunk_in_key_sentence528);
                     cb=key_chunk();
                     _fsp--;
                     if (failed) return retval;
@@ -1079,28 +1121,28 @@
             root_0 = (Object)adaptor.nil();
 
             // DSLMap.g:133:4: ( literal )+
-            int cnt8=0;
-            loop8:
+            int cnt9=0;
+            loop9:
             do {
-                int alt8=2;
-                int LA8_0 = input.LA(1);
+                int alt9=2;
+                int LA9_0 = input.LA(1);
 
-                if ( ((LA8_0>=LEFT_SQUARE && LA8_0<=COLON)) ) {
-                    int LA8_2 = input.LA(2);
+                if ( ((LA9_0>=LEFT_SQUARE && LA9_0<=LITERAL)||LA9_0==COLON) ) {
+                    int LA9_2 = input.LA(2);
 
-                    if ( (synpred11()) ) {
-                        alt8=1;
+                    if ( (synpred12()) ) {
+                        alt9=1;
                     }
 
 
                 }
 
 
-                switch (alt8) {
+                switch (alt9) {
             	case 1 :
             	    // DSLMap.g:0:0: literal
             	    {
-            	    pushFollow(FOLLOW_literal_in_key_chunk547);
+            	    pushFollow(FOLLOW_literal_in_key_chunk549);
             	    literal20=literal();
             	    _fsp--;
             	    if (failed) return retval;
@@ -1110,13 +1152,13 @@
             	    break;
 
             	default :
-            	    if ( cnt8 >= 1 ) break loop8;
+            	    if ( cnt9 >= 1 ) break loop9;
             	    if (backtracking>0) {failed=true; return retval;}
                         EarlyExitException eee =
-                            new EarlyExitException(8, input);
+                            new EarlyExitException(9, input);
                         throw eee;
                 }
-                cnt8++;
+                cnt9++;
             } while (true);
 
 
@@ -1161,22 +1203,22 @@
             // DSLMap.g:137:4: ( value_sentence )+
             {
             // DSLMap.g:137:4: ( value_sentence )+
-            int cnt9=0;
-            loop9:
+            int cnt10=0;
+            loop10:
             do {
-                int alt9=2;
-                int LA9_0 = input.LA(1);
+                int alt10=2;
+                int LA10_0 = input.LA(1);
 
-                if ( ((LA9_0>=EQUALS && LA9_0<=LEFT_CURLY)) ) {
-                    alt9=1;
+                if ( ((LA10_0>=EQUALS && LA10_0<=LEFT_CURLY)) ) {
+                    alt10=1;
                 }
 
 
-                switch (alt9) {
+                switch (alt10) {
             	case 1 :
             	    // DSLMap.g:0:0: value_sentence
             	    {
-            	    pushFollow(FOLLOW_value_sentence_in_value_section562);
+            	    pushFollow(FOLLOW_value_sentence_in_value_section564);
             	    value_sentence21=value_sentence();
             	    _fsp--;
             	    if (failed) return retval;
@@ -1186,13 +1228,13 @@
             	    break;
 
             	default :
-            	    if ( cnt9 >= 1 ) break loop9;
+            	    if ( cnt10 >= 1 ) break loop10;
             	    if (backtracking>0) {failed=true; return retval;}
                         EarlyExitException eee =
-                            new EarlyExitException(9, input);
+                            new EarlyExitException(10, input);
                         throw eee;
                 }
-                cnt9++;
+                cnt10++;
             } while (true);
 
 
@@ -1273,29 +1315,29 @@
 
         try {
             // DSLMap.g:145:2: ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] )
-            int alt10=2;
-            int LA10_0 = input.LA(1);
+            int alt11=2;
+            int LA11_0 = input.LA(1);
 
-            if ( (LA10_0==LEFT_CURLY) ) {
-                alt10=1;
+            if ( (LA11_0==LEFT_CURLY) ) {
+                alt11=1;
             }
-            else if ( ((LA10_0>=EQUALS && LA10_0<=COLON)) ) {
-                alt10=2;
+            else if ( ((LA11_0>=EQUALS && LA11_0<=COLON)) ) {
+                alt11=2;
             }
             else {
                 if (backtracking>0) {failed=true; return retval;}
                 NoViableAltException nvae =
-                    new NoViableAltException("141:1: value_sentence : ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] );", 10, 0, input);
+                    new NoViableAltException("141:1: value_sentence : ( variable_reference | vc= value_chunk -> VT_LITERAL[$vc.start, text] );", 11, 0, input);
 
                 throw nvae;
             }
-            switch (alt10) {
+            switch (alt11) {
                 case 1 :
                     // DSLMap.g:145:4: variable_reference
                     {
                     root_0 = (Object)adaptor.nil();
 
-                    pushFollow(FOLLOW_variable_reference_in_value_sentence593);
+                    pushFollow(FOLLOW_variable_reference_in_value_sentence595);
                     variable_reference22=variable_reference();
                     _fsp--;
                     if (failed) return retval;
@@ -1306,7 +1348,7 @@
                 case 2 :
                     // DSLMap.g:146:4: vc= value_chunk
                     {
-                    pushFollow(FOLLOW_value_chunk_in_value_sentence600);
+                    pushFollow(FOLLOW_value_chunk_in_value_sentence602);
                     vc=value_chunk();
                     _fsp--;
                     if (failed) return retval;
@@ -1361,7 +1403,7 @@
     };
 
     // $ANTLR start value_chunk
-    // DSLMap.g:150:1: value_chunk : ( literal | EQUALS )+ ;
+    // DSLMap.g:150:1: value_chunk : ( literal | EQUALS | COMMA )+ ;
     public final value_chunk_return value_chunk() throws RecognitionException {
         value_chunk_return retval = new value_chunk_return();
         retval.start = input.LT(1);
@@ -1369,49 +1411,69 @@
         Object root_0 = null;
 
         Token EQUALS24=null;
+        Token COMMA25=null;
         literal_return literal23 = null;
 
 
         Object EQUALS24_tree=null;
+        Object COMMA25_tree=null;
 
         try {
-            // DSLMap.g:151:2: ( ( literal | EQUALS )+ )
-            // DSLMap.g:151:4: ( literal | EQUALS )+
+            // DSLMap.g:151:2: ( ( literal | EQUALS | COMMA )+ )
+            // DSLMap.g:151:4: ( literal | EQUALS | COMMA )+
             {
             root_0 = (Object)adaptor.nil();
 
-            // DSLMap.g:151:4: ( literal | EQUALS )+
-            int cnt11=0;
-            loop11:
+            // DSLMap.g:151:4: ( literal | EQUALS | COMMA )+
+            int cnt12=0;
+            loop12:
             do {
-                int alt11=3;
-                int LA11_0 = input.LA(1);
+                int alt12=4;
+                switch ( input.LA(1) ) {
+                case LEFT_SQUARE:
+                case RIGHT_SQUARE:
+                case LITERAL:
+                case COLON:
+                    {
+                    int LA12_2 = input.LA(2);
 
-                if ( ((LA11_0>=LEFT_SQUARE && LA11_0<=COLON)) ) {
-                    int LA11_2 = input.LA(2);
+                    if ( (synpred15()) ) {
+                        alt12=1;
+                    }
 
-                    if ( (synpred14()) ) {
-                        alt11=1;
+
                     }
+                    break;
+                case EQUALS:
+                    {
+                    int LA12_3 = input.LA(2);
 
+                    if ( (synpred16()) ) {
+                        alt12=2;
+                    }
 
-                }
-                else if ( (LA11_0==EQUALS) ) {
-                    int LA11_3 = input.LA(2);
 
-                    if ( (synpred15()) ) {
-                        alt11=2;
                     }
+                    break;
+                case COMMA:
+                    {
+                    int LA12_4 = input.LA(2);
 
+                    if ( (synpred17()) ) {
+                        alt12=3;
+                    }
 
+
+                    }
+                    break;
+
                 }
 
-
-                switch (alt11) {
+                switch (alt12) {
             	case 1 :
             	    // DSLMap.g:151:5: literal
             	    {
-            	    pushFollow(FOLLOW_literal_in_value_chunk622);
+            	    pushFollow(FOLLOW_literal_in_value_chunk624);
             	    literal23=literal();
             	    _fsp--;
             	    if (failed) return retval;
@@ -1423,7 +1485,7 @@
             	    // DSLMap.g:151:13: EQUALS
             	    {
             	    EQUALS24=(Token)input.LT(1);
-            	    match(input,EQUALS,FOLLOW_EQUALS_in_value_chunk624); if (failed) return retval;
+            	    match(input,EQUALS,FOLLOW_EQUALS_in_value_chunk626); if (failed) return retval;
             	    if ( backtracking==0 ) {
             	    EQUALS24_tree = (Object)adaptor.create(EQUALS24);
             	    adaptor.addChild(root_0, EQUALS24_tree);
@@ -1431,15 +1493,27 @@
 
             	    }
             	    break;
+            	case 3 :
+            	    // DSLMap.g:151:20: COMMA
+            	    {
+            	    COMMA25=(Token)input.LT(1);
+            	    match(input,COMMA,FOLLOW_COMMA_in_value_chunk628); if (failed) return retval;
+            	    if ( backtracking==0 ) {
+            	    COMMA25_tree = (Object)adaptor.create(COMMA25);
+            	    adaptor.addChild(root_0, COMMA25_tree);
+            	    }
 
+            	    }
+            	    break;
+
             	default :
-            	    if ( cnt11 >= 1 ) break loop11;
+            	    if ( cnt12 >= 1 ) break loop12;
             	    if (backtracking>0) {failed=true; return retval;}
                         EarlyExitException eee =
-                            new EarlyExitException(11, input);
+                            new EarlyExitException(12, input);
                         throw eee;
                 }
-                cnt11++;
+                cnt12++;
             } while (true);
 
 
@@ -1475,9 +1549,9 @@
 
         Object root_0 = null;
 
-        Token set25=null;
+        Token set26=null;
 
-        Object set25_tree=null;
+        Object set26_tree=null;
 
         try {
             // DSLMap.g:156:2: ( ( LITERAL | COLON | LEFT_SQUARE | RIGHT_SQUARE ) )
@@ -1485,17 +1559,17 @@
             {
             root_0 = (Object)adaptor.nil();
 
-            set25=(Token)input.LT(1);
-            if ( (input.LA(1)>=LEFT_SQUARE && input.LA(1)<=COLON) ) {
+            set26=(Token)input.LT(1);
+            if ( (input.LA(1)>=LEFT_SQUARE && input.LA(1)<=LITERAL)||input.LA(1)==COLON ) {
                 input.consume();
-                if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set25));
+                if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set26));
                 errorRecovery=false;failed=false;
             }
             else {
                 if (backtracking>0) {failed=true; return retval;}
                 MismatchedSetException mse =
                     new MismatchedSetException(null,input);
-                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_literal642);    throw mse;
+                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_literal646);    throw mse;
             }
 
 
@@ -1534,14 +1608,14 @@
         Token lc=null;
         Token name=null;
         Token rc=null;
-        Token COLON26=null;
+        Token COLON27=null;
         pattern_return pat = null;
 
 
         Object lc_tree=null;
         Object name_tree=null;
         Object rc_tree=null;
-        Object COLON26_tree=null;
+        Object COLON27_tree=null;
         RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
         RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
@@ -1557,32 +1631,35 @@
             // DSLMap.g:166:4: lc= LEFT_CURLY name= LITERAL ( COLON pat= pattern )? rc= RIGHT_CURLY
             {
             lc=(Token)input.LT(1);
-            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition678); if (failed) return retval;
+            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition682); if (failed) return retval;
             if ( backtracking==0 ) stream_LEFT_CURLY.add(lc);
 
             if ( backtracking==0 ) {
-               if( ((CommonToken)input.LT(-2)).getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true; 
+               
+              		CommonToken back2 =  (CommonToken)input.LT(-2);
+              		if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true; 
+              		
             }
             name=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition686); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition693); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(name);
 
-            // DSLMap.g:167:15: ( COLON pat= pattern )?
-            int alt12=2;
-            int LA12_0 = input.LA(1);
+            // DSLMap.g:171:15: ( COLON pat= pattern )?
+            int alt13=2;
+            int LA13_0 = input.LA(1);
 
-            if ( (LA12_0==COLON) ) {
-                alt12=1;
+            if ( (LA13_0==COLON) ) {
+                alt13=1;
             }
-            switch (alt12) {
+            switch (alt13) {
                 case 1 :
-                    // DSLMap.g:167:17: COLON pat= pattern
+                    // DSLMap.g:171:17: COLON pat= pattern
                     {
-                    COLON26=(Token)input.LT(1);
-                    match(input,COLON,FOLLOW_COLON_in_variable_definition690); if (failed) return retval;
-                    if ( backtracking==0 ) stream_COLON.add(COLON26);
+                    COLON27=(Token)input.LT(1);
+                    match(input,COLON,FOLLOW_COLON_in_variable_definition697); if (failed) return retval;
+                    if ( backtracking==0 ) stream_COLON.add(COLON27);
 
-                    pushFollow(FOLLOW_pattern_in_variable_definition694);
+                    pushFollow(FOLLOW_pattern_in_variable_definition701);
                     pat=pattern();
                     _fsp--;
                     if (failed) return retval;
@@ -1597,11 +1674,15 @@
             }
 
             rc=(Token)input.LT(1);
-            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition703); if (failed) return retval;
+            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition710); if (failed) return retval;
             if ( backtracking==0 ) stream_RIGHT_CURLY.add(rc);
 
             if ( backtracking==0 ) {
-              if(((CommonToken)rc).getStopIndex() < ((CommonToken)input.LT(1)).getStartIndex() - 1) hasSpaceAfter = true;
+              
+              	CommonToken rc1 = (CommonToken)input.LT(1);
+              	System.out.println("lt1 from rc: " + rc1.getText());
+              	if(!"=".equals(rc1.getText()) && ((CommonToken)rc).getStopIndex() < rc1.getStartIndex() - 1) hasSpaceAfter = true;
+              	
             }
 
             // AST REWRITE
@@ -1616,10 +1697,10 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 169:2: -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+            // 177:2: -> {hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
             if (hasSpaceBefore && !"".equals(text) && !hasSpaceAfter) {
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
-                // DSLMap.g:169:70: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+                // DSLMap.g:177:70: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1631,9 +1712,9 @@
                 }
 
             }
-            else // 170:2: -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+            else // 178:2: -> {!hasSpaceBefore && !\"\".equals(text) && !hasSpaceAfter}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
             if (!hasSpaceBefore && !"".equals(text)  && !hasSpaceAfter) {
-                // DSLMap.g:170:63: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+                // DSLMap.g:178:63: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1645,10 +1726,10 @@
                 }
 
             }
-            else // 171:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name)
+            else // 179:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name)
             if (hasSpaceBefore  && !hasSpaceAfter) {
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
-                // DSLMap.g:171:51: ^( VT_VAR_DEF $name)
+                // DSLMap.g:179:51: ^( VT_VAR_DEF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1659,9 +1740,9 @@
                 }
 
             }
-            else // 172:2: -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name)
+            else // 180:2: -> {!hasSpaceBefore && !hasSpaceAfter}? ^( VT_VAR_DEF $name)
             if (!hasSpaceBefore  && !hasSpaceAfter) {
-                // DSLMap.g:172:44: ^( VT_VAR_DEF $name)
+                // DSLMap.g:180:44: ^( VT_VAR_DEF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1672,10 +1753,10 @@
                 }
 
             }
-            else // 174:2: -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) VT_SPACE
+            else // 182:2: -> {hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) VT_SPACE
             if (hasSpaceBefore && !"".equals(text) && hasSpaceAfter) {
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
-                // DSLMap.g:174:69: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+                // DSLMap.g:182:69: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1688,9 +1769,9 @@
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
 
             }
-            else // 175:2: -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) VT_SPACE
+            else // 183:2: -> {!hasSpaceBefore && !\"\".equals(text) && hasSpaceAfter}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) VT_SPACE
             if (!hasSpaceBefore && !"".equals(text)  && hasSpaceAfter) {
-                // DSLMap.g:175:62: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+                // DSLMap.g:183:62: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1703,10 +1784,10 @@
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
 
             }
-            else // 176:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name) VT_SPACE
+            else // 184:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_DEF $name) VT_SPACE
             if (hasSpaceBefore  && hasSpaceAfter) {
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
-                // DSLMap.g:176:50: ^( VT_VAR_DEF $name)
+                // DSLMap.g:184:50: ^( VT_VAR_DEF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1718,9 +1799,9 @@
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
 
             }
-            else // 177:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name) VT_SPACE
+            else // 185:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_DEF $name) VT_SPACE
             if (!hasSpaceBefore  && hasSpaceAfter) {
-                // DSLMap.g:177:43: ^( VT_VAR_DEF $name)
+                // DSLMap.g:185:43: ^( VT_VAR_DEF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1732,9 +1813,9 @@
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
 
             }
-            else // 178:2: -> ^( VT_VAR_DEF $name)
+            else // 186:2: -> ^( VT_VAR_DEF $name)
             {
-                // DSLMap.g:178:5: ^( VT_VAR_DEF $name)
+                // DSLMap.g:186:5: ^( VT_VAR_DEF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1773,7 +1854,7 @@
     };
 
     // $ANTLR start variable_definition2
-    // DSLMap.g:181:1: variable_definition2 : LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) ;
+    // DSLMap.g:189:1: variable_definition2 : LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) ;
     public final variable_definition2_return variable_definition2() throws RecognitionException {
         variable_definition2_return retval = new variable_definition2_return();
         retval.start = input.LT(1);
@@ -1781,16 +1862,16 @@
         Object root_0 = null;
 
         Token name=null;
-        Token LEFT_CURLY27=null;
-        Token COLON28=null;
-        Token RIGHT_CURLY29=null;
+        Token LEFT_CURLY28=null;
+        Token COLON29=null;
+        Token RIGHT_CURLY30=null;
         pattern_return pat = null;
 
 
         Object name_tree=null;
-        Object LEFT_CURLY27_tree=null;
-        Object COLON28_tree=null;
-        Object RIGHT_CURLY29_tree=null;
+        Object LEFT_CURLY28_tree=null;
+        Object COLON29_tree=null;
+        Object RIGHT_CURLY30_tree=null;
         RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
         RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
@@ -1800,33 +1881,33 @@
                 String text = "";
 
         try {
-            // DSLMap.g:185:2: ( LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) )
-            // DSLMap.g:185:4: LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY
+            // DSLMap.g:193:2: ( LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] ) -> ^( VT_VAR_DEF $name) )
+            // DSLMap.g:193:4: LEFT_CURLY name= LITERAL ( COLON pat= pattern )? RIGHT_CURLY
             {
-            LEFT_CURLY27=(Token)input.LT(1);
-            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition2879); if (failed) return retval;
-            if ( backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY27);
+            LEFT_CURLY28=(Token)input.LT(1);
+            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_definition2886); if (failed) return retval;
+            if ( backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY28);
 
             name=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition2883); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition2890); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(name);
 
-            // DSLMap.g:185:28: ( COLON pat= pattern )?
-            int alt13=2;
-            int LA13_0 = input.LA(1);
+            // DSLMap.g:193:28: ( COLON pat= pattern )?
+            int alt14=2;
+            int LA14_0 = input.LA(1);
 
-            if ( (LA13_0==COLON) ) {
-                alt13=1;
+            if ( (LA14_0==COLON) ) {
+                alt14=1;
             }
-            switch (alt13) {
+            switch (alt14) {
                 case 1 :
-                    // DSLMap.g:185:30: COLON pat= pattern
+                    // DSLMap.g:193:30: COLON pat= pattern
                     {
-                    COLON28=(Token)input.LT(1);
-                    match(input,COLON,FOLLOW_COLON_in_variable_definition2887); if (failed) return retval;
-                    if ( backtracking==0 ) stream_COLON.add(COLON28);
+                    COLON29=(Token)input.LT(1);
+                    match(input,COLON,FOLLOW_COLON_in_variable_definition2894); if (failed) return retval;
+                    if ( backtracking==0 ) stream_COLON.add(COLON29);
 
-                    pushFollow(FOLLOW_pattern_in_variable_definition2891);
+                    pushFollow(FOLLOW_pattern_in_variable_definition2898);
                     pat=pattern();
                     _fsp--;
                     if (failed) return retval;
@@ -1840,9 +1921,9 @@
 
             }
 
-            RIGHT_CURLY29=(Token)input.LT(1);
-            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition2898); if (failed) return retval;
-            if ( backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY29);
+            RIGHT_CURLY30=(Token)input.LT(1);
+            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_definition2905); if (failed) return retval;
+            if ( backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY30);
 
 
             // AST REWRITE
@@ -1857,9 +1938,9 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 186:2: -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+            // 194:2: -> {!\"\".equals(text)}? ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
             if (!"".equals(text)) {
-                // DSLMap.g:186:25: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
+                // DSLMap.g:194:25: ^( VT_VAR_DEF $name VT_PATTERN[$pat.start, text] )
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1871,9 +1952,9 @@
                 }
 
             }
-            else // 187:2: -> ^( VT_VAR_DEF $name)
+            else // 195:2: -> ^( VT_VAR_DEF $name)
             {
-                // DSLMap.g:187:5: ^( VT_VAR_DEF $name)
+                // DSLMap.g:195:5: ^( VT_VAR_DEF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_DEF, "VT_VAR_DEF"), root_1);
@@ -1912,47 +1993,47 @@
     };
 
     // $ANTLR start pattern
-    // DSLMap.g:191:1: pattern : ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ ;
+    // DSLMap.g:199:1: pattern : ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ ;
     public final pattern_return pattern() throws RecognitionException {
         pattern_return retval = new pattern_return();
         retval.start = input.LT(1);
 
         Object root_0 = null;
 
-        Token LEFT_CURLY31=null;
-        Token RIGHT_CURLY33=null;
-        Token LEFT_SQUARE34=null;
-        Token RIGHT_SQUARE36=null;
-        literal_return literal30 = null;
+        Token LEFT_CURLY32=null;
+        Token RIGHT_CURLY34=null;
+        Token LEFT_SQUARE35=null;
+        Token RIGHT_SQUARE37=null;
+        literal_return literal31 = null;
 
-        literal_return literal32 = null;
+        literal_return literal33 = null;
 
-        pattern_return pattern35 = null;
+        pattern_return pattern36 = null;
 
 
-        Object LEFT_CURLY31_tree=null;
-        Object RIGHT_CURLY33_tree=null;
-        Object LEFT_SQUARE34_tree=null;
-        Object RIGHT_SQUARE36_tree=null;
+        Object LEFT_CURLY32_tree=null;
+        Object RIGHT_CURLY34_tree=null;
+        Object LEFT_SQUARE35_tree=null;
+        Object RIGHT_SQUARE37_tree=null;
 
         try {
-            // DSLMap.g:192:9: ( ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ )
-            // DSLMap.g:192:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
+            // DSLMap.g:200:9: ( ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ )
+            // DSLMap.g:200:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
             {
             root_0 = (Object)adaptor.nil();
 
-            // DSLMap.g:192:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
-            int cnt14=0;
-            loop14:
+            // DSLMap.g:200:11: ( literal | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
+            int cnt15=0;
+            loop15:
             do {
-                int alt14=4;
+                int alt15=4;
                 switch ( input.LA(1) ) {
                 case RIGHT_SQUARE:
                     {
-                    int LA14_2 = input.LA(2);
+                    int LA15_2 = input.LA(2);
 
-                    if ( (synpred21()) ) {
-                        alt14=1;
+                    if ( (synpred23()) ) {
+                        alt15=1;
                     }
 
 
@@ -1960,13 +2041,13 @@
                     break;
                 case LEFT_SQUARE:
                     {
-                    int LA14_3 = input.LA(2);
+                    int LA15_3 = input.LA(2);
 
-                    if ( (synpred21()) ) {
-                        alt14=1;
+                    if ( (synpred23()) ) {
+                        alt15=1;
                     }
-                    else if ( (synpred23()) ) {
-                        alt14=3;
+                    else if ( (synpred25()) ) {
+                        alt15=3;
                     }
 
 
@@ -1974,85 +2055,85 @@
                     break;
                 case LEFT_CURLY:
                     {
-                    alt14=2;
+                    alt15=2;
                     }
                     break;
                 case LITERAL:
                 case COLON:
                     {
-                    alt14=1;
+                    alt15=1;
                     }
                     break;
 
                 }
 
-                switch (alt14) {
+                switch (alt15) {
             	case 1 :
-            	    // DSLMap.g:192:13: literal
+            	    // DSLMap.g:200:13: literal
             	    {
-            	    pushFollow(FOLLOW_literal_in_pattern949);
-            	    literal30=literal();
+            	    pushFollow(FOLLOW_literal_in_pattern956);
+            	    literal31=literal();
             	    _fsp--;
             	    if (failed) return retval;
-            	    if ( backtracking==0 ) adaptor.addChild(root_0, literal30.getTree());
+            	    if ( backtracking==0 ) adaptor.addChild(root_0, literal31.getTree());
 
             	    }
             	    break;
             	case 2 :
-            	    // DSLMap.g:193:13: LEFT_CURLY literal RIGHT_CURLY
+            	    // DSLMap.g:201:13: LEFT_CURLY literal RIGHT_CURLY
             	    {
-            	    LEFT_CURLY31=(Token)input.LT(1);
-            	    match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_pattern963); if (failed) return retval;
+            	    LEFT_CURLY32=(Token)input.LT(1);
+            	    match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_pattern970); if (failed) return retval;
             	    if ( backtracking==0 ) {
-            	    LEFT_CURLY31_tree = (Object)adaptor.create(LEFT_CURLY31);
-            	    adaptor.addChild(root_0, LEFT_CURLY31_tree);
+            	    LEFT_CURLY32_tree = (Object)adaptor.create(LEFT_CURLY32);
+            	    adaptor.addChild(root_0, LEFT_CURLY32_tree);
             	    }
-            	    pushFollow(FOLLOW_literal_in_pattern965);
-            	    literal32=literal();
+            	    pushFollow(FOLLOW_literal_in_pattern972);
+            	    literal33=literal();
             	    _fsp--;
             	    if (failed) return retval;
-            	    if ( backtracking==0 ) adaptor.addChild(root_0, literal32.getTree());
-            	    RIGHT_CURLY33=(Token)input.LT(1);
-            	    match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_pattern967); if (failed) return retval;
+            	    if ( backtracking==0 ) adaptor.addChild(root_0, literal33.getTree());
+            	    RIGHT_CURLY34=(Token)input.LT(1);
+            	    match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_pattern974); if (failed) return retval;
             	    if ( backtracking==0 ) {
-            	    RIGHT_CURLY33_tree = (Object)adaptor.create(RIGHT_CURLY33);
-            	    adaptor.addChild(root_0, RIGHT_CURLY33_tree);
+            	    RIGHT_CURLY34_tree = (Object)adaptor.create(RIGHT_CURLY34);
+            	    adaptor.addChild(root_0, RIGHT_CURLY34_tree);
             	    }
 
             	    }
             	    break;
             	case 3 :
-            	    // DSLMap.g:194:13: LEFT_SQUARE pattern RIGHT_SQUARE
+            	    // DSLMap.g:202:13: LEFT_SQUARE pattern RIGHT_SQUARE
             	    {
-            	    LEFT_SQUARE34=(Token)input.LT(1);
-            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_pattern981); if (failed) return retval;
+            	    LEFT_SQUARE35=(Token)input.LT(1);
+            	    match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_pattern988); if (failed) return retval;
             	    if ( backtracking==0 ) {
-            	    LEFT_SQUARE34_tree = (Object)adaptor.create(LEFT_SQUARE34);
-            	    adaptor.addChild(root_0, LEFT_SQUARE34_tree);
+            	    LEFT_SQUARE35_tree = (Object)adaptor.create(LEFT_SQUARE35);
+            	    adaptor.addChild(root_0, LEFT_SQUARE35_tree);
             	    }
-            	    pushFollow(FOLLOW_pattern_in_pattern983);
-            	    pattern35=pattern();
+            	    pushFollow(FOLLOW_pattern_in_pattern990);
+            	    pattern36=pattern();
             	    _fsp--;
             	    if (failed) return retval;
-            	    if ( backtracking==0 ) adaptor.addChild(root_0, pattern35.getTree());
-            	    RIGHT_SQUARE36=(Token)input.LT(1);
-            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_pattern985); if (failed) return retval;
+            	    if ( backtracking==0 ) adaptor.addChild(root_0, pattern36.getTree());
+            	    RIGHT_SQUARE37=(Token)input.LT(1);
+            	    match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_pattern992); if (failed) return retval;
             	    if ( backtracking==0 ) {
-            	    RIGHT_SQUARE36_tree = (Object)adaptor.create(RIGHT_SQUARE36);
-            	    adaptor.addChild(root_0, RIGHT_SQUARE36_tree);
+            	    RIGHT_SQUARE37_tree = (Object)adaptor.create(RIGHT_SQUARE37);
+            	    adaptor.addChild(root_0, RIGHT_SQUARE37_tree);
             	    }
 
             	    }
             	    break;
 
             	default :
-            	    if ( cnt14 >= 1 ) break loop14;
+            	    if ( cnt15 >= 1 ) break loop15;
             	    if (backtracking>0) {failed=true; return retval;}
                         EarlyExitException eee =
-                            new EarlyExitException(14, input);
+                            new EarlyExitException(15, input);
                         throw eee;
                 }
-                cnt14++;
+                cnt15++;
             } while (true);
 
 
@@ -2081,7 +2162,7 @@
     };
 
     // $ANTLR start variable_reference
-    // DSLMap.g:199:1: variable_reference : lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) ;
+    // DSLMap.g:207:1: variable_reference : lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) ;
     public final variable_reference_return variable_reference() throws RecognitionException {
         variable_reference_return retval = new variable_reference_return();
         retval.start = input.LT(1);
@@ -2104,22 +2185,30 @@
                 boolean hasSpaceAfter = false;
 
         try {
-            // DSLMap.g:204:2: (lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) )
-            // DSLMap.g:204:4: lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY
+            // DSLMap.g:212:2: (lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE -> ^( VT_VAR_REF $name) )
+            // DSLMap.g:212:4: lc= LEFT_CURLY name= LITERAL rc= RIGHT_CURLY
             {
             lc=(Token)input.LT(1);
-            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference1020); if (failed) return retval;
+            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference1027); if (failed) return retval;
             if ( backtracking==0 ) stream_LEFT_CURLY.add(lc);
 
             if ( backtracking==0 ) {
-               if( ((CommonToken)input.LT(-2)).getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true; 
+              //try too figure out how to get " {name} " to realize there's a space infron of the { char
+              		System.out.println("input is a " + input.getClass().getName());
+              		System.out.println("input is: " + input.toString());
+              		System.out.println("input LA[1]: " + input.LA(1));
+              		
+              		System.out.println("lc start is: " + ((CommonToken)lc).getStartIndex() );
+              		CommonToken back2 =  (CommonToken)input.LT(-2);
+              		if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true; 
+              		
             }
             name=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference1028); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference1038); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(name);
 
             rc=(Token)input.LT(1);
-            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference1032); if (failed) return retval;
+            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference1042); if (failed) return retval;
             if ( backtracking==0 ) stream_RIGHT_CURLY.add(rc);
 
             if ( backtracking==0 ) {
@@ -2138,10 +2227,10 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 207:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE
+            // 224:2: -> {hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name) VT_SPACE
             if (hasSpaceBefore && hasSpaceAfter) {
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
-                // DSLMap.g:207:49: ^( VT_VAR_REF $name)
+                // DSLMap.g:224:49: ^( VT_VAR_REF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
@@ -2153,10 +2242,10 @@
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
 
             }
-            else // 208:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name)
+            else // 225:2: -> {hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF $name)
             if (hasSpaceBefore && !hasSpaceAfter) {
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
-                // DSLMap.g:208:50: ^( VT_VAR_REF $name)
+                // DSLMap.g:225:50: ^( VT_VAR_REF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
@@ -2167,9 +2256,9 @@
                 }
 
             }
-            else // 209:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE
+            else // 226:2: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF $name) VT_SPACE
             if (!hasSpaceBefore && hasSpaceAfter) {
-                // DSLMap.g:209:42: ^( VT_VAR_REF $name)
+                // DSLMap.g:226:42: ^( VT_VAR_REF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
@@ -2181,9 +2270,9 @@
                 adaptor.addChild(root_0, adaptor.create(VT_SPACE, "VT_SPACE"));
 
             }
-            else // 210:2: -> ^( VT_VAR_REF $name)
+            else // 227:2: -> ^( VT_VAR_REF $name)
             {
-                // DSLMap.g:210:6: ^( VT_VAR_REF $name)
+                // DSLMap.g:227:6: ^( VT_VAR_REF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
@@ -2222,7 +2311,7 @@
     };
 
     // $ANTLR start variable_reference2
-    // DSLMap.g:214:1: variable_reference2 : LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) ;
+    // DSLMap.g:231:1: variable_reference2 : LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) ;
     public final variable_reference2_return variable_reference2() throws RecognitionException {
         variable_reference2_return retval = new variable_reference2_return();
         retval.start = input.LT(1);
@@ -2230,31 +2319,31 @@
         Object root_0 = null;
 
         Token name=null;
-        Token LEFT_CURLY37=null;
-        Token RIGHT_CURLY38=null;
+        Token LEFT_CURLY38=null;
+        Token RIGHT_CURLY39=null;
 
         Object name_tree=null;
-        Object LEFT_CURLY37_tree=null;
-        Object RIGHT_CURLY38_tree=null;
+        Object LEFT_CURLY38_tree=null;
+        Object RIGHT_CURLY39_tree=null;
         RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
         RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
 
         try {
-            // DSLMap.g:215:2: ( LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) )
-            // DSLMap.g:215:4: LEFT_CURLY name= LITERAL RIGHT_CURLY
+            // DSLMap.g:232:2: ( LEFT_CURLY name= LITERAL RIGHT_CURLY -> ^( VT_VAR_REF $name) )
+            // DSLMap.g:232:4: LEFT_CURLY name= LITERAL RIGHT_CURLY
             {
-            LEFT_CURLY37=(Token)input.LT(1);
-            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference21110); if (failed) return retval;
-            if ( backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY37);
+            LEFT_CURLY38=(Token)input.LT(1);
+            match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference21120); if (failed) return retval;
+            if ( backtracking==0 ) stream_LEFT_CURLY.add(LEFT_CURLY38);
 
             name=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference21114); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference21124); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(name);
 
-            RIGHT_CURLY38=(Token)input.LT(1);
-            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference21116); if (failed) return retval;
-            if ( backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY38);
+            RIGHT_CURLY39=(Token)input.LT(1);
+            match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference21126); if (failed) return retval;
+            if ( backtracking==0 ) stream_RIGHT_CURLY.add(RIGHT_CURLY39);
 
 
             // AST REWRITE
@@ -2269,9 +2358,9 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 216:2: -> ^( VT_VAR_REF $name)
+            // 233:2: -> ^( VT_VAR_REF $name)
             {
-                // DSLMap.g:216:5: ^( VT_VAR_REF $name)
+                // DSLMap.g:233:5: ^( VT_VAR_REF $name)
                 {
                 Object root_1 = (Object)adaptor.nil();
                 root_1 = (Object)adaptor.becomeRoot(adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
@@ -2310,7 +2399,7 @@
     };
 
     // $ANTLR start condition_key
-    // DSLMap.g:220:1: condition_key : {...}?value= LITERAL -> VT_CONDITION[$value] ;
+    // DSLMap.g:237:1: condition_key : {...}?value= LITERAL -> VT_CONDITION[$value] ;
     public final condition_key_return condition_key() throws RecognitionException {
         condition_key_return retval = new condition_key_return();
         retval.start = input.LT(1);
@@ -2323,15 +2412,15 @@
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
 
         try {
-            // DSLMap.g:221:2: ({...}?value= LITERAL -> VT_CONDITION[$value] )
-            // DSLMap.g:221:4: {...}?value= LITERAL
+            // DSLMap.g:238:2: ({...}?value= LITERAL -> VT_CONDITION[$value] )
+            // DSLMap.g:238:4: {...}?value= LITERAL
             {
             if ( !(validateIdentifierKey("condition")||validateIdentifierKey("when")) ) {
                 if (backtracking>0) {failed=true; return retval;}
                 throw new FailedPredicateException(input, "condition_key", "validateIdentifierKey(\"condition\")||validateIdentifierKey(\"when\")");
             }
             value=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_condition_key1145); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_condition_key1155); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(value);
 
 
@@ -2346,7 +2435,7 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 222:2: -> VT_CONDITION[$value]
+            // 239:2: -> VT_CONDITION[$value]
             {
                 adaptor.addChild(root_0, adaptor.create(VT_CONDITION, value));
 
@@ -2379,7 +2468,7 @@
     };
 
     // $ANTLR start consequence_key
-    // DSLMap.g:225:1: consequence_key : {...}?value= LITERAL -> VT_CONSEQUENCE[$value] ;
+    // DSLMap.g:242:1: consequence_key : {...}?value= LITERAL -> VT_CONSEQUENCE[$value] ;
     public final consequence_key_return consequence_key() throws RecognitionException {
         consequence_key_return retval = new consequence_key_return();
         retval.start = input.LT(1);
@@ -2392,15 +2481,15 @@
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
 
         try {
-            // DSLMap.g:226:2: ({...}?value= LITERAL -> VT_CONSEQUENCE[$value] )
-            // DSLMap.g:226:4: {...}?value= LITERAL
+            // DSLMap.g:243:2: ({...}?value= LITERAL -> VT_CONSEQUENCE[$value] )
+            // DSLMap.g:243:4: {...}?value= LITERAL
             {
             if ( !(validateIdentifierKey("consequence")||validateIdentifierKey("then")) ) {
                 if (backtracking>0) {failed=true; return retval;}
                 throw new FailedPredicateException(input, "consequence_key", "validateIdentifierKey(\"consequence\")||validateIdentifierKey(\"then\")");
             }
             value=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_consequence_key1168); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_consequence_key1178); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(value);
 
 
@@ -2415,7 +2504,7 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 227:2: -> VT_CONSEQUENCE[$value]
+            // 244:2: -> VT_CONSEQUENCE[$value]
             {
                 adaptor.addChild(root_0, adaptor.create(VT_CONSEQUENCE, value));
 
@@ -2448,7 +2537,7 @@
     };
 
     // $ANTLR start keyword_key
-    // DSLMap.g:230:1: keyword_key : {...}?value= LITERAL -> VT_KEYWORD[$value] ;
+    // DSLMap.g:247:1: keyword_key : {...}?value= LITERAL -> VT_KEYWORD[$value] ;
     public final keyword_key_return keyword_key() throws RecognitionException {
         keyword_key_return retval = new keyword_key_return();
         retval.start = input.LT(1);
@@ -2461,15 +2550,15 @@
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
 
         try {
-            // DSLMap.g:231:2: ({...}?value= LITERAL -> VT_KEYWORD[$value] )
-            // DSLMap.g:231:4: {...}?value= LITERAL
+            // DSLMap.g:248:2: ({...}?value= LITERAL -> VT_KEYWORD[$value] )
+            // DSLMap.g:248:4: {...}?value= LITERAL
             {
             if ( !(validateIdentifierKey("keyword")) ) {
                 if (backtracking>0) {failed=true; return retval;}
                 throw new FailedPredicateException(input, "keyword_key", "validateIdentifierKey(\"keyword\")");
             }
             value=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_keyword_key1191); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_keyword_key1201); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(value);
 
 
@@ -2484,7 +2573,7 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 232:2: -> VT_KEYWORD[$value]
+            // 249:2: -> VT_KEYWORD[$value]
             {
                 adaptor.addChild(root_0, adaptor.create(VT_KEYWORD, value));
 
@@ -2517,7 +2606,7 @@
     };
 
     // $ANTLR start any_key
-    // DSLMap.g:235:1: any_key : {...}?value= LITERAL -> VT_ANY[$value] ;
+    // DSLMap.g:252:1: any_key : {...}?value= LITERAL -> VT_ANY[$value] ;
     public final any_key_return any_key() throws RecognitionException {
         any_key_return retval = new any_key_return();
         retval.start = input.LT(1);
@@ -2530,15 +2619,15 @@
         RewriteRuleTokenStream stream_LITERAL=new RewriteRuleTokenStream(adaptor,"token LITERAL");
 
         try {
-            // DSLMap.g:236:2: ({...}?value= LITERAL -> VT_ANY[$value] )
-            // DSLMap.g:236:4: {...}?value= LITERAL
+            // DSLMap.g:253:2: ({...}?value= LITERAL -> VT_ANY[$value] )
+            // DSLMap.g:253:4: {...}?value= LITERAL
             {
             if ( !(validateIdentifierKey("*")) ) {
                 if (backtracking>0) {failed=true; return retval;}
                 throw new FailedPredicateException(input, "any_key", "validateIdentifierKey(\"*\")");
             }
             value=(Token)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_any_key1214); if (failed) return retval;
+            match(input,LITERAL,FOLLOW_LITERAL_in_any_key1224); if (failed) return retval;
             if ( backtracking==0 ) stream_LITERAL.add(value);
 
 
@@ -2553,7 +2642,7 @@
             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
 
             root_0 = (Object)adaptor.nil();
-            // 237:2: -> VT_ANY[$value]
+            // 254:2: -> VT_ANY[$value]
             {
                 adaptor.addChild(root_0, adaptor.create(VT_ANY, value));
 
@@ -2580,122 +2669,147 @@
     }
     // $ANTLR end any_key
 
-    // $ANTLR start synpred5
-    public final void synpred5_fragment() throws RecognitionException {   
+    // $ANTLR start synpred4
+    public final void synpred4_fragment() throws RecognitionException {   
+        // DSLMap.g:94:24: ( meta_section )
+        // DSLMap.g:94:24: meta_section
+        {
+        pushFollow(FOLLOW_meta_section_in_synpred4341);
+        meta_section();
+        _fsp--;
+        if (failed) return ;
+
+        }
+    }
+    // $ANTLR end synpred4
+
+    // $ANTLR start synpred6
+    public final void synpred6_fragment() throws RecognitionException {   
         // DSLMap.g:102:4: ( condition_key )
         // DSLMap.g:102:4: condition_key
         {
-        pushFollow(FOLLOW_condition_key_in_synpred5390);
+        pushFollow(FOLLOW_condition_key_in_synpred6392);
         condition_key();
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred5
+    // $ANTLR end synpred6
 
-    // $ANTLR start synpred6
-    public final void synpred6_fragment() throws RecognitionException {   
+    // $ANTLR start synpred7
+    public final void synpred7_fragment() throws RecognitionException {   
         // DSLMap.g:103:5: ( consequence_key )
         // DSLMap.g:103:5: consequence_key
         {
-        pushFollow(FOLLOW_consequence_key_in_synpred6399);
+        pushFollow(FOLLOW_consequence_key_in_synpred7401);
         consequence_key();
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred6
+    // $ANTLR end synpred7
 
-    // $ANTLR start synpred7
-    public final void synpred7_fragment() throws RecognitionException {   
+    // $ANTLR start synpred8
+    public final void synpred8_fragment() throws RecognitionException {   
         // DSLMap.g:104:5: ( keyword_key )
         // DSLMap.g:104:5: keyword_key
         {
-        pushFollow(FOLLOW_keyword_key_in_synpred7407);
+        pushFollow(FOLLOW_keyword_key_in_synpred8409);
         keyword_key();
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred7
+    // $ANTLR end synpred8
 
-    // $ANTLR start synpred11
-    public final void synpred11_fragment() throws RecognitionException {   
+    // $ANTLR start synpred12
+    public final void synpred12_fragment() throws RecognitionException {   
         // DSLMap.g:133:4: ( literal )
         // DSLMap.g:133:4: literal
         {
-        pushFollow(FOLLOW_literal_in_synpred11547);
+        pushFollow(FOLLOW_literal_in_synpred12549);
         literal();
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred11
+    // $ANTLR end synpred12
 
-    // $ANTLR start synpred14
-    public final void synpred14_fragment() throws RecognitionException {   
+    // $ANTLR start synpred15
+    public final void synpred15_fragment() throws RecognitionException {   
         // DSLMap.g:151:5: ( literal )
         // DSLMap.g:151:5: literal
         {
-        pushFollow(FOLLOW_literal_in_synpred14622);
+        pushFollow(FOLLOW_literal_in_synpred15624);
         literal();
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred14
+    // $ANTLR end synpred15
 
-    // $ANTLR start synpred15
-    public final void synpred15_fragment() throws RecognitionException {   
+    // $ANTLR start synpred16
+    public final void synpred16_fragment() throws RecognitionException {   
         // DSLMap.g:151:13: ( EQUALS )
         // DSLMap.g:151:13: EQUALS
         {
-        match(input,EQUALS,FOLLOW_EQUALS_in_synpred15624); if (failed) return ;
+        match(input,EQUALS,FOLLOW_EQUALS_in_synpred16626); if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred15
+    // $ANTLR end synpred16
 
-    // $ANTLR start synpred21
-    public final void synpred21_fragment() throws RecognitionException {   
-        // DSLMap.g:192:13: ( literal )
-        // DSLMap.g:192:13: literal
+    // $ANTLR start synpred17
+    public final void synpred17_fragment() throws RecognitionException {   
+        // DSLMap.g:151:20: ( COMMA )
+        // DSLMap.g:151:20: COMMA
         {
-        pushFollow(FOLLOW_literal_in_synpred21949);
+        match(input,COMMA,FOLLOW_COMMA_in_synpred17628); if (failed) return ;
+
+        }
+    }
+    // $ANTLR end synpred17
+
+    // $ANTLR start synpred23
+    public final void synpred23_fragment() throws RecognitionException {   
+        // DSLMap.g:200:13: ( literal )
+        // DSLMap.g:200:13: literal
+        {
+        pushFollow(FOLLOW_literal_in_synpred23956);
         literal();
         _fsp--;
         if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred21
+    // $ANTLR end synpred23
 
-    // $ANTLR start synpred23
-    public final void synpred23_fragment() throws RecognitionException {   
-        // DSLMap.g:194:13: ( LEFT_SQUARE pattern RIGHT_SQUARE )
-        // DSLMap.g:194:13: LEFT_SQUARE pattern RIGHT_SQUARE
+    // $ANTLR start synpred25
+    public final void synpred25_fragment() throws RecognitionException {   
+        // DSLMap.g:202:13: ( LEFT_SQUARE pattern RIGHT_SQUARE )
+        // DSLMap.g:202:13: LEFT_SQUARE pattern RIGHT_SQUARE
         {
-        match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred23981); if (failed) return ;
-        pushFollow(FOLLOW_pattern_in_synpred23983);
+        match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred25988); if (failed) return ;
+        pushFollow(FOLLOW_pattern_in_synpred25990);
         pattern();
         _fsp--;
         if (failed) return ;
-        match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred23985); if (failed) return ;
+        match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred25992); if (failed) return ;
 
         }
     }
-    // $ANTLR end synpred23
+    // $ANTLR end synpred25
 
-    public final boolean synpred23() {
+    public final boolean synpred12() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred23_fragment(); // can never throw exception
+            synpred12_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -2705,11 +2819,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred7() {
+    public final boolean synpred4() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred7_fragment(); // can never throw exception
+            synpred4_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -2719,11 +2833,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred14() {
+    public final boolean synpred25() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred14_fragment(); // can never throw exception
+            synpred25_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -2733,11 +2847,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred11() {
+    public final boolean synpred23() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred11_fragment(); // can never throw exception
+            synpred23_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -2747,11 +2861,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred5() {
+    public final boolean synpred16() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred5_fragment(); // can never throw exception
+            synpred16_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -2761,6 +2875,34 @@
         failed=false;
         return success;
     }
+    public final boolean synpred7() {
+        backtracking++;
+        int start = input.mark();
+        try {
+            synpred7_fragment(); // can never throw exception
+        } catch (RecognitionException re) {
+            System.err.println("impossible: "+re);
+        }
+        boolean success = !failed;
+        input.rewind(start);
+        backtracking--;
+        failed=false;
+        return success;
+    }
+    public final boolean synpred17() {
+        backtracking++;
+        int start = input.mark();
+        try {
+            synpred17_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 synpred6() {
         backtracking++;
         int start = input.mark();
@@ -2789,11 +2931,11 @@
         failed=false;
         return success;
     }
-    public final boolean synpred21() {
+    public final boolean synpred8() {
         backtracking++;
         int start = input.mark();
         try {
-            synpred21_fragment(); // can never throw exception
+            synpred8_fragment(); // can never throw exception
         } catch (RecognitionException re) {
             System.err.println("impossible: "+re);
         }
@@ -2812,68 +2954,71 @@
     public static final BitSet FOLLOW_comment_in_statement292 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_EOL_in_statement298 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_LINE_COMMENT_in_comment314 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_scope_section_in_entry339 = new BitSet(new long[]{0x0000000000800000L});
-    public static final BitSet FOLLOW_meta_section_in_entry341 = new BitSet(new long[]{0x000000000F800000L});
-    public static final BitSet FOLLOW_key_section_in_entry343 = new BitSet(new long[]{0x0000000000400000L});
-    public static final BitSet FOLLOW_EQUALS_in_entry345 = new BitSet(new long[]{0x000000000FC00000L});
-    public static final BitSet FOLLOW_value_section_in_entry347 = new BitSet(new long[]{0x0000000000100000L});
-    public static final BitSet FOLLOW_EOL_in_entry350 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EOF_in_entry352 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_scope_section382 = new BitSet(new long[]{0x0000000002000000L});
-    public static final BitSet FOLLOW_condition_key_in_scope_section390 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_consequence_key_in_scope_section399 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_keyword_key_in_scope_section407 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_any_key_in_scope_section415 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_scope_section423 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_meta_section461 = new BitSet(new long[]{0x0000000003000000L});
-    public static final BitSet FOLLOW_LITERAL_in_meta_section463 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_meta_section466 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_key_sentence_in_key_section488 = new BitSet(new long[]{0x000000000F800002L});
-    public static final BitSet FOLLOW_variable_definition_in_key_sentence519 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_key_chunk_in_key_sentence526 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_key_chunk547 = new BitSet(new long[]{0x0000000007800002L});
-    public static final BitSet FOLLOW_value_sentence_in_value_section562 = new BitSet(new long[]{0x000000000FC00002L});
-    public static final BitSet FOLLOW_variable_reference_in_value_sentence593 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_value_chunk_in_value_sentence600 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_value_chunk622 = new BitSet(new long[]{0x0000000007C00002L});
-    public static final BitSet FOLLOW_EQUALS_in_value_chunk624 = new BitSet(new long[]{0x0000000007C00002L});
-    public static final BitSet FOLLOW_set_in_literal642 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition678 = new BitSet(new long[]{0x0000000002000000L});
-    public static final BitSet FOLLOW_LITERAL_in_variable_definition686 = new BitSet(new long[]{0x0000000014000000L});
-    public static final BitSet FOLLOW_COLON_in_variable_definition690 = new BitSet(new long[]{0x000000000F800000L});
-    public static final BitSet FOLLOW_pattern_in_variable_definition694 = new BitSet(new long[]{0x0000000010000000L});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition703 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition2879 = new BitSet(new long[]{0x0000000002000000L});
-    public static final BitSet FOLLOW_LITERAL_in_variable_definition2883 = new BitSet(new long[]{0x0000000014000000L});
-    public static final BitSet FOLLOW_COLON_in_variable_definition2887 = new BitSet(new long[]{0x000000000F800000L});
-    public static final BitSet FOLLOW_pattern_in_variable_definition2891 = new BitSet(new long[]{0x0000000010000000L});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition2898 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_pattern949 = new BitSet(new long[]{0x000000000F800002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_pattern963 = new BitSet(new long[]{0x0000000007800000L});
-    public static final BitSet FOLLOW_literal_in_pattern965 = new BitSet(new long[]{0x0000000010000000L});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_pattern967 = new BitSet(new long[]{0x000000000F800002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_pattern981 = new BitSet(new long[]{0x000000000F800000L});
-    public static final BitSet FOLLOW_pattern_in_pattern983 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_pattern985 = new BitSet(new long[]{0x000000000F800002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference1020 = new BitSet(new long[]{0x0000000002000000L});
-    public static final BitSet FOLLOW_LITERAL_in_variable_reference1028 = new BitSet(new long[]{0x0000000010000000L});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference1032 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference21110 = new BitSet(new long[]{0x0000000002000000L});
-    public static final BitSet FOLLOW_LITERAL_in_variable_reference21114 = new BitSet(new long[]{0x0000000010000000L});
-    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference21116 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LITERAL_in_condition_key1145 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LITERAL_in_consequence_key1168 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LITERAL_in_keyword_key1191 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LITERAL_in_any_key1214 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_condition_key_in_synpred5390 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_consequence_key_in_synpred6399 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_keyword_key_in_synpred7407 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_synpred11547 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_synpred14622 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_EQUALS_in_synpred15624 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_literal_in_synpred21949 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred23981 = new BitSet(new long[]{0x000000000F800000L});
-    public static final BitSet FOLLOW_pattern_in_synpred23983 = new BitSet(new long[]{0x0000000001000000L});
-    public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred23985 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_scope_section_in_entry339 = new BitSet(new long[]{0x000000001B800000L});
+    public static final BitSet FOLLOW_meta_section_in_entry341 = new BitSet(new long[]{0x000000001B800000L});
+    public static final BitSet FOLLOW_key_section_in_entry344 = new BitSet(new long[]{0x0000000000400000L});
+    public static final BitSet FOLLOW_EQUALS_in_entry346 = new BitSet(new long[]{0x000000001FC00000L});
+    public static final BitSet FOLLOW_value_section_in_entry348 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_EOL_in_entry351 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EOF_in_entry353 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_scope_section384 = new BitSet(new long[]{0x0000000002000000L});
+    public static final BitSet FOLLOW_condition_key_in_scope_section392 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_consequence_key_in_scope_section401 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_keyword_key_in_scope_section409 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_any_key_in_scope_section417 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_scope_section425 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_meta_section463 = new BitSet(new long[]{0x0000000003000000L});
+    public static final BitSet FOLLOW_LITERAL_in_meta_section465 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_meta_section468 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_key_sentence_in_key_section490 = new BitSet(new long[]{0x000000001B800002L});
+    public static final BitSet FOLLOW_variable_definition_in_key_sentence521 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_key_chunk_in_key_sentence528 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_key_chunk549 = new BitSet(new long[]{0x000000000B800002L});
+    public static final BitSet FOLLOW_value_sentence_in_value_section564 = new BitSet(new long[]{0x000000001FC00002L});
+    public static final BitSet FOLLOW_variable_reference_in_value_sentence595 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_value_chunk_in_value_sentence602 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_value_chunk624 = new BitSet(new long[]{0x000000000FC00002L});
+    public static final BitSet FOLLOW_EQUALS_in_value_chunk626 = new BitSet(new long[]{0x000000000FC00002L});
+    public static final BitSet FOLLOW_COMMA_in_value_chunk628 = new BitSet(new long[]{0x000000000FC00002L});
+    public static final BitSet FOLLOW_set_in_literal646 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition682 = new BitSet(new long[]{0x0000000002000000L});
+    public static final BitSet FOLLOW_LITERAL_in_variable_definition693 = new BitSet(new long[]{0x0000000028000000L});
+    public static final BitSet FOLLOW_COLON_in_variable_definition697 = new BitSet(new long[]{0x000000001B800000L});
+    public static final BitSet FOLLOW_pattern_in_variable_definition701 = new BitSet(new long[]{0x0000000020000000L});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition710 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_definition2886 = new BitSet(new long[]{0x0000000002000000L});
+    public static final BitSet FOLLOW_LITERAL_in_variable_definition2890 = new BitSet(new long[]{0x0000000028000000L});
+    public static final BitSet FOLLOW_COLON_in_variable_definition2894 = new BitSet(new long[]{0x000000001B800000L});
+    public static final BitSet FOLLOW_pattern_in_variable_definition2898 = new BitSet(new long[]{0x0000000020000000L});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_definition2905 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_pattern956 = new BitSet(new long[]{0x000000001B800002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_pattern970 = new BitSet(new long[]{0x000000000B800000L});
+    public static final BitSet FOLLOW_literal_in_pattern972 = new BitSet(new long[]{0x0000000020000000L});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_pattern974 = new BitSet(new long[]{0x000000001B800002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_pattern988 = new BitSet(new long[]{0x000000001B800000L});
+    public static final BitSet FOLLOW_pattern_in_pattern990 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_pattern992 = new BitSet(new long[]{0x000000001B800002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference1027 = new BitSet(new long[]{0x0000000002000000L});
+    public static final BitSet FOLLOW_LITERAL_in_variable_reference1038 = new BitSet(new long[]{0x0000000020000000L});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference1042 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_CURLY_in_variable_reference21120 = new BitSet(new long[]{0x0000000002000000L});
+    public static final BitSet FOLLOW_LITERAL_in_variable_reference21124 = new BitSet(new long[]{0x0000000020000000L});
+    public static final BitSet FOLLOW_RIGHT_CURLY_in_variable_reference21126 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LITERAL_in_condition_key1155 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LITERAL_in_consequence_key1178 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LITERAL_in_keyword_key1201 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LITERAL_in_any_key1224 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_meta_section_in_synpred4341 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_condition_key_in_synpred6392 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_consequence_key_in_synpred7401 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_keyword_key_in_synpred8409 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_synpred12549 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_synpred15624 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_EQUALS_in_synpred16626 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_COMMA_in_synpred17628 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_literal_in_synpred23956 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_LEFT_SQUARE_in_synpred25988 = new BitSet(new long[]{0x000000001B800000L});
+    public static final BitSet FOLLOW_pattern_in_synpred25990 = new BitSet(new long[]{0x0000000001000000L});
+    public static final BitSet FOLLOW_RIGHT_SQUARE_in_synpred25992 = new BitSet(new long[]{0x0000000000000002L});
 
 }
\ No newline at end of file

Modified: labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java
===================================================================
--- labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java	2008-05-22 18:32:46 UTC (rev 20114)
+++ labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapWalker.java	2008-05-22 23:06:09 UTC (rev 20115)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 DSLMapWalker.g 2008-05-20 17:54:41
+// $ANTLR 3.0.1 DSLMapWalker.g 2008-05-22 16:02:42
 
 	package org.drools.lang.dsl;
 	
@@ -112,7 +112,7 @@
                 match(input, Token.UP, null); 
             }
             
-            		System.out.println("done parsing file");
+            		//System.out.println("done parsing file");
             		//System.out.println(((mapping_file_scope)mapping_file_stack.peek()).retval.dumpFile());
             		mapping = ((mapping_file_scope)mapping_file_stack.peek()).retval;
             		//java.io.StringWriter sw = new java.io.StringWriter();
@@ -151,7 +151,7 @@
 
             
             		((mapping_file_scope)mapping_file_stack.peek()).retval.addEntry(ent);
-            		System.out.println("mapping size is now " + ((mapping_file_scope)mapping_file_stack.peek()).retval.getEntries().size());
+            		//System.out.println("mapping size is now " + ((mapping_file_scope)mapping_file_stack.peek()).retval.getEntries().size());
             	
 
             }
@@ -237,7 +237,7 @@
 
 
     // $ANTLR start entry
-    // DSLMapWalker.g:49:1: entry returns [DSLMappingEntry mappingEntry] : ^( VT_ENTRY scope_section meta_section key_section value_section ) ;
+    // DSLMapWalker.g:49:1: entry returns [DSLMappingEntry mappingEntry] : ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) ;
     public final DSLMappingEntry entry() throws RecognitionException {
         entry_stack.push(new entry_scope());
         DSLMappingEntry mappingEntry = null;
@@ -249,8 +249,8 @@
         	((entry_scope)entry_stack.peek()).valuebuffer = new StringBuffer();
 
         try {
-            // DSLMapWalker.g:63:2: ( ^( VT_ENTRY scope_section meta_section key_section value_section ) )
-            // DSLMapWalker.g:63:4: ^( VT_ENTRY scope_section meta_section key_section value_section )
+            // DSLMapWalker.g:63:2: ( ^( VT_ENTRY scope_section ( meta_section )? key_section value_section ) )
+            // DSLMapWalker.g:63:4: ^( VT_ENTRY scope_section ( meta_section )? key_section value_section )
             {
             match(input,VT_ENTRY,FOLLOW_VT_ENTRY_in_entry132); 
 
@@ -259,27 +259,51 @@
             scope_section();
             _fsp--;
 
-            pushFollow(FOLLOW_meta_section_in_entry136);
-            meta_section();
-            _fsp--;
+            // DSLMapWalker.g:63:29: ( meta_section )?
+            int alt3=2;
+            int LA3_0 = input.LA(1);
 
-            pushFollow(FOLLOW_key_section_in_entry138);
+            if ( (LA3_0==VT_META) ) {
+                alt3=1;
+            }
+            switch (alt3) {
+                case 1 :
+                    // DSLMapWalker.g:63:29: meta_section
+                    {
+                    pushFollow(FOLLOW_meta_section_in_entry136);
+                    meta_section();
+                    _fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+            pushFollow(FOLLOW_key_section_in_entry139);
             key_section();
             _fsp--;
 
-            pushFollow(FOLLOW_value_section_in_entry140);
+            ((entry_scope)entry_stack.peek()).retval.variables = ((entry_scope)entry_stack.peek()).variables; ((entry_scope)entry_stack.peek()).retval.setMappingKey(((entry_scope)entry_stack.peek()).keybuffer.toString());
+            pushFollow(FOLLOW_value_section_in_entry145);
             value_section();
             _fsp--;
 
 
             match(input, Token.UP, null); 
             
-            		System.out.println("for this entry, metadata is " + ((entry_scope)entry_stack.peek()).retval.getMetaData().getMetaData());
-            		System.out.println("variables are " + ((entry_scope)entry_stack.peek()).variables);
-            		System.out.println("keybuffer: " + ((entry_scope)entry_stack.peek()).keybuffer);
-            		System.out.println("valuebuffer: " + ((entry_scope)entry_stack.peek()).valuebuffer);
+            		//System.out.println("for this entry, metadata is " + ((entry_scope)entry_stack.peek()).retval.getMetaData().getMetaData());
+            		//System.out.println("variables are " + ((entry_scope)entry_stack.peek()).variables);
+            		
+            		//System.out.println("keybuffer: " + ((entry_scope)entry_stack.peek()).keybuffer);
+            		//System.out.println("valuebuffer: " + ((entry_scope)entry_stack.peek()).valuebuffer);
             //		((mapping_file_scope)mapping_file_stack.peek()).retval.addEntry(((entry_scope)entry_stack.peek()).retval);
             //		System.out.println("mapping size is now " + ((mapping_file_scope)mapping_file_stack.peek()).retval.getEntries().size());
+            		//((entry_scope)entry_stack.peek()).retval.variables = ((entry_scope)entry_stack.peek()).variables;
+            		//((entry_scope)entry_stack.peek()).retval.setMappingKey(((entry_scope)entry_stack.peek()).keybuffer.toString());
+            		((entry_scope)entry_stack.peek()).retval.setMappingValue(((entry_scope)entry_stack.peek()).valuebuffer.toString());
+            		//System.out.println("keypattern is " + ((entry_scope)entry_stack.peek()).retval.getKeyPattern());
+            		//System.out.println("valuepattern is " + ((entry_scope)entry_stack.peek()).retval.getValuePattern());
             		mappingEntry = ((entry_scope)entry_stack.peek()).retval;
             	
 
@@ -299,31 +323,31 @@
 
 
     // $ANTLR start scope_section
-    // DSLMapWalker.g:76:1: scope_section : ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) ;
+    // DSLMapWalker.g:83:1: scope_section : ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) ;
     public final void scope_section() throws RecognitionException {
         CommonTree thescope=null;
 
         try {
-            // DSLMapWalker.g:77:2: ( ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) )
-            // DSLMapWalker.g:77:4: ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? )
+            // DSLMapWalker.g:84:2: ( ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? ) )
+            // DSLMapWalker.g:84:4: ^(thescope= VT_SCOPE ( condition_key )? ( consequence_key )? ( keyword_key )? ( any_key )? )
             {
             thescope=(CommonTree)input.LT(1);
-            match(input,VT_SCOPE,FOLLOW_VT_SCOPE_in_scope_section160); 
+            match(input,VT_SCOPE,FOLLOW_VT_SCOPE_in_scope_section165); 
 
             if ( input.LA(1)==Token.DOWN ) {
                 match(input, Token.DOWN, null); 
-                // DSLMapWalker.g:77:24: ( condition_key )?
-                int alt3=2;
-                int LA3_0 = input.LA(1);
+                // DSLMapWalker.g:84:24: ( condition_key )?
+                int alt4=2;
+                int LA4_0 = input.LA(1);
 
-                if ( (LA3_0==VT_CONDITION) ) {
-                    alt3=1;
+                if ( (LA4_0==VT_CONDITION) ) {
+                    alt4=1;
                 }
-                switch (alt3) {
+                switch (alt4) {
                     case 1 :
-                        // DSLMapWalker.g:77:24: condition_key
+                        // DSLMapWalker.g:84:24: condition_key
                         {
-                        pushFollow(FOLLOW_condition_key_in_scope_section162);
+                        pushFollow(FOLLOW_condition_key_in_scope_section167);
                         condition_key();
                         _fsp--;
 
@@ -333,18 +357,18 @@
 
                 }
 
-                // DSLMapWalker.g:77:39: ( consequence_key )?
-                int alt4=2;
-                int LA4_0 = input.LA(1);
+                // DSLMapWalker.g:84:39: ( consequence_key )?
+                int alt5=2;
+                int LA5_0 = input.LA(1);
 
-                if ( (LA4_0==VT_CONSEQUENCE) ) {
-                    alt4=1;
+                if ( (LA5_0==VT_CONSEQUENCE) ) {
+                    alt5=1;
                 }
-                switch (alt4) {
+                switch (alt5) {
                     case 1 :
-                        // DSLMapWalker.g:77:39: consequence_key
+                        // DSLMapWalker.g:84:39: consequence_key
                         {
-                        pushFollow(FOLLOW_consequence_key_in_scope_section165);
+                        pushFollow(FOLLOW_consequence_key_in_scope_section170);
                         consequence_key();
                         _fsp--;
 
@@ -354,18 +378,18 @@
 
                 }
 
-                // DSLMapWalker.g:77:56: ( keyword_key )?
-                int alt5=2;
-                int LA5_0 = input.LA(1);
+                // DSLMapWalker.g:84:56: ( keyword_key )?
+                int alt6=2;
+                int LA6_0 = input.LA(1);
 
-                if ( (LA5_0==VT_KEYWORD) ) {
-                    alt5=1;
+                if ( (LA6_0==VT_KEYWORD) ) {
+                    alt6=1;
                 }
-                switch (alt5) {
+                switch (alt6) {
                     case 1 :
-                        // DSLMapWalker.g:77:56: keyword_key
+                        // DSLMapWalker.g:84:56: keyword_key
                         {
-                        pushFollow(FOLLOW_keyword_key_in_scope_section168);
+                        pushFollow(FOLLOW_keyword_key_in_scope_section173);
                         keyword_key();
                         _fsp--;
 
@@ -375,18 +399,18 @@
 
                 }
 
-                // DSLMapWalker.g:77:69: ( any_key )?
-                int alt6=2;
-                int LA6_0 = input.LA(1);
+                // DSLMapWalker.g:84:69: ( any_key )?
+                int alt7=2;
+                int LA7_0 = input.LA(1);
 
-                if ( (LA6_0==VT_ANY) ) {
-                    alt6=1;
+                if ( (LA7_0==VT_ANY) ) {
+                    alt7=1;
                 }
-                switch (alt6) {
+                switch (alt7) {
                     case 1 :
-                        // DSLMapWalker.g:77:69: any_key
+                        // DSLMapWalker.g:84:69: any_key
                         {
-                        pushFollow(FOLLOW_any_key_in_scope_section171);
+                        pushFollow(FOLLOW_any_key_in_scope_section176);
                         any_key();
                         _fsp--;
 
@@ -415,31 +439,31 @@
 
 
     // $ANTLR start meta_section
-    // DSLMapWalker.g:82:1: meta_section : ^( VT_META (metalit= LITERAL )? ) ;
+    // DSLMapWalker.g:89:1: meta_section : ^( VT_META (metalit= LITERAL )? ) ;
     public final void meta_section() throws RecognitionException {
         CommonTree metalit=null;
 
         try {
-            // DSLMapWalker.g:83:2: ( ^( VT_META (metalit= LITERAL )? ) )
-            // DSLMapWalker.g:83:4: ^( VT_META (metalit= LITERAL )? )
+            // DSLMapWalker.g:90:2: ( ^( VT_META (metalit= LITERAL )? ) )
+            // DSLMapWalker.g:90:4: ^( VT_META (metalit= LITERAL )? )
             {
-            match(input,VT_META,FOLLOW_VT_META_in_meta_section188); 
+            match(input,VT_META,FOLLOW_VT_META_in_meta_section193); 
 
             if ( input.LA(1)==Token.DOWN ) {
                 match(input, Token.DOWN, null); 
-                // DSLMapWalker.g:83:21: (metalit= LITERAL )?
-                int alt7=2;
-                int LA7_0 = input.LA(1);
+                // DSLMapWalker.g:90:21: (metalit= LITERAL )?
+                int alt8=2;
+                int LA8_0 = input.LA(1);
 
-                if ( (LA7_0==LITERAL) ) {
-                    alt7=1;
+                if ( (LA8_0==LITERAL) ) {
+                    alt8=1;
                 }
-                switch (alt7) {
+                switch (alt8) {
                     case 1 :
-                        // DSLMapWalker.g:83:21: metalit= LITERAL
+                        // DSLMapWalker.g:90:21: metalit= LITERAL
                         {
                         metalit=(CommonTree)input.LT(1);
-                        match(input,LITERAL,FOLLOW_LITERAL_in_meta_section192); 
+                        match(input,LITERAL,FOLLOW_LITERAL_in_meta_section197); 
 
                         }
                         break;
@@ -472,32 +496,32 @@
 
 
     // $ANTLR start key_section
-    // DSLMapWalker.g:93:1: key_section : ^( VT_ENTRY_KEY ( key_sentence )+ ) ;
+    // DSLMapWalker.g:100:1: key_section : ^( VT_ENTRY_KEY ( key_sentence )+ ) ;
     public final void key_section() throws RecognitionException {
         try {
-            // DSLMapWalker.g:94:2: ( ^( VT_ENTRY_KEY ( key_sentence )+ ) )
-            // DSLMapWalker.g:94:4: ^( VT_ENTRY_KEY ( key_sentence )+ )
+            // DSLMapWalker.g:101:2: ( ^( VT_ENTRY_KEY ( key_sentence )+ ) )
+            // DSLMapWalker.g:101:4: ^( VT_ENTRY_KEY ( key_sentence )+ )
             {
-            match(input,VT_ENTRY_KEY,FOLLOW_VT_ENTRY_KEY_in_key_section209); 
+            match(input,VT_ENTRY_KEY,FOLLOW_VT_ENTRY_KEY_in_key_section214); 
 
             match(input, Token.DOWN, null); 
-            // DSLMapWalker.g:94:19: ( key_sentence )+
-            int cnt8=0;
-            loop8:
+            // DSLMapWalker.g:101:19: ( key_sentence )+
+            int cnt9=0;
+            loop9:
             do {
-                int alt8=2;
-                int LA8_0 = input.LA(1);
+                int alt9=2;
+                int LA9_0 = input.LA(1);
 
-                if ( (LA8_0==VT_VAR_DEF||LA8_0==VT_LITERAL||LA8_0==VT_SPACE) ) {
-                    alt8=1;
+                if ( (LA9_0==VT_VAR_DEF||LA9_0==VT_LITERAL||LA9_0==VT_SPACE) ) {
+                    alt9=1;
                 }
 
 
-                switch (alt8) {
+                switch (alt9) {
             	case 1 :
-            	    // DSLMapWalker.g:94:19: key_sentence
+            	    // DSLMapWalker.g:101:19: key_sentence
             	    {
-            	    pushFollow(FOLLOW_key_sentence_in_key_section211);
+            	    pushFollow(FOLLOW_key_sentence_in_key_section216);
             	    key_sentence();
             	    _fsp--;
 
@@ -506,18 +530,18 @@
             	    break;
 
             	default :
-            	    if ( cnt8 >= 1 ) break loop8;
+            	    if ( cnt9 >= 1 ) break loop9;
                         EarlyExitException eee =
-                            new EarlyExitException(8, input);
+                            new EarlyExitException(9, input);
                         throw eee;
                 }
-                cnt8++;
+                cnt9++;
             } while (true);
 
 
             match(input, Token.UP, null); 
             
-            		((entry_scope)entry_stack.peek()).retval.setMappingKey(((entry_scope)entry_stack.peek()).keybuffer.toString());
+            		//((entry_scope)entry_stack.peek()).retval.setMappingKey(((entry_scope)entry_stack.peek()).keybuffer.toString());
             	
 
             }
@@ -535,41 +559,41 @@
 
 
     // $ANTLR start key_sentence
-    // DSLMapWalker.g:100:1: key_sentence : ( variable_definition | vtl= VT_LITERAL | VT_SPACE );
+    // DSLMapWalker.g:107:1: key_sentence : ( variable_definition | vtl= VT_LITERAL | VT_SPACE );
     public final void key_sentence() throws RecognitionException {
         CommonTree vtl=null;
 
         try {
-            // DSLMapWalker.g:101:2: ( variable_definition | vtl= VT_LITERAL | VT_SPACE )
-            int alt9=3;
+            // DSLMapWalker.g:108:2: ( variable_definition | vtl= VT_LITERAL | VT_SPACE )
+            int alt10=3;
             switch ( input.LA(1) ) {
             case VT_VAR_DEF:
                 {
-                alt9=1;
+                alt10=1;
                 }
                 break;
             case VT_LITERAL:
                 {
-                alt9=2;
+                alt10=2;
                 }
                 break;
             case VT_SPACE:
                 {
-                alt9=3;
+                alt10=3;
                 }
                 break;
             default:
                 NoViableAltException nvae =
-                    new NoViableAltException("100:1: key_sentence : ( variable_definition | vtl= VT_LITERAL | VT_SPACE );", 9, 0, input);
+                    new NoViableAltException("107:1: key_sentence : ( variable_definition | vtl= VT_LITERAL | VT_SPACE );", 10, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt9) {
+            switch (alt10) {
                 case 1 :
-                    // DSLMapWalker.g:101:4: variable_definition
+                    // DSLMapWalker.g:108:4: variable_definition
                     {
-                    pushFollow(FOLLOW_variable_definition_in_key_sentence229);
+                    pushFollow(FOLLOW_variable_definition_in_key_sentence234);
                     variable_definition();
                     _fsp--;
 
@@ -577,21 +601,21 @@
                     }
                     break;
                 case 2 :
-                    // DSLMapWalker.g:102:4: vtl= VT_LITERAL
+                    // DSLMapWalker.g:109:4: vtl= VT_LITERAL
                     {
                     vtl=(CommonTree)input.LT(1);
-                    match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_key_sentence236); 
+                    match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_key_sentence241); 
                     
-                    		System.out.println("in key_sentence, literal is " + vtl.getText());
+                    		//System.out.println("in key_sentence, literal is " + vtl.getText());
                     		((entry_scope)entry_stack.peek()).keybuffer.append(vtl.getText());
                     	
 
                     }
                     break;
                 case 3 :
-                    // DSLMapWalker.g:107:4: VT_SPACE
+                    // DSLMapWalker.g:114:4: VT_SPACE
                     {
-                    match(input,VT_SPACE,FOLLOW_VT_SPACE_in_key_sentence245); 
+                    match(input,VT_SPACE,FOLLOW_VT_SPACE_in_key_sentence250); 
                     
                     		((entry_scope)entry_stack.peek()).keybuffer.append("\\s+");
                     	
@@ -613,32 +637,32 @@
 
 
     // $ANTLR start value_section
-    // DSLMapWalker.g:117:1: value_section : ^( VT_ENTRY_VAL ( value_sentence )+ ) ;
+    // DSLMapWalker.g:124:1: value_section : ^( VT_ENTRY_VAL ( value_sentence )+ ) ;
     public final void value_section() throws RecognitionException {
         try {
-            // DSLMapWalker.g:118:2: ( ^( VT_ENTRY_VAL ( value_sentence )+ ) )
-            // DSLMapWalker.g:118:4: ^( VT_ENTRY_VAL ( value_sentence )+ )
+            // DSLMapWalker.g:125:2: ( ^( VT_ENTRY_VAL ( value_sentence )+ ) )
+            // DSLMapWalker.g:125:4: ^( VT_ENTRY_VAL ( value_sentence )+ )
             {
-            match(input,VT_ENTRY_VAL,FOLLOW_VT_ENTRY_VAL_in_value_section264); 
+            match(input,VT_ENTRY_VAL,FOLLOW_VT_ENTRY_VAL_in_value_section269); 
 
             match(input, Token.DOWN, null); 
-            // DSLMapWalker.g:118:19: ( value_sentence )+
-            int cnt10=0;
-            loop10:
+            // DSLMapWalker.g:125:19: ( value_sentence )+
+            int cnt11=0;
+            loop11:
             do {
-                int alt10=2;
-                int LA10_0 = input.LA(1);
+                int alt11=2;
+                int LA11_0 = input.LA(1);
 
-                if ( ((LA10_0>=VT_VAR_REF && LA10_0<=VT_LITERAL)||LA10_0==VT_SPACE) ) {
-                    alt10=1;
+                if ( ((LA11_0>=VT_VAR_REF && LA11_0<=VT_LITERAL)||LA11_0==VT_SPACE) ) {
+                    alt11=1;
                 }
 
 
-                switch (alt10) {
+                switch (alt11) {
             	case 1 :
-            	    // DSLMapWalker.g:118:19: value_sentence
+            	    // DSLMapWalker.g:125:19: value_sentence
             	    {
-            	    pushFollow(FOLLOW_value_sentence_in_value_section266);
+            	    pushFollow(FOLLOW_value_sentence_in_value_section271);
             	    value_sentence();
             	    _fsp--;
 
@@ -647,18 +671,18 @@
             	    break;
 
             	default :
-            	    if ( cnt10 >= 1 ) break loop10;
+            	    if ( cnt11 >= 1 ) break loop11;
                         EarlyExitException eee =
-                            new EarlyExitException(10, input);
+                            new EarlyExitException(11, input);
                         throw eee;
                 }
-                cnt10++;
+                cnt11++;
             } while (true);
 
 
             match(input, Token.UP, null); 
             
-            		((entry_scope)entry_stack.peek()).retval.setMappingValue(((entry_scope)entry_stack.peek()).valuebuffer.toString());
+            		//((entry_scope)entry_stack.peek()).retval.setMappingValue(((entry_scope)entry_stack.peek()).valuebuffer.toString());
             	
 
             }
@@ -676,41 +700,41 @@
 
 
     // $ANTLR start value_sentence
-    // DSLMapWalker.g:124:1: value_sentence : ( variable_reference | vtl= VT_LITERAL | VT_SPACE );
+    // DSLMapWalker.g:131:1: value_sentence : ( variable_reference | vtl= VT_LITERAL | VT_SPACE );
     public final void value_sentence() throws RecognitionException {
         CommonTree vtl=null;
 
         try {
-            // DSLMapWalker.g:125:2: ( variable_reference | vtl= VT_LITERAL | VT_SPACE )
-            int alt11=3;
+            // DSLMapWalker.g:132:2: ( variable_reference | vtl= VT_LITERAL | VT_SPACE )
+            int alt12=3;
             switch ( input.LA(1) ) {
             case VT_VAR_REF:
                 {
-                alt11=1;
+                alt12=1;
                 }
                 break;
             case VT_LITERAL:
                 {
-                alt11=2;
+                alt12=2;
                 }
                 break;
             case VT_SPACE:
                 {
-                alt11=3;
+                alt12=3;
                 }
                 break;
             default:
                 NoViableAltException nvae =
-                    new NoViableAltException("124:1: value_sentence : ( variable_reference | vtl= VT_LITERAL | VT_SPACE );", 11, 0, input);
+                    new NoViableAltException("131:1: value_sentence : ( variable_reference | vtl= VT_LITERAL | VT_SPACE );", 12, 0, input);
 
                 throw nvae;
             }
 
-            switch (alt11) {
+            switch (alt12) {
                 case 1 :
-                    // DSLMapWalker.g:125:4: variable_reference
+                    // DSLMapWalker.g:132:4: variable_reference
                     {
-                    pushFollow(FOLLOW_variable_reference_in_value_sentence286);
+                    pushFollow(FOLLOW_variable_reference_in_value_sentence291);
                     variable_reference();
                     _fsp--;
 
@@ -718,21 +742,21 @@
                     }
                     break;
                 case 2 :
-                    // DSLMapWalker.g:126:4: vtl= VT_LITERAL
+                    // DSLMapWalker.g:133:4: vtl= VT_LITERAL
                     {
                     vtl=(CommonTree)input.LT(1);
-                    match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_value_sentence293); 
+                    match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_value_sentence298); 
                     
-                    		System.out.println("in value_sentence, literal is " + vtl.getText());
+                    		//System.out.println("in value_sentence, literal is " + vtl.getText());
                     		((entry_scope)entry_stack.peek()).valuebuffer.append(vtl.getText());
                     	
 
                     }
                     break;
                 case 3 :
-                    // DSLMapWalker.g:131:4: VT_SPACE
+                    // DSLMapWalker.g:138:4: VT_SPACE
                     {
-                    match(input,VT_SPACE,FOLLOW_VT_SPACE_in_value_sentence301); 
+                    match(input,VT_SPACE,FOLLOW_VT_SPACE_in_value_sentence306); 
                     
                     		((entry_scope)entry_stack.peek()).valuebuffer.append(" ");
                     	
@@ -754,17 +778,17 @@
 
 
     // $ANTLR start literal
-    // DSLMapWalker.g:141:1: literal : theliteral= VT_LITERAL ;
+    // DSLMapWalker.g:148:1: literal : theliteral= VT_LITERAL ;
     public final void literal() throws RecognitionException {
         CommonTree theliteral=null;
 
         try {
-            // DSLMapWalker.g:142:2: (theliteral= VT_LITERAL )
-            // DSLMapWalker.g:142:4: theliteral= VT_LITERAL
+            // DSLMapWalker.g:149:2: (theliteral= VT_LITERAL )
+            // DSLMapWalker.g:149:4: theliteral= VT_LITERAL
             {
             theliteral=(CommonTree)input.LT(1);
-            match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_literal321); 
-            System.out.println("theliteral is " + theliteral.getText());
+            match(input,VT_LITERAL,FOLLOW_VT_LITERAL_in_literal326); 
+            //System.out.println("theliteral is " + theliteral.getText());
 
             }
 
@@ -781,33 +805,33 @@
 
 
     // $ANTLR start variable_definition
-    // DSLMapWalker.g:146:1: variable_definition : ^( VT_VAR_DEF varname= LITERAL (pattern= VT_PATTERN )? ) ;
+    // DSLMapWalker.g:153:1: variable_definition : ^( VT_VAR_DEF varname= LITERAL (pattern= VT_PATTERN )? ) ;
     public final void variable_definition() throws RecognitionException {
         CommonTree varname=null;
         CommonTree pattern=null;
 
         try {
-            // DSLMapWalker.g:148:2: ( ^( VT_VAR_DEF varname= LITERAL (pattern= VT_PATTERN )? ) )
-            // DSLMapWalker.g:148:6: ^( VT_VAR_DEF varname= LITERAL (pattern= VT_PATTERN )? )
+            // DSLMapWalker.g:155:2: ( ^( VT_VAR_DEF varname= LITERAL (pattern= VT_PATTERN )? ) )
+            // DSLMapWalker.g:155:6: ^( VT_VAR_DEF varname= LITERAL (pattern= VT_PATTERN )? )
             {
-            match(input,VT_VAR_DEF,FOLLOW_VT_VAR_DEF_in_variable_definition340); 
+            match(input,VT_VAR_DEF,FOLLOW_VT_VAR_DEF_in_variable_definition345); 
 
             match(input, Token.DOWN, null); 
             varname=(CommonTree)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition344); 
-            // DSLMapWalker.g:148:42: (pattern= VT_PATTERN )?
-            int alt12=2;
-            int LA12_0 = input.LA(1);
+            match(input,LITERAL,FOLLOW_LITERAL_in_variable_definition349); 
+            // DSLMapWalker.g:155:42: (pattern= VT_PATTERN )?
+            int alt13=2;
+            int LA13_0 = input.LA(1);
 
-            if ( (LA12_0==VT_PATTERN) ) {
-                alt12=1;
+            if ( (LA13_0==VT_PATTERN) ) {
+                alt13=1;
             }
-            switch (alt12) {
+            switch (alt13) {
                 case 1 :
-                    // DSLMapWalker.g:148:42: pattern= VT_PATTERN
+                    // DSLMapWalker.g:155:42: pattern= VT_PATTERN
                     {
                     pattern=(CommonTree)input.LT(1);
-                    match(input,VT_PATTERN,FOLLOW_VT_PATTERN_in_variable_definition348); 
+                    match(input,VT_PATTERN,FOLLOW_VT_PATTERN_in_variable_definition353); 
 
                     }
                     break;
@@ -817,7 +841,7 @@
 
             match(input, Token.UP, null); 
             
-            		System.out.println("variable " + varname.getText() + " defined with pattern " + pattern);
+            		//System.out.println("variable " + varname.getText() + " defined with pattern " + pattern);
             		((entry_scope)entry_stack.peek()).counter++;
             		((entry_scope)entry_stack.peek()).variables.put(varname.getText(), new Integer(((entry_scope)entry_stack.peek()).counter));
             		((entry_scope)entry_stack.peek()).keybuffer.append(pattern != null? "(" + pattern.getText() + ")" : "(.*?)");
@@ -838,25 +862,25 @@
 
 
     // $ANTLR start variable_reference
-    // DSLMapWalker.g:158:1: variable_reference : ^(varref= VT_VAR_REF lit= LITERAL ) ;
+    // DSLMapWalker.g:165:1: variable_reference : ^(varref= VT_VAR_REF lit= LITERAL ) ;
     public final void variable_reference() throws RecognitionException {
         CommonTree varref=null;
         CommonTree lit=null;
 
         try {
-            // DSLMapWalker.g:159:2: ( ^(varref= VT_VAR_REF lit= LITERAL ) )
-            // DSLMapWalker.g:159:4: ^(varref= VT_VAR_REF lit= LITERAL )
+            // DSLMapWalker.g:166:2: ( ^(varref= VT_VAR_REF lit= LITERAL ) )
+            // DSLMapWalker.g:166:4: ^(varref= VT_VAR_REF lit= LITERAL )
             {
             varref=(CommonTree)input.LT(1);
-            match(input,VT_VAR_REF,FOLLOW_VT_VAR_REF_in_variable_reference370); 
+            match(input,VT_VAR_REF,FOLLOW_VT_VAR_REF_in_variable_reference375); 
 
             match(input, Token.DOWN, null); 
             lit=(CommonTree)input.LT(1);
-            match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference374); 
+            match(input,LITERAL,FOLLOW_LITERAL_in_variable_reference379); 
 
             match(input, Token.UP, null); 
             
-            		System.out.println("varref is " + varref.getText() + " and points to " + lit.getText());
+            		//System.out.println("varref is " + varref.getText() + " and points to " + lit.getText());
             		((entry_scope)entry_stack.peek()).valuebuffer.append("$" + ((entry_scope)entry_stack.peek()).variables.get(lit.getText()));
             	
 
@@ -875,13 +899,13 @@
 
 
     // $ANTLR start condition_key
-    // DSLMapWalker.g:166:1: condition_key : VT_CONDITION ;
+    // DSLMapWalker.g:173:1: condition_key : VT_CONDITION ;
     public final void condition_key() throws RecognitionException {
         try {
-            // DSLMapWalker.g:167:2: ( VT_CONDITION )
-            // DSLMapWalker.g:167:4: VT_CONDITION
+            // DSLMapWalker.g:174:2: ( VT_CONDITION )
+            // DSLMapWalker.g:174:4: VT_CONDITION
             {
-            match(input,VT_CONDITION,FOLLOW_VT_CONDITION_in_condition_key392); 
+            match(input,VT_CONDITION,FOLLOW_VT_CONDITION_in_condition_key397); 
             ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.CONDITION);
 
             }
@@ -899,13 +923,13 @@
 
 
     // $ANTLR start consequence_key
-    // DSLMapWalker.g:171:1: consequence_key : VT_CONSEQUENCE ;
+    // DSLMapWalker.g:178:1: consequence_key : VT_CONSEQUENCE ;
     public final void consequence_key() throws RecognitionException {
         try {
-            // DSLMapWalker.g:172:2: ( VT_CONSEQUENCE )
-            // DSLMapWalker.g:172:4: VT_CONSEQUENCE
+            // DSLMapWalker.g:179:2: ( VT_CONSEQUENCE )
+            // DSLMapWalker.g:179:4: VT_CONSEQUENCE
             {
-            match(input,VT_CONSEQUENCE,FOLLOW_VT_CONSEQUENCE_in_consequence_key407); 
+            match(input,VT_CONSEQUENCE,FOLLOW_VT_CONSEQUENCE_in_consequence_key412); 
             ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.CONSEQUENCE);
 
             }
@@ -923,13 +947,13 @@
 
 
     // $ANTLR start keyword_key
-    // DSLMapWalker.g:176:1: keyword_key : VT_KEYWORD ;
+    // DSLMapWalker.g:183:1: keyword_key : VT_KEYWORD ;
     public final void keyword_key() throws RecognitionException {
         try {
-            // DSLMapWalker.g:177:2: ( VT_KEYWORD )
-            // DSLMapWalker.g:177:4: VT_KEYWORD
+            // DSLMapWalker.g:184:2: ( VT_KEYWORD )
+            // DSLMapWalker.g:184:4: VT_KEYWORD
             {
-            match(input,VT_KEYWORD,FOLLOW_VT_KEYWORD_in_keyword_key422); 
+            match(input,VT_KEYWORD,FOLLOW_VT_KEYWORD_in_keyword_key427); 
             ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.KEYWORD);
 
             }
@@ -947,13 +971,13 @@
 
 
     // $ANTLR start any_key
-    // DSLMapWalker.g:181:1: any_key : VT_ANY ;
+    // DSLMapWalker.g:188:1: any_key : VT_ANY ;
     public final void any_key() throws RecognitionException {
         try {
-            // DSLMapWalker.g:182:2: ( VT_ANY )
-            // DSLMapWalker.g:182:4: VT_ANY
+            // DSLMapWalker.g:189:2: ( VT_ANY )
+            // DSLMapWalker.g:189:4: VT_ANY
             {
-            match(input,VT_ANY,FOLLOW_VT_ANY_in_any_key437); 
+            match(input,VT_ANY,FOLLOW_VT_ANY_in_any_key442); 
             ((entry_scope)entry_stack.peek()).retval.setSection(DSLMappingEntry.ANY);
 
             }
@@ -978,36 +1002,36 @@
     public static final BitSet FOLLOW_entry_in_valid_entry97 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_VT_COMMENT_in_valid_entry104 = new BitSet(new long[]{0x0000000000000002L});
     public static final BitSet FOLLOW_VT_ENTRY_in_entry132 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_scope_section_in_entry134 = new BitSet(new long[]{0x0000000000001000L});
+    public static final BitSet FOLLOW_scope_section_in_entry134 = new BitSet(new long[]{0x0000000000003000L});
     public static final BitSet FOLLOW_meta_section_in_entry136 = new BitSet(new long[]{0x0000000000002000L});
-    public static final BitSet FOLLOW_key_section_in_entry138 = new BitSet(new long[]{0x0000000000004000L});
-    public static final BitSet FOLLOW_value_section_in_entry140 = new BitSet(new long[]{0x0000000000000008L});
-    public static final BitSet FOLLOW_VT_SCOPE_in_scope_section160 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_condition_key_in_scope_section162 = new BitSet(new long[]{0x0000000000000E08L});
-    public static final BitSet FOLLOW_consequence_key_in_scope_section165 = new BitSet(new long[]{0x0000000000000C08L});
-    public static final BitSet FOLLOW_keyword_key_in_scope_section168 = new BitSet(new long[]{0x0000000000000808L});
-    public static final BitSet FOLLOW_any_key_in_scope_section171 = new BitSet(new long[]{0x0000000000000008L});
-    public static final BitSet FOLLOW_VT_META_in_meta_section188 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_LITERAL_in_meta_section192 = new BitSet(new long[]{0x0000000000000008L});
-    public static final BitSet FOLLOW_VT_ENTRY_KEY_in_key_section209 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_key_sentence_in_key_section211 = new BitSet(new long[]{0x00000000000A8008L});
-    public static final BitSet FOLLOW_variable_definition_in_key_sentence229 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_LITERAL_in_key_sentence236 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_SPACE_in_key_sentence245 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_ENTRY_VAL_in_value_section264 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_value_sentence_in_value_section266 = new BitSet(new long[]{0x00000000000B0008L});
-    public static final BitSet FOLLOW_variable_reference_in_value_sentence286 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_LITERAL_in_value_sentence293 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_SPACE_in_value_sentence301 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_LITERAL_in_literal321 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_VAR_DEF_in_variable_definition340 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_LITERAL_in_variable_definition344 = new BitSet(new long[]{0x0000000000040008L});
-    public static final BitSet FOLLOW_VT_PATTERN_in_variable_definition348 = new BitSet(new long[]{0x0000000000000008L});
-    public static final BitSet FOLLOW_VT_VAR_REF_in_variable_reference370 = new BitSet(new long[]{0x0000000000000004L});
-    public static final BitSet FOLLOW_LITERAL_in_variable_reference374 = new BitSet(new long[]{0x0000000000000008L});
-    public static final BitSet FOLLOW_VT_CONDITION_in_condition_key392 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_CONSEQUENCE_in_consequence_key407 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_KEYWORD_in_keyword_key422 = new BitSet(new long[]{0x0000000000000002L});
-    public static final BitSet FOLLOW_VT_ANY_in_any_key437 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_key_section_in_entry139 = new BitSet(new long[]{0x0000000000004000L});
+    public static final BitSet FOLLOW_value_section_in_entry145 = new BitSet(new long[]{0x0000000000000008L});
+    public static final BitSet FOLLOW_VT_SCOPE_in_scope_section165 = new BitSet(new long[]{0x0000000000000004L});
+    public static final BitSet FOLLOW_condition_key_in_scope_section167 = new BitSet(new long[]{0x0000000000000E08L});
+    public static final BitSet FOLLOW_consequence_key_in_scope_section170 = new BitSet(new long[]{0x0000000000000C08L});
+    public static final BitSet FOLLOW_keyword_key_in_scope_section173 = new BitSet(new long[]{0x0000000000000808L});
+    public static final BitSet FOLLOW_any_key_in_scope_section176 = new BitSet(new long[]{0x0000000000000008L});
+    public static final BitSet FOLLOW_VT_META_in_meta_section193 = new BitSet(new long[]{0x0000000000000004L});
+    public static final BitSet FOLLOW_LITERAL_in_meta_section197 = new BitSet(new long[]{0x0000000000000008L});
+    public static final BitSet FOLLOW_VT_ENTRY_KEY_in_key_section214 = new BitSet(new long[]{0x0000000000000004L});
+    public static final BitSet FOLLOW_key_sentence_in_key_section216 = new BitSet(new long[]{0x00000000000A8008L});
+    public static final BitSet FOLLOW_variable_definition_in_key_sentence234 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_LITERAL_in_key_sentence241 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_SPACE_in_key_sentence250 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_ENTRY_VAL_in_value_section269 = new BitSet(new long[]{0x0000000000000004L});
+    public static final BitSet FOLLOW_value_sentence_in_value_section271 = new BitSet(new long[]{0x00000000000B0008L});
+    public static final BitSet FOLLOW_variable_reference_in_value_sentence291 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_LITERAL_in_value_sentence298 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_SPACE_in_value_sentence306 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_LITERAL_in_literal326 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_VAR_DEF_in_variable_definition345 = new BitSet(new long[]{0x0000000000000004L});
+    public static final BitSet FOLLOW_LITERAL_in_variable_definition349 = new BitSet(new long[]{0x0000000000040008L});
+    public static final BitSet FOLLOW_VT_PATTERN_in_variable_definition353 = new BitSet(new long[]{0x0000000000000008L});
+    public static final BitSet FOLLOW_VT_VAR_REF_in_variable_reference375 = new BitSet(new long[]{0x0000000000000004L});
+    public static final BitSet FOLLOW_LITERAL_in_variable_reference379 = new BitSet(new long[]{0x0000000000000008L});
+    public static final BitSet FOLLOW_VT_CONDITION_in_condition_key397 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_CONSEQUENCE_in_consequence_key412 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_KEYWORD_in_keyword_key427 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_VT_ANY_in_any_key442 = new BitSet(new long[]{0x0000000000000002L});
 
 }
\ No newline at end of file

Modified: labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
===================================================================
--- labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java	2008-05-22 18:32:46 UTC (rev 20114)
+++ labs/jbossrules/branches/mattgeis/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java	2008-05-22 23:06:09 UTC (rev 20115)
@@ -228,6 +228,10 @@
                 // expand the expression
                 for ( final Iterator it = this.condition.iterator(); it.hasNext(); ) {
                     final DSLMappingEntry entry = (DSLMappingEntry) it.next();
+                    System.out.println("toExpand, st: " + expanded[lastExpanded] + "|");
+                    System.out.println("kp: " + entry.getKeyPattern());
+                    System.out.println("vp: " + entry.getValuePattern());
+                    System.out.println("matches?: " + entry.getKeyPattern().matcher(expanded[lastExpanded]).matches());
                     expanded[lastExpanded] = entry.getKeyPattern().matcher( expanded[lastExpanded] ).replaceAll( entry.getValuePattern() );
                 }
 




More information about the jboss-svn-commits mailing list