velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r928248 - in /velocity/engine/branches/2.0_Exp/src: java/org/apache/velocity/runtime/directive/ java/org/apache/velocity/runtime/parser/ parser/ test/org/apache/velocity/test/issues/
Date Sat, 27 Mar 2010 19:22:25 GMT
Author: nbubna
Date: Sat Mar 27 19:22:25 2010
New Revision: 928248

URL: http://svn.apache.org/viewvc?rev=928248&view=rev
Log:
merge recent fixes VELOCITY-729,VELOCITY-758

Added:
    velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
      - copied unchanged from r928244, velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity729TestCase.java
    velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity758TestCase.java
      - copied unchanged from r928244, velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity758TestCase.java
Modified:
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Parse.java
    velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
    velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Parse.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Parse.java?rev=928248&r1=928247&r2=928248&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Parse.java
(original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Parse.java
Sat Mar 27 19:22:25 2010
@@ -141,40 +141,40 @@ public class Parse extends InputBase
          */
         if ( node.jjtGetNumChildren() == 0 )
         {
-            throw new VelocityException("parameter missing: template name at "
-                 + Log.formatFileString(this));
+            throw new VelocityException("#parse(): argument missing at " +
+                                        Log.formatFileString(this));
         }
 
         /*
          *  does it have a value?  If you have a null reference, then no.
          */
         Object value =  node.jjtGetChild(0).value( context );
-
-        if ( value == null)
+        if (value == null && rsvc.getLog().isDebugEnabled())
         {
-            if (strictRef)
-            {
-                throw new VelocityException("The argument to #parse returned null at "
-                  + Log.formatFileString(this));
-            }
-            
-            rsvc.getLog().error("#parse() null argument");
-            return  false;
+            rsvc.getLog().debug("#parse(): null argument at " +
+                                Log.formatFileString(this));
         }
 
         /*
          *  get the path
          */
-        String sourcearg = value.toString();
+        String sourcearg = value == null ? null : value.toString();
 
         /*
          *  check to see if the argument will be changed by the event cartridge
          */
-
-
         String arg = EventHandlerUtil.includeEvent( rsvc, context, sourcearg, context.getCurrentTemplateName(),
getName());
 
         /*
+         * if strict mode and arg was not fixed by event handler, then complain
+         */
+        if (strictRef && value == null && arg == null)
+        {
+            throw new VelocityException("The argument to #parse returned null at "
+              + Log.formatFileString(this));
+        }
+
+        /*
          *   a null return value from the event cartridge indicates we should not
          *   input a resource.
          */

Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java?rev=928248&r1=928247&r2=928248&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
(original)
+++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
Sat Mar 27 19:22:25 2010
@@ -2041,15 +2041,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;
@@ -2088,13 +2088,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;
@@ -2132,7 +2132,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;
@@ -2147,24 +2147,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)
@@ -2179,17 +2168,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)
@@ -2201,7 +2201,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)
@@ -2219,49 +2219,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;
@@ -2276,27 +2280,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)
@@ -2306,9 +2302,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)
+                     jjCheckNAddTwoStates(29, 30);
                   if (curChar == 92)
-                     jjAddStates(110, 111);
+                     jjstateSet[jjnewStateCnt++] = 19;
                   break;
                case 2:
                   if (curChar == 116)
@@ -2357,57 +2361,57 @@ 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:
                   if ((0x7fffffe87ffffffL & l) == 0L)
                      break;
                   if (kind > 13)
                      kind = 13;
-                  jjCheckNAdd(22);
+                  jjCheckNAdd(23);
                   break;
