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:
"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)
image = new StringBuffer(jjstrLiteralImages[4]);
else
image.append(jjstrLiteralImages[4]);
- PHPParser.htmlStart = SimpleCharStream.getPosition();
+ PHPParser.htmlStart = PHPParser.token.sourceEnd;
break;
default :
break;