misc changes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / test / PHPParserTokenManager.java
index 6e8d5a0..e8a8a8e 100644 (file)
@@ -11,6 +11,11 @@ import java.text.MessageFormat;
 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
+import net.sourceforge.phpdt.internal.compiler.parser.PHPSegmentWithChildren;
+import net.sourceforge.phpdt.internal.compiler.parser.PHPFunctionDeclaration;
+import net.sourceforge.phpdt.internal.compiler.parser.PHPClassDeclaration;
+import net.sourceforge.phpdt.internal.compiler.parser.PHPVarDeclaration;
+import net.sourceforge.phpdt.internal.compiler.parser.PHPReqIncDeclaration;
 
 public class PHPParserTokenManager implements PHPParserConstants
 {
@@ -1198,7 +1203,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
 {
    int[] nextStates;
    int startsAt = 0;
-   jjnewStateCnt = 56;
+   jjnewStateCnt = 64;
    int i = 1;
    jjstateSet[0] = startState;
    int j, kind = 0x7fffffff;
@@ -1217,9 +1222,9 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   if ((0x3ff000000000000L & l) != 0L)
                      jjCheckNAddStates(2, 8);
                   else if (curChar == 39)
-                     jjCheckNAddStates(9, 12);
+                     jjCheckNAddStates(9, 14);
                   else if (curChar == 34)
-                     jjCheckNAddStates(13, 18);
+                     jjCheckNAddStates(15, 20);
                   else if (curChar == 36)
                      jjstateSet[jjnewStateCnt++] = 16;
                   else if (curChar == 46)
@@ -1236,7 +1241,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   {
                      if (kind > 64)
                         kind = 64;
-                     jjCheckNAddStates(19, 21);
+                     jjCheckNAddStates(21, 23);
                   }
                   break;
                case 0:
@@ -1274,7 +1279,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                      break;
                   if (kind > 68)
                      kind = 68;
-                  jjCheckNAddStates(22, 24);
+                  jjCheckNAddStates(24, 26);
                   break;
                case 10:
                   if ((0x280000000000L & l) != 0L)
@@ -1318,14 +1323,14 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                      break;
                   if (kind > 68)
                      kind = 68;
-                  jjCheckNAddStates(25, 27);
+                  jjCheckNAddStates(27, 29);
                   break;
                case 21:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 68)
                      kind = 68;
-                  jjCheckNAddStates(25, 27);
+                  jjCheckNAddStates(27, 29);
                   break;
                case 23:
                   if ((0x280000000000L & l) != 0L)
@@ -1355,7 +1360,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 29:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(28, 30);
+                     jjCheckNAddStates(30, 32);
                   break;
                case 31:
                   if ((0x280000000000L & l) != 0L)
@@ -1370,7 +1375,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                      break;
                   if (kind > 64)
                      kind = 64;
-                  jjCheckNAddStates(19, 21);
+                  jjCheckNAddStates(21, 23);
                   break;
                case 35:
                   if ((0x3ff000000000000L & l) == 0L)
@@ -1388,15 +1393,15 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 37:
                   if (curChar == 34)
-                     jjCheckNAddStates(13, 18);
+                     jjCheckNAddStates(15, 20);
                   break;
                case 38:
                   if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(31, 33);
+                     jjCheckNAddStates(33, 35);
                   break;
                case 39:
                   if (curChar == 34)
-                     jjCheckNAddStates(31, 33);
+                     jjCheckNAddStates(33, 35);
                   break;
                case 41:
                   if (curChar == 34 && kind > 70)
@@ -1404,11 +1409,11 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 42:
                   if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(34, 36);
+                     jjCheckNAddStates(36, 38);
                   break;
                case 43:
                   if (curChar == 34)
-                     jjCheckNAddStates(34, 36);
+                     jjCheckNAddStates(36, 38);
                   break;
                case 45:
                   if (curChar == 34 && kind > 71)
@@ -1416,29 +1421,37 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 46:
                   if (curChar == 39)
-                     jjCheckNAddStates(9, 12);
+                     jjCheckNAddStates(9, 14);
                   break;
                case 47:
                   if ((0xffffff7fffffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(47, 48);
+                     jjCheckNAddStates(39, 41);
                   break;
                case 48:
+                  if (curChar == 39)
+                     jjCheckNAddStates(39, 41);
+                  break;
+               case 50:
                   if (curChar == 39 && kind > 70)
                      kind = 70;
                   break;
-               case 49:
+               case 51:
                   if ((0xffffff7fffffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(49, 50);
+                     jjCheckNAddStates(42, 44);
                   break;
-               case 50:
+               case 52:
+                  if (curChar == 39)
+                     jjCheckNAddStates(42, 44);
+                  break;
+               case 54:
                   if (curChar == 39 && kind > 72)
                      kind = 72;
                   break;
-               case 52:
-                  jjAddStates(37, 38);
+               case 56:
+                  jjAddStates(45, 47);
                   break;
-               case 54:
-                  jjAddStates(39, 40);
+               case 60:
+                  jjAddStates(48, 50);
                   break;
                default : break;
             }
@@ -1459,7 +1472,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                      jjCheckNAdd(14);
                   }
                   else if (curChar == 96)
-                     jjCheckNAddStates(41, 44);
+                     jjCheckNAddStates(51, 56);
                   break;
                case 1:
                   if (kind > 10)
@@ -1471,7 +1484,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 9:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(45, 46);
+                     jjAddStates(57, 58);
                   break;
                case 12:
                   if ((0x5000000050L & l) != 0L && kind > 68)
@@ -1495,15 +1508,15 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 22:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(47, 48);
+                     jjAddStates(59, 60);
                   break;
                case 26:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(49, 50);
+                     jjAddStates(61, 62);
                   break;
                case 30:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(51, 52);
+                     jjAddStates(63, 64);
                   break;
                case 34:
                   if ((0x100000001000000L & l) != 0L)
@@ -1517,42 +1530,66 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   jjCheckNAddTwoStates(35, 6);
                   break;
                case 38:
-                  jjAddStates(31, 33);
+                  jjAddStates(33, 35);
                   break;
                case 40:
                   if (curChar == 92)
                      jjstateSet[jjnewStateCnt++] = 39;
                   break;
                case 42:
-                  jjAddStates(34, 36);
+                  jjAddStates(36, 38);
                   break;
                case 44:
                   if (curChar == 92)
                      jjstateSet[jjnewStateCnt++] = 43;
                   break;
                case 47:
-                  jjAddStates(53, 54);
+                  jjAddStates(39, 41);
                   break;
                case 49:
-                  jjAddStates(55, 56);
+                  if (curChar == 92)
+                     jjstateSet[jjnewStateCnt++] = 48;
                   break;
                case 51:
+                  jjAddStates(42, 44);
+                  break;
+               case 53:
+                  if (curChar == 92)
+                     jjstateSet[jjnewStateCnt++] = 52;
+                  break;
+               case 55:
                   if (curChar == 96)
-                     jjCheckNAddStates(41, 44);
+                     jjCheckNAddStates(51, 56);
                   break;
-               case 52:
+               case 56:
                   if ((0xfffffffeffffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(52, 53);
+                     jjCheckNAddStates(45, 47);
                   break;
-               case 53:
+               case 57:
+                  if (curChar == 96)
+                     jjCheckNAddStates(45, 47);
+                  break;
+               case 58:
+                  if (curChar == 92)
+                     jjstateSet[jjnewStateCnt++] = 57;
+                  break;
+               case 59:
                   if (curChar == 96 && kind > 70)
                      kind = 70;
                   break;
-               case 54:
+               case 60:
                   if ((0xfffffffeffffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(54, 55);
+                     jjCheckNAddStates(48, 50);
                   break;
-               case 55:
+               case 61:
+                  if (curChar == 96)
+                     jjCheckNAddStates(48, 50);
+                  break;
+               case 62:
+                  if (curChar == 92)
+                     jjstateSet[jjnewStateCnt++] = 61;
+                  break;
+               case 63:
                   if (curChar == 96 && kind > 73)
                      kind = 73;
                   break;
@@ -1574,27 +1611,27 @@ static private final int jjMoveNfa_1(int startState, int curPos)
                   break;
                case 38:
                   if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(31, 33);
+                     jjAddStates(33, 35);
                   break;
                case 42:
                   if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(34, 36);
+                     jjAddStates(36, 38);
                   break;
                case 47:
                   if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(53, 54);
+                     jjAddStates(39, 41);
                   break;
-               case 49:
+               case 51:
                   if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(55, 56);
+                     jjAddStates(42, 44);
                   break;
-               case 52:
+               case 56:
                   if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(37, 38);
+                     jjAddStates(45, 47);
                   break;
-               case 54:
+               case 60:
                   if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(39, 40);
+                     jjAddStates(48, 50);
                   break;
                default : break;
             }
@@ -1607,7 +1644,7 @@ static private final int jjMoveNfa_1(int startState, int curPos)
          kind = 0x7fffffff;
       }
       ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 56 - (jjnewStateCnt = startsAt)))
+      if ((i = jjnewStateCnt) == (startsAt = 64 - (jjnewStateCnt = startsAt)))
          return curPos;
       try { curChar = input_stream.readChar(); }
       catch(java.io.IOException e) { return curPos; }
@@ -1641,10 +1678,11 @@ static private final int jjMoveStringLiteralDfa1_3(long active0)
    return 2;
 }
 static final int[] jjnextStates = {
-   4, 5, 19, 20, 25, 26, 29, 30, 12, 47, 48, 49, 50, 38, 40, 41, 
-   42, 44, 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30, 12, 38, 
-   40, 41, 42, 44, 45, 52, 53, 54, 55, 52, 53, 54, 55, 10, 11, 23, 
-   24, 27, 28, 31, 32, 47, 48, 49, 50, 
+   4, 5, 19, 20, 25, 26, 29, 30, 12, 47, 49, 50, 51, 53, 54, 38, 
+   40, 41, 42, 44, 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30, 
+   12, 38, 40, 41, 42, 44, 45, 47, 49, 50, 51, 53, 54, 56, 58, 59, 
+   60, 62, 63, 56, 58, 59, 60, 62, 63, 10, 11, 23, 24, 27, 28, 31, 
+   32, 
 };
 public static final String[] jjstrLiteralImages = {
 "", null, "\77\76", null, null, null, null, null, null, null, null, null, null, 
@@ -1686,9 +1724,9 @@ static final long[] jjtoSpecial = {
 static final long[] jjtoMore = {
    0x8e00L, 0x0L, 0x0L, 
 };
-static private SimpleCharStream input_stream;
-static private final int[] jjrounds = new int[56];
-static private final int[] jjstateSet = new int[112];
+static protected SimpleCharStream input_stream;
+static private final int[] jjrounds = new int[64];
+static private final int[] jjstateSet = new int[128];
 static StringBuffer image;
 static int jjimageLen;
 static int lengthOfMatch;
@@ -1715,7 +1753,7 @@ static private final void ReInitRounds()
 {
    int i;
    jjround = 0x80000001;
-   for (i = 56; i-- > 0;)
+   for (i = 64; i-- > 0;)
       jjrounds[i] = 0x80000000;
 }
 static public void ReInit(SimpleCharStream stream, int lexState)
@@ -1731,7 +1769,7 @@ static public void SwitchTo(int lexState)
       curLexState = lexState;
 }
 
-static private final Token jjFillToken()
+static protected Token jjFillToken()
 {
    Token t = Token.newToken(jjmatchedKind);
    t.kind = jjmatchedKind;
@@ -1751,7 +1789,7 @@ static int jjround;
 static int jjmatchedPos;
 static int jjmatchedKind;
 
-public static final Token getNextToken() 
+public static Token getNextToken() 
 {
   int kind;
   Token specialToken = null;
@@ -1893,7 +1931,7 @@ public static final Token getNextToken()
   }
 }
 
-static final void SkipLexicalActions(Token matchedToken)
+static void SkipLexicalActions(Token matchedToken)
 {
    switch(jjmatchedKind)
    {
@@ -1901,7 +1939,7 @@ static final void SkipLexicalActions(Token matchedToken)
          break;
    }
 }
-static final void MoreLexicalActions()
+static void MoreLexicalActions()
 {
    jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
    switch(jjmatchedKind)