velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From by...@apache.org
Subject svn commit: r741397 [1/3] - in /velocity/engine/branches/2.0_Exp/src: java/org/apache/velocity/context/ java/org/apache/velocity/runtime/directive/ java/org/apache/velocity/runtime/parser/ java/org/apache/velocity/runtime/parser/node/ parser/ test/org/...
Date Fri, 06 Feb 2009 04:24:52 GMT
Author: byron
Date: Fri Feb  6 04:24:49 2009
New Revision: 741397

URL: http://svn.apache.org/viewvc?rev=741397&view=rev
Log:
VELOCITY-680 Added #local and #global directive for scope control within macros

Added:
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/node/ASTGlobalDirective.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/node/ASTLocalDirective.java
    velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/GlobalTestCase.java
    velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/LocalDirectiveTestCase.java
Modified:
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ChainedInternalContextAdapter.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/Context.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/EvaluateContext.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalWrapperContext.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ProxyVMContext.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Foreach.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/Parser.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserConstants.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
    velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ChainedInternalContextAdapter.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ChainedInternalContextAdapter.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ChainedInternalContextAdapter.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ChainedInternalContextAdapter.java Fri Feb  6 04:24:49 2009
@@ -19,16 +19,10 @@
  * under the License.    
  */
 
-import java.util.HashSet;
-import java.util.Set;
 import java.util.List;
 
-import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.event.EventCartridge;
-import org.apache.velocity.runtime.RuntimeConstants;
-import org.apache.velocity.runtime.RuntimeServices;
 import org.apache.velocity.runtime.resource.Resource;
-import org.apache.velocity.util.ClassUtils;
 import org.apache.velocity.util.introspection.IntrospectionCacheData;
 
 /**
@@ -207,14 +201,6 @@
     }
 
     /**
-     * @see org.apache.velocity.context.InternalWrapperContext#localPut(java.lang.String,java.lang.Object)
-     */
-    public Object localPut(final String key, final Object value)
-    {
-        return innerContext.put(key, value);
-    }
-
-    /**
      * @see org.apache.velocity.context.InternalHousekeepingContext#icachePut(java.lang.Object, org.apache.velocity.util.introspection.IntrospectionCacheData)
      */
     public void icachePut(Object key, IntrospectionCacheData o)
@@ -270,4 +256,32 @@
     {
         return innerContext.getCurrentResource();
     }
+    
+    /**
+     * Associated the value with the given key from the given scope, the default implementation
+     * is to ignore the scope and simply place the value into the innerContext.
+     */
+    public Object put(String key, Object value, Scope scope)
+    {
+        return innerContext.put(key, value);
+    }
+    
+    /**
+     * Retrieve the value associated with the given key from the specified scope. 
+     * The default implementation is to ignore the scope and retrieve the value
+     * from the innerContext.
+     */
+    public Object get(String key, Scope scope)
+    {
+        return innerContext.get(key);
+    }
+
+    /**
+     * Return true if the context of the specifed scope contains key.  The default
+     * implementation ignores scope.
+     */
+    public boolean containsKey(String key, Scope scope)
+    {
+        return innerContext.containsKey(key);
+    }
 }

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/Context.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/Context.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/Context.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/Context.java Fri Feb  6 04:24:49 2009
@@ -37,6 +37,9 @@
  */
 public interface Context
 {
+    public enum Scope {DEFAULT, LOCAL, GLOBAL}
+  
+  
     /**
      * Adds a name/value pair to the context.
      *

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/EvaluateContext.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/EvaluateContext.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/EvaluateContext.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/EvaluateContext.java Fri Feb  6 04:24:49 2009
@@ -21,15 +21,11 @@
 
 import java.util.HashSet;
 import java.util.Set;
-import java.util.List;
 
 import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.event.EventCartridge;
 import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.runtime.RuntimeServices;
-import org.apache.velocity.runtime.resource.Resource;
 import org.apache.velocity.util.ClassUtils;
-import org.apache.velocity.util.introspection.IntrospectionCacheData;
 
 /**
  *  This is a special, internal-use-only context implementation to be
@@ -141,7 +137,6 @@
         /*
          *  always try the local context then innerContext
          */
-
         Object o = localContext.get( key );
 
         if ( o == null)
@@ -189,17 +184,41 @@
     }
 
     /**
-     * Allows callers to explicitly put objects in the local context.
-     * Objects added to the context through this method always end up
-     * in the top-level context of possible wrapped contexts.
-     *
-     *  @param key name of item to set.
-     *  @param value object to set to key.
-     *  @return old stored object
-     */
-    public Object localPut(final String key, final Object value)
-    {
-        return localContext.put(key, value);
+     * Put a value into the appropriate context specified by 'scope'
+     */    
+    public Object put(String key, Object value, Scope scope)
+    {
+      switch (scope)
+      {
+          case GLOBAL: return super.put(key, value);
+          case LOCAL: return localContext.put(key, value);
+          default: return put(key, value);  // DEFAULT scope
+      }      
     }
 
+    /**
+     * Returns a value associated with 'key' from the specified 'scope'
+     */    
+    public Object get(String key, Scope scope)
+    {
+      switch (scope)
+      {
+          case GLOBAL: return super.get(key);
+          case LOCAL: return localContext.get(key);
+          default: return get(key);  // DEFAULT scope
+      }      
+    }
+    
+    /**
+     * Returns true if the specified scope contains 'key'
+     */
+    public boolean containsKey(String key, Scope scope)
+    {
+        switch (scope)
+        {
+            case GLOBAL: return super.containsKey(key);
+            case LOCAL: return localContext.containsKey(key);
+            default: return containsKey(key);  // DEFAULT scope
+        }            
+    }    
 }

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java Fri Feb  6 04:24:49 2009
@@ -251,15 +251,6 @@
     }
 
     /**
-     * @see InternalWrapperContext#localPut(String, Object)
-     * @since 1.5
-     */
-    public Object localPut(final String key, final Object value)
-    {
-        return put(key, value);
-    }
-
-    /**
      * @see org.apache.velocity.context.Context#get(java.lang.String)
      */
     public Object get(String key)
@@ -343,6 +334,35 @@
 
         return null;
     }
+
+    /**
+     * Retrieve the value associated with key.
+     * This class will always be used as the global context, so we ignore 
+     * scope and retrieve the value from Context.
+     */
+    public Object get(String key, Scope scope)
+    {
+        return context.get(key);
+    }    
+
+    /**
+     * Put the value assocated with key into the context.
+     * @see #get(String, org.apache.velocity.context.Context.Scope) for notes about scope
+     */
+    public Object put(String key, Object value, Scope scope)
+    {
+        return context.put(key, value);
+    }
+
+    /**
+     * Returns true if key is in the context.
+     * @see #get(String, org.apache.velocity.context.Context.Scope) for notes about scope
+     */
+    public boolean containsKey(String key, Scope scope)
+    {
+        return context.containsKey(key);
+    }
+
 }
 
 

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalWrapperContext.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalWrapperContext.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalWrapperContext.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/InternalWrapperContext.java Fri Feb  6 04:24:49 2009
@@ -1,5 +1,7 @@
 package org.apache.velocity.context;
 
