Modified: 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java?rev=735657&r1=735656&r2=735657&view=diff
==============================================================================
--- 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
 (original)
+++ 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
 Mon Jan 19 02:59:28 2009
@@ -11,7 +11,6 @@
 import org.apache.velocity.util.StringUtils;
 import org.apache.commons.lang.text.StrBuilder;
 
-/** Token Manager. */
 public class ParserTokenManager implements ParserConstants
 {
     private int fileDepth = 0;
@@ -109,7 +108,7 @@
     /**
      * Holds the state of the parsing process.
      */
-    private class ParserState
+    private static class ParserState
     {
         int lparen;
         int rparen;
@@ -169,10 +168,7 @@
             }
         }
     }
-
-  /** Debug output. */
   public  java.io.PrintStream debugStream = System.out;
-  /** Set debug output. */
   public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
 private final int jjStopStringLiteralDfa_3(int pos, long active0)
 {
@@ -231,13 +227,21 @@
 {
    return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
 }
-private int jjStopAtPos(int pos, int kind)
+private final int jjStopAtPos(int pos, int kind)
 {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
    return pos + 1;
 }
-private int jjMoveStringLiteralDfa0_3()
+private final int jjStartNfaWithStates_3(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_3(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_3()
 {
    switch(curChar)
    {
@@ -280,7 +284,7 @@
          return jjMoveNfa_3(0, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_3(long active0)
+private final int jjMoveStringLiteralDfa1_3(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -312,10 +316,10 @@
    }
    return jjStartNfa_3(0, active0);
 }
-private int jjMoveStringLiteralDfa2_3(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_3(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_3(0, old0);
+      return jjStartNfa_3(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_3(1, active0);
@@ -336,10 +340,10 @@
    }
    return jjStartNfa_3(1, active0);
 }
-private int jjMoveStringLiteralDfa3_3(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_3(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_3(1, old0);
+      return jjStartNfa_3(1, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_3(2, active0);
@@ -358,10 +362,10 @@
    }
    return jjStartNfa_3(2, active0);
 }
-private int jjMoveStringLiteralDfa4_3(long old0, long active0)
+private final int jjMoveStringLiteralDfa4_3(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_3(2, old0);
+      return jjStartNfa_3(2, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_3(3, active0);
@@ -378,13 +382,35 @@
    }
    return jjStartNfa_3(3, active0);
 }
-private int jjStartNfaWithStates_3(int pos, int kind, int state)
+private final void jjCheckNAdd(int state)
 {
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_3(state, pos + 1);
+   if (jjrounds[state] != jjround)
+   {
+      jjstateSet[jjnewStateCnt++] = state;
+      jjrounds[state] = jjround;
+   }
+}
+private final void jjAddStates(int start, int end)
+{
+   do {
+      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
+   } while (start++ != end);
+}
+private final void jjCheckNAddTwoStates(int state1, int state2)
+{
+   jjCheckNAdd(state1);
+   jjCheckNAdd(state2);
+}
+private final void jjCheckNAddStates(int start, int end)
+{
+   do {
+      jjCheckNAdd(jjnextStates[start]);
+   } while (start++ != end);
+}
+private final void jjCheckNAddStates(int start)
+{
+   jjCheckNAdd(jjnextStates[start]);
+   jjCheckNAdd(jjnextStates[start + 1]);
 }
 static final long[] jjbitVec0 = {
    0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 
0xffffffffffffffffL
@@ -392,13 +418,14 @@
 static final long[] jjbitVec2 = {
    0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
 };
-private int jjMoveNfa_3(int startState, int curPos)
+private final int jjMoveNfa_3(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 101;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -406,7 +433,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -800,7 +827,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1011,7 +1038,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1064,7 +1091,15 @@
 {
    return jjMoveNfa_9(jjStopStringLiteralDfa_9(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_9()
+private final int jjStartNfaWithStates_9(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_9(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_9()
 {
    switch(curChar)
    {
@@ -1077,7 +1112,7 @@
          return jjMoveNfa_9(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_9(long active0)
+private final int jjMoveStringLiteralDfa1_9(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -1103,10 +1138,10 @@
    }
    return jjStartNfa_9(0, active0);
 }
-private int jjMoveStringLiteralDfa2_9(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_9(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_9(0, old0);
+      return jjStartNfa_9(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_9(1, active0);
@@ -1123,21 +1158,14 @@
    }
    return jjStartNfa_9(1, active0);
 }
-private int jjStartNfaWithStates_9(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_9(state, pos + 1);
-}
-private int jjMoveNfa_9(int startState, int curPos)
+private final int jjMoveNfa_9(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 12;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -1145,7 +1173,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1197,7 +1225,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1232,7 +1260,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1277,7 +1305,15 @@
 {
    return jjMoveNfa_7(jjStopStringLiteralDfa_7(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_7()
+private final int jjStartNfaWithStates_7(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_7(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_7()
 {
    switch(curChar)
    {
@@ -1288,7 +1324,7 @@
          return jjMoveNfa_7(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_7(long active0)
+private final int jjMoveStringLiteralDfa1_7(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -1312,10 +1348,10 @@
    }
    return jjStartNfa_7(0, active0);
 }
-private int jjMoveStringLiteralDfa2_7(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_7(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_7(0, old0);
+      return jjStartNfa_7(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_7(1, active0);
@@ -1332,21 +1368,14 @@
    }
    return jjStartNfa_7(1, active0);
 }
-private int jjStartNfaWithStates_7(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_7(state, pos + 1);
-}
-private int jjMoveNfa_7(int startState, int curPos)
+private final int jjMoveNfa_7(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 92;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -1354,7 +1383,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1561,7 +1590,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1832,7 +1861,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -1877,7 +1906,15 @@
 {
    return jjMoveNfa_6(jjStopStringLiteralDfa_6(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_6()
+private final int jjStartNfaWithStates_6(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_6(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_6()
 {
    switch(curChar)
    {
@@ -1888,7 +1925,7 @@
          return jjMoveNfa_6(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_6(long active0)
+private final int jjMoveStringLiteralDfa1_6(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -1912,10 +1949,10 @@
    }
    return jjStartNfa_6(0, active0);
 }
-private int jjMoveStringLiteralDfa2_6(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_6(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_6(0, old0);
+      return jjStartNfa_6(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_6(1, active0);
@@ -1932,21 +1969,14 @@
    }
    return jjStartNfa_6(1, active0);
 }
-private int jjStartNfaWithStates_6(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_6(state, pos + 1);
-}
-private int jjMoveNfa_6(int startState, int curPos)
+private final int jjMoveNfa_6(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 12;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -1954,7 +1984,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2006,7 +2036,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2041,7 +2071,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2090,7 +2120,15 @@
 {
    return jjMoveNfa_5(jjStopStringLiteralDfa_5(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_5()
+private final int jjStartNfaWithStates_5(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_5(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_5()
 {
    switch(curChar)
    {
@@ -2104,7 +2142,7 @@
          return jjMoveNfa_5(13, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_5(long active0)
+private final int jjMoveStringLiteralDfa1_5(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -2132,10 +2170,10 @@
    }
    return jjStartNfa_5(0, active0);
 }
-private int jjMoveStringLiteralDfa2_5(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_5(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_5(0, old0);
+      return jjStartNfa_5(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_5(1, active0);
@@ -2152,21 +2190,14 @@
    }
    return jjStartNfa_5(1, active0);
 }
-private int jjStartNfaWithStates_5(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_5(state, pos + 1);
-}
-private int jjMoveNfa_5(int startState, int curPos)
+private final int jjMoveNfa_5(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 39;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -2174,7 +2205,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2303,7 +2334,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2447,7 +2478,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2500,7 +2531,15 @@
 {
    return jjMoveNfa_10(jjStopStringLiteralDfa_10(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_10()
+private final int jjStartNfaWithStates_10(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_10(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_10()
 {
    switch(curChar)
    {
@@ -2513,7 +2552,7 @@
          return jjMoveNfa_10(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_10(long active0)
+private final int jjMoveStringLiteralDfa1_10(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -2539,10 +2578,10 @@
    }
    return jjStartNfa_10(0, active0);
 }
-private int jjMoveStringLiteralDfa2_10(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_10(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_10(0, old0);
+      return jjStartNfa_10(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_10(1, active0);
@@ -2559,21 +2598,14 @@
    }
    return jjStartNfa_10(1, active0);
 }
-private int jjStartNfaWithStates_10(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_10(state, pos + 1);
-}
-private int jjMoveNfa_10(int startState, int curPos)
+private final int jjMoveNfa_10(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 12;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -2581,7 +2613,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2633,7 +2665,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2668,7 +2700,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -2713,7 +2745,15 @@
 {
    return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_2()
+private final int jjStartNfaWithStates_2(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_2(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_2()
 {
    switch(curChar)
    {
@@ -2730,7 +2770,7 @@
          return jjMoveNfa_2(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_2(long active0)
+private final int jjMoveStringLiteralDfa1_2(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -2758,10 +2798,10 @@
    }
    return jjStartNfa_2(0, active0);
 }
-private int jjMoveStringLiteralDfa2_2(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_2(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_2(0, old0);
+      return jjStartNfa_2(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_2(1, active0);
@@ -2782,10 +2822,10 @@
    }
    return jjStartNfa_2(1, active0);
 }
-private int jjMoveStringLiteralDfa3_2(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_2(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_2(1, old0);
+      return jjStartNfa_2(1, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_2(2, active0);
@@ -2804,10 +2844,10 @@
    }
    return jjStartNfa_2(2, active0);
 }
-private int jjMoveStringLiteralDfa4_2(long old0, long active0)
+private final int jjMoveStringLiteralDfa4_2(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_2(2, old0);
+      return jjStartNfa_2(2, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_2(3, active0);
@@ -2824,21 +2864,14 @@
    }
    return jjStartNfa_2(3, active0);
 }
-private int jjStartNfaWithStates_2(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_2(state, pos + 1);
-}
-private int jjMoveNfa_2(int startState, int curPos)
+private final int jjMoveNfa_2(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 55;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -2846,7 +2879,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3093,7 +3126,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3178,7 +3211,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3231,7 +3264,15 @@
 {
    return jjMoveNfa_11(jjStopStringLiteralDfa_11(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_11()
+private final int jjStartNfaWithStates_11(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_11(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_11()
 {
    switch(curChar)
    {
@@ -3242,7 +3283,7 @@
          return jjMoveNfa_11(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_11(long active0)
+private final int jjMoveStringLiteralDfa1_11(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -3266,10 +3307,10 @@
    }
    return jjStartNfa_11(0, active0);
 }
-private int jjMoveStringLiteralDfa2_11(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_11(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_11(0, old0);
+      return jjStartNfa_11(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_11(1, active0);
@@ -3286,21 +3327,14 @@
    }
    return jjStartNfa_11(1, active0);
 }
-private int jjStartNfaWithStates_11(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_11(state, pos + 1);
-}
-private int jjMoveNfa_11(int startState, int curPos)
+private final int jjMoveNfa_11(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 15;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -3308,7 +3342,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3379,7 +3413,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3414,7 +3448,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3488,7 +3522,15 @@
 {
    return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 
1);
 }
-private int jjMoveStringLiteralDfa0_0()
+private final int jjStartNfaWithStates_0(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_0(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_0()
 {
    switch(curChar)
    {
@@ -3509,7 +3551,7 @@
          return jjMoveNfa_0(12, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_0(long active0)
+private final int jjMoveStringLiteralDfa1_0(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -3537,7 +3579,7 @@
    }
    return jjStartNfa_0(0, active0, 0L);
 }
-private int jjMoveStringLiteralDfa2_0(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(0, old0, 0L);
@@ -3561,7 +3603,7 @@
    }
    return jjStartNfa_0(1, active0, 0L);
 }
-private int jjMoveStringLiteralDfa3_0(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(1, old0, 0L);
@@ -3583,7 +3625,7 @@
    }
    return jjStartNfa_0(2, active0, 0L);
 }
-private int jjMoveStringLiteralDfa4_0(long old0, long active0)
+private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(2, old0, 0L);
@@ -3603,21 +3645,14 @@
    }
    return jjStartNfa_0(3, active0, 0L);
 }
-private int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_0(state, pos + 1);
-}
-private int jjMoveNfa_0(int startState, int curPos)
+private final int jjMoveNfa_0(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 33;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -3625,7 +3660,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3723,7 +3758,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3825,7 +3860,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -3901,7 +3936,15 @@
 {
    return jjMoveNfa_4(jjStopStringLiteralDfa_4(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_4()
+private final int jjStartNfaWithStates_4(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_4(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_4()
 {
    switch(curChar)
    {
@@ -3932,7 +3975,7 @@
          return jjMoveNfa_4(13, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_4(long active0)
+private final int jjMoveStringLiteralDfa1_4(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -3964,10 +4007,10 @@
    }
    return jjStartNfa_4(0, active0);
 }
-private int jjMoveStringLiteralDfa2_4(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_4(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_4(0, old0);
+      return jjStartNfa_4(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_4(1, active0);
@@ -3988,10 +4031,10 @@
    }
    return jjStartNfa_4(1, active0);
 }
-private int jjMoveStringLiteralDfa3_4(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_4(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_4(1, old0);
+      return jjStartNfa_4(1, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_4(2, active0);
@@ -4010,10 +4053,10 @@
    }
    return jjStartNfa_4(2, active0);
 }
-private int jjMoveStringLiteralDfa4_4(long old0, long active0)
+private final int jjMoveStringLiteralDfa4_4(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_4(2, old0);
+      return jjStartNfa_4(2, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_4(3, active0);
@@ -4030,21 +4073,14 @@
    }
    return jjStartNfa_4(3, active0);
 }
-private int jjStartNfaWithStates_4(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_4(state, pos + 1);
-}
-private int jjMoveNfa_4(int startState, int curPos)
+private final int jjMoveNfa_4(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 71;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -4052,7 +4088,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4329,7 +4365,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4474,7 +4510,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4527,7 +4563,15 @@
 {
    return jjMoveNfa_8(jjStopStringLiteralDfa_8(pos, active0), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_8()
+private final int jjStartNfaWithStates_8(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_8(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_8()
 {
    switch(curChar)
    {
@@ -4540,7 +4584,7 @@
          return jjMoveNfa_8(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_8(long active0)
+private final int jjMoveStringLiteralDfa1_8(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -4566,10 +4610,10 @@
    }
    return jjStartNfa_8(0, active0);
 }
-private int jjMoveStringLiteralDfa2_8(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_8(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_8(0, old0);
+      return jjStartNfa_8(0, old0); 
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_8(1, active0);
@@ -4590,21 +4634,14 @@
    }
    return jjStartNfa_8(1, active0);
 }
-private int jjStartNfaWithStates_8(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_8(state, pos + 1);
-}
-private int jjMoveNfa_8(int startState, int curPos)
+private final int jjMoveNfa_8(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 12;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -4612,7 +4649,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4664,7 +4701,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4699,7 +4736,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4773,7 +4810,15 @@
 {
    return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 
1);
 }
-private int jjMoveStringLiteralDfa0_1()
+private final int jjStartNfaWithStates_1(int pos, int kind, int state)
+{
+   jjmatchedKind = kind;
+   jjmatchedPos = pos;
+   try { curChar = input_stream.readChar(); }
+   catch(java.io.IOException e) { return pos + 1; }
+   return jjMoveNfa_1(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_1()
 {
    switch(curChar)
    {
@@ -4796,7 +4841,7 @@
          return jjMoveNfa_1(12, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_1(long active0)
+private final int jjMoveStringLiteralDfa1_1(long active0)
 {
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
@@ -4824,7 +4869,7 @@
    }
    return jjStartNfa_1(0, active0, 0L);
 }
-private int jjMoveStringLiteralDfa2_1(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_1(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_1(0, old0, 0L);
@@ -4848,7 +4893,7 @@
    }
    return jjStartNfa_1(1, active0, 0L);
 }
-private int jjMoveStringLiteralDfa3_1(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_1(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_1(1, old0, 0L);
@@ -4870,7 +4915,7 @@
    }
    return jjStartNfa_1(2, active0, 0L);
 }
-private int jjMoveStringLiteralDfa4_1(long old0, long active0)
+private final int jjMoveStringLiteralDfa4_1(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_1(2, old0, 0L);
@@ -4890,21 +4935,14 @@
    }
    return jjStartNfa_1(3, active0, 0L);
 }
-private int jjStartNfaWithStates_1(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_1(state, pos + 1);
-}
-private int jjMoveNfa_1(int startState, int curPos)
+private final int jjMoveNfa_1(int startState, int curPos)
 {
+   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 28;
    int i = 1;
    jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
+   int j, kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -4912,7 +4950,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -4999,7 +5037,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -5093,7 +5131,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         do
+         MatchLoop: do
          {
             switch(jjstateSet[--i])
             {
@@ -5140,14 +5178,12 @@
    {
       case 0:
          return ((jjbitVec2[i2] & l2) != 0L);
-      default :
+      default : 
          if ((jjbitVec0[i1] & l1) != 0L)
             return true;
          return false;
    }
 }
-
-/** Token literal values. */
 public static final String[] jjstrLiteralImages = {
 null, null, null, null, null, null, null, null, null, null, null, null, null, 
 null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, 
@@ -5155,24 +5191,20 @@
 null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, 
 null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, 
 null, null, null, null, null, };
-
-/** Lexer state names. */
 public static final String[] lexStateNames = {
-   "REFERENCE",
-   "REFMODIFIER",
-   "REFINDEX",
-   "DIRECTIVE",
-   "REFMOD2",
-   "DEFAULT",
-   "REFMOD",
-   "PRE_DIRECTIVE",
-   "IN_TEXTBLOCK",
-   "IN_MULTI_LINE_COMMENT",
-   "IN_FORMAL_COMMENT",
-   "IN_SINGLE_LINE_COMMENT",
+   "REFERENCE", 
+   "REFMODIFIER", 
+   "REFINDEX", 
+   "DIRECTIVE", 
+   "REFMOD2", 
+   "DEFAULT", 
+   "REFMOD", 
+   "PRE_DIRECTIVE", 
+   "IN_TEXTBLOCK", 
+   "IN_MULTI_LINE_COMMENT", 
+   "IN_FORMAL_COMMENT", 
+   "IN_SINGLE_LINE_COMMENT", 
 };
-
-/** Lex State array. */
 public static final int[] jjnewLexState = {
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, 
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, 
@@ -5193,23 +5225,19 @@
 protected CharStream input_stream;
 private final int[] jjrounds = new int[101];
 private final int[] jjstateSet = new int[202];
-private final StrBuilder jjimage = new StrBuilder();
-private StrBuilder image = jjimage;
-private int jjimageLen;
-private int lengthOfMatch;
+StrBuilder image;
+int jjimageLen;
+int lengthOfMatch;
 protected char curChar;
-/** Constructor. */
-public ParserTokenManager(CharStream stream){
+public ParserTokenManager(CharStream stream)
+{
    input_stream = stream;
 }
-
-/** Constructor. */
-public ParserTokenManager(CharStream stream, int lexState){
+public ParserTokenManager(CharStream stream, int lexState)
+{
    this(stream);
    SwitchTo(lexState);
 }
-
-/** Reinitialise parser. */
 public void ReInit(CharStream stream)
 {
    jjmatchedPos = jjnewStateCnt = 0;
@@ -5217,22 +5245,18 @@
    input_stream = stream;
    ReInitRounds();
 }
-private void ReInitRounds()
+private final void ReInitRounds()
 {
    int i;
    jjround = 0x80000001;
    for (i = 101; i-- > 0;)
       jjrounds[i] = 0x80000000;
 }
-
-/** Reinitialise parser. */
 public void ReInit(CharStream stream, int lexState)
 {
    ReInit(stream);
    SwitchTo(lexState);
 }
-
-/** Switch to specified lex state. */
 public void SwitchTo(int lexState)
 {
    if (lexState >= 12 || lexState < 0)
@@ -5243,27 +5267,14 @@
 
 protected Token jjFillToken()
 {
-   final Token t;
-   final String curTokenImage;
-   final int beginLine;
-   final int endLine;
-   final int beginColumn;
-   final int endColumn;
-   String im = jjstrLiteralImages[jjmatchedKind];
-   curTokenImage = (im == null) ? input_stream.GetImage() : im;
-   beginLine = input_stream.getBeginLine();
-   beginColumn = input_stream.getBeginColumn();
-   endLine = input_stream.getEndLine();
-   endColumn = input_stream.getEndColumn();
-   t = Token.newToken(jjmatchedKind);
+   Token t = Token.newToken(jjmatchedKind);
    t.kind = jjmatchedKind;
-   t.image = curTokenImage;
-
-   t.beginLine = beginLine;
-   t.endLine = endLine;
-   t.beginColumn = beginColumn;
-   t.endColumn = endColumn;
-
+   String im = jjstrLiteralImages[jjmatchedKind];
+   t.image = (im == null) ? input_stream.GetImage() : im;
+   t.beginLine = input_stream.getBeginLine();
+   t.beginColumn = input_stream.getBeginColumn();
+   t.endLine = input_stream.getEndLine();
+   t.endColumn = input_stream.getEndColumn();
    return t;
 }
 
@@ -5274,29 +5285,28 @@
 int jjmatchedPos;
 int jjmatchedKind;
 
-/** Get the next Token. */
 public Token getNextToken() 
 {
+  int kind;
   Token specialToken = null;
   Token matchedToken;
   int curPos = 0;
 
   EOFLoop :
   for (;;)
-  {
-   try
-   {
+  {   
+   try   
+   {     
       curChar = input_stream.BeginToken();
-   }
+   }     
    catch(java.io.IOException e)
-   {
+   {        
       jjmatchedKind = 0;
       matchedToken = jjFillToken();
       matchedToken.specialToken = specialToken;
       return matchedToken;
    }
-   image = jjimage;
-   image.setLength(0);
+   image = null;
    jjimageLen = 0;
 
    for (;;)
@@ -5423,7 +5433,7 @@
               }
               SkipLexicalActions(matchedToken);
            }
-           else
+           else 
               SkipLexicalActions(null);
          if (jjnewLexState[jjmatchedKind] != -1)
            curLexState = jjnewLexState[jjmatchedKind];
@@ -5469,7 +5479,10 @@
    switch(jjmatchedKind)
    {
       case 71 :
-         image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+         if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         /*
          * push every terminator character back into the stream
          */
@@ -5484,7 +5497,10 @@
         stateStackPop();
          break;
       case 72 :
-         image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+         if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         if ( debugPrint )
             System.out.print("DIRECTIVE_TERM :");
 
@@ -5502,7 +5518,10 @@
    switch(jjmatchedKind)
    {
       case 15 :
-         image.append(input_stream.GetSuffix(jjimageLen));
+         if (image == null)
+              image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen)));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen));
          jjimageLen = 0;
         if (! inComment)
         {
@@ -5527,7 +5546,10 @@
         }
          break;
       case 16 :
-         image.append(input_stream.GetSuffix(jjimageLen));
+         if (image == null)
+              image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen)));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen));
          jjimageLen = 0;
         if (! inComment)
         {
@@ -5552,7 +5574,10 @@
         }
          break;
       case 17 :
-         image.append(input_stream.GetSuffix(jjimageLen));
+         if (image == null)
+              image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen)));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen));
          jjimageLen = 0;
        if (!inComment)
        {
@@ -5562,7 +5587,10 @@
        }
          break;
       case 18 :
-         image.append(input_stream.GetSuffix(jjimageLen));
+         if (image == null)
+              image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen)));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen));
          jjimageLen = 0;
         if (!inComment)
         {
@@ -5573,7 +5601,10 @@
         }
          break;
       case 19 :
-         image.append(input_stream.GetSuffix(jjimageLen));
+         if (image == null)
+              image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen)));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen));
          jjimageLen = 0;
         if (!inComment)
         {
@@ -5583,7 +5614,10 @@
         }
          break;
       case 20 :
-         image.append(input_stream.GetSuffix(jjimageLen));
+         if (image == null)
+              image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen)));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen));
          jjimageLen = 0;
         if (! inComment)
         {
@@ -5609,7 +5643,7 @@
             SwitchTo(PRE_DIRECTIVE);
         }
          break;
-      default :
+      default : 
          break;
    }
 }
@@ -5618,16 +5652,25 @@
    switch(jjmatchedKind)
    {
       case 1 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
      stateStackPush();
      SwitchTo(REFINDEX);
          break;
       case 2 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
      stateStackPop();
          break;
       case 10 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         if (!inComment)
             lparen++;
 
@@ -5640,11 +5683,17 @@
             SwitchTo( REFMOD2 );
          break;
       case 11 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
        RPARENHandler();
          break;
       case 12 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         /*
          * need to simply switch back to REFERENCE, not drop down the stack
          * because we can (infinitely) chain, ala
@@ -5654,7 +5703,10 @@
         SwitchTo( REFERENCE );
          break;
       case 14 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         if (! inComment)
         {
             inDirective = true;
@@ -5685,7 +5737,10 @@
         }
          break;
       case 21 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         if (!inComment)
         {
             if (curLexState == REFERENCE)
@@ -5700,27 +5755,42 @@
         }
          break;
       case 25 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
      inComment = false;
      stateStackPop();
          break;
       case 26 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
     inComment = false;
     stateStackPop();
          break;
       case 27 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
     inComment = false;
     stateStackPop();
          break;
       case 28 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
     inComment = false;
     stateStackPop();
          break;
       case 32 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         /*
          *  - if we are in DIRECTIVE and haven't seen ( yet, then also drop 
out.
          *      don't forget to account for the beloved yet wierd #set
@@ -5731,7 +5801,10 @@
             stateStackPop();
          break;
       case 35 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         if ( debugPrint )
             System.out.println(" NEWLINE :");
 
@@ -5744,30 +5817,48 @@
             inDirective = false;
          break;
       case 51 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         inDirective = false;
         stateStackPop();
          break;
       case 52 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         SwitchTo(DIRECTIVE);
          break;
       case 53 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         SwitchTo(DIRECTIVE);
          break;
       case 54 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         inDirective = false;
         stateStackPop();
          break;
       case 55 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         inDirective = false;
         stateStackPop();
          break;
       case 57 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         /*
          * Remove the double period if it is there
          */
@@ -5788,7 +5879,10 @@
         }
          break;
       case 58 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         /*
          * check to see if we are in set
          *    ex.  #set $foo = $foo + 3
@@ -5801,7 +5895,10 @@
     }
          break;
       case 68 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         /*
          * push the alpha char back into the stream so the following identifier
          * is complete
@@ -5821,38 +5918,14 @@
         SwitchTo(REFMODIFIER);
          break;
       case 70 :
-        image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
+        if (image == null)
+            image = new StrBuilder(new 
String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 
1))));
+         else
+            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = 
jjmatchedPos + 1)));
         stateStackPop();
          break;
-      default :
+      default : 
          break;
    }
 }
-private void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-
-private void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-
 }

Modified: 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java?rev=735657&r1=735656&r2=735657&view=diff
==============================================================================
--- 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java
 (original)
+++ 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java
 Mon Jan 19 02:59:28 2009
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. ParserTreeConstants.java 
Version 4.1 */
+/* Generated By:JJTree: Do not edit this line. 
/Users/bfoster/open/velocity/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java
 */
+
 package org.apache.velocity.runtime.parser;
 
 public interface ParserTreeConstants
@@ -94,4 +95,3 @@
     "NotNode",
   };
 }
-/* JavaCC - OriginalChecksum=6486d1e0227c52f059ed205018b7b6fa (do not edit 
this line) */


Reply via email to