// 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;
+ void CommonTokenAction(Token t) {
+ t.sourceStart = input_stream.getBeginOffset();
+ t.sourceEnd = input_stream.getBeginOffset();
}
- 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)
+ public java.io.PrintStream debugStream = System.out;
+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
+private final int jjStopAtPos(int pos, int kind)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
return pos + 1;
}
-static private final int jjMoveStringLiteralDfa0_5()
+private final int jjMoveStringLiteralDfa0_5()
{
switch(curChar)
{
return 1;
}
}
-static private final int jjMoveStringLiteralDfa1_5(long active0)
+private final int jjMoveStringLiteralDfa1_5(long active0)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
}
return 2;
}
-static private final int jjMoveStringLiteralDfa2_5(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_5(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 2;
return 3;
}
}
-static private final int jjMoveStringLiteralDfa3_5(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_5(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 3;
}
return 4;
}
-static private final int jjMoveStringLiteralDfa0_8()
+private final int jjMoveStringLiteralDfa0_8()
{
switch(curChar)
{
return 1;
}
}
-private static final int jjStopStringLiteralDfa_9(int pos, long active0, long active1)
+private final int jjStopStringLiteralDfa_9(int pos, long active0, long active1)
{
switch (pos)
{
return -1;
}
}
-private static final int jjStartNfa_9(int pos, long active0, long active1)
+private final int jjStartNfa_9(int pos, long active0, long active1)
{
return jjMoveNfa_9(jjStopStringLiteralDfa_9(pos, active0, active1), pos + 1);
}
-static private final int jjStartNfaWithStates_9(int pos, int kind, int state)
+private final int jjStartNfaWithStates_9(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_9(state, pos + 1);
}
-static private final int jjMoveStringLiteralDfa0_9()
+private final int jjMoveStringLiteralDfa0_9()
{
switch(curChar)
{
return jjMoveNfa_9(0, 0);
}
}
-static private final void jjCheckNAdd(int state)
+private final void jjCheckNAdd(int state)
{
if (jjrounds[state] != jjround)
{
jjrounds[state] = jjround;
}
}
-static private final void jjAddStates(int start, int end)
+private final void jjAddStates(int start, int end)
{
do {
jjstateSet[jjnewStateCnt++] = jjnextStates[start];
} while (start++ != end);
}
-static private final void jjCheckNAddTwoStates(int state1, int state2)
+private final void jjCheckNAddTwoStates(int state1, int state2)
{
jjCheckNAdd(state1);
jjCheckNAdd(state2);
}
-static private final void jjCheckNAddStates(int start, int end)
+private final void jjCheckNAddStates(int start, int end)
{
do {
jjCheckNAdd(jjnextStates[start]);
} while (start++ != end);
}
-static private final void jjCheckNAddStates(int start)
+private final void jjCheckNAddStates(int start)
{
jjCheckNAdd(jjnextStates[start]);
jjCheckNAdd(jjnextStates[start + 1]);
static final long[] jjbitVec0 = {
0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
-static private final int jjMoveNfa_9(int startState, int curPos)
+private final int jjMoveNfa_9(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
catch(java.io.IOException e) { return curPos; }
}
}
-static private final int jjMoveStringLiteralDfa0_0()
+private final int jjMoveStringLiteralDfa0_0()
{
switch(curChar)
{
return 1;
}
}
-static private final int jjMoveStringLiteralDfa1_0(long active0)
+private final int jjMoveStringLiteralDfa1_0(long active0)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
return 2;
}
}
-static private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 2;
}
return 3;
}
-static private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 3;
}
return 4;
}
-static private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
+private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 4;
}
return 5;
}
-static private final int jjMoveStringLiteralDfa0_4()
+private final int jjMoveStringLiteralDfa0_4()
{
switch(curChar)
{
return 1;
}
}
-static private final int jjMoveStringLiteralDfa1_4(long active0)
+private final int jjMoveStringLiteralDfa1_4(long active0)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
}
return 2;
}
-static private final int jjMoveStringLiteralDfa2_4(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_4(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 2;
return 3;
}
}
-static private final int jjMoveStringLiteralDfa3_4(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_4(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return 3;
}
return 4;
}
-private static final int jjStopStringLiteralDfa_3(int pos, long active0, long active1, long active2)
+private final int jjStopStringLiteralDfa_3(int pos, long active0, long active1, long active2)
{
switch (pos)
{
return -1;
}
}
-private static final int jjStartNfa_3(int pos, long active0, long active1, long active2)
+private final int jjStartNfa_3(int pos, long active0, long active1, long active2)
{
return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0, active1, active2), pos + 1);
}
-static private final int jjStartNfaWithStates_3(int pos, int kind, int state)
+private final int jjStartNfaWithStates_3(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_3(state, pos + 1);
}
-static private final int jjMoveStringLiteralDfa0_3()
+private final int jjMoveStringLiteralDfa0_3()
{
switch(curChar)
{
return jjMoveNfa_3(0, 0);
}
}
-static private final int jjMoveStringLiteralDfa1_3(long active0, long active1, long active2)
+private final int jjMoveStringLiteralDfa1_3(long active0, long active1, long active2)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
}
return jjStartNfa_3(0, active0, active1, active2);
}
-static private final int jjMoveStringLiteralDfa2_3(long old0, long active0, long old1, long active1, long old2, long active2)
+private final int jjMoveStringLiteralDfa2_3(long old0, long active0, long old1, long active1, long old2, long active2)
{
if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L)
return jjStartNfa_3(0, old0, old1, old2);
}
return jjStartNfa_3(1, 0L, active1, active2);
}
-static private final int jjMoveNfa_3(int startState, int curPos)
+private final int jjMoveNfa_3(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
catch(java.io.IOException e) { return curPos; }
}
}
-private static final int jjStopStringLiteralDfa_6(int pos, long active0, long active1)
+private final int jjStopStringLiteralDfa_6(int pos, long active0, long active1)
{
switch (pos)
{
return -1;
}
}
-private static final int jjStartNfa_6(int pos, long active0, long active1)
+private final int jjStartNfa_6(int pos, long active0, long active1)
{
return jjMoveNfa_6(jjStopStringLiteralDfa_6(pos, active0, active1), pos + 1);
}
-static private final int jjStartNfaWithStates_6(int pos, int kind, int state)
+private final int jjStartNfaWithStates_6(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_6(state, pos + 1);
}
-static private final int jjMoveStringLiteralDfa0_6()
+private final int jjMoveStringLiteralDfa0_6()
{
switch(curChar)
{
return jjMoveNfa_6(0, 0);
}
}
-static private final int jjMoveNfa_6(int startState, int curPos)
+private final int jjMoveNfa_6(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
catch(java.io.IOException e) { return curPos; }
}
}
-private static final int jjStopStringLiteralDfa_2(int pos, long active0)
+private final int jjStopStringLiteralDfa_2(int pos, long active0)
{
switch (pos)
{
return -1;
}
}
-private static final int jjStartNfa_2(int pos, long active0)
+private final int jjStartNfa_2(int pos, long active0)
{
return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
}
-static private final int jjStartNfaWithStates_2(int pos, int kind, int state)
+private final int jjStartNfaWithStates_2(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_2(state, pos + 1);
}
-static private final int jjMoveStringLiteralDfa0_2()
+private final int jjMoveStringLiteralDfa0_2()
{
switch(curChar)
{
return jjMoveNfa_2(0, 0);
}
}
-static private final int jjMoveStringLiteralDfa1_2(long active0)
+private final int jjMoveStringLiteralDfa1_2(long active0)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
}
return jjStartNfa_2(0, active0);
}
-static private final int jjMoveStringLiteralDfa2_2(long old0, long active0)
+private final int jjMoveStringLiteralDfa2_2(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_2(0, old0);
}
return jjStartNfa_2(1, active0);
}
-static private final int jjMoveStringLiteralDfa3_2(long old0, long active0)
+private final int jjMoveStringLiteralDfa3_2(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_2(1, old0);
}
return jjStartNfa_2(2, active0);
}
-static private final int jjMoveNfa_2(int startState, int curPos)
+private final int jjMoveNfa_2(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
catch(java.io.IOException e) { return curPos; }
}
}
-private static final int jjStopStringLiteralDfa_1(int pos, long active0, long active1, long active2)
+private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1, long active2)
{
switch (pos)
{
return -1;
}
}
-private static final int jjStartNfa_1(int pos, long active0, long active1, long active2)
+private final int jjStartNfa_1(int pos, long active0, long active1, long active2)
{
return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1, active2), pos + 1);
}
-static private final int jjStartNfaWithStates_1(int pos, int kind, int state)
+private final int jjStartNfaWithStates_1(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_1(state, pos + 1);
}
-static private final int jjMoveStringLiteralDfa0_1()
+private final int jjMoveStringLiteralDfa0_1()
{
switch(curChar)
{
return jjMoveNfa_1(3, 0);
}
}
-static private final int jjMoveStringLiteralDfa1_1(long active0, long active1, long active2)
+private final int jjMoveStringLiteralDfa1_1(long active0, long active1, long active2)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
}
return jjStartNfa_1(0, active0, active1, active2);
}
-static private final int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1, long old2, long active2)
+private final int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1, long old2, long active2)
{
if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L)
return jjStartNfa_1(0, old0, old1, old2);
}
return jjStartNfa_1(1, active0, active1, active2);
}
-static private final int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1, long old2, long active2)
+private final int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1, long old2, long active2)
{
if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L)
return jjStartNfa_1(1, old0, old1, old2);
}
return jjStartNfa_1(2, active0, active1, 0L);
}
-static private final int jjMoveStringLiteralDfa4_1(long old0, long active0, long old1, long active1)
+private final int jjMoveStringLiteralDfa4_1(long old0, long active0, long old1, long active1)
{
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_1(2, old0, old1, 0L);
}
return jjStartNfa_1(3, active0, active1, 0L);
}
-static private final int jjMoveStringLiteralDfa5_1(long old0, long active0, long old1, long active1)
+private final int jjMoveStringLiteralDfa5_1(long old0, long active0, long old1, long active1)
{
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_1(3, old0, old1, 0L);
}
return jjStartNfa_1(4, active0, active1, 0L);
}
-static private final int jjMoveStringLiteralDfa6_1(long old0, long active0, long old1, long active1)
+private final int jjMoveStringLiteralDfa6_1(long old0, long active0, long old1, long active1)
{
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_1(4, old0, old1, 0L);
}
return jjStartNfa_1(5, active0, active1, 0L);
}
-static private final int jjMoveStringLiteralDfa7_1(long old0, long active0, long old1, long active1)
+private final int jjMoveStringLiteralDfa7_1(long old0, long active0, long old1, long active1)
{
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_1(5, old0, old1, 0L);
}
return jjStartNfa_1(6, active0, active1, 0L);
}
-static private final int jjMoveStringLiteralDfa8_1(long old0, long active0, long old1, long active1)
+private final int jjMoveStringLiteralDfa8_1(long old0, long active0, long old1, long active1)
{
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_1(6, old0, old1, 0L);
}
return jjStartNfa_1(7, active0, active1, 0L);
}
-static private final int jjMoveStringLiteralDfa9_1(long old0, long active0, long old1, long active1)
+private final int jjMoveStringLiteralDfa9_1(long old0, long active0, long old1, long active1)
{
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_1(7, old0, old1, 0L);
}
return jjStartNfa_1(8, active0, 0L, 0L);
}
-static private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
+private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_1(8, old0, 0L, 0L);
}
return jjStartNfa_1(9, active0, 0L, 0L);
}
-static private final int jjMoveStringLiteralDfa11_1(long old0, long active0)
+private final int jjMoveStringLiteralDfa11_1(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_1(9, old0, 0L, 0L);
}
return jjStartNfa_1(10, active0, 0L, 0L);
}
-static private final int jjMoveNfa_1(int startState, int curPos)
+private final int jjMoveNfa_1(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
catch(java.io.IOException e) { return curPos; }
}
}
-private static final int jjStopStringLiteralDfa_7(int pos, long active0, long active1)
+private final int jjStopStringLiteralDfa_7(int pos, long active0, long active1)
{
switch (pos)
{
return -1;
}
}
-private static final int jjStartNfa_7(int pos, long active0, long active1)
+private final int jjStartNfa_7(int pos, long active0, long active1)
{
return jjMoveNfa_7(jjStopStringLiteralDfa_7(pos, active0, active1), pos + 1);
}
-static private final int jjStartNfaWithStates_7(int pos, int kind, int state)
+private final int jjStartNfaWithStates_7(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_7(state, pos + 1);
}
-static private final int jjMoveStringLiteralDfa0_7()
+private final int jjMoveStringLiteralDfa0_7()
{
switch(curChar)
{
return jjMoveNfa_7(0, 0);
}
}
-static private final int jjMoveNfa_7(int startState, int curPos)
+private final int jjMoveNfa_7(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
static final long[] jjtoMore = {
0x4000000L, 0x0L, 0x0L,
};
-static protected SimpleCharStream input_stream;
-static private final int[] jjrounds = new int[52];
-static private final int[] jjstateSet = new int[104];
-static StringBuffer image;
-static int jjimageLen;
-static int lengthOfMatch;
-static protected char curChar;
+protected SimpleCharStream input_stream;
+private final int[] jjrounds = new int[52];
+private final int[] jjstateSet = new int[104];
+StringBuffer image;
+int jjimageLen;
+int lengthOfMatch;
+protected char curChar;
public PHPParserTokenManager(SimpleCharStream stream)
{
- if (input_stream != null)
- throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
+ if (SimpleCharStream.staticFlag)
+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
input_stream = stream;
}
public PHPParserTokenManager(SimpleCharStream stream, int lexState)
this(stream);
SwitchTo(lexState);
}
-static public void ReInit(SimpleCharStream stream)
+public void ReInit(SimpleCharStream stream)
{
jjmatchedPos = jjnewStateCnt = 0;
curLexState = defaultLexState;
input_stream = stream;
ReInitRounds();
}
-static private final void ReInitRounds()
+private final void ReInitRounds()
{
int i;
jjround = 0x80000001;
for (i = 52; i-- > 0;)
jjrounds[i] = 0x80000000;
}
-static public void ReInit(SimpleCharStream stream, int lexState)
+public void ReInit(SimpleCharStream stream, int lexState)
{
ReInit(stream);
SwitchTo(lexState);
}
-static public void SwitchTo(int lexState)
+public void SwitchTo(int lexState)
{
if (lexState >= 10 || lexState < 0)
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
curLexState = lexState;
}
-static protected Token jjFillToken()
+protected Token jjFillToken()
{
Token t = Token.newToken(jjmatchedKind);
t.kind = jjmatchedKind;
return t;
}
-static int curLexState = 0;
-static int defaultLexState = 0;
-static int jjnewStateCnt;
-static int jjround;
-static int jjmatchedPos;
-static int jjmatchedKind;
+int curLexState = 0;
+int defaultLexState = 0;
+int jjnewStateCnt;
+int jjround;
+int jjmatchedPos;
+int jjmatchedKind;
-public static Token getNextToken()
+public Token getNextToken()
{
int kind;
Token specialToken = null;
}
}
-static void SkipLexicalActions(Token matchedToken)
+void SkipLexicalActions(Token matchedToken)
{
switch(jjmatchedKind)
{
break;
}
}
-static void TokenLexicalActions(Token matchedToken)
+void TokenLexicalActions(Token matchedToken)
{
switch(jjmatchedKind)
{