+import org.apache.velocity.context.Context.Scope;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -27,6 +29,7 @@
  */
 public interface InternalWrapperContext
 {
+    
     /**
      * Returns the wrapped user context.
      * @return The wrapped user context.
@@ -41,13 +44,18 @@
     InternalContextAdapter getBaseContext();
 
     /**
-     * Allows callers to explicitly put objects in the local context.
-     * Objects added to the context through this method always end up
-     * in the top-level context of possible wrapped contexts.
-     *
-     *  @param key name of item to set.
-     *  @param value object to set to key.
-     *  @return old stored object
+     * Retrieve the specified key value pair from the given scope.
+     */
+    Object put(String key, Object value, Scope scope);
+    
+    /**
+     * Place key value pair into the context of the specified scope.
+     */
+    Object get(String key, Scope scope);
+    
+    /**
+     * Tests if the key exists in the specified scope
      */
-    Object localPut(final String key, final Object value);
+    boolean containsKey(String key, Scope scope);
+        
 }

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ProxyVMContext.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ProxyVMContext.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ProxyVMContext.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/context/ProxyVMContext.java Fri Feb  6 04:24:49 2009
@@ -23,41 +23,31 @@
 import java.util.Map;
 
 /**
- * Context for Velocity macro arguments.
- * 
- * This special context combines ideas of earlier VMContext and VMProxyArgs
- * by implementing routing functionality internally. This significantly
- * reduces memory allocation upon macro invocations.
- * Since the macro AST is now shared and RuntimeMacro directive is used,
- * the earlier implementation of precalculating VMProxyArgs would not work.
+ * ProxyVMContext provides a context for a macro call frame and basically manages both
+ * the local and global contexts. The local context is created for every call into a 
+ * macro and destroyed when the macro exits.  The global context consists of the original 
+ * users data and any variables defined in the global scope. The macro call
+ * does not afffect the global context lifecycle.
  */
 public class ProxyVMContext extends ChainedInternalContextAdapter
 {
     /** container for any local or constant macro arguments. Size must be power of 2. */
-    Map localcontext = new HashMap(8, 0.8f);
+    protected Map<String, Object> localcontext = new HashMap<String, Object>(8, 0.8f);
     
     /** If we are operating in global or localscope */
     boolean localscope = true;
     
     /**
-     * @param inner Velocity context for processing
-     * @param rsvc RuntimeServices provides logging reference
-     * @param localContextScope if true, all references are set to be local
+     * @param context the parent context
+     * @param localScopeContext if true, all references are set to be local
      */
-    public ProxyVMContext(InternalContextAdapter global, boolean localScopeContext)
+    public ProxyVMContext(InternalContextAdapter context, boolean localScopeContext)
     {
-        super(global instanceof ProxyVMContext ? ((ProxyVMContext)global).getGlobal() : global);        
+        // By always constructing with the base then calling super methods will always
+        // access the global context.
+        super(context.getBaseContext());        
         localscope = localScopeContext;
     }
-
-    /**
-     * Get the global context from this ProxyVMContext
-     * @return
-     */
-    private InternalContextAdapter getGlobal()
-    {
-      return innerContext;
-    }
     
     /**
      * Impl of the Context.put() method.
@@ -66,7 +56,7 @@
      * @param value object to set to key
      * @return old stored object
      */
-    public Object put(final String key, final Object value)
+    public Object put(String key, Object value)
     {
         if (localscope)    
           return localcontext.put(key, value);
@@ -75,22 +65,47 @@
     }
 
     /**
-     * Allows callers to explicitly put objects in the local context, no matter what the
-     * velocimacro.context.local setting says. Needed e.g. for loop variables in foreach.
-     * 
-     * @param key name of item to set.
-     * @param value object to set to key.
-     * @return old stored object
+     * Put a value into the appropriate context specified by 'scope'
      */
-    public Object localPut(final String key, final Object value)
+    public Object put(String key, Object value, Scope scope)
     {
-        return put(key, value);
+        switch (scope)
+        {
+            case GLOBAL: return super.put(key, value);
+            case LOCAL: return localcontext.put(key, value);
+            default: return put(key, value);  // DEFAULT scope
+        }
     }
 
     /**
+     * Returns a value associated with 'key' from the specified 'scope'
+     */
+    public Object get(String key, Scope scope)
+    {
+        switch (scope)
+        {
+            case GLOBAL: return super.get(key);
+            case LOCAL: return localcontext.get(key);
+            default: return get(key);  // DEFAULT scope
+        }      
+    }
+    
+    /**
+     * Returns true if the specified scope contains 'key'
+     */
+    public boolean containsKey(String key, Scope scope)
+    {
+        switch (scope)
+        {
+            case GLOBAL: return super.containsKey(key);
+            case LOCAL: return localcontext.containsKey(key);
+            default: return containsKey(key);  // DEFAULT scope
+        }            
+    }
+    
+    /**
      * Implementation of the Context.get() method.  First checks
      * localcontext, then global context.
-     * 
      * @param key name of item to get
      * @return stored object or null
      */

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Foreach.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Foreach.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Foreach.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Foreach.java Fri Feb  6 04:24:49 2009
@@ -341,8 +341,7 @@
 
         while (!maxNbrLoopsExceeded && i.hasNext())
         {
-            // TODO: JDK 1.5+ -> Integer.valueOf()
-            put(context, counterName , new Integer(counter));
+            put(context, counterName , Integer.valueOf(counter));
             Object value = i.next();
             put(context, hasNextName, Boolean.valueOf(i.hasNext()));
             put(context, elementKey, value);

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/Parser.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/Parser.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/Parser.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/Parser.java Fri Feb  6 04:24:49 2009
@@ -44,7 +44,7 @@
     public String currentTemplateName = "";
 
     /**
-     * Set to true if the property
+     * Set to true if the property 
      * RuntimeConstants.RUNTIME_REFERENCES_STRICT_ESCAPE is set to true
      */
     public boolean strictEscape = false;
@@ -305,6 +305,8 @@
         case RPAREN:
         case ESCAPE_DIRECTIVE:
         case SET_DIRECTIVE:
+        case LOCAL_DIRECTIVE:
+        case GLOBAL_DIRECTIVE:
         case SINGLE_LINE_COMMENT_START:
         case DOUBLE_ESCAPE:
         case ESCAPE:
@@ -387,6 +389,12 @@
         case SET_DIRECTIVE:
           SetDirective();
           break;
+        case LOCAL_DIRECTIVE:
+          LocalDirective();
+          break;
+        case GLOBAL_DIRECTIVE:
+          GlobalDirective();
+          break;
         case ESCAPE_DIRECTIVE:
           EscapedDirective();
           break;
@@ -911,6 +919,8 @@
           case RPAREN:
           case ESCAPE_DIRECTIVE:
           case SET_DIRECTIVE:
+          case LOCAL_DIRECTIVE:
+          case GLOBAL_DIRECTIVE:
           case SINGLE_LINE_COMMENT_START:
           case DOUBLE_ESCAPE:
           case ESCAPE:
@@ -1686,6 +1696,8 @@
           case RPAREN:
           case ESCAPE_DIRECTIVE:
           case SET_DIRECTIVE:
+          case LOCAL_DIRECTIVE:
+          case GLOBAL_DIRECTIVE:
           case SINGLE_LINE_COMMENT_START:
           case DOUBLE_ESCAPE:
           case ESCAPE:
@@ -1799,6 +1811,8 @@
           case RPAREN:
           case ESCAPE_DIRECTIVE:
           case SET_DIRECTIVE:
+          case LOCAL_DIRECTIVE:
+          case GLOBAL_DIRECTIVE:
           case SINGLE_LINE_COMMENT_START:
           case DOUBLE_ESCAPE:
           case ESCAPE:
@@ -1895,6 +1909,8 @@
           case RPAREN:
           case ESCAPE_DIRECTIVE:
           case SET_DIRECTIVE:
+          case LOCAL_DIRECTIVE:
+          case GLOBAL_DIRECTIVE:
           case SINGLE_LINE_COMMENT_START:
           case DOUBLE_ESCAPE:
           case ESCAPE:
@@ -2029,6 +2045,134 @@
   }
 
 /**
+ * Meant to shadow the behavior of Set but only affect local contexts
+ */
+  final public void LocalDirective() throws ParseException {
+                         /*@bgen(jjtree) LocalDirective */
+  ASTLocalDirective jjtn000 = new ASTLocalDirective(this, JJTLOCALDIRECTIVE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+    try {
+      jj_consume_token(LOCAL_DIRECTIVE);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHITESPACE:
+        jj_consume_token(WHITESPACE);
+        break;
+      default:
+        jj_la1[53] = jj_gen;
+        ;
+      }
+      Reference();
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHITESPACE:
+        jj_consume_token(WHITESPACE);
+        break;
+      default:
+        jj_la1[54] = jj_gen;
+        ;
+      }
+      jj_consume_token(EQUALS);
+      Expression();
+      jj_consume_token(RPAREN);
+        /*
+         * ensure that inSet is false.  Leads to some amusing bugs...
+         */
+
+        token_source.inSet = false;
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case NEWLINE:
+        jj_consume_token(NEWLINE);
+        break;
+      default:
+        jj_la1[55] = jj_gen;
+        ;
+      }
+    } catch (Throwable jjte000) {
+      if (jjtc000) {
+        jjtree.clearNodeScope(jjtn000);
+        jjtc000 = false;
+      } else {
+        jjtree.popNode();
+      }
+      if (jjte000 instanceof RuntimeException) {
+        {if (true) throw (RuntimeException)jjte000;}
+      }
+      if (jjte000 instanceof ParseException) {
+        {if (true) throw (ParseException)jjte000;}
+      }
+      {if (true) throw (Error)jjte000;}
+    } finally {
+      if (jjtc000) {
+        jjtree.closeNodeScope(jjtn000, true);
+      }
+    }
+  }
+
+/**
+ * Meant to shadow the behavior of Set but only affect the global context
+ */
+  final public void GlobalDirective() throws ParseException {
+                          /*@bgen(jjtree) GlobalDirective */
+  ASTGlobalDirective jjtn000 = new ASTGlobalDirective(this, JJTGLOBALDIRECTIVE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+    try {
+      jj_consume_token(GLOBAL_DIRECTIVE);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHITESPACE:
+        jj_consume_token(WHITESPACE);
+        break;
+      default:
+        jj_la1[56] = jj_gen;
+        ;
+      }
+      Reference();
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHITESPACE:
+        jj_consume_token(WHITESPACE);
+        break;
+      default:
+        jj_la1[57] = jj_gen;
+        ;
+      }
+      jj_consume_token(EQUALS);
+      Expression();
+      jj_consume_token(RPAREN);
+        /*
+         * ensure that inSet is false.  Leads to some amusing bugs...
+         */
+
+        token_source.inSet = false;
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case NEWLINE:
+        jj_consume_token(NEWLINE);
+        break;
+      default:
+        jj_la1[58] = jj_gen;
+        ;
+      }
+    } catch (Throwable jjte000) {
+      if (jjtc000) {
+        jjtree.clearNodeScope(jjtn000);
+        jjtc000 = false;
+      } else {
+        jjtree.popNode();
+      }
+      if (jjte000 instanceof RuntimeException) {
+        {if (true) throw (RuntimeException)jjte000;}
+      }
+      if (jjte000 instanceof ParseException) {
+        {if (true) throw (ParseException)jjte000;}
+      }
+      {if (true) throw (Error)jjte000;}
+    } finally {
+      if (jjtc000) {
+        jjtree.closeNodeScope(jjtn000, true);
+      }
+    }
+  }
+
+/**
  * This method corresponds to the #stop
  * directive which just simulates and EOF
  * so that parsing stops. The #stop directive
@@ -2121,7 +2265,7 @@
         ;
         break;
       default:
-        jj_la1[53] = jj_gen;
+        jj_la1[59] = jj_gen;
         break label_18;
       }
       jj_consume_token(LOGICAL_OR);
@@ -2161,7 +2305,7 @@
         ;
         break;
       default:
-        jj_la1[54] = jj_gen;
+        jj_la1[60] = jj_gen;
         break label_19;
       }
       jj_consume_token(LOGICAL_AND);
@@ -2202,7 +2346,7 @@
         ;
         break;
       default:
-        jj_la1[55] = jj_gen;
+        jj_la1[61] = jj_gen;
         break label_20;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2261,7 +2405,7 @@
         }
         break;
       default:
-        jj_la1[56] = jj_gen;
+        jj_la1[62] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2280,7 +2424,7 @@
         ;
         break;
       default:
-        jj_la1[57] = jj_gen;
+        jj_la1[63] = jj_gen;
         break label_21;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2393,7 +2537,7 @@
         }
         break;
       default:
-        jj_la1[58] = jj_gen;
+        jj_la1[64] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2410,7 +2554,7 @@
         ;
         break;
       default:
-        jj_la1[59] = jj_gen;
+        jj_la1[65] = jj_gen;
         break label_22;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2469,7 +2613,7 @@
         }
         break;
       default:
-        jj_la1[60] = jj_gen;
+        jj_la1[66] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2487,7 +2631,7 @@
         ;
         break;
       default:
-        jj_la1[61] = jj_gen;
+        jj_la1[67] = jj_gen;
         break label_23;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2573,7 +2717,7 @@
         }
         break;
       default:
-        jj_la1[62] = jj_gen;
+        jj_la1[68] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2587,7 +2731,7 @@
         jj_consume_token(WHITESPACE);
         break;
       default:
-        jj_la1[63] = jj_gen;
+        jj_la1[69] = jj_gen;
         ;
       }
       jj_consume_token(LOGICAL_NOT);
@@ -2631,7 +2775,7 @@
         PrimaryExpression();
         break;
       default:
-        jj_la1[64] = jj_gen;
+        jj_la1[70] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2644,7 +2788,7 @@
       jj_consume_token(WHITESPACE);
       break;
     default:
-      jj_la1[65] = jj_gen;
+      jj_la1[71] = jj_gen;
       ;
     }
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2659,7 +2803,7 @@
       IntegerLiteral();
       break;
     default:
-      jj_la1[66] = jj_gen;
+      jj_la1[72] = jj_gen;
       if (jj_2_12(2147483647)) {
         IntegerRange();
       } else {
@@ -2685,7 +2829,7 @@
           jj_consume_token(RPAREN);
           break;
         default:
-          jj_la1[67] = jj_gen;
+          jj_la1[73] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
@@ -2696,488 +2840,371 @@
       jj_consume_token(WHITESPACE);
       break;
     default:
-      jj_la1[68] = jj_gen;
+      jj_la1[74] = jj_gen;
       ;
     }
   }
 
-  private boolean jj_2_1(int xla) {
+  final private boolean jj_2_1(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_1(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(0, xla); }
   }
 
-  private boolean jj_2_2(int xla) {
+  final private boolean jj_2_2(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_2(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(1, xla); }
   }
 
-  private boolean jj_2_3(int xla) {
+  final private boolean jj_2_3(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_3(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(2, xla); }
   }
 
-  private boolean jj_2_4(int xla) {
+  final private boolean jj_2_4(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_4(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(3, xla); }
   }
 
-  private boolean jj_2_5(int xla) {
+  final private boolean jj_2_5(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_5(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(4, xla); }
   }
 
-  private boolean jj_2_6(int xla) {
+  final private boolean jj_2_6(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_6(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(5, xla); }
   }
 
-  private boolean jj_2_7(int xla) {
+  final private boolean jj_2_7(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_7(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(6, xla); }
   }
 
-  private boolean jj_2_8(int xla) {
+  final private boolean jj_2_8(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_8(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(7, xla); }
   }
 
-  private boolean jj_2_9(int xla) {
+  final private boolean jj_2_9(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_9(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(8, xla); }
   }
 
-  private boolean jj_2_10(int xla) {
+  final private boolean jj_2_10(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_10(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(9, xla); }
   }
 
-  private boolean jj_2_11(int xla) {
+  final private boolean jj_2_11(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_11(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(10, xla); }
   }
 
-  private boolean jj_2_12(int xla) {
+  final private boolean jj_2_12(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_12(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(11, xla); }
   }
 
-  private boolean jj_3_6() {
+  final private boolean jj_3R_98() {
+    if (jj_3R_24()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_75() {
+    if (jj_3R_24()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_78() {
+    if (jj_3R_29()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_101()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_66() {
     if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_30()) {
+    if (jj_3R_75()) {
     jj_scanpos = xsp;
-    if (jj_3R_31()) return true;
+    if (jj_3R_76()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     if (jj_scan_token(DOUBLEDOT)) return true;
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_98()) {
+    jj_scanpos = xsp;
+    if (jj_3R_99()) return true;
+    }
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    if (jj_scan_token(RBRACKET)) return true;
     return false;
   }
 
-  private boolean jj_3R_33() {
-    if (jj_3R_60()) return true;
-    if (jj_scan_token(LPAREN)) return true;
+  final private boolean jj_3R_26() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_69() {
+    if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_61()) jj_scanpos = xsp;
-    if (jj_scan_token(REFMOD2_RPAREN)) return true;
+    if (jj_3R_78()) jj_scanpos = xsp;
+    if (jj_scan_token(RBRACKET)) return true;
     return false;
   }
 
-  private boolean jj_3R_59() {
-    if (jj_3R_67()) return true;
+  final private boolean jj_3R_77() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     return false;
   }
 
-  private boolean jj_3R_58() {
-    if (jj_3R_24()) return true;
+  final private boolean jj_3_5() {
+    if (jj_3R_29()) return true;
+    if (jj_scan_token(COLON)) return true;
+    if (jj_3R_29()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_100()) { jj_scanpos = xsp; break; }
+    }
     return false;
   }
 
-  private boolean jj_3R_57() {
-    if (jj_3R_71()) return true;
+  final private boolean jj_3R_37() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_56() {
-    if (jj_3R_70()) return true;
+  final private boolean jj_3R_25() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_55() {
-    if (jj_3R_69()) return true;
+  final private boolean jj_3R_68() {
+    if (jj_scan_token(LEFT_CURLEY)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_5()) {
+    jj_scanpos = xsp;
+    if (jj_3R_77()) return true;
+    }
+    xsp = jj_scanpos;
+    if (jj_scan_token(9)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(72)) return true;
+    }
     return false;
   }
 
-  private boolean jj_3R_54() {
-    if (jj_3R_68()) return true;
+  final private boolean jj_3_1() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_53() {
-    if (jj_3R_66()) return true;
+  final private boolean jj_3R_36() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_52() {
-    if (jj_3R_40()) return true;
+  final private boolean jj_3R_50() {
+    if (jj_3R_71()) return true;
     return false;
   }
 
-  private boolean jj_3R_51() {
-    if (jj_3R_65()) return true;
+  final private boolean jj_3R_90() {
+    if (jj_3R_73()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_49() {
+    if (jj_3R_70()) return true;
     return false;
   }
 
-  private boolean jj_3R_29() {
+  final private boolean jj_3_3() {
+    if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_51()) {
-    jj_scanpos = xsp;
-    if (jj_3R_52()) {
-    jj_scanpos = xsp;
-    if (jj_3R_53()) {
-    jj_scanpos = xsp;
-    if (jj_3R_54()) {
-    jj_scanpos = xsp;
-    if (jj_3R_55()) {
-    jj_scanpos = xsp;
-    if (jj_3R_56()) {
-    jj_scanpos = xsp;
-    if (jj_3R_57()) {
-    jj_scanpos = xsp;
-    if (jj_3R_58()) {
+    if (jj_3R_25()) {
     jj_scanpos = xsp;
-    if (jj_3R_59()) return true;
-    }
-    }
-    }
-    }
-    }
-    }
-    }
+    if (jj_3R_26()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    if (jj_scan_token(DOUBLEDOT)) return true;
     return false;
   }
 
-  private boolean jj_3R_100() {
-    if (jj_scan_token(COMMA)) return true;
-    if (jj_3R_29()) return true;
-    if (jj_scan_token(COLON)) return true;
-    if (jj_3R_29()) return true;
+  final private boolean jj_3R_48() {
+    if (jj_3R_69()) return true;
     return false;
   }
 
-  private boolean jj_3R_96() {
-    if (jj_3R_24()) return true;
+  final private boolean jj_3R_89() {
+    if (jj_3R_73()) return true;
     return false;
   }
 
-  private boolean jj_3R_95() {
-    if (jj_3R_71()) return true;
+  final private boolean jj_3R_47() {
+    if (jj_3R_68()) return true;
     return false;
   }
 
-  private boolean jj_3R_94() {
-    if (jj_3R_70()) return true;
+  final private boolean jj_3R_46() {
+    if (jj_3R_67()) return true;
     return false;
   }
 
-  private boolean jj_3R_93() {
-    if (jj_3R_40()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_92() {
-    if (jj_3R_65()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_99() {
-    if (jj_3R_40()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_76() {
-    if (jj_3R_40()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_101() {
-    if (jj_scan_token(COMMA)) return true;
-    if (jj_3R_29()) return true;
-    return false;
-  }
-
-  private boolean jj_3_2() {
-    if (jj_scan_token(DOUBLE_ESCAPE)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_91() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_92()) {
-    jj_scanpos = xsp;
-    if (jj_3R_93()) {
-    jj_scanpos = xsp;
-    if (jj_3R_94()) {
-    jj_scanpos = xsp;
-    if (jj_3R_95()) {
-    jj_scanpos = xsp;
-    if (jj_3R_96()) return true;
-    }
-    }
-    }
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    return false;
-  }
-
-  private boolean jj_3R_98() {
-    if (jj_3R_24()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_75() {
-    if (jj_3R_24()) return true;
+  final private boolean jj_3R_45() {
+    if (jj_3R_66()) return true;
     return false;
   }
 
-  private boolean jj_3R_78() {
-    if (jj_3R_29()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_101()) { jj_scanpos = xsp; break; }
-    }
+  final private boolean jj_3R_34() {
+    if (jj_3R_60()) return true;
     return false;
   }
 
-  private boolean jj_3R_66() {
+  final private boolean jj_3_12() {
     if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_75()) {
+    if (jj_3R_36()) {
     jj_scanpos = xsp;
-    if (jj_3R_76()) return true;
+    if (jj_3R_37()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     if (jj_scan_token(DOUBLEDOT)) return true;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_98()) {
-    jj_scanpos = xsp;
-    if (jj_3R_99()) return true;
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    if (jj_scan_token(RBRACKET)) return true;
     return false;
   }
 
-  private boolean jj_3R_26() {
-    if (jj_3R_40()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_69() {
-    if (jj_scan_token(LBRACKET)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_78()) jj_scanpos = xsp;
-    if (jj_scan_token(RBRACKET)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_77() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    return false;
-  }
-
-  private boolean jj_3_5() {
-    if (jj_3R_29()) return true;
-    if (jj_scan_token(COLON)) return true;
-    if (jj_3R_29()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_100()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private boolean jj_3R_25() {
-    if (jj_3R_24()) return true;
+  final private boolean jj_3R_32() {
+    if (jj_3R_60()) return true;
     return false;
   }
 
-  private boolean jj_3R_68() {
-    if (jj_scan_token(LEFT_CURLEY)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3_5()) {
-    jj_scanpos = xsp;
-    if (jj_3R_77()) return true;
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(9)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(70)) return true;
-    }
+  final private boolean jj_3R_44() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3_1() {
-    if (jj_3R_24()) return true;
+  final private boolean jj_3R_88() {
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_50() {
+  final private boolean jj_3R_87() {
     if (jj_3R_71()) return true;
     return false;
   }
 
-  private boolean jj_3R_90() {
-    if (jj_3R_73()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_49() {
+  final private boolean jj_3R_86() {
     if (jj_3R_70()) return true;
     return false;
   }
 
-  private boolean jj_3_3() {
-    if (jj_scan_token(LBRACKET)) return true;
+  final private boolean jj_3R_27() {
+    if (jj_scan_token(COMMA)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_25()) {
-    jj_scanpos = xsp;
-    if (jj_3R_26()) return true;
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    if (jj_scan_token(DOUBLEDOT)) return true;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     return false;
   }
 
-  private boolean jj_3R_48() {
+  final private boolean jj_3R_85() {
     if (jj_3R_69()) return true;
     return false;
   }
 
-  private boolean jj_3R_89() {
-    if (jj_3R_73()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_37() {
-    if (jj_3R_40()) return true;
+  final private boolean jj_3R_43() {
+    if (jj_3R_65()) return true;
     return false;
   }
 
-  private boolean jj_3R_47() {
+  final private boolean jj_3R_84() {
     if (jj_3R_68()) return true;
     return false;
   }
 
-  private boolean jj_3R_46() {
+  final private boolean jj_3R_83() {
     if (jj_3R_67()) return true;
     return false;
   }
 
-  private boolean jj_3R_45() {
+  final private boolean jj_3R_82() {
     if (jj_3R_66()) return true;
     return false;
   }
 
-  private boolean jj_3R_34() {
-    if (jj_3R_60()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_36() {
-    if (jj_3R_24()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_32() {
-    if (jj_3R_60()) return true;
+  final private boolean jj_3R_42() {
+    if (jj_3R_64()) return true;
     return false;
   }
 
-  private boolean jj_3R_44() {
+  final private boolean jj_3R_81() {
     if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_27() {
-    if (jj_scan_token(COMMA)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+  final private boolean jj_3R_80() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_43() {
+  final private boolean jj_3R_79() {
     if (jj_3R_65()) return true;
     return false;
   }
 
-  private boolean jj_3R_42() {
-    if (jj_3R_64()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_41() {
+  final private boolean jj_3R_41() {
     if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_28() {
+  final private boolean jj_3R_28() {
     Token xsp;
     xsp = jj_scanpos;
     if (jj_3R_41()) {
@@ -3211,104 +3238,133 @@
     return false;
   }
 
-  private boolean jj_3_10() {
+  final private boolean jj_3R_72() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_79()) {
+    jj_scanpos = xsp;
+    if (jj_3R_80()) {
+    jj_scanpos = xsp;
+    if (jj_3R_81()) {
+    jj_scanpos = xsp;
+    if (jj_3R_82()) {
+    jj_scanpos = xsp;
+    if (jj_3R_83()) {
+    jj_scanpos = xsp;
+    if (jj_3R_84()) {
+    jj_scanpos = xsp;
+    if (jj_3R_85()) {
+    jj_scanpos = xsp;
+    if (jj_3R_86()) {
+    jj_scanpos = xsp;
+    if (jj_3R_87()) {
+    jj_scanpos = xsp;
+    if (jj_3R_88()) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_10() {
     if (jj_3R_33()) return true;
     return false;
   }
 
-  private boolean jj_3R_64() {
+  final private boolean jj_3R_35() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_11()) {
+    jj_scanpos = xsp;
+    if (jj_3R_62()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_11() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    if (jj_scan_token(LOGICAL_NOT)) return true;
+    if (jj_3R_35()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_62() {
+    if (jj_3R_72()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_64() {
     if (jj_scan_token(WORD)) return true;
     return false;
   }
 
-  private boolean jj_3R_31() {
+  final private boolean jj_3R_31() {
     if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3_8() {
+  final private boolean jj_3_8() {
     if (jj_3R_33()) return true;
     return false;
   }
 
-  private boolean jj_3R_74() {
+  final private boolean jj_3R_74() {
     if (jj_3R_73()) return true;
     return false;
   }
 
-  private boolean jj_3R_60() {
+  final private boolean jj_3R_60() {
     if (jj_scan_token(IDENTIFIER)) return true;
     return false;
   }
 
-  private boolean jj_3R_97() {
+  final private boolean jj_3R_97() {
     if (jj_scan_token(COMMA)) return true;
     if (jj_3R_29()) return true;
     return false;
   }
 
-  private boolean jj_3_12() {
-    if (jj_scan_token(LBRACKET)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_36()) {
-    jj_scanpos = xsp;
-    if (jj_3R_37()) return true;
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    if (jj_scan_token(DOUBLEDOT)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_71() {
+  final private boolean jj_3R_71() {
     if (jj_scan_token(FALSE)) return true;
     return false;
   }
 
-  private boolean jj_3_4() {
+  final private boolean jj_3_4() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     xsp = jj_scanpos;
     if (jj_3R_27()) jj_scanpos = xsp;
     if (jj_3R_28()) return true;
     return false;
   }
 
-  private boolean jj_3R_63() {
+  final private boolean jj_3R_63() {
     if (jj_3R_73()) return true;
     return false;
   }
 
-  private boolean jj_3R_88() {
-    if (jj_scan_token(LPAREN)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_30() {
+  final private boolean jj_3R_30() {
     if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_87() {
-    if (jj_3R_71()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_70() {
+  final private boolean jj_3R_70() {
     if (jj_scan_token(TRUE)) return true;
     return false;
   }
 
-  private boolean jj_3R_86() {
-    if (jj_3R_70()) return true;
-    return false;
-  }
-
-  private boolean jj_3_9() {
+  final private boolean jj_3_9() {
     if (jj_scan_token(DOT)) return true;
     Token xsp;
     xsp = jj_scanpos;
@@ -3323,37 +3379,12 @@
     return false;
   }
 
-  private boolean jj_3R_85() {
-    if (jj_3R_69()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_84() {
-    if (jj_3R_68()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_83() {
-    if (jj_3R_67()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_82() {
-    if (jj_3R_66()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_65() {
+  final private boolean jj_3R_65() {
     if (jj_scan_token(STRING_LITERAL)) return true;
     return false;
   }
 
-  private boolean jj_3R_81() {
-    if (jj_3R_40()) return true;
-    return false;
-  }
-
-  private boolean jj_3_7() {
+  final private boolean jj_3_7() {
     if (jj_scan_token(DOT)) return true;
     Token xsp;
     xsp = jj_scanpos;
@@ -3368,7 +3399,7 @@
     return false;
   }
 
-  private boolean jj_3R_61() {
+  final private boolean jj_3R_61() {
     if (jj_3R_29()) return true;
     Token xsp;
     while (true) {
@@ -3378,12 +3409,7 @@
     return false;
   }
 
-  private boolean jj_3R_80() {
-    if (jj_3R_24()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_39() {
+  final private boolean jj_3R_39() {
     if (jj_scan_token(LCURLY)) return true;
     if (jj_scan_token(IDENTIFIER)) return true;
     Token xsp;
@@ -3399,41 +3425,140 @@
     return false;
   }
 
-  private boolean jj_3R_79() {
-    if (jj_3R_65()) return true;
+  final private boolean jj_3R_40() {
+    if (jj_scan_token(INTEGER_LITERAL)) return true;
     return false;
   }
 
-  private boolean jj_3R_40() {
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
+  final private boolean jj_3R_38() {
+    if (jj_scan_token(IDENTIFIER)) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_63()) { jj_scanpos = xsp; break; }
+    }
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_7()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_67() {
+    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
     return false;
   }
 
-  private boolean jj_3R_72() {
+  final private boolean jj_3R_24() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
+    if (jj_3R_38()) {
+    jj_scanpos = xsp;
+    if (jj_3R_39()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_73() {
+    if (jj_scan_token(INDEX_LBRACKET)) return true;
+    if (jj_3R_91()) return true;
+    if (jj_scan_token(INDEX_RBRACKET)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_6() {
+    if (jj_scan_token(LBRACKET)) return true;
+    Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_79()) {
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_30()) {
     jj_scanpos = xsp;
-    if (jj_3R_80()) {
+    if (jj_3R_31()) return true;
+    }
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    if (jj_scan_token(DOUBLEDOT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_33() {
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(LPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_61()) jj_scanpos = xsp;
+    if (jj_scan_token(REFMOD2_RPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_59() {
+    if (jj_3R_67()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_58() {
+    if (jj_3R_24()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_57() {
+    if (jj_3R_71()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_56() {
+    if (jj_3R_70()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_55() {
+    if (jj_3R_69()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_54() {
+    if (jj_3R_68()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_53() {
+    if (jj_3R_66()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_52() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_51() {
+    if (jj_3R_65()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_29() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_51()) {
     jj_scanpos = xsp;
-    if (jj_3R_81()) {
+    if (jj_3R_52()) {
     jj_scanpos = xsp;
-    if (jj_3R_82()) {
+    if (jj_3R_53()) {
     jj_scanpos = xsp;
-    if (jj_3R_83()) {
+    if (jj_3R_54()) {
     jj_scanpos = xsp;
-    if (jj_3R_84()) {
+    if (jj_3R_55()) {
     jj_scanpos = xsp;
-    if (jj_3R_85()) {
+    if (jj_3R_56()) {
     jj_scanpos = xsp;
-    if (jj_3R_86()) {
+    if (jj_3R_57()) {
     jj_scanpos = xsp;
-    if (jj_3R_87()) {
+    if (jj_3R_58()) {
     jj_scanpos = xsp;
-    if (jj_3R_88()) return true;
-    }
+    if (jj_3R_59()) return true;
     }
     }
     }
@@ -3442,144 +3567,157 @@
     }
     }
     }
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     return false;
   }
 
-  private boolean jj_3R_38() {
-    if (jj_scan_token(IDENTIFIER)) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_63()) { jj_scanpos = xsp; break; }
-    }
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3_7()) { jj_scanpos = xsp; break; }
-    }
+  final private boolean jj_3R_100() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_29()) return true;
+    if (jj_scan_token(COLON)) return true;
+    if (jj_3R_29()) return true;
     return false;
   }
 
-  private boolean jj_3R_67() {
-    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
+  final private boolean jj_3R_96() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_24() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_38()) {
-    jj_scanpos = xsp;
-    if (jj_3R_39()) return true;
-    }
+  final private boolean jj_3R_95() {
+    if (jj_3R_71()) return true;
     return false;
   }
 
-  private boolean jj_3R_35() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3_11()) {
-    jj_scanpos = xsp;
-    if (jj_3R_62()) return true;
-    }
+  final private boolean jj_3R_94() {
+    if (jj_3R_70()) return true;
     return false;
   }
 
-  private boolean jj_3_11() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) jj_scanpos = xsp;
-    if (jj_scan_token(LOGICAL_NOT)) return true;
-    if (jj_3R_35()) return true;
+  final private boolean jj_3R_93() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_62() {
-    if (jj_3R_72()) return true;
+  final private boolean jj_3R_92() {
+    if (jj_3R_65()) return true;
     return false;
   }
 
-  private boolean jj_3R_73() {
-    if (jj_scan_token(INDEX_LBRACKET)) return true;
-    if (jj_3R_91()) return true;
-    if (jj_scan_token(INDEX_RBRACKET)) return true;
+  final private boolean jj_3R_99() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_76() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_101() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_29()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_2() {
+    if (jj_scan_token(DOUBLE_ESCAPE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_91() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_92()) {
+    jj_scanpos = xsp;
+    if (jj_3R_93()) {
+    jj_scanpos = xsp;
+    if (jj_3R_94()) {
+    jj_scanpos = xsp;
+    if (jj_3R_95()) {
+    jj_scanpos = xsp;
+    if (jj_3R_96()) return true;
+    }
+    }
+    }
+    }
+    xsp = jj_scanpos;
+    if (jj_scan_token(33)) jj_scanpos = xsp;
     return false;
   }
 
-  /** Generated Token Manager. */
   public ParserTokenManager token_source;
