velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From by...@apache.org
Subject svn commit: r730566 [1/3] - in /velocity/engine/trunk: src/java/org/apache/velocity/runtime/parser/ src/java/org/apache/velocity/runtime/parser/node/ src/java/org/apache/velocity/util/ src/parser/ src/test/org/apache/velocity/test/ xdocs/docs/
Date Thu, 01 Jan 2009 16:43:23 GMT
Author: byron
Date: Thu Jan  1 08:43:22 2009
New Revision: 730566

URL: http://svn.apache.org/viewvc?rev=730566&view=rev
Log:
VELOCITY-406 Added bracketed syntax e.g., 

Added:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTIndex.java
    velocity/engine/trunk/src/test/org/apache/velocity/test/IndexTestCase.java
Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserConstants.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
    velocity/engine/trunk/src/java/org/apache/velocity/util/ClassUtils.java
    velocity/engine/trunk/src/parser/Parser.jjt
    velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
    velocity/engine/trunk/src/test/org/apache/velocity/test/StrictCompareTestCase.java
    velocity/engine/trunk/xdocs/docs/user-guide.xml

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java?rev=730566&r1=730565&r2=730566&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java Thu Jan  1 08:43:22 2009
@@ -1168,6 +1168,50 @@
   }
 
 /**
+ * A Simplified parameter more suitable for an index position: $foo[$index]
+ */
+  final public void IndexParameter() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case WHITESPACE:
+      jj_consume_token(WHITESPACE);
+      break;
+    default:
+      jj_la1[25] = jj_gen;
+      ;
+    }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case STRING_LITERAL:
+      StringLiteral();
+      break;
+    case INTEGER_LITERAL:
+      IntegerLiteral();
+      break;
+    case TRUE:
+      True();
+      break;
+    case FALSE:
+      False();
+      break;
+    case IDENTIFIER:
+    case LCURLY:
+      Reference();
+      break;
+    default:
+      jj_la1[26] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case WHITESPACE:
+      jj_consume_token(WHITESPACE);
+      break;
+    default:
+      jj_la1[27] = jj_gen;
+      ;
+    }
+  }
+
+/**
  * This method has yet to be fully implemented
  * but will allow arbitrarily nested method
  * calls
@@ -1178,7 +1222,7 @@
       jj_consume_token(WHITESPACE);
       break;
     default:
-      jj_la1[25] = jj_gen;
+      jj_la1[28] = jj_gen;
       ;
     }
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1189,7 +1233,7 @@
       IntegerLiteral();
       break;
     default:
-      jj_la1[26] = jj_gen;
+      jj_la1[29] = jj_gen;
       if (jj_2_6(2147483647)) {
         IntegerRange();
       } else {
@@ -1214,7 +1258,7 @@
           FloatingPointLiteral();
           break;
         default:
-          jj_la1[27] = jj_gen;
+          jj_la1[30] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
@@ -1225,7 +1269,7 @@
       jj_consume_token(WHITESPACE);
       break;
     default:
-      jj_la1[28] = jj_gen;
+      jj_la1[31] = jj_gen;
       ;
     }
   }
@@ -1262,7 +1306,7 @@
             ;
             break;
           default:
-            jj_la1[29] = jj_gen;
+            jj_la1[32] = jj_gen;
             break label_7;
           }
           jj_consume_token(COMMA);
@@ -1270,7 +1314,7 @@
         }
         break;
       default:
-        jj_la1[30] = jj_gen;
+        jj_la1[33] = jj_gen;
         ;
       }
       jj_consume_token(REFMOD2_RPAREN);
@@ -1295,6 +1339,36 @@
     }
   }
 
+  final public void Index() throws ParseException {
+                /*@bgen(jjtree) Index */
+  ASTIndex jjtn000 = new ASTIndex(this, JJTINDEX);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+    try {
+      jj_consume_token(INDEX_LBRACKET);
+      IndexParameter();
+      jj_consume_token(INDEX_RBRACKET);
+    } 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);
+     }
+    }
+  }
+
   final public void Reference() throws ParseException {
                     /*@bgen(jjtree) Reference */
   ASTReference jjtn000 = new ASTReference(this, JJTREFERENCE);
@@ -1306,10 +1380,22 @@
         jj_consume_token(IDENTIFIER);
         label_8:
         while (true) {
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case INDEX_LBRACKET:
+            ;
+            break;
+          default:
+            jj_la1[34] = jj_gen;
+            break label_8;
+          }
+          Index();
+        }
+        label_9:
+        while (true) {
           if (jj_2_7(2)) {
             ;
           } else {
-            break label_8;
+            break label_9;
           }
           jj_consume_token(DOT);
           if (jj_2_8(3)) {
@@ -1320,22 +1406,46 @@
               Identifier();
               break;
             default:
-              jj_la1[31] = jj_gen;
+              jj_la1[35] = jj_gen;
               jj_consume_token(-1);
               throw new ParseException();
             }
           }
+          label_10:
+          while (true) {
+            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+            case INDEX_LBRACKET:
+              ;
+              break;
+            default:
+              jj_la1[36] = jj_gen;
+              break label_10;
+            }
+            Index();
+          }
         }
         break;
       case LCURLY:
         jj_consume_token(LCURLY);
         jj_consume_token(IDENTIFIER);
-        label_9:
+        label_11:
+        while (true) {
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case INDEX_LBRACKET:
+            ;
+            break;
+          default:
+            jj_la1[37] = jj_gen;
+            break label_11;
+          }
+          Index();
+        }
+        label_12:
         while (true) {
           if (jj_2_9(2)) {
             ;
           } else {
-            break label_9;
+            break label_12;
           }
           jj_consume_token(DOT);
           if (jj_2_10(3)) {
@@ -1346,16 +1456,28 @@
               Identifier();
               break;
             default:
-              jj_la1[32] = jj_gen;
+              jj_la1[38] = jj_gen;
               jj_consume_token(-1);
               throw new ParseException();
             }
           }
+          label_13:
+          while (true) {
+            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+            case INDEX_LBRACKET:
+              ;
+              break;
+            default:
+              jj_la1[39] = jj_gen;
+              break label_13;
+            }
+            Index();
+          }
         }
         jj_consume_token(RCURLY);
         break;
       default:
-        jj_la1[33] = jj_gen;
+        jj_la1[40] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -1451,7 +1573,7 @@
         jj_consume_token(RCURLY);
         break;
       default:
-        jj_la1[34] = jj_gen;
+        jj_la1[41] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -1479,7 +1601,7 @@
         jj_consume_token(WHITESPACE);
         break;
       default:
-        jj_la1[35] = jj_gen;
+        jj_la1[42] = jj_gen;
         ;
       }
       jj_consume_token(LPAREN);