-               case 22:
+               case 23:
                   if ((0x7fffffe87fffffeL & 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 ((0x7fffffe87ffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(25, 26);
+                     jjCheckNAddTwoStates(26, 27);
                   break;
-               case 25:
+               case 26:
                   if ((0x7fffffe87fffffeL & 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;
@@ -2434,7 +2438,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;
@@ -2449,7 +2453,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; }
@@ -2824,7 +2828,7 @@ private int jjMoveNfa_2(int startState, 
                   {
                      if (kind > 56)
                         kind = 56;
-                     jjCheckNAddStates(118, 123);
+                     jjCheckNAddStates(119, 124);
                   }
                   else if ((0x100002600L & l) != 0L)
                   {
@@ -2833,7 +2837,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)
@@ -2843,9 +2847,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;
@@ -2870,11 +2874,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)
@@ -2882,15 +2886,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)
@@ -2914,23 +2918,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)
@@ -2938,7 +2942,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)
@@ -2987,7 +2991,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)
@@ -3053,7 +3057,7 @@ private int jjMoveNfa_2(int startState, 
                      break;
                   if (kind > 56)
                      kind = 56;
-                  jjCheckNAddStates(118, 123);
+                  jjCheckNAddStates(119, 124);
                   break;
                default : break;
             }
@@ -3068,22 +3072,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)
@@ -3103,10 +3107,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)
@@ -3114,7 +3118,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)
@@ -3126,15 +3130,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;
             }
@@ -3157,11 +3161,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;
             }
@@ -3350,7 +3354,7 @@ private int jjMoveNfa_10(int startState,
             {
                case 3:
                   if (curChar == 92)
-                     jjCheckNAddStates(156, 159);
+                     jjCheckNAddStates(159, 162);
                   break;
                case 1:
                   if (kind > 18)
@@ -3366,7 +3370,7 @@ private int jjMoveNfa_10(int startState,
                   break;
                case 12:
                   if (curChar == 92)
-                     jjAddStates(160, 161);
+                     jjAddStates(163, 164);
                   break;
                default : break;
             }
@@ -3410,7 +3414,7 @@ private final int jjStopStringLiteralDfa
    {
       case 0:
          if ((active0 & 0x3a0000L) != 0L)
-            return 32;
+            return 33;
          if ((active0 & 0x600000000L) != 0L)
          {
             jjmatchedKind = 66;
@@ -3425,7 +3429,7 @@ private final int jjStopStringLiteralDfa
             return 13;
          }
          if ((active0 & 0x80000L) != 0L)
-            return 30;
+            return 31;
          return -1;
       case 2:
          if ((active0 & 0x600000000L) != 0L)
@@ -3489,7 +3493,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);
@@ -3579,7 +3583,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;
@@ -3598,21 +3602,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)
@@ -3624,7 +3628,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)
@@ -3643,41 +3647,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;
@@ -3700,9 +3708,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)
@@ -3759,23 +3767,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;
@@ -3794,7 +3802,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;
@@ -3809,7 +3817,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; }
@@ -4022,7 +4030,7 @@ private int jjMoveNfa_4(int startState, 
                   {
                      if (kind > 56)
                         kind = 56;
-                     jjCheckNAddStates(174, 179);
+                     jjCheckNAddStates(178, 183);
                   }
                   else if ((0x100002600L & l) != 0L)
                   {
@@ -4033,9 +4041,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)
@@ -4043,9 +4051,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;
@@ -4071,7 +4079,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)
@@ -4086,7 +4094,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)
@@ -4094,15 +4102,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)
@@ -4126,31 +4134,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)
@@ -4184,7 +4192,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)
@@ -4196,7 +4204,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)
@@ -4277,7 +4285,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)
@@ -4302,7 +4310,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)
@@ -4347,15 +4355,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)
@@ -4375,14 +4383,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:
@@ -4394,7 +4402,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)
@@ -4406,7 +4414,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)
@@ -4414,11 +4422,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)
@@ -4441,11 +4449,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)
@@ -4660,7 +4668,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)
@@ -4684,7 +4692,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)
@@ -4722,7 +4730,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)
@@ -4751,7 +4759,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)
@@ -4804,7 +4812,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)
@@ -4816,7 +4824,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)
@@ -5078,14 +5086,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/branches/2.0_Exp/src/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt?rev=928248&r1=928247&r2=928248&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt (original)
+++ velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt Sat Mar 27 19:22:25 2010
@@ -1761,7 +1761,7 @@ void False() : {}
 <DEFAULT,REFERENCE>
 TOKEN :
 {
-  <EMPTY_INDEX : ("$[" | "$![" | "$\\![")>
+  <EMPTY_INDEX : ("$[" | "$![" | "$\\![" | "$.")>
 }
 
 



Mime
View raw message