-  /** Current token. */
-  public Token token;
-  /** Next token. */
-  public Token jj_nt;
+  public Token token, jj_nt;
   private int jj_ntk;
   private Token jj_scanpos, jj_lastpos;
   private int jj_la;
+  public boolean lookingAhead = false;
+  private boolean jj_semLA;
   private int jj_gen;
-  final private int[] jj_la1 = new int[69];
+  final private int[] jj_la1 = new int[75];
   static private int[] jj_la1_0;
   static private int[] jj_la1_1;
   static private int[] jj_la1_2;
   static {
-      jj_la1_init_0();
-      jj_la1_init_1();
-      jj_la1_init_2();
+      jj_la1_0();
+      jj_la1_1();
+      jj_la1_2();
    }
-   private static void jj_la1_init_0() {
-      jj_la1_0 = new int[] {0x1de06c00,0x0,0x1de06c00,0x2000000,0xc200000,0x0,0x108,0x0,0x80000000,0x80000000,0x80000000,0x20,0x80000000,0x1de06c00,0x20,0x80000000,0x200,0x20,0x80000108,0x80000000,0x0,0x80000000,0x80000000,0x0,0x80000000,0x80000000,0x0,0x80000000,0x80000000,0x0,0x108,0x80000000,0x20,0x80000108,0x2,0x0,0x2,0x2,0x0,0x2,0x0,0x1800c00,0x80000000,0x1de06c00,0x0,0x0,0x0,0x1de06c00,0x80000000,0x1de06c00,0x80000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x80000508,0x80000000,0x0,0x508,0x80000000,};
+   private static void jj_la1_0() {
+      jj_la1_0 = new int[] {0x7781ec00,0x0,0x7781ec00,0x8000000,0x30800000,0x0,0x108,0x0,0x0,0x0,0x0,0x20,0x0,0x7781ec00,0x20,0x0,0x200,0x20,0x108,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x108,0x0,0x20,0x108,0x2,0x0,0x2,0x2,0x0,0x2,0x0,0x6000c00,0x0,0x7781ec00,0x0,0x0,0x0,0x7781ec00,0x0,0x7781ec00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x508,0x0,0x0,0x508,0x0,};
    }
-   private static void jj_la1_init_1() {
-      jj_la1_1 = new int[] {0xc6900001,0x900000,0xc6000001,0x0,0x0,0x42000001,0x4000006,0xc0000000,0x0,0x0,0x0,0x0,0x0,0xc6900001,0x0,0x0,0x0,0x0,0x6000007,0x0,0x2000000,0x0,0x0,0x2000000,0x0,0x0,0x2000007,0x0,0x0,0x2000001,0x4000006,0x0,0x0,0x6000007,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000001,0x0,0xc6900001,0x200000,0x200000,0x400000,0xc6900001,0x0,0xc6900001,0x0,0x0,0x8,0x400,0x200,0x18000,0x18000,0x7800,0x7800,0x30,0x30,0x1c0,0x1c0,0x0,0x6000007,0x0,0x2000001,0x4000006,0x0,};
+   private static void jj_la1_1() {
+      jj_la1_1 = new int[] {0x1a400004,0x2400000,0x18000004,0x0,0x0,0x8000004,0x10000018,0x0,0x2,0x2,0x2,0x0,0x2,0x1a400004,0x0,0x2,0x0,0x0,0x1800001e,0x2,0x8000000,0x2,0x2,0x8000000,0x2,0x2,0x800001c,0x2,0x2,0x8000004,0x10000018,0x2,0x0,0x1800001e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000004,0x2,0x1a400004,0x800000,0x800000,0x1000000,0x1a400004,0x2,0x1a400004,0x2,0x2,0x20,0x2,0x2,0x20,0x2,0x2,0x20,0x1000,0x800,0x60000,0x60000,0x1e000,0x1e000,0xc0,0xc0,0x700,0x700,0x2,0x1800001e,0x2,0x8000004,0x10000018,0x2,};
    }
-   private static void jj_la1_init_2() {
-      jj_la1_2 = new int[] {0x278,0x0,0x270,0x0,0x0,0x28,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x278,0x0,0x0,0x40,0x0,0x28,0x0,0x28,0x0,0x0,0x28,0x0,0x0,0x28,0x0,0x0,0x0,0x28,0x0,0x0,0x28,0x0,0x8,0x0,0x0,0x8,0x0,0x28,0x270,0x0,0x278,0x0,0x0,0x0,0x278,0x0,0x278,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x28,0x0,0x28,0x0,0x0,};
+   private static void jj_la1_2() {
+      jj_la1_2 = new int[] {0x9e3,0x0,0x9c3,0x0,0x0,0xa1,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x9e3,0x0,0x0,0x100,0x0,0xa0,0x0,0xa0,0x0,0x0,0xa0,0x0,0x0,0xa0,0x0,0x0,0x0,0xa0,0x0,0x0,0xa0,0x0,0x20,0x0,0x0,0x20,0x0,0xa0,0x9c0,0x0,0x9e3,0x0,0x0,0x0,0x9e3,0x0,0x9e3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa0,0x0,0xa0,0x0,0x0,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[12];
   private boolean jj_rescan = false;
   private int jj_gc = 0;
 
-  /** Constructor with user supplied CharStream. */
   public Parser(CharStream stream) {
     token_source = new ParserTokenManager(stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 69; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 75; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
-  /** Reinitialise. */
   public void ReInit(CharStream stream) {
     token_source.ReInit(stream);
     token = new Token();
     jj_ntk = -1;
     jjtree.reset();
     jj_gen = 0;
-    for (int i = 0; i < 69; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 75; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
-  /** Constructor with generated Token Manager. */
   public Parser(ParserTokenManager tm) {
     token_source = tm;
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 69; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 75; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
-  /** Reinitialise. */
   public void ReInit(ParserTokenManager tm) {
     token_source = tm;
     token = new Token();
     jj_ntk = -1;
     jjtree.reset();
     jj_gen = 0;
-    for (int i = 0; i < 69; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 75; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
-  private Token jj_consume_token(int kind) throws ParseException {
+  final private Token jj_consume_token(int kind) throws ParseException {
     Token oldToken;
     if ((oldToken = token).next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -3605,7 +3743,7 @@
 
   static private final class LookaheadSuccess extends java.lang.Error { }
   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
-  private boolean jj_scan_token(int kind) {
+  final private boolean jj_scan_token(int kind) {
     if (jj_scanpos == jj_lastpos) {
       jj_la--;
       if (jj_scanpos.next == null) {
@@ -3626,8 +3764,6 @@
     return false;
   }
 
-
-/** Get the next Token. */
   final public Token getNextToken() {
     if (token.next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -3636,9 +3772,8 @@
     return token;
   }
 
-/** Get the specific Token. */
   final public Token getToken(int index) {
-    Token t = token;
+    Token t = lookingAhead ? jj_scanpos : token;
     for (int i = 0; i < index; i++) {
       if (t.next != null) t = t.next;
       else t = t.next = token_source.getNextToken();
@@ -3646,14 +3781,14 @@
     return t;
   }
 
-  private int jj_ntk() {
+  final private int jj_ntk() {
     if ((jj_nt=token.next) == null)
       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
     else
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.List jj_expentries = new java.util.ArrayList();
+  private java.util.Vector jj_expentries = new java.util.Vector();
   private int[] jj_expentry;
   private int jj_kind = -1;
   private int[] jj_lasttokens = new int[100];
@@ -3668,31 +3803,36 @@
       for (int i = 0; i < jj_endpos; i++) {
         jj_expentry[i] = jj_lasttokens[i];
       }
-      jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
-        int[] oldentry = (int[])(it.next());
+      boolean exists = false;
+      for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
+        int[] oldentry = (int[])(e.nextElement());
         if (oldentry.length == jj_expentry.length) {
+          exists = true;
           for (int i = 0; i < jj_expentry.length; i++) {
             if (oldentry[i] != jj_expentry[i]) {
-              continue jj_entries_loop;
+              exists = false;
+              break;
             }
           }
-          jj_expentries.add(jj_expentry);
-          break jj_entries_loop;
+          if (exists) break;
         }
       }
+      if (!exists) jj_expentries.addElement(jj_expentry);
       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
     }
   }
 
-  /** Generate ParseException. */
   public ParseException generateParseException() {
-    jj_expentries.clear();
-    boolean[] la1tokens = new boolean[74];
+    jj_expentries.removeAllElements();
+    boolean[] la1tokens = new boolean[76];
+    for (int i = 0; i < 76; i++) {
+      la1tokens[i] = false;
+    }
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
     }
-    for (int i = 0; i < 69; i++) {
+    for (int i = 0; i < 75; i++) {
       if (jj_la1[i] == jj_gen) {
         for (int j = 0; j < 32; j++) {
           if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -3707,11 +3847,11 @@
         }
       }
     }
-    for (int i = 0; i < 74; i++) {
+    for (int i = 0; i < 76; i++) {
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;
-        jj_expentries.add(jj_expentry);
+        jj_expentries.addElement(jj_expentry);
       }
     }
     jj_endpos = 0;
@@ -3719,23 +3859,20 @@
     jj_add_error_token(0, 0);
     int[][] exptokseq = new int[jj_expentries.size()][];
     for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = (int[])jj_expentries.get(i);
+      exptokseq[i] = (int[])jj_expentries.elementAt(i);
     }
     return new ParseException(token, exptokseq, tokenImage);
   }
 
-  /** Enable tracing. */
   final public void enable_tracing() {
   }
 
-  /** Disable tracing. */
   final public void disable_tracing() {
   }
 
-  private void jj_rescan_token() {
+  final private void jj_rescan_token() {
     jj_rescan = true;
     for (int i = 0; i < 12; i++) {
-    try {
       JJCalls p = jj_2_rtns[i];
       do {
         if (p.gen > jj_gen) {
@@ -3757,12 +3894,11 @@
         }
         p = p.next;
       } while (p != null);
-      } catch(LookaheadSuccess ls) { }
     }
     jj_rescan = false;
   }
 
-  private void jj_save(int index, int xla) {
+  final private void jj_save(int index, int xla) {
     JJCalls p = jj_2_rtns[index];
     while (p.gen > jj_gen) {
       if (p.next == null) { p = p.next = new JJCalls(); break; }

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserConstants.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserConstants.java?rev=741397&r1=741396&r2=741397&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserConstants.java (original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserConstants.java Fri Feb  6 04:24:49 2009
@@ -1,178 +1,93 @@
 /* Generated By:JJTree&JavaCC: Do not edit this line. ParserConstants.java */
 package org.apache.velocity.runtime.parser;
 
-
-/**
- * Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGen#start()
- */
 public interface ParserConstants {
 
-  /** End of File. */
   int EOF = 0;
-  /** RegularExpression Id. */
   int INDEX_LBRACKET = 1;
-  /** RegularExpression Id. */
   int INDEX_RBRACKET = 2;
-  /** RegularExpression Id. */
   int LBRACKET = 3;
-  /** RegularExpression Id. */
   int RBRACKET = 4;
-  /** RegularExpression Id. */
   int COMMA = 5;
-  /** RegularExpression Id. */
   int DOUBLEDOT = 6;
-  /** RegularExpression Id. */
   int COLON = 7;
-  /** RegularExpression Id. */
   int LEFT_CURLEY = 8;
-  /** RegularExpression Id. */
   int RIGHT_CURLEY = 9;
-  /** RegularExpression Id. */
   int LPAREN = 10;
-  /** RegularExpression Id. */
   int RPAREN = 11;
-  /** RegularExpression Id. */
   int REFMOD2_RPAREN = 12;
-  /** RegularExpression Id. */
   int ESCAPE_DIRECTIVE = 13;
-  /** RegularExpression Id. */
   int SET_DIRECTIVE = 14;
-  /** RegularExpression Id. */
-  int DOLLAR = 15;
-  /** RegularExpression Id. */
-  int DOLLARBANG = 16;
-  /** RegularExpression Id. */
-  int HASH = 20;
-  /** RegularExpression Id. */
-  int SINGLE_LINE_COMMENT_START = 21;
-  /** RegularExpression Id. */
-  int DOUBLE_ESCAPE = 22;
-  /** RegularExpression Id. */
-  int ESCAPE = 23;
-  /** RegularExpression Id. */
-  int TEXT = 24;
-  /** RegularExpression Id. */
-  int SINGLE_LINE_COMMENT = 25;
-  /** RegularExpression Id. */
-  int FORMAL_COMMENT = 26;
-  /** RegularExpression Id. */
-  int MULTI_LINE_COMMENT = 27;
-  /** RegularExpression Id. */
-  int TEXTBLOCK = 28;
-  /** RegularExpression Id. */
-  int WHITESPACE = 31;
-  /** RegularExpression Id. */
-  int STRING_LITERAL = 32;
-  /** RegularExpression Id. */
-  int TRUE = 33;
-  /** RegularExpression Id. */
-  int FALSE = 34;
-  /** RegularExpression Id. */
-  int NEWLINE = 35;
-  /** RegularExpression Id. */
-  int MINUS = 36;
-  /** RegularExpression Id. */
-  int PLUS = 37;
-  /** RegularExpression Id. */
-  int MULTIPLY = 38;
-  /** RegularExpression Id. */
-  int DIVIDE = 39;
-  /** RegularExpression Id. */
-  int MODULUS = 40;
-  /** RegularExpression Id. */
-  int LOGICAL_AND = 41;
-  /** RegularExpression Id. */
-  int LOGICAL_OR = 42;
-  /** RegularExpression Id. */
-  int LOGICAL_LT = 43;
-  /** RegularExpression Id. */
-  int LOGICAL_LE = 44;
-  /** RegularExpression Id. */
-  int LOGICAL_GT = 45;
-  /** RegularExpression Id. */
-  int LOGICAL_GE = 46;
-  /** RegularExpression Id. */
-  int LOGICAL_EQUALS = 47;
-  /** RegularExpression Id. */
-  int LOGICAL_NOT_EQUALS = 48;
-  /** RegularExpression Id. */
-  int LOGICAL_NOT = 49;
-  /** RegularExpression Id. */
-  int EQUALS = 50;
-  /** RegularExpression Id. */
-  int END = 51;
-  /** RegularExpression Id. */
-  int IF_DIRECTIVE = 52;
-  /** RegularExpression Id. */
-  int ELSEIF_DIRECTIVE = 53;
-  /** RegularExpression Id. */
-  int ELSE_DIRECTIVE = 54;
-  /** RegularExpression Id. */
-  int STOP_DIRECTIVE = 55;
-  /** RegularExpression Id. */
-  int DIGIT = 56;
-  /** RegularExpression Id. */
-  int INTEGER_LITERAL = 57;
-  /** RegularExpression Id. */
-  int FLOATING_POINT_LITERAL = 58;
-  /** RegularExpression Id. */
-  int EXPONENT = 59;
-  /** RegularExpression Id. */
-  int LETTER = 60;
-  /** RegularExpression Id. */
-  int DIRECTIVE_CHAR = 61;
-  /** RegularExpression Id. */
-  int WORD = 62;
-  /** RegularExpression Id. */
-  int BRACKETED_WORD = 63;
-  /** RegularExpression Id. */
-  int ALPHA_CHAR = 64;
-  /** RegularExpression Id. */
-  int ALPHANUM_CHAR = 65;
-  /** RegularExpression Id. */
-  int IDENTIFIER_CHAR = 66;
-  /** RegularExpression Id. */
-  int IDENTIFIER = 67;
-  /** RegularExpression Id. */
-  int DOT = 68;
-  /** RegularExpression Id. */
-  int LCURLY = 69;
-  /** RegularExpression Id. */
-  int RCURLY = 70;
-  /** RegularExpression Id. */
-  int REFERENCE_TERMINATOR = 71;
-  /** RegularExpression Id. */
-  int DIRECTIVE_TERMINATOR = 72;
-  /** RegularExpression Id. */
-  int EMPTY_INDEX = 73;
+  int LOCAL_DIRECTIVE = 15;
+  int GLOBAL_DIRECTIVE = 16;
+  int DOLLAR = 17;
+  int DOLLARBANG = 18;
+  int HASH = 22;
+  int SINGLE_LINE_COMMENT_START = 23;
+  int DOUBLE_ESCAPE = 24;
+  int ESCAPE = 25;
+  int TEXT = 26;
+  int SINGLE_LINE_COMMENT = 27;
+  int FORMAL_COMMENT = 28;
+  int MULTI_LINE_COMMENT = 29;
+  int TEXTBLOCK = 30;
+  int WHITESPACE = 33;
+  int STRING_LITERAL = 34;
+  int TRUE = 35;
+  int FALSE = 36;
+  int NEWLINE = 37;
+  int MINUS = 38;
+  int PLUS = 39;
+  int MULTIPLY = 40;
+  int DIVIDE = 41;
+  int MODULUS = 42;
+  int LOGICAL_AND = 43;
+  int LOGICAL_OR = 44;
+  int LOGICAL_LT = 45;
+  int LOGICAL_LE = 46;
+  int LOGICAL_GT = 47;
+  int LOGICAL_GE = 48;
+  int LOGICAL_EQUALS = 49;
+  int LOGICAL_NOT_EQUALS = 50;
+  int LOGICAL_NOT = 51;
+  int EQUALS = 52;
+  int END = 53;
+  int IF_DIRECTIVE = 54;
+  int ELSEIF_DIRECTIVE = 55;
+  int ELSE_DIRECTIVE = 56;
+  int STOP_DIRECTIVE = 57;
+  int DIGIT = 58;
+  int INTEGER_LITERAL = 59;
+  int FLOATING_POINT_LITERAL = 60;
+  int EXPONENT = 61;
+  int LETTER = 62;
+  int DIRECTIVE_CHAR = 63;
+  int WORD = 64;
+  int BRACKETED_WORD = 65;
+  int ALPHA_CHAR = 66;
+  int ALPHANUM_CHAR = 67;
+  int IDENTIFIER_CHAR = 68;
+  int IDENTIFIER = 69;
+  int DOT = 70;
+  int LCURLY = 71;
+  int RCURLY = 72;
+  int REFERENCE_TERMINATOR = 73;
+  int DIRECTIVE_TERMINATOR = 74;
+  int EMPTY_INDEX = 75;
 
-  /** Lexical state. */
   int REFERENCE = 0;
-  /** Lexical state. */
   int REFMODIFIER = 1;
-  /** Lexical state. */
   int REFINDEX = 2;
-  /** Lexical state. */
   int DIRECTIVE = 3;
-  /** Lexical state. */
   int REFMOD2 = 4;
-  /** Lexical state. */
   int DEFAULT = 5;
-  /** Lexical state. */
   int REFMOD = 6;
-  /** Lexical state. */
   int IN_TEXTBLOCK = 7;
-  /** Lexical state. */
   int IN_MULTI_LINE_COMMENT = 8;
-  /** Lexical state. */
   int IN_FORMAL_COMMENT = 9;
-  /** Lexical state. */
   int IN_SINGLE_LINE_COMMENT = 10;
-  /** Lexical state. */
   int PRE_DIRECTIVE = 11;
 
-  /** Literal token values. */
   String[] tokenImage = {
     "<EOF>",
     "\"[\"",
@@ -189,10 +104,12 @@
     "\")\"",
     "<ESCAPE_DIRECTIVE>",
     "<SET_DIRECTIVE>",
+    "<LOCAL_DIRECTIVE>",
+    "<GLOBAL_DIRECTIVE>",
     "<DOLLAR>",
     "<DOLLARBANG>",
     "\"#[[\"",
-    "<token of kind 18>",
+    "<token of kind 20>",
     "\"#*\"",
     "\"#\"",
     "\"##\"",
@@ -203,8 +120,8 @@
     "\"*#\"",
     "\"*#\"",
     "\"]]#\"",
-    "<token of kind 29>",
-    "<token of kind 30>",
+    "<token of kind 31>",
+    "<token of kind 32>",
     "<WHITESPACE>",
     "<STRING_LITERAL>",
     "\"true\"",



Mime
View raw message