@@ -1489,7 +1611,7 @@
       boolean jjtc001 = true;
       jjtree.openNodeScope(jjtn001);
       try {
-        label_10:
+        label_14:
         while (true) {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
           case LPAREN:
@@ -1516,8 +1638,8 @@
             ;
             break;
           default:
-            jj_la1[36] = jj_gen;
-            break label_10;
+            jj_la1[43] = jj_gen;
+            break label_14;
           }
           Statement();
         }
@@ -1542,7 +1664,7 @@
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case ELSEIF_DIRECTIVE:
-        label_11:
+        label_15:
         while (true) {
           ElseIfStatement();
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1550,13 +1672,13 @@
             ;
             break;
           default:
-            jj_la1[37] = jj_gen;
-            break label_11;
+            jj_la1[44] = jj_gen;
+            break label_15;
           }
         }
         break;
       default:
-        jj_la1[38] = jj_gen;
+        jj_la1[45] = jj_gen;
         ;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1564,7 +1686,7 @@
         ElseStatement();
         break;
       default:
-        jj_la1[39] = jj_gen;
+        jj_la1[46] = jj_gen;
         ;
       }
       jj_consume_token(END);
@@ -1600,7 +1722,7 @@
       boolean jjtc001 = true;
       jjtree.openNodeScope(jjtn001);
       try {
-        label_12:
+        label_16:
         while (true) {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
           case LPAREN:
@@ -1627,8 +1749,8 @@
             ;
             break;
           default:
-            jj_la1[40] = jj_gen;
-            break label_12;
+            jj_la1[47] = jj_gen;
+            break label_16;
           }
           Statement();
         }
@@ -1684,7 +1806,7 @@
         jj_consume_token(WHITESPACE);
         break;
       default:
-        jj_la1[41] = jj_gen;
+        jj_la1[48] = jj_gen;
         ;
       }
       jj_consume_token(LPAREN);
@@ -1694,7 +1816,7 @@
       boolean jjtc001 = true;
       jjtree.openNodeScope(jjtn001);
       try {
-        label_13:
+        label_17:
         while (true) {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
           case LPAREN:
@@ -1721,8 +1843,8 @@
             ;
             break;
           default:
-            jj_la1[42] = jj_gen;
-            break label_13;
+            jj_la1[49] = jj_gen;
+            break label_17;
           }
           Statement();
         }
@@ -1783,7 +1905,7 @@
         jj_consume_token(WHITESPACE);
         break;
       default:
-        jj_la1[43] = jj_gen;
+        jj_la1[50] = jj_gen;
         ;
       }
       Reference();
@@ -1792,7 +1914,7 @@
         jj_consume_token(WHITESPACE);
         break;
       default:
-        jj_la1[44] = jj_gen;
+        jj_la1[51] = jj_gen;
         ;
       }
       jj_consume_token(EQUALS);
@@ -1808,7 +1930,7 @@
         jj_consume_token(NEWLINE);
         break;
       default:
-        jj_la1[45] = jj_gen;
+        jj_la1[52] = jj_gen;
         ;
       }
     } catch (Throwable jjte000) {
@@ -1918,15 +2040,15 @@
 
   final public void ConditionalOrExpression() throws ParseException {
     ConditionalAndExpression();
-    label_14:
+    label_18:
     while (true) {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LOGICAL_OR:
         ;
         break;
       default:
-        jj_la1[46] = jj_gen;
-        break label_14;
+        jj_la1[53] = jj_gen;
+        break label_18;
       }
       jj_consume_token(LOGICAL_OR);
                      ASTOrNode jjtn001 = new ASTOrNode(this, JJTORNODE);
@@ -1958,15 +2080,15 @@
 
   final public void ConditionalAndExpression() throws ParseException {
     EqualityExpression();
-    label_15:
+    label_19:
     while (true) {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LOGICAL_AND:
         ;
         break;
       default:
-        jj_la1[47] = jj_gen;
-        break label_15;
+        jj_la1[54] = jj_gen;
+        break label_19;
       }
       jj_consume_token(LOGICAL_AND);
                     ASTAndNode jjtn001 = new ASTAndNode(this, JJTANDNODE);
@@ -1998,7 +2120,7 @@
 
   final public void EqualityExpression() throws ParseException {
     RelationalExpression();
-    label_16:
+    label_20:
     while (true) {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LOGICAL_EQUALS:
@@ -2006,8 +2128,8 @@
         ;
         break;
       default:
-        jj_la1[48] = jj_gen;
-        break label_16;
+        jj_la1[55] = jj_gen;
+        break label_20;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LOGICAL_EQUALS:
@@ -2065,7 +2187,7 @@
         }
         break;
       default:
-        jj_la1[49] = jj_gen;
+        jj_la1[56] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2074,7 +2196,7 @@
 
   final public void RelationalExpression() throws ParseException {
     AdditiveExpression();
-    label_17:
+    label_21:
     while (true) {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LOGICAL_LT:
@@ -2084,8 +2206,8 @@
         ;
         break;
       default:
-        jj_la1[50] = jj_gen;
-        break label_17;
+        jj_la1[57] = jj_gen;
+        break label_21;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LOGICAL_LT:
@@ -2197,7 +2319,7 @@
         }
         break;
       default:
-        jj_la1[51] = jj_gen;
+        jj_la1[58] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2206,7 +2328,7 @@
 
   final public void AdditiveExpression() throws ParseException {
     MultiplicativeExpression();
-    label_18:
+    label_22:
     while (true) {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case MINUS:
@@ -2214,8 +2336,8 @@
         ;
         break;
       default:
-        jj_la1[52] = jj_gen;
-        break label_18;
+        jj_la1[59] = jj_gen;
+        break label_22;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case PLUS:
@@ -2273,7 +2395,7 @@
         }
         break;
       default:
-        jj_la1[53] = jj_gen;
+        jj_la1[60] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2282,7 +2404,7 @@
 
   final public void MultiplicativeExpression() throws ParseException {
     UnaryExpression();
-    label_19:
+    label_23:
     while (true) {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case MULTIPLY:
@@ -2291,8 +2413,8 @@
         ;
         break;
       default:
-        jj_la1[54] = jj_gen;
-        break label_19;
+        jj_la1[61] = jj_gen;
+        break label_23;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case MULTIPLY:
@@ -2377,7 +2499,7 @@
         }
         break;
       default:
-        jj_la1[55] = jj_gen;
+        jj_la1[62] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2391,7 +2513,7 @@
         jj_consume_token(WHITESPACE);
         break;
       default:
-        jj_la1[56] = jj_gen;
+        jj_la1[63] = jj_gen;
         ;
       }
       jj_consume_token(LOGICAL_NOT);
@@ -2435,7 +2557,7 @@
         PrimaryExpression();
         break;
       default:
-        jj_la1[57] = jj_gen;
+        jj_la1[64] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2448,7 +2570,7 @@
       jj_consume_token(WHITESPACE);
       break;
     default:
-      jj_la1[58] = jj_gen;
+      jj_la1[65] = jj_gen;
       ;
     }
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2463,7 +2585,7 @@
       IntegerLiteral();
       break;
     default:
-      jj_la1[59] = jj_gen;
+      jj_la1[66] = jj_gen;
       if (jj_2_12(2147483647)) {
         IntegerRange();
       } else {
@@ -2489,7 +2611,7 @@
           jj_consume_token(RPAREN);
           break;
         default:
-          jj_la1[60] = jj_gen;
+          jj_la1[67] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
@@ -2500,175 +2622,198 @@
       jj_consume_token(WHITESPACE);
       break;
     default:
-      jj_la1[61] = jj_gen;
+      jj_la1[68] = 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_3R_45() {
-    if (jj_3R_65()) return true;
+  final private boolean jj_3R_50() {
+    if (jj_3R_71()) return true;
+    return false;
+  }
+
+  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(67)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_49() {
+    if (jj_3R_70()) return true;
     return false;
   }
 
-  private boolean jj_3_3() {
+  final private boolean jj_3_3() {
     if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_21()) {
+    if (jj_3R_25()) {
     jj_scanpos = xsp;
-    if (jj_3R_22()) return true;
+    if (jj_3R_26()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     if (jj_scan_token(DOUBLEDOT)) return true;
     return false;
   }
 
-  private boolean jj_3R_44() {
-    if (jj_3R_64()) return true;
+  final private boolean jj_3R_48() {
+    if (jj_3R_69()) return true;
     return false;
   }
 
-  private boolean jj_3R_43() {
-    if (jj_3R_63()) return true;
+  final private boolean jj_3R_47() {
+    if (jj_3R_68()) return true;
     return false;
   }
 
-  private boolean jj_3R_42() {
-    if (jj_3R_62()) return true;
+  final private boolean jj_3R_46() {
+    if (jj_3R_67()) return true;
     return false;
   }
 
-  private boolean jj_3R_41() {
-    if (jj_3R_61()) return true;
+  final private boolean jj_3R_45() {
+    if (jj_3R_66()) return true;
     return false;
   }
 
-  private boolean jj_3R_40() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_90() {
+    if (jj_3R_73()) return true;
     return false;
   }
 
-  private boolean jj_3R_39() {
-    if (jj_3R_60()) return true;
+  final private boolean jj_3R_44() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_38() {
-    if (jj_3R_59()) return true;
+  final private boolean jj_3R_89() {
+    if (jj_3R_73()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_43() {
+    if (jj_3R_65()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_42() {
+    if (jj_3R_64()) return true;
     return false;
   }
 
-  private boolean jj_3R_23() {
+  final private boolean jj_3R_27() {
     if (jj_scan_token(COMMA)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     return false;
   }
 
-  private boolean jj_3R_37() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_41() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_24() {
+  final private boolean jj_3R_28() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_37()) {
-    jj_scanpos = xsp;
-    if (jj_3R_38()) {
-    jj_scanpos = xsp;
-    if (jj_3R_39()) {
-    jj_scanpos = xsp;
-    if (jj_3R_40()) {
-    jj_scanpos = xsp;
     if (jj_3R_41()) {
     jj_scanpos = xsp;
     if (jj_3R_42()) {
@@ -2679,7 +2824,15 @@
     jj_scanpos = xsp;
     if (jj_3R_45()) {
     jj_scanpos = xsp;
-    if (jj_3R_46()) return true;
+    if (jj_3R_46()) {
+    jj_scanpos = xsp;
+    if (jj_3R_47()) {
+    jj_scanpos = xsp;
+    if (jj_3R_48()) {
+    jj_scanpos = xsp;
+    if (jj_3R_49()) {
+    jj_scanpos = xsp;
+    if (jj_3R_50()) return true;
     }
     }
     }
@@ -2692,282 +2845,284 @@
     return false;
   }
 
-  private boolean jj_3R_59() {
+  final private boolean jj_3R_34() {
+    if (jj_3R_60()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_32() {
+    if (jj_3R_60()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_64() {
     if (jj_scan_token(WORD)) return true;
     return false;
   }
 
-  private boolean jj_3R_56() {
-    if (jj_scan_token(IDENTIFIER)) return true;
+  final private boolean jj_3R_37() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_30() {
-    if (jj_3R_56()) return true;
+  final private boolean jj_3R_60() {
+    if (jj_scan_token(IDENTIFIER)) return true;
     return false;
   }
 
-  private boolean jj_3_4() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_23()) jj_scanpos = xsp;
+  final private boolean jj_3R_36() {
     if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_60() {
-    if (jj_scan_token(STRING_LITERAL)) return true;
+  final private boolean jj_3_10() {
+    if (jj_3R_33()) return true;
     return false;
   }
 
-  private boolean jj_3R_28() {
-    if (jj_3R_56()) return true;
+  final private boolean jj_3_4() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(28)) 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_33() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_65() {
+    if (jj_scan_token(STRING_LITERAL)) return true;
     return false;
   }
 
-  private boolean jj_3R_36() {
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
+  final private boolean jj_3R_31() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_62() {
-    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
+  final private boolean jj_3_8() {
+    if (jj_3R_33()) return true;
     return false;
   }
 
-  private boolean jj_3R_32() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_40() {
+    if (jj_scan_token(INTEGER_LITERAL)) return true;
     return false;
   }
 
-  private boolean jj_3R_27() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_74() {
+    if (jj_3R_73()) return true;
     return false;
   }
 
-  private boolean jj_3_10() {
+  final private boolean jj_3R_97() {
+    if (jj_scan_token(COMMA)) return true;
     if (jj_3R_29()) return true;
     return false;
   }
 
-  private boolean jj_3R_82() {
-    if (jj_scan_token(COMMA)) return true;
-    if (jj_3R_25()) return true;
+  final private boolean jj_3R_67() {
+    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
     return false;
   }
 
-  private boolean jj_3_8() {
-    if (jj_3R_29()) return true;
+  final private boolean jj_3R_63() {
+    if (jj_3R_73()) return true;
     return false;
   }
 
-  private boolean jj_3R_26() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_71() {
+    if (jj_scan_token(FALSE)) return true;
     return false;
   }
 
-  private boolean jj_3R_66() {
-    if (jj_scan_token(FALSE)) return true;
+  final private boolean jj_3R_30() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_65() {
+  final private boolean jj_3R_70() {
     if (jj_scan_token(TRUE)) 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;
     if (jj_3_10()) {
     jj_scanpos = xsp;
-    if (jj_3R_30()) return true;
+    if (jj_3R_34()) return true;
     }
-    return false;
-  }
-
-  private boolean jj_3R_57() {
-    if (jj_3R_25()) return true;
-    Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_82()) { jj_scanpos = xsp; break; }
+      if (jj_3R_90()) { jj_scanpos = xsp; break; }
     }
     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;
     if (jj_3_8()) {
     jj_scanpos = xsp;
-    if (jj_3R_28()) return true;
+    if (jj_3R_32()) return true;
+    }
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_89()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  private boolean jj_3R_35() {
+  final private boolean jj_3R_61() {
+    if (jj_3R_29()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_97()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_39() {
     if (jj_scan_token(LCURLY)) return true;
     if (jj_scan_token(IDENTIFIER)) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
+      if (jj_3R_74()) { jj_scanpos = xsp; break; }
+    }
+    while (true) {
+      xsp = jj_scanpos;
       if (jj_3_9()) { jj_scanpos = xsp; break; }
     }
     if (jj_scan_token(RCURLY)) return true;
     return false;
   }
 
-  private boolean jj_3_12() {
+  final private boolean jj_3_12() {
     if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_32()) {
+    if (jj_3R_36()) {
     jj_scanpos = xsp;
-    if (jj_3R_33()) return true;
+    if (jj_3R_37()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     if (jj_scan_token(DOUBLEDOT)) return true;
     return false;
   }
 
-  private boolean jj_3R_34() {
+  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;
   }
 
-  private boolean jj_3R_81() {
+  final private boolean jj_3R_88() {
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_80() {
-    if (jj_3R_66()) return true;
+  final private boolean jj_3R_87() {
+    if (jj_3R_71()) return true;
     return false;
   }
 
-  private boolean jj_3R_79() {
-    if (jj_3R_65()) return true;
-    return false;
-  }
-
-  private boolean jj_3_2() {
-    if (jj_scan_token(DOUBLE_ESCAPE)) return true;
+  final private boolean jj_3R_86() {
+    if (jj_3R_70()) return true;
     return false;
   }
 
-  private boolean jj_3R_20() {
+  final private boolean jj_3R_24() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_34()) {
+    if (jj_3R_38()) {
     jj_scanpos = xsp;
-    if (jj_3R_35()) return true;
+    if (jj_3R_39()) return true;
     }
     return false;
   }
 
-  private boolean jj_3R_78() {
-    if (jj_3R_64()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_77() {
-    if (jj_3R_63()) return true;
+  final private boolean jj_3R_85() {
+    if (jj_3R_69()) return true;
     return false;
   }
 
-  private boolean jj_3R_76() {
-    if (jj_3R_62()) return true;
+  final private boolean jj_3R_84() {
+    if (jj_3R_68()) return true;
     return false;
   }
 
-  private boolean jj_3R_75() {
-    if (jj_3R_61()) return true;
+  final private boolean jj_3R_83() {
+    if (jj_3R_67()) return true;
     return false;
   }
 
-  private boolean jj_3R_74() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_82() {
+    if (jj_3R_66()) return true;
     return false;
   }
 
-  private boolean jj_3R_73() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_81() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3_6() {
-    if (jj_scan_token(LBRACKET)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_26()) {
-    jj_scanpos = xsp;
-    if (jj_3R_27()) return true;
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
-    if (jj_scan_token(DOUBLEDOT)) return true;
+  final private boolean jj_3R_80() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_29() {
-    if (jj_3R_56()) return true;
-    if (jj_scan_token(LPAREN)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_57()) jj_scanpos = xsp;
-    if (jj_scan_token(REFMOD2_RPAREN)) return true;
+  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;
   }
 
-  private boolean jj_3R_72() {
-    if (jj_3R_60()) return true;
+  final private boolean jj_3R_79() {
+    if (jj_3R_65()) return true;
     return false;
   }
 
-  private boolean jj_3R_67() {
+  final private boolean jj_3R_72() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_72()) {
+    if (jj_3R_79()) {
     jj_scanpos = xsp;
-    if (jj_3R_73()) {
+    if (jj_3R_80()) {
     jj_scanpos = xsp;
-    if (jj_3R_74()) {
+    if (jj_3R_81()) {
     jj_scanpos = xsp;
-    if (jj_3R_75()) {
+    if (jj_3R_82()) {
     jj_scanpos = xsp;
-    if (jj_3R_76()) {
+    if (jj_3R_83()) {
     jj_scanpos = xsp;
-    if (jj_3R_77()) {
+    if (jj_3R_84()) {
     jj_scanpos = xsp;
-    if (jj_3R_78()) {
+    if (jj_3R_85()) {
     jj_scanpos = xsp;
-    if (jj_3R_79()) {
+    if (jj_3R_86()) {
     jj_scanpos = xsp;
-    if (jj_3R_80()) {
+    if (jj_3R_87()) {
     jj_scanpos = xsp;
-    if (jj_3R_81()) return true;
+    if (jj_3R_88()) return true;
     }
     }
     }
@@ -2980,112 +3135,111 @@
     return false;
   }
 
-  private boolean jj_3R_55() {
-    if (jj_3R_62()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_54() {
-    if (jj_3R_20()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_53() {
-    if (jj_3R_66()) return true;
+  final private boolean jj_3_6() {
+    if (jj_scan_token(LBRACKET)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_30()) {
+    jj_scanpos = xsp;
+    if (jj_3R_31()) return true;
+    }
+    xsp = jj_scanpos;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
+    if (jj_scan_token(DOUBLEDOT)) return true;
     return false;
   }
 
-  private boolean jj_3R_52() {
-    if (jj_3R_65()) return true;
+  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;
   }
 
-  private boolean jj_3R_31() {
+  final private boolean jj_3R_35() {
     Token xsp;
     xsp = jj_scanpos;
     if (jj_3_11()) {
     jj_scanpos = xsp;
-    if (jj_3R_58()) return true;
+    if (jj_3R_62()) return true;
     }
     return false;
   }
 
-  private boolean jj_3_11() {
+  final private boolean jj_3_11() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     if (jj_scan_token(LOGICAL_NOT)) return true;
-    if (jj_3R_31()) return true;
+    if (jj_3R_35()) return true;
     return false;
   }
 
-  private boolean jj_3R_58() {
+  final private boolean jj_3R_62() {
+    if (jj_3R_72()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_59() {
     if (jj_3R_67()) return true;
     return false;
   }
 
-  private boolean jj_3R_51() {
-    if (jj_3R_64()) return true;
+  final private boolean jj_3R_58() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_85() {
-    if (jj_scan_token(COMMA)) return true;
-    if (jj_3R_25()) return true;
-    if (jj_scan_token(COLON)) return true;
-    if (jj_3R_25()) return true;
+  final private boolean jj_3R_57() {
+    if (jj_3R_71()) return true;
     return false;
   }
 
-  private boolean jj_3R_50() {
-    if (jj_3R_63()) return true;
+  final private boolean jj_3R_56() {
+    if (jj_3R_70()) return true;
     return false;
   }
 
-  private boolean jj_3R_49() {
-    if (jj_3R_61()) return true;
+  final private boolean jj_3_2() {
+    if (jj_scan_token(DOUBLE_ESCAPE)) return true;
     return false;
   }
 
-  private boolean jj_3R_48() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_55() {
+    if (jj_3R_69()) return true;
     return false;
   }
 
-  private boolean jj_3R_47() {
-    if (jj_3R_60()) return true;
+  final private boolean jj_3R_54() {
+    if (jj_3R_68()) return true;
     return false;
   }
 
-  private boolean jj_3R_84() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_53() {
+    if (jj_3R_66()) return true;
     return false;
   }
 
-  private boolean jj_3R_69() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_52() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_86() {
-    if (jj_scan_token(COMMA)) return true;
-    if (jj_3R_25()) return true;
+  final private boolean jj_3R_51() {
+    if (jj_3R_65()) return true;
     return false;
   }
 
-  private boolean jj_3R_25() {
+  final private boolean jj_3R_29() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_47()) {
-    jj_scanpos = xsp;
-    if (jj_3R_48()) {
-    jj_scanpos = xsp;
-    if (jj_3R_49()) {
-    jj_scanpos = xsp;
-    if (jj_3R_50()) {
-    jj_scanpos = xsp;
     if (jj_3R_51()) {
     jj_scanpos = xsp;
     if (jj_3R_52()) {
@@ -3094,7 +3248,15 @@
     jj_scanpos = xsp;
     if (jj_3R_54()) {
     jj_scanpos = xsp;
-    if (jj_3R_55()) return true;
+    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()) {
+    jj_scanpos = xsp;
+    if (jj_3R_59()) return true;
     }
     }
     }
@@ -3104,195 +3266,240 @@
     }
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
+    return false;
+  }
+
+  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;
+  }
+
+  final private boolean jj_3R_96() {
+    if (jj_3R_24()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_95() {
+    if (jj_3R_71()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_94() {
+    if (jj_3R_70()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_93() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_92() {
+    if (jj_3R_65()) return true;
+    return false;
+  }
+
+  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_3R_91() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(28)) 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(28)) jj_scanpos = xsp;
     return false;
   }
 
-  private boolean jj_3R_22() {
-    if (jj_3R_36()) return true;
+  final private boolean jj_3R_26() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  private boolean jj_3R_83() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_98() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_68() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_75() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_71() {
-    if (jj_3R_25()) return true;
+  final private boolean jj_3R_78() {
+    if (jj_3R_29()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_86()) { jj_scanpos = xsp; break; }
+      if (jj_3R_101()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  private boolean jj_3R_61() {
+  final private boolean jj_3R_66() {
     if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_68()) {
+    if (jj_3R_75()) {
     jj_scanpos = xsp;
-    if (jj_3R_69()) return true;
+    if (jj_3R_76()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     if (jj_scan_token(DOUBLEDOT)) return true;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     xsp = jj_scanpos;
-    if (jj_3R_83()) {
+    if (jj_3R_98()) {
     jj_scanpos = xsp;
-    if (jj_3R_84()) return true;
+    if (jj_3R_99()) return true;
     }
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     if (jj_scan_token(RBRACKET)) return true;
     return false;
   }
 
-  private boolean jj_3_1() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3_1() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_21() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_25() {
+    if (jj_3R_24()) return true;
     return false;
   }
 
-  private boolean jj_3R_64() {
+  final private boolean jj_3R_69() {
     if (jj_scan_token(LBRACKET)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_71()) jj_scanpos = xsp;
+    if (jj_3R_78()) jj_scanpos = xsp;
     if (jj_scan_token(RBRACKET)) return true;
     return false;
   }
 
-  private boolean jj_3R_70() {
+  final private boolean jj_3R_77() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(26)) jj_scanpos = xsp;
+    if (jj_scan_token(28)) jj_scanpos = xsp;
     return false;
   }
 
-  private boolean jj_3_5() {
-    if (jj_3R_25()) return true;
+  final private boolean jj_3_5() {
+    if (jj_3R_29()) return true;
     if (jj_scan_token(COLON)) return true;
-    if (jj_3R_25()) return true;
+    if (jj_3R_29()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_85()) { jj_scanpos = xsp; break; }
+      if (jj_3R_100()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  private boolean jj_3R_46() {
-    if (jj_3R_66()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_63() {
-    if (jj_scan_token(LEFT_CURLEY)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3_5()) {
-    jj_scanpos = xsp;
-    if (jj_3R_70()) return true;
-    }
-    xsp = jj_scanpos;
-    if (jj_scan_token(7)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(65)) return true;
-    }
-    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[62];
+  final private int[] jj_la1 = new int[69];
   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[] {0x9bc1b00,0x0,0x9bc1b00,0x400000,0x1840000,0x8000000,0x30000042,0x0,0x4000000,0x4000000,0x4000000,0x8,0x4000000,0x9bc1b00,0x8,0x4000000,0x80,0x8,0x3c000042,0x4000000,0x0,0x4000000,0x4000000,0x0,0x4000000,0x4000000,0x8000000,0x30000042,0x4000000,0x8,0x3c000042,0x0,0x0,0x0,0x8300300,0x4000000,0x9bc1b00,0x0,0x0,0x0,0x9bc1b00,0x4000000,0x9bc1b00,0x4000000,0x4000000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x0,0x0,0x4000000,0x3c000142,0x4000000,0x8000000,0x30000142,0x4000000,};
+   private static void jj_la1_0() {
+      jj_la1_0 = new int[] {0x26f06c00,0x0,0x26f06c00,0x1000000,0x6100000,0x20000000,0xc0000108,0x0,0x10000000,0x10000000,0x10000000,0x20,0x10000000,0x26f06c00,0x20,0x10000000,0x200,0x20,0xf0000108,0x10000000,0x0,0x10000000,0x10000000,0x0,0x10000000,0x10000000,0xe0000000,0x10000000,0x10000000,0x20000000,0xc0000108,0x10000000,0x20,0xf0000108,0x2,0x0,0x2,0x2,0x0,0x2,0x0,0x20c00c00,0x10000000,0x26f06c00,0x0,0x0,0x0,0x26f06c00,0x10000000,0x26f06c00,0x10000000,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000000,0xf0000508,0x10000000,0x20000000,0xc0000508,0x10000000,};
    }
-   private static void jj_la1_init_1() {
-      jj_la1_1 = new int[] {0xc6348000,0x48000,0x86300000,0x0,0x0,0x42100000,0x200000,0x6000000,0x0,0x0,0x0,0x0,0x0,0xc6348000,0x0,0x0,0x0,0x0,0x40300000,0x0,0x40100000,0x0,0x0,0x40100000,0x0,0x0,0x100000,0x40200000,0x0,0x0,0x40300000,0x40000000,0x40000000,0x40000000,0x80300000,0x0,0xc6348000,0x10000,0x10000,0x20000,0xc6348000,0x0,0xc6348000,0x0,0x0,0x0,0x20,0x10,0xc00,0xc00,0x3c0,0x3c0,0x1,0x1,0xe,0xe,0x0,0x40300000,0x0,0x40100000,0x200000,0x0,};
+   private static void jj_la1_1() {
+      jj_la1_1 = new int[] {0x18d20000,0x120000,0x18c00000,0x0,0x0,0x8400000,0x800000,0x18000000,0x0,0x0,0x0,0x0,0x0,0x18d20000,0x0,0x0,0x0,0x0,0xc00000,0x0,0x400000,0x0,0x0,0x400000,0x0,0x0,0x400000,0x0,0x0,0x400000,0x800000,0x0,0x0,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc00000,0x0,0x18d20000,0x40000,0x40000,0x80000,0x18d20000,0x0,0x18d20000,0x0,0x0,0x1,0x80,0x40,0x3000,0x3000,0xf00,0xf00,0x6,0x6,0x38,0x38,0x0,0xc00000,0x0,0x400000,0x800000,0x0,};
    }
-   private static void jj_la1_init_2() {
-      jj_la1_2 = new int[] {0x3,0x0,0x3,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x2,0x0,0x1,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x1,0x3,0x0,0x3,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x0,};
+   private static void jj_la1_2() {
+      jj_la1_2 = new int[] {0xf,0x0,0xe,0x0,0x0,0x5,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x0,0x0,0x8,0x0,0x5,0x0,0x5,0x0,0x0,0x5,0x0,0x0,0x5,0x0,0x0,0x0,0x5,0x0,0x0,0x5,0x0,0x1,0x0,0x0,0x1,0x0,0x5,0xe,0x0,0xf,0x0,0x0,0x0,0xf,0x0,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5,0x0,0x5,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 < 62; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 69; 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 < 62; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 69; 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 < 62; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 69; 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 < 62; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 69; 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();
@@ -3318,7 +3525,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) {
@@ -3339,8 +3546,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();
@@ -3349,9 +3554,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();
@@ -3359,14 +3563,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];
@@ -3381,31 +3585,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[68];
+    jj_expentries.removeAllElements();
+    boolean[] la1tokens = new boolean[70];
+    for (int i = 0; i < 70; i++) {
+      la1tokens[i] = false;
+    }
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
     }
-    for (int i = 0; i < 62; i++) {
+    for (int i = 0; i < 69; i++) {
       if (jj_la1[i] == jj_gen) {
         for (int j = 0; j < 32; j++) {
           if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -3420,11 +3629,11 @@
         }
       }
     }
-    for (int i = 0; i < 68; i++) {
+    for (int i = 0; i < 70; 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;
@@ -3432,23 +3641,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) {
@@ -3470,12 +3676,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/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj?rev=730566&r1=730565&r2=730566&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj Thu Jan  1 08:43:22 2009
@@ -1,4 +1,4 @@
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. C:\java\apache\velocity\head\src\java\org\apache\velocity\runtime\parser\Parser.jj */
+/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. Parser.jj */
 /*@egen*//*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -15,7 +15,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License.
+ * under the License.    
  */
 
 /*
@@ -23,39 +23,14 @@
  *    to always have to page past it... :)
  */
 options
-{
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
 
     /**
      * The parser must be non-static in order for the
      * above option to work, otherwise the parser value
      * is passed in as null, which isn't all the useful ;)
      */
-    STATIC=false;
-
-
-
-
-
-
-
-
-
+    STATIC=false;                                                                                                                                                                                                                                                                                                              
 
     /**
      * Declare that we are accepting unicode input and
@@ -115,7 +90,7 @@
     /**
      *  Name of current template we are parsing.  Passed to us in parse()
      */
-    String currentTemplateName = "";
+    public String currentTemplateName = "";
 
     VelocityCharStream velcharstream = null;
 
@@ -253,7 +228,7 @@
         String strDirective = strImage.substring(iLast + 1);
 
         boolean bRecognizedDirective = false;
-
+        
         // we don't have to call substring method all the time in this method
         String dirTag = strDirective.substring(1);
         if (dirTag.charAt(0) == '{')
@@ -508,6 +483,27 @@
  *
  * ------------------------------------------------------------------------- */
 
+<REFERENCE, REFMODIFIER>
+TOKEN:
+{
+   <INDEX_LBRACKET: "[">
+   {
+     stateStackPush();
+     SwitchTo(REFINDEX);
+   }
+  
+}
+
+<REFINDEX>
+TOKEN:
+{
+   <INDEX_RBRACKET: "]">
+   {
+     stateStackPop();
+   }  
+}
+
+
 <DIRECTIVE,REFMOD2>
 TOKEN:
 {
@@ -849,13 +845,13 @@
  *
  * ---------------------------------------------------------------------- */
 
-<DIRECTIVE,REFMOD2>
+<DIRECTIVE,REFMOD2,REFINDEX>
 TOKEN:
 {
     <WHITESPACE : ([" ","\t", "\n", "\r"])+ >
 }
 
-<DIRECTIVE,REFMOD2>
+<DIRECTIVE,REFMOD2,REFINDEX>
 TOKEN :
 {
 //   <STRING_LITERAL: ( "\"" ( ~["\"","\n","\r"] )* "\"" ) | ( "'" ( ~["'","\n","\r"] )* "'" ) >
@@ -894,7 +890,7 @@
     }
 }
 
-<REFERENCE,DIRECTIVE,REFMODIFIER,REFMOD2>
+<REFERENCE,DIRECTIVE,REFMODIFIER,REFMOD2,REFINDEX>
 TOKEN:
 {
    <TRUE: "true">
@@ -975,7 +971,7 @@
     }
 }
 
-<PRE_DIRECTIVE,DIRECTIVE,REFMOD2>
+<PRE_DIRECTIVE,DIRECTIVE,REFMOD2,REFINDEX>
 TOKEN:
 {
    <#DIGIT: [ "0"-"9" ] >
@@ -1005,7 +1001,7 @@
          *  because we want to handle the \n after
          */
 
-        if ( lparen == 0 && !inSet && curLexState != REFMOD2)
+        if ( lparen == 0 && !inSet && curLexState != REFMOD2 && curLexState != REFINDEX)
         {
             stateStackPop();
         }
@@ -1733,7 +1729,7 @@
       |
       [ <WHITESPACE> ]
      )
-
+     
      /** note: need both tokens as they are generated in different states **/
      ( <RIGHT_CURLEY> | <RCURLY> )/*@bgen(jjtree)*/
     } catch (Throwable jjte000) {
@@ -1832,6 +1828,23 @@
 
 
 /**
+ * A Simplified parameter more suitable for an index position: $foo[$index]
+ */
+void IndexParameter()      : {}
+{
+    [<WHITESPACE>]
+    (
+        StringLiteral()
+        | IntegerLiteral()
+        | True()
+        | False()
+        | Reference()
+        )
+    [ <WHITESPACE>]
+}
+
+
+/**
  * This method has yet to be fully implemented
  * but will allow arbitrarily nested method
  * calls
@@ -1889,6 +1902,38 @@
 /*@egen*/
 }
 
+
+void Index() : {/*@bgen(jjtree) Index */
+  ASTIndex jjtn000 = new ASTIndex(this, JJTINDEX);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Index */
+   try {
+/*@egen*/
+   <INDEX_LBRACKET> IndexParameter() <INDEX_RBRACKET>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
 void Reference() : {/*@bgen(jjtree) Reference */
   ASTReference jjtn000 = new ASTReference(this, JJTREFERENCE);
   boolean jjtc000 = true;
@@ -1902,14 +1947,14 @@
      */
 
       (
-         <IDENTIFIER>
-         (LOOKAHEAD(2) <DOT> (LOOKAHEAD(3) Method() | Identifier() ))*
+         <IDENTIFIER> (Index())*
+         (LOOKAHEAD(2) <DOT> (LOOKAHEAD(3) Method() | Identifier() ) (Index())* )*
       )
       |
       (
          <LCURLY>
-         <IDENTIFIER>
-         (LOOKAHEAD(2) <DOT> (LOOKAHEAD(3) Method() | Identifier() ))*
+         <IDENTIFIER> (Index())*
+         (LOOKAHEAD(2) <DOT> (LOOKAHEAD(3) Method() | Identifier() ) (Index())* )*
          <RCURLY>
       )/*@bgen(jjtree)*/
       } catch (Throwable jjte000) {
@@ -2103,7 +2148,7 @@
         jjtree.closeNodeScope(jjtn001, true);
       }
     }
-/*@egen*/       /*@bgen(jjtree)*/
+/*@egen*//*@bgen(jjtree)*/
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
@@ -2163,7 +2208,7 @@
         jjtree.closeNodeScope(jjtn001, true);
       }
     }
-/*@egen*/       /*@bgen(jjtree)*/
+/*@egen*//*@bgen(jjtree)*/
     } catch (Throwable jjte000) {
       if (jjtc000) {
         jjtree.clearNodeScope(jjtn000);
@@ -2354,7 +2399,7 @@
                        jjtree.closeNodeScope(jjtn001,  2);
                      }
                    }
-/*@egen*/            )*
+/*@egen*/ )*
 }
 
 
@@ -2388,7 +2433,7 @@
                       jjtree.closeNodeScope(jjtn001,  2);
                     }
                   }
-/*@egen*/             )*
+/*@egen*/ )*
 }
 
 void EqualityExpression()       : {}

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserConstants.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserConstants.java?rev=730566&r1=730565&r2=730566&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserConstants.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserConstants.java Thu Jan  1 08:43:22 2009
@@ -1,168 +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 LBRACKET = 1;
-  /** RegularExpression Id. */
-  int RBRACKET = 2;
-  /** RegularExpression Id. */
-  int COMMA = 3;
-  /** RegularExpression Id. */
-  int DOUBLEDOT = 4;
-  /** RegularExpression Id. */
-  int COLON = 5;
-  /** RegularExpression Id. */
-  int LEFT_CURLEY = 6;
-  /** RegularExpression Id. */
-  int RIGHT_CURLEY = 7;
-  /** RegularExpression Id. */
-  int LPAREN = 8;
-  /** RegularExpression Id. */
-  int RPAREN = 9;
-  /** RegularExpression Id. */
-  int REFMOD2_RPAREN = 10;
-  /** RegularExpression Id. */
-  int ESCAPE_DIRECTIVE = 11;
-  /** RegularExpression Id. */
-  int SET_DIRECTIVE = 12;
-  /** RegularExpression Id. */
-  int DOLLAR = 13;
-  /** RegularExpression Id. */
-  int DOLLARBANG = 14;
-  /** RegularExpression Id. */
-  int HASH = 17;
-  /** RegularExpression Id. */
-  int SINGLE_LINE_COMMENT_START = 18;
-  /** RegularExpression Id. */
-  int DOUBLE_ESCAPE = 19;
-  /** RegularExpression Id. */
-  int ESCAPE = 20;
-  /** RegularExpression Id. */
-  int TEXT = 21;
-  /** RegularExpression Id. */
-  int SINGLE_LINE_COMMENT = 22;
-  /** RegularExpression Id. */
-  int FORMAL_COMMENT = 23;
-  /** RegularExpression Id. */
-  int MULTI_LINE_COMMENT = 24;
-  /** RegularExpression Id. */
-  int WHITESPACE = 26;
-  /** RegularExpression Id. */
-  int STRING_LITERAL = 27;
-  /** RegularExpression Id. */
-  int TRUE = 28;
-  /** RegularExpression Id. */
-  int FALSE = 29;
-  /** RegularExpression Id. */
-  int NEWLINE = 30;
-  /** RegularExpression Id. */
-  int MINUS = 31;
-  /** RegularExpression Id. */
-  int PLUS = 32;
-  /** RegularExpression Id. */
-  int MULTIPLY = 33;
-  /** RegularExpression Id. */
-  int DIVIDE = 34;
-  /** RegularExpression Id. */
-  int MODULUS = 35;
-  /** RegularExpression Id. */
-  int LOGICAL_AND = 36;
-  /** RegularExpression Id. */
-  int LOGICAL_OR = 37;
-  /** RegularExpression Id. */
-  int LOGICAL_LT = 38;
-  /** RegularExpression Id. */
-  int LOGICAL_LE = 39;
-  /** RegularExpression Id. */
-  int LOGICAL_GT = 40;
-  /** RegularExpression Id. */
-  int LOGICAL_GE = 41;
-  /** RegularExpression Id. */
-  int LOGICAL_EQUALS = 42;
-  /** RegularExpression Id. */
-  int LOGICAL_NOT_EQUALS = 43;
-  /** RegularExpression Id. */
-  int LOGICAL_NOT = 44;
-  /** RegularExpression Id. */
-  int EQUALS = 45;
-  /** RegularExpression Id. */
-  int END = 46;
-  /** RegularExpression Id. */
-  int IF_DIRECTIVE = 47;
-  /** RegularExpression Id. */
-  int ELSEIF_DIRECTIVE = 48;
-  /** RegularExpression Id. */
-  int ELSE_DIRECTIVE = 49;
-  /** RegularExpression Id. */
-  int STOP_DIRECTIVE = 50;
-  /** RegularExpression Id. */
-  int DIGIT = 51;
-  /** RegularExpression Id. */
-  int INTEGER_LITERAL = 52;
-  /** RegularExpression Id. */
-  int FLOATING_POINT_LITERAL = 53;
-  /** RegularExpression Id. */
-  int EXPONENT = 54;
-  /** RegularExpression Id. */
-  int LETTER = 55;
-  /** RegularExpression Id. */
-  int DIRECTIVE_CHAR = 56;
-  /** RegularExpression Id. */
-  int WORD = 57;
-  /** RegularExpression Id. */
-  int BRACKETED_WORD = 58;
-  /** RegularExpression Id. */
-  int ALPHA_CHAR = 59;
-  /** RegularExpression Id. */
-  int ALPHANUM_CHAR = 60;
-  /** RegularExpression Id. */
-  int IDENTIFIER_CHAR = 61;
-  /** RegularExpression Id. */
-  int IDENTIFIER = 62;
-  /** RegularExpression Id. */
-  int DOT = 63;
-  /** RegularExpression Id. */
-  int LCURLY = 64;
-  /** RegularExpression Id. */
-  int RCURLY = 65;
-  /** RegularExpression Id. */
-  int REFERENCE_TERMINATOR = 66;
-  /** RegularExpression Id. */
-  int DIRECTIVE_TERMINATOR = 67;
-
-  /** Lexical state. */
-  int DIRECTIVE = 0;
-  /** Lexical state. */
-  int REFMOD2 = 1;
-  /** Lexical state. */
-  int REFMODIFIER = 2;
-  /** Lexical state. */
-  int DEFAULT = 3;
-  /** Lexical state. */
-  int REFERENCE = 4;
-  /** Lexical state. */
-  int PRE_DIRECTIVE = 5;
-  /** Lexical state. */
-  int IN_MULTI_LINE_COMMENT = 6;
-  /** Lexical state. */
-  int IN_FORMAL_COMMENT = 7;
-  /** Lexical state. */
-  int IN_SINGLE_LINE_COMMENT = 8;
+  int INDEX_LBRACKET = 1;
+  int INDEX_RBRACKET = 2;
+  int LBRACKET = 3;
+  int RBRACKET = 4;
+  int COMMA = 5;
+  int DOUBLEDOT = 6;
+  int COLON = 7;
+  int LEFT_CURLEY = 8;
+  int RIGHT_CURLEY = 9;
+  int LPAREN = 10;
+  int RPAREN = 11;
+  int REFMOD2_RPAREN = 12;
+  int ESCAPE_DIRECTIVE = 13;
+  int SET_DIRECTIVE = 14;
+  int DOLLAR = 15;
+  int DOLLARBANG = 16;
+  int HASH = 19;
+  int SINGLE_LINE_COMMENT_START = 20;
+  int DOUBLE_ESCAPE = 21;
+  int ESCAPE = 22;
+  int TEXT = 23;
+  int SINGLE_LINE_COMMENT = 24;
+  int FORMAL_COMMENT = 25;
+  int MULTI_LINE_COMMENT = 26;
+  int WHITESPACE = 28;
+  int STRING_LITERAL = 29;
+  int TRUE = 30;
+  int FALSE = 31;
+  int NEWLINE = 32;
+  int MINUS = 33;
+  int PLUS = 34;
+  int MULTIPLY = 35;
+  int DIVIDE = 36;
+  int MODULUS = 37;
+  int LOGICAL_AND = 38;
+  int LOGICAL_OR = 39;
+  int LOGICAL_LT = 40;
+  int LOGICAL_LE = 41;
+  int LOGICAL_GT = 42;
+  int LOGICAL_GE = 43;
+  int LOGICAL_EQUALS = 44;
+  int LOGICAL_NOT_EQUALS = 45;
+  int LOGICAL_NOT = 46;
+  int EQUALS = 47;
+  int END = 48;
+  int IF_DIRECTIVE = 49;
+  int ELSEIF_DIRECTIVE = 50;
+  int ELSE_DIRECTIVE = 51;
+  int STOP_DIRECTIVE = 52;
+  int DIGIT = 53;
+  int INTEGER_LITERAL = 54;
+  int FLOATING_POINT_LITERAL = 55;
+  int EXPONENT = 56;
+  int LETTER = 57;
+  int DIRECTIVE_CHAR = 58;
+  int WORD = 59;
+  int BRACKETED_WORD = 60;
+  int ALPHA_CHAR = 61;
+  int ALPHANUM_CHAR = 62;
+  int IDENTIFIER_CHAR = 63;
+  int IDENTIFIER = 64;
+  int DOT = 65;
+  int LCURLY = 66;
+  int RCURLY = 67;
+  int REFERENCE_TERMINATOR = 68;
+  int DIRECTIVE_TERMINATOR = 69;
+
+  int REFERENCE = 0;
+  int REFMODIFIER = 1;
+  int REFINDEX = 2;
+  int DIRECTIVE = 3;
+  int REFMOD2 = 4;
+  int DEFAULT = 5;
+  int PRE_DIRECTIVE = 6;
+  int IN_MULTI_LINE_COMMENT = 7;
+  int IN_FORMAL_COMMENT = 8;
+  int IN_SINGLE_LINE_COMMENT = 9;
 
-  /** Literal token values. */
   String[] tokenImage = {
     "<EOF>",
     "\"[\"",
     "\"]\"",
+    "\"[\"",
+    "\"]\"",
     "\",\"",
     "\"..\"",
     "\":\"",
@@ -175,7 +100,7 @@
     "<SET_DIRECTIVE>",
     "<DOLLAR>",
     "<DOLLARBANG>",
-    "<token of kind 15>",
+    "<token of kind 17>",
     "\"#*\"",
     "\"#\"",
     "\"##\"",
@@ -185,7 +110,7 @@
     "<SINGLE_LINE_COMMENT>",
     "\"*#\"",
     "\"*#\"",
-    "<token of kind 25>",
+    "<token of kind 27>",
     "<WHITESPACE>",
     "<STRING_LITERAL>",
     "\"true\"",



Mime
View raw message