velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r927161 - in /velocity/engine/trunk/src: java/org/apache/velocity/runtime/parser/ParserTokenManager.java parser/Parser.jjt test/org/apache/velocity/test/issues/Velocity729TestCase.java
Date Wed, 24 Mar 2010 19:32:57 GMT
Author: nbubna
Date: Wed Mar 24 19:32:57 2010
New Revision: 927161

URL: http://svn.apache.org/viewvc?rev=927161&view=rev
Log:
VELOCITY-729, VELOCITY-754 fix $.x problems (thanks to Jarkko Viinamaki who should really
be committing his own patches :)

Added:
    velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
  (with props)
Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
    velocity/engine/trunk/src/parser/Parser.jjt

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=927161&r1=927160&r2=927161&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
Wed Mar 24 19:32:57 2010
@@ -2029,15 +2029,15 @@ private final int jjStopStringLiteralDfa
    {
       case 0:
          if ((active0 & 0xc00000L) != 0L)
-            return 19;
+            return 20;
          if ((active0 & 0x3a0000L) != 0L)
-            return 38;
+            return 39;
          return -1;
       case 1:
          if ((active0 & 0x400000L) != 0L)
-            return 39;
+            return 40;
          if ((active0 & 0x80000L) != 0L)
-            return 36;
+            return 37;
          return -1;
       default :
          return -1;
@@ -2076,13 +2076,13 @@ private int jjMoveStringLiteralDfa1_5(lo
          break;
       case 42:
          if ((active0 & 0x80000L) != 0L)
-            return jjStartNfaWithStates_5(1, 19, 36);
+            return jjStartNfaWithStates_5(1, 19, 37);
          break;
       case 91:
          return jjMoveStringLiteralDfa2_5(active0, 0x20000L);
       case 92:
          if ((active0 & 0x400000L) != 0L)
-            return jjStartNfaWithStates_5(1, 22, 39);
+            return jjStartNfaWithStates_5(1, 22, 40);
          break;
       default :
          break;
@@ -2120,7 +2120,7 @@ private int jjStartNfaWithStates_5(int p
 private int jjMoveNfa_5(int startState, int curPos)
 {
    int startsAt = 0;
-   jjnewStateCnt = 39;
+   jjnewStateCnt = 40;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = 0x7fffffff;
@@ -2135,24 +2135,13 @@ private int jjMoveNfa_5(int startState, 
          {
             switch(jjstateSet[--i])
             {
-               case 19:
-                  if (curChar == 36)
-                     jjCheckNAddTwoStates(32, 33);
-                  else if (curChar == 35)
-                     jjAddStates(98, 99);
-                  if (curChar == 36)
-                  {
-                     if (kind > 15)
-                        kind = 15;
-                  }
-                  break;
-               case 38:
+               case 39:
                   if (curChar == 42)
-                     jjstateSet[jjnewStateCnt++] = 36;
+                     jjstateSet[jjnewStateCnt++] = 37;
                   break;
-               case 39:
+               case 40:
                   if (curChar == 36)
-                     jjCheckNAddTwoStates(32, 33);
+                     jjCheckNAddTwoStates(33, 34);
                   if (curChar == 36)
                   {
                      if (kind > 15)
@@ -2167,17 +2156,28 @@ private int jjMoveNfa_5(int startState, 
                      jjCheckNAdd(12);
                   }
                   else if (curChar == 35)
-                     jjCheckNAddStates(100, 102);
+                     jjCheckNAddStates(98, 100);
                   else if (curChar == 36)
                   {
                      if (kind > 15)
                         kind = 15;
-                     jjCheckNAddTwoStates(32, 33);
+                     jjCheckNAddTwoStates(33, 34);
                   }
                   if ((0x100000200L & l) != 0L)
                      jjCheckNAddTwoStates(0, 1);
                   else if (curChar == 36)
-                     jjCheckNAddStates(103, 105);
+                     jjCheckNAddStates(101, 104);
+                  break;
+               case 20:
+                  if (curChar == 36)
+                     jjCheckNAddTwoStates(33, 34);
+                  else if (curChar == 35)
+                     jjAddStates(105, 106);
+                  if (curChar == 36)
+                  {
+                     if (kind > 15)
+                        kind = 15;
+                  }
                   break;
                case 0:
                   if ((0x100000200L & l) != 0L)
@@ -2189,7 +2189,7 @@ private int jjMoveNfa_5(int startState, 
                   break;
                case 3:
                   if (curChar == 32)
-                     jjAddStates(106, 107);
+                     jjAddStates(107, 108);
                   break;
                case 4:
                   if (curChar == 40 && kind > 14)
@@ -2207,49 +2207,53 @@ private int jjMoveNfa_5(int startState, 
                   if (curChar == 33)
                      jjCheckNAdd(14);
                   break;
-               case 20:
+               case 18:
+                  if (curChar == 46 && kind > 72)
+                     kind = 72;
+                  break;
+               case 21:
                   if (curChar == 35)
-                     jjAddStates(98, 99);
+                     jjAddStates(105, 106);
                   break;
-               case 22:
+               case 23:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 13)
                      kind = 13;
-                  jjstateSet[jjnewStateCnt++] = 22;
+                  jjstateSet[jjnewStateCnt++] = 23;
                   break;
-               case 25:
+               case 26:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjAddStates(108, 109);
+                     jjAddStates(109, 110);
                   break;
-               case 29:
+               case 30:
                   if (curChar == 36 && kind > 15)
                      kind = 15;
                   break;
-               case 31:
+               case 32:
                   if (curChar == 36)
-                     jjCheckNAddTwoStates(32, 33);
+                     jjCheckNAddTwoStates(33, 34);
                   break;
-               case 33:
+               case 34:
                   if (curChar == 33 && kind > 16)
                      kind = 16;
                   break;
-               case 34:
+               case 35:
                   if (curChar != 36)
                      break;
                   if (kind > 15)
                      kind = 15;
-                  jjCheckNAddTwoStates(32, 33);
+                  jjCheckNAddTwoStates(33, 34);
                   break;
-               case 35:
+               case 36:
                   if (curChar == 35)
-                     jjCheckNAddStates(100, 102);
+                     jjCheckNAddStates(98, 100);
                   break;
-               case 36:
+               case 37:
                   if (curChar == 42)
-                     jjstateSet[jjnewStateCnt++] = 37;
+                     jjstateSet[jjnewStateCnt++] = 38;
                   break;
-               case 37:
+               case 38:
                   if ((0xfffffff7ffffffffL & l) != 0L && kind > 18)
                      kind = 18;
                   break;
@@ -2264,27 +2268,19 @@ private int jjMoveNfa_5(int startState, 
          {
             switch(jjstateSet[--i])
             {
-               case 19:
-                  if (curChar == 92)
-                     jjCheckNAddTwoStates(30, 31);
-                  if (curChar == 92)
-                     jjCheckNAddTwoStates(28, 29);
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 18;
-                  break;
-               case 38:
+               case 39:
                   if (curChar == 123)
                      jjstateSet[jjnewStateCnt++] = 10;
                   else if (curChar == 115)
                      jjstateSet[jjnewStateCnt++] = 5;
                   break;
-               case 39:
+               case 40:
                   if (curChar == 92)
-                     jjAddStates(110, 111);
+                     jjAddStates(111, 112);
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(30, 31);
+                     jjCheckNAddTwoStates(31, 32);
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(28, 29);
+                     jjCheckNAddTwoStates(29, 30);
                   break;
                case 13:
                   if ((0xffffffffefffffffL & l) != 0L)
@@ -2294,9 +2290,17 @@ private int jjMoveNfa_5(int startState, 
                      jjCheckNAdd(12);
                   }
                   else if (curChar == 92)
-                     jjCheckNAddStates(112, 115);
+                     jjCheckNAddStates(113, 116);
+                  if (curChar == 92)
+                     jjAddStates(111, 112);
+                  break;
+               case 20:
+                  if (curChar == 92)
+                     jjCheckNAddTwoStates(31, 32);
                   if (curChar == 92)
-                     jjAddStates(110, 111);
+                     jjCheckNAddTwoStates(29, 30);
+                  if (curChar == 92)
+                     jjstateSet[jjnewStateCnt++] = 19;
                   break;
                case 2:
                   if (curChar == 116)
@@ -2345,51 +2349,51 @@ private int jjMoveNfa_5(int startState, 
                   if (curChar == 92)
                      jjstateSet[jjnewStateCnt++] = 16;
                   break;
-               case 18:
+               case 19:
                   if (curChar == 92)
-                     jjAddStates(110, 111);
+                     jjAddStates(111, 112);
                   break;
-               case 21:
                case 22:
+               case 23:
                   if ((0x7fffffe87ffffffL & l) == 0L)
                      break;
                   if (kind > 13)
                      kind = 13;
-                  jjCheckNAdd(22);
+                  jjCheckNAdd(23);
                   break;
-               case 23:
+               case 24:
                   if (curChar == 123)
-                     jjstateSet[jjnewStateCnt++] = 24;
+                     jjstateSet[jjnewStateCnt++] = 25;
                   break;
-               case 24:
+               case 25:
                   if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(25, 26);
+                     jjCheckNAddTwoStates(26, 27);
                   break;
-               case 25:
+               case 26:
                   if ((0x7fffffe87ffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(25, 26);
+                     jjCheckNAddTwoStates(26, 27);
                   break;
-               case 26:
+               case 27:
                   if (curChar == 125 && kind > 13)
                      kind = 13;
                   break;
-               case 27:
+               case 28:
                   if (curChar == 92)
-                     jjCheckNAddStates(112, 115);
+                     jjCheckNAddStates(113, 116);
                   break;
-               case 28:
+               case 29:
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(28, 29);
+                     jjCheckNAddTwoStates(29, 30);
                   break;
-               case 30:
+               case 31:
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(30, 31);
+                     jjCheckNAddTwoStates(31, 32);
                   break;
-               case 32:
+               case 33:
                   if (curChar == 92)
-                     jjAddStates(116, 117);
+                     jjAddStates(117, 118);
                   break;
-               case 37:
+               case 38:
                   if (kind > 18)
                      kind = 18;
                   break;
@@ -2416,7 +2420,7 @@ private int jjMoveNfa_5(int startState, 
                      kind = 24;
                   jjCheckNAdd(12);
                   break;
-               case 37:
+               case 38:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 18)
                      kind = 18;
                   break;
@@ -2431,7 +2435,7 @@ private int jjMoveNfa_5(int startState, 
          kind = 0x7fffffff;
       }
       ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 39 - (jjnewStateCnt = startsAt)))
+      if ((i = jjnewStateCnt) == (startsAt = 40 - (jjnewStateCnt = startsAt)))
          return curPos;
       try { curChar = input_stream.readChar(); }
       catch(java.io.IOException e) { return curPos; }
@@ -2806,7 +2810,7 @@ private int jjMoveNfa_2(int startState, 
                   {
                      if (kind > 56)
                         kind = 56;
-                     jjCheckNAddStates(118, 123);
+                     jjCheckNAddStates(119, 124);
                   }
                   else if ((0x100002600L & l) != 0L)
                   {
@@ -2815,7 +2819,7 @@ private int jjMoveNfa_2(int startState, 
                      jjCheckNAdd(4);
                   }
                   else if (curChar == 45)
-                     jjCheckNAddStates(124, 127);
+                     jjCheckNAddStates(125, 128);
                   else if (curChar == 36)
                   {
                      if (kind > 15)
@@ -2825,9 +2829,9 @@ private int jjMoveNfa_2(int startState, 
                   else if (curChar == 46)
                      jjCheckNAdd(28);
                   else if (curChar == 39)
-                     jjCheckNAddStates(128, 130);
+                     jjCheckNAddStates(129, 131);
                   else if (curChar == 34)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   else if (curChar == 35)
                      jjstateSet[jjnewStateCnt++] = 2;
                   break;
@@ -2852,11 +2856,11 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 5:
                   if (curChar == 34)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 6:
                   if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 7:
                   if (curChar == 34 && kind > 32)
@@ -2864,15 +2868,15 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 9:
                   if ((0x8400000000L & l) != 0L)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 10:
                   if ((0xff000000000000L & l) != 0L)
-                     jjCheckNAddStates(134, 137);
+                     jjCheckNAddStates(135, 138);
                   break;
                case 11:
                   if ((0xff000000000000L & l) != 0L)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 12:
                   if ((0xf000000000000L & l) != 0L)
@@ -2896,23 +2900,23 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 18:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 19:
                   if (curChar == 32)
-                     jjAddStates(110, 111);
+                     jjAddStates(139, 140);
                   break;
                case 20:
                   if (curChar == 10)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 21:
                   if (curChar == 39)
-                     jjCheckNAddStates(128, 130);
+                     jjCheckNAddStates(129, 131);
                   break;
                case 22:
                   if ((0xffffff7fffffffffL & l) != 0L)
-                     jjCheckNAddStates(128, 130);
+                     jjCheckNAddStates(129, 131);
                   break;
                case 24:
                   if (curChar == 32)
@@ -2920,7 +2924,7 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 25:
                   if (curChar == 10)
-                     jjCheckNAddStates(128, 130);
+                     jjCheckNAddStates(129, 131);
                   break;
                case 26:
                   if (curChar == 39 && kind > 32)
@@ -2969,7 +2973,7 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 40:
                   if (curChar == 45)
-                     jjCheckNAddStates(124, 127);
+                     jjCheckNAddStates(125, 128);
                   break;
                case 41:
                   if ((0x3ff000000000000L & l) == 0L)
@@ -3035,7 +3039,7 @@ private int jjMoveNfa_2(int startState, 
                      break;
                   if (kind > 56)
                      kind = 56;
-                  jjCheckNAddStates(118, 123);
+                  jjCheckNAddStates(119, 124);
                   break;
                default : break;
             }
@@ -3050,22 +3054,22 @@ private int jjMoveNfa_2(int startState, 
             {
                case 3:
                   if (curChar == 92)
-                     jjCheckNAddStates(138, 141);
+                     jjCheckNAddStates(141, 144);
                   break;
                case 1:
                   if (kind > 18)
                      kind = 18;
                   break;
                case 6:
-                  jjCheckNAddStates(131, 133);
+                  jjCheckNAddStates(132, 134);
                   break;
                case 8:
                   if (curChar == 92)
-                     jjAddStates(142, 147);
+                     jjAddStates(145, 150);
                   break;
                case 9:
                   if ((0x14404410000000L & l) != 0L)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 14:
                   if (curChar == 117)
@@ -3085,10 +3089,10 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 18:
                   if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddStates(131, 133);
+                     jjCheckNAddStates(132, 134);
                   break;
                case 22:
-                  jjAddStates(128, 130);
+                  jjAddStates(129, 131);
                   break;
                case 23:
                   if (curChar == 92)
@@ -3096,7 +3100,7 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 29:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(148, 149);
+                     jjAddStates(151, 152);
                   break;
                case 33:
                   if (curChar == 92)
@@ -3108,15 +3112,15 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 37:
                   if (curChar == 92)
-                     jjAddStates(150, 151);
+                     jjAddStates(153, 154);
                   break;
                case 47:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(152, 153);
+                     jjAddStates(155, 156);
                   break;
                case 51:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(154, 155);
+                     jjAddStates(157, 158);
                   break;
                default : break;
             }
@@ -3139,11 +3143,11 @@ private int jjMoveNfa_2(int startState, 
                   break;
                case 6:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(131, 133);
+                     jjAddStates(132, 134);
                   break;
                case 22:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(128, 130);
+                     jjAddStates(129, 131);
                   break;
                default : break;
             }
@@ -3332,7 +3336,7 @@ private int jjMoveNfa_10(int startState,
             {
                case 3:
                   if (curChar == 92)
-                     jjCheckNAddStates(156, 159);
+                     jjCheckNAddStates(159, 162);
                   break;
                case 1:
                   if (kind > 18)
@@ -3348,7 +3352,7 @@ private int jjMoveNfa_10(int startState,
                   break;
                case 12:
                   if (curChar == 92)
-                     jjAddStates(160, 161);
+                     jjAddStates(163, 164);
                   break;
                default : break;
             }
@@ -3392,7 +3396,7 @@ private final int jjStopStringLiteralDfa
    {
       case 0:
          if ((active0 & 0x3a0000L) != 0L)
-            return 32;
+            return 33;
          if ((active0 & 0x600000000L) != 0L)
          {
             jjmatchedKind = 66;
@@ -3407,7 +3411,7 @@ private final int jjStopStringLiteralDfa
             return 13;
          }
          if ((active0 & 0x80000L) != 0L)
-            return 30;
+            return 31;
          return -1;
       case 2:
          if ((active0 & 0x600000000L) != 0L)
@@ -3471,7 +3475,7 @@ private int jjMoveStringLiteralDfa1_0(lo
          break;
       case 42:
          if ((active0 & 0x80000L) != 0L)
-            return jjStartNfaWithStates_0(1, 19, 30);
+            return jjStartNfaWithStates_0(1, 19, 31);
          break;
       case 91:
          return jjMoveStringLiteralDfa2_0(active0, 0x20000L);
@@ -3561,7 +3565,7 @@ private int jjStartNfaWithStates_0(int p
 private int jjMoveNfa_0(int startState, int curPos)
 {
    int startsAt = 0;
-   jjnewStateCnt = 33;
+   jjnewStateCnt = 34;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = 0x7fffffff;
@@ -3580,21 +3584,21 @@ private int jjMoveNfa_0(int startState, 
                   if ((0x100000200L & l) != 0L)
                      jjCheckNAddTwoStates(0, 1);
                   else if (curChar == 35)
-                     jjCheckNAddStates(162, 164);
+                     jjCheckNAddStates(165, 167);
                   else if (curChar == 36)
                   {
                      if (kind > 15)
                         kind = 15;
-                     jjCheckNAddTwoStates(26, 27);
+                     jjCheckNAddTwoStates(27, 28);
                   }
                   else if (curChar == 46)
                      jjstateSet[jjnewStateCnt++] = 15;
                   if (curChar == 36)
-                     jjCheckNAddStates(165, 167);
+                     jjCheckNAddStates(168, 171);
                   break;
-               case 32:
+               case 33:
                   if (curChar == 42)
-                     jjstateSet[jjnewStateCnt++] = 30;
+                     jjstateSet[jjnewStateCnt++] = 31;
                   break;
                case 0:
                   if ((0x100000200L & l) != 0L)
@@ -3606,7 +3610,7 @@ private int jjMoveNfa_0(int startState, 
                   break;
                case 3:
                   if (curChar == 32)
-                     jjAddStates(106, 107);
+                     jjAddStates(107, 108);
                   break;
                case 4:
                   if (curChar == 40 && kind > 14)
@@ -3625,41 +3629,45 @@ private int jjMoveNfa_0(int startState, 
                   break;
                case 16:
                   if (curChar == 36)
-                     jjCheckNAddStates(165, 167);
+                     jjCheckNAddStates(168, 171);
                   break;
                case 18:
                case 19:
                   if (curChar == 33)
                      jjCheckNAdd(17);
                   break;
-               case 23:
+               case 21:
+                  if (curChar == 46 && kind > 72)
+                     kind = 72;
+                  break;
+               case 24:
                   if (curChar == 36 && kind > 15)
                      kind = 15;
                   break;
-               case 25:
+               case 26:
                   if (curChar == 36)
-                     jjCheckNAddTwoStates(26, 27);
+                     jjCheckNAddTwoStates(27, 28);
                   break;
-               case 27:
+               case 28:
                   if (curChar == 33 && kind > 16)
                      kind = 16;
                   break;
-               case 28:
+               case 29:
                   if (curChar != 36)
                      break;
                   if (kind > 15)
                      kind = 15;
-                  jjCheckNAddTwoStates(26, 27);
+                  jjCheckNAddTwoStates(27, 28);
                   break;
-               case 29:
+               case 30:
                   if (curChar == 35)
-                     jjCheckNAddStates(162, 164);
+                     jjCheckNAddStates(165, 167);
                   break;
-               case 30:
+               case 31:
                   if (curChar == 42)
-                     jjstateSet[jjnewStateCnt++] = 31;
+                     jjstateSet[jjnewStateCnt++] = 32;
                   break;
-               case 31:
+               case 32:
                   if ((0xfffffff7ffffffffL & l) != 0L && kind > 18)
                      kind = 18;
                   break;
@@ -3682,9 +3690,9 @@ private int jjMoveNfa_0(int startState, 
                      jjCheckNAdd(13);
                   }
                   else if (curChar == 92)
-                     jjCheckNAddStates(168, 171);
+                     jjCheckNAddStates(172, 175);
                   break;
-               case 32:
+               case 33:
                   if (curChar == 123)
                      jjstateSet[jjnewStateCnt++] = 10;
                   else if (curChar == 115)
@@ -3741,23 +3749,23 @@ private int jjMoveNfa_0(int startState, 
                   if (curChar == 92)
                      jjstateSet[jjnewStateCnt++] = 19;
                   break;
-               case 21:
+               case 22:
                   if (curChar == 92)
-                     jjCheckNAddStates(168, 171);
+                     jjCheckNAddStates(172, 175);
                   break;
-               case 22:
+               case 23:
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(22, 23);
+                     jjCheckNAddTwoStates(23, 24);
                   break;
-               case 24:
+               case 25:
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(24, 25);
+                     jjCheckNAddTwoStates(25, 26);
                   break;
-               case 26:
+               case 27:
                   if (curChar == 92)
-                     jjAddStates(172, 173);
+                     jjAddStates(176, 177);
                   break;
-               case 31:
+               case 32:
                   if (kind > 18)
                      kind = 18;
                   break;
@@ -3776,7 +3784,7 @@ private int jjMoveNfa_0(int startState, 
          {
             switch(jjstateSet[--i])
             {
-               case 31:
+               case 32:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 18)
                      kind = 18;
                   break;
@@ -3791,7 +3799,7 @@ private int jjMoveNfa_0(int startState, 
          kind = 0x7fffffff;
       }
       ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 33 - (jjnewStateCnt = startsAt)))
+      if ((i = jjnewStateCnt) == (startsAt = 34 - (jjnewStateCnt = startsAt)))
          return curPos;
       try { curChar = input_stream.readChar(); }
       catch(java.io.IOException e) { return curPos; }
@@ -4004,7 +4012,7 @@ private int jjMoveNfa_4(int startState, 
                   {
                      if (kind > 56)
                         kind = 56;
-                     jjCheckNAddStates(174, 179);
+                     jjCheckNAddStates(178, 183);
                   }
                   else if ((0x100002600L & l) != 0L)
                   {
@@ -4015,9 +4023,9 @@ private int jjMoveNfa_4(int startState, 
                   else if (curChar == 46)
                      jjCheckNAddTwoStates(60, 70);
                   else if (curChar == 45)
-                     jjCheckNAddStates(180, 183);
+                     jjCheckNAddStates(184, 187);
                   else if (curChar == 35)
-                     jjCheckNAddStates(184, 186);
+                     jjCheckNAddStates(188, 190);
                   else if (curChar == 36)
                   {
                      if (kind > 15)
@@ -4025,9 +4033,9 @@ private int jjMoveNfa_4(int startState, 
                      jjCheckNAddTwoStates(42, 43);
                   }
                   else if (curChar == 39)
-                     jjCheckNAddStates(187, 189);
+                     jjCheckNAddStates(191, 193);
                   else if (curChar == 34)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   if ((0x100000200L & l) != 0L)
                      jjCheckNAddTwoStates(0, 1);
                   break;
@@ -4053,7 +4061,7 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 3:
                   if (curChar == 32)
-                     jjAddStates(106, 107);
+                     jjAddStates(107, 108);
                   break;
                case 4:
                   if (curChar == 40 && kind > 14)
@@ -4068,7 +4076,7 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 14:
                   if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 15:
                   if (curChar == 34 && kind > 32)
@@ -4076,15 +4084,15 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 17:
                   if ((0x8400000000L & l) != 0L)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 18:
                   if ((0xff000000000000L & l) != 0L)
-                     jjCheckNAddStates(193, 196);
+                     jjCheckNAddStates(197, 200);
                   break;
                case 19:
                   if ((0xff000000000000L & l) != 0L)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 20:
                   if ((0xf000000000000L & l) != 0L)
@@ -4108,31 +4116,31 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 26:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 27:
                   if (curChar == 32)
-                     jjAddStates(197, 198);
+                     jjAddStates(176, 177);
                   break;
                case 28:
                   if (curChar == 10)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 29:
                   if (curChar == 39)
-                     jjCheckNAddStates(187, 189);
+                     jjCheckNAddStates(191, 193);
                   break;
                case 30:
                   if ((0xffffff7fffffffffL & l) != 0L)
-                     jjCheckNAddStates(187, 189);
+                     jjCheckNAddStates(191, 193);
                   break;
                case 32:
                   if (curChar == 32)
-                     jjAddStates(116, 117);
+                     jjAddStates(201, 202);
                   break;
                case 33:
                   if (curChar == 10)
-                     jjCheckNAddStates(187, 189);
+                     jjCheckNAddStates(191, 193);
                   break;
                case 34:
                   if (curChar == 39 && kind > 32)
@@ -4166,7 +4174,7 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 45:
                   if (curChar == 35)
-                     jjCheckNAddStates(184, 186);
+                     jjCheckNAddStates(188, 190);
                   break;
                case 46:
                   if (curChar == 42)
@@ -4178,7 +4186,7 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 49:
                   if (curChar == 45)
-                     jjCheckNAddStates(180, 183);
+                     jjCheckNAddStates(184, 187);
                   break;
                case 50:
                   if ((0x3ff000000000000L & l) == 0L)
@@ -4259,7 +4267,7 @@ private int jjMoveNfa_4(int startState, 
                      break;
                   if (kind > 56)
                      kind = 56;
-                  jjCheckNAddStates(174, 179);
+                  jjCheckNAddStates(178, 183);
                   break;
                case 69:
                   if (curChar == 46)
@@ -4284,7 +4292,7 @@ private int jjMoveNfa_4(int startState, 
                      jjCheckNAdd(36);
                   }
                   else if (curChar == 92)
-                     jjCheckNAddStates(199, 202);
+                     jjCheckNAddStates(203, 206);
                   break;
                case 70:
                   if ((0x7fffffe07fffffeL & l) != 0L && kind > 67)
@@ -4329,15 +4337,15 @@ private int jjMoveNfa_4(int startState, 
                      jjstateSet[jjnewStateCnt++] = 10;
                   break;
                case 14:
-                  jjCheckNAddStates(190, 192);
+                  jjCheckNAddStates(194, 196);
                   break;
                case 16:
                   if (curChar == 92)
-                     jjAddStates(203, 208);
+                     jjAddStates(207, 212);
                   break;
                case 17:
                   if ((0x14404410000000L & l) != 0L)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 22:
                   if (curChar == 117)
@@ -4357,14 +4365,14 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 26:
                   if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddStates(190, 192);
+                     jjCheckNAddStates(194, 196);
                   break;
                case 30:
-                  jjAddStates(187, 189);
+                  jjAddStates(191, 193);
                   break;
                case 31:
                   if (curChar == 92)
-                     jjAddStates(116, 117);
+                     jjAddStates(201, 202);
                   break;
                case 35:
                case 36:
@@ -4376,7 +4384,7 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 37:
                   if (curChar == 92)
-                     jjCheckNAddStates(199, 202);
+                     jjCheckNAddStates(203, 206);
                   break;
                case 38:
                   if (curChar == 92)
@@ -4388,7 +4396,7 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 42:
                   if (curChar == 92)
-                     jjAddStates(209, 210);
+                     jjAddStates(213, 214);
                   break;
                case 47:
                   if (kind > 18)
@@ -4396,11 +4404,11 @@ private int jjMoveNfa_4(int startState, 
                   break;
                case 56:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(211, 212);
+                     jjAddStates(215, 216);
                   break;
                case 61:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(213, 214);
+                     jjAddStates(217, 218);
                   break;
                case 65:
                   if ((0x2000000020L & l) != 0L)
@@ -4423,11 +4431,11 @@ private int jjMoveNfa_4(int startState, 
             {
                case 14:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(190, 192);
+                     jjAddStates(194, 196);
                   break;
                case 30:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(187, 189);
+                     jjAddStates(191, 193);
                   break;
                case 47:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 18)
@@ -4642,7 +4650,7 @@ private int jjMoveNfa_1(int startState, 
                   if ((0x100000200L & l) != 0L)
                      jjCheckNAddTwoStates(0, 1);
                   else if (curChar == 35)
-                     jjCheckNAddStates(215, 217);
+                     jjCheckNAddStates(219, 221);
                   else if (curChar == 36)
                   {
                      if (kind > 15)
@@ -4666,7 +4674,7 @@ private int jjMoveNfa_1(int startState, 
                   break;
                case 3:
                   if (curChar == 32)
-                     jjAddStates(106, 107);
+                     jjAddStates(107, 108);
                   break;
                case 4:
                   if (curChar == 40 && kind > 14)
@@ -4704,7 +4712,7 @@ private int jjMoveNfa_1(int startState, 
                   break;
                case 24:
                   if (curChar == 35)
-                     jjCheckNAddStates(215, 217);
+                     jjCheckNAddStates(219, 221);
                   break;
                case 25:
                   if (curChar == 42)
@@ -4733,7 +4741,7 @@ private int jjMoveNfa_1(int startState, 
                      jjCheckNAdd(13);
                   }
                   else if (curChar == 92)
-                     jjCheckNAddStates(218, 221);
+                     jjCheckNAddStates(222, 225);
                   break;
                case 27:
                   if (curChar == 123)
@@ -4786,7 +4794,7 @@ private int jjMoveNfa_1(int startState, 
                   break;
                case 16:
                   if (curChar == 92)
-                     jjCheckNAddStates(218, 221);
+                     jjCheckNAddStates(222, 225);
                   break;
                case 17:
                   if (curChar == 92)
@@ -4798,7 +4806,7 @@ private int jjMoveNfa_1(int startState, 
                   break;
                case 21:
                   if (curChar == 92)
-                     jjAddStates(222, 223);
+                     jjAddStates(226, 227);
                   break;
                case 26:
                   if (kind > 18)
@@ -5060,14 +5068,15 @@ static final int[] jjnextStates = {
    74, 94, 95, 98, 99, 69, 71, 72, 73, 78, 79, 69, 72, 6, 78, 15, 
    16, 27, 28, 30, 38, 39, 41, 46, 28, 47, 62, 39, 63, 50, 53, 60, 
    67, 18, 19, 20, 21, 31, 36, 43, 9, 10, 22, 23, 76, 77, 5, 6, 
-   7, 8, 21, 23, 6, 11, 38, 14, 15, 17, 3, 4, 25, 26, 19, 20, 
-   28, 29, 30, 31, 32, 33, 41, 43, 44, 45, 50, 51, 41, 44, 27, 50, 
-   22, 23, 26, 6, 7, 8, 6, 11, 7, 8, 33, 34, 35, 36, 9, 10, 
-   12, 14, 19, 20, 30, 31, 37, 38, 48, 49, 52, 53, 8, 9, 10, 11, 
-   12, 13, 6, 11, 32, 17, 18, 20, 22, 23, 24, 25, 26, 27, 50, 52, 
-   53, 54, 64, 65, 50, 53, 59, 64, 6, 11, 48, 30, 31, 34, 14, 15, 
-   16, 14, 19, 15, 16, 27, 28, 38, 39, 40, 41, 17, 18, 20, 22, 27, 
-   28, 42, 43, 57, 58, 62, 63, 6, 11, 27, 17, 18, 19, 20, 21, 22, 
+   7, 8, 6, 11, 39, 14, 15, 17, 18, 22, 24, 3, 4, 26, 27, 20, 
+   21, 29, 30, 31, 32, 33, 34, 41, 43, 44, 45, 50, 51, 41, 44, 27, 
+   50, 22, 23, 26, 6, 7, 8, 6, 11, 7, 8, 19, 20, 33, 34, 35, 
+   36, 9, 10, 12, 14, 19, 20, 30, 31, 37, 38, 48, 49, 52, 53, 8, 
+   9, 10, 11, 12, 13, 6, 11, 33, 17, 18, 20, 21, 23, 24, 25, 26, 
+   27, 28, 50, 52, 53, 54, 64, 65, 50, 53, 59, 64, 6, 11, 48, 30, 
+   31, 34, 14, 15, 16, 14, 19, 15, 16, 32, 33, 38, 39, 40, 41, 17, 
+   18, 20, 22, 27, 28, 42, 43, 57, 58, 62, 63, 6, 11, 27, 17, 18, 
+   19, 20, 21, 22, 
 };
 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
 {

Modified: velocity/engine/trunk/src/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/parser/Parser.jjt?rev=927161&r1=927160&r2=927161&view=diff
==============================================================================
--- velocity/engine/trunk/src/parser/Parser.jjt (original)
+++ velocity/engine/trunk/src/parser/Parser.jjt Wed Mar 24 19:32:57 2010
@@ -1734,7 +1734,7 @@ void False() : {}
 <DEFAULT,REFERENCE>
 TOKEN :
 {
-  <EMPTY_INDEX : ("$[" | "$![" | "$\\![")>
+  <EMPTY_INDEX : ("$[" | "$![" | "$\\![" | "$.")>
 }
 
 

Added: velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java?rev=927161&view=auto
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
(added)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
Wed Mar 24 19:32:57 2010
@@ -0,0 +1,47 @@
+package org.apache.velocity.test.issues;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.    
+ */
+
+import org.apache.velocity.test.BaseTestCase;
+import org.apache.velocity.exception.VelocityException;
+
+/**
+ * This class tests VELOCITY-729.
+ */
+public class Velocity729TestCase extends BaseTestCase
+{
+    public Velocity729TestCase(String name)
+    {
+        super(name);
+        // DEBUG = true;
+    }
+
+    public void testDotRightAfterDollarReference()
+    {
+        String s = "$.x schmoo $jee";
+        context.put("jee", "foo");
+        assertEvalEquals("$.x schmoo foo", s);
+    }
+
+    public void testVelocity754jQueryPost()
+    {
+        assertSchmoo("$.post(\"someUrl\", \"\")"); 
+    }
+}

Propchange: velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
------------------------------------------------------------------------------
    svn:keywords = Revision

Propchange: velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message