import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
+import net.sourceforge.phpdt.internal.corext.Assert;
public class PHPParserTokenManager implements PHPParserConstants
{
+ // CommonTokenAction: use the begins/ends fields added to the Jack
+ // CharStream class to set corresponding fields in each Token (which was
+ // also extended with new fields). By default Jack doesn't supply absolute
+ // offsets, just line/column offsets
+ static void CommonTokenAction(Token t) {
+ t.sourceStart = input_stream.beginOffset;
+ t.sourceEnd = input_stream.endOffset;
+ }
public static java.io.PrintStream debugStream = System.out;
public static void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
static private final int jjStopAtPos(int pos, int kind)
switch(curChar)
{
case 63:
- return jjMoveStringLiteralDfa1_2(0x10000L);
+ return jjMoveStringLiteralDfa1_2(0x10L);
case 84:
case 116:
return jjMoveStringLiteralDfa1_2(0x20000L);
switch(curChar)
{
case 62:
- if ((active0 & 0x10000L) != 0L)
- return jjStopAtPos(1, 16);
+ if ((active0 & 0x10L) != 0L)
+ return jjStopAtPos(1, 4);
break;
case 79:
case 111:
jjCheckNAddStates(31, 33);
break;
case 40:
- if (curChar == 34)
- jjCheckNAddStates(31, 33);
+ jjCheckNAddStates(31, 33);
break;
case 41:
if (curChar == 34 && kind > 103)
jjCheckNAddStates(34, 36);
break;
case 44:
- if (curChar == 34)
- jjCheckNAddStates(34, 36);
+ jjCheckNAddStates(34, 36);
break;
case 45:
if (curChar == 34 && kind > 104)
jjCheckNAddStates(37, 39);
break;
case 49:
- if (curChar == 39)
- jjCheckNAddStates(37, 39);
+ jjCheckNAddStates(37, 39);
break;
case 50:
if (curChar == 39 && kind > 103)
jjCheckNAddStates(40, 42);
break;
case 53:
- if (curChar == 39)
- jjCheckNAddStates(40, 42);
+ jjCheckNAddStates(40, 42);
break;
case 54:
if (curChar == 39 && kind > 105)
kind = 105;
break;
case 56:
- jjAddStates(43, 45);
+ case 58:
+ jjCheckNAddStates(43, 45);
break;
case 60:
- jjAddStates(46, 48);
+ case 62:
+ jjCheckNAddStates(46, 48);
break;
default : break;
}
jjstateSet[jjnewStateCnt++] = 40;
break;
case 40:
- if (curChar == 92)
- jjCheckNAddStates(31, 33);
+ jjCheckNAddStates(31, 33);
break;
case 42:
if ((0xffffffffefffffffL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 44;
break;
case 44:
- if (curChar == 92)
- jjCheckNAddStates(34, 36);
+ jjCheckNAddStates(34, 36);
break;
case 47:
if ((0xffffffffefffffffL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 49;
break;
case 49:
- if (curChar == 92)
- jjCheckNAddStates(37, 39);
+ jjCheckNAddStates(37, 39);
break;
case 51:
if ((0xffffffffefffffffL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 53;
break;
case 53:
- if (curChar == 92)
- jjCheckNAddStates(40, 42);
+ jjCheckNAddStates(40, 42);
break;
case 55:
if (curChar == 96)
jjstateSet[jjnewStateCnt++] = 58;
break;
case 58:
- if ((0x110000000L & l) != 0L)
- jjCheckNAddStates(43, 45);
+ jjCheckNAddStates(43, 45);
break;
case 59:
if (curChar == 96 && kind > 103)
jjstateSet[jjnewStateCnt++] = 62;
break;
case 62:
- if ((0x110000000L & l) != 0L)
- jjCheckNAddStates(46, 48);
+ jjCheckNAddStates(46, 48);
break;
case 63:
if (curChar == 96 && kind > 106)
jjCheckNAdd(17);
break;
case 38:
+ case 40:
if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(31, 33);
+ jjCheckNAddStates(31, 33);
break;
case 42:
+ case 44:
if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(34, 36);
+ jjCheckNAddStates(34, 36);
break;
case 47:
+ case 49:
if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(37, 39);
+ jjCheckNAddStates(37, 39);
break;
case 51:
+ case 53:
if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(40, 42);
+ jjCheckNAddStates(40, 42);
break;
case 56:
+ case 58:
if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(43, 45);
+ jjCheckNAddStates(43, 45);
break;
case 60:
+ case 62:
if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(46, 48);
+ jjCheckNAddStates(46, 48);
break;
default : break;
}
"IN_MULTI_LINE_COMMENT",
};
public static final int[] jjnewLexState = {
- -1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, 2, 2, 3, 4, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1,
+ -1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, 2, 2, 3, 4, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
jjmatchedKind = 0;
matchedToken = jjFillToken();
matchedToken.specialToken = specialToken;
+ CommonTokenAction(matchedToken);
return matchedToken;
}
image = null;
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_2();
- if (jjmatchedPos == 0 && jjmatchedKind > 20)
+ if (jjmatchedPos == 0 && jjmatchedKind > 16)
{
- jjmatchedKind = 20;
+ jjmatchedKind = 16;
}
break;
case 3:
TokenLexicalActions(matchedToken);
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
+ CommonTokenAction(matchedToken);
return matchedToken;
}
else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)