org.nuiton.jaxx.compiler.css.parser.CSSParserTokenManager Maven / Gradle / Ivy
The newest version!
/*
* #%L
* JAXX :: Compiler
* %%
* Copyright (C) 2008 - 2024 Code Lutin, Ultreia.io
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
/* Generated By:JJTree&JavaCC: Do not edit this line. CSSParserTokenManager.java */
package org.nuiton.jaxx.compiler.css.parser;
public class CSSParserTokenManager implements CSSParserConstants {
public java.io.PrintStream debugStream = System.out;
public void setDebugStream(java.io.PrintStream ds) {
debugStream = ds;
}
private int jjStopStringLiteralDfa_0(int pos, long active0) {
switch (pos) {
default:
return -1;
}
}
private int jjStartNfa_0(int pos, long active0) {
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
}
private int jjStopAtPos(int pos, int kind) {
jjmatchedKind = kind;
jjmatchedPos = pos;
return pos + 1;
}
private int jjStartNfaWithStates_0(int pos, int kind, int state) {
jjmatchedKind = kind;
jjmatchedPos = pos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return pos + 1;
}
return jjMoveNfa_0(state, pos + 1);
}
private int jjMoveStringLiteralDfa0_0() {
switch (curChar) {
case 35:
return jjStopAtPos(0, 30);
case 42:
return jjStopAtPos(0, 29);
case 44:
return jjStopAtPos(0, 28);
case 46:
return jjStopAtPos(0, 31);
case 58:
return jjStopAtPos(0, 13);
case 59:
return jjStopAtPos(0, 15);
case 61:
return jjStopAtPos(0, 34);
case 91:
return jjStopAtPos(0, 32);
case 93:
return jjStopAtPos(0, 33);
case 123:
return jjStopAtPos(0, 16);
default:
return jjMoveNfa_0(3, 0);
}
}
private void jjCheckNAdd(int state) {
if (jjrounds[state] != jjround) {
jjstateSet[jjnewStateCnt++] = state;
jjrounds[state] = jjround;
}
}
private void jjAddStates(int start, int end) {
do {
jjstateSet[jjnewStateCnt++] = jjnextStates[start];
} while (start++ != end);
}
private void jjCheckNAddTwoStates(int state1, int state2) {
jjCheckNAdd(state1);
jjCheckNAdd(state2);
}
private void jjCheckNAddStates(int start, int end) {
do {
jjCheckNAdd(jjnextStates[start]);
} while (start++ != end);
}
private void jjCheckNAddStates(int start) {
jjCheckNAdd(jjnextStates[start]);
jjCheckNAdd(jjnextStates[start + 1]);
}
static final long[] jjbitVec0 = {
0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
private int jjMoveNfa_0(int startState, int curPos) {
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 17;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (; ; ) {
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64) {
long l = 1L << curChar;
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 3:
if ((0x3ff000000000000L & l) != 0L) {
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(0, 1);
} else if (curChar == 47)
jjAddStates(0, 1);
else if (curChar == 45) {
if (kind > 9)
kind = 9;
jjCheckNAdd(4);
}
break;
case 0:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(0, 1);
break;
case 1:
if (curChar == 46)
jjCheckNAdd(2);
break;
case 2:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAdd(2);
break;
case 4:
if ((0x3ff200000000000L & l) == 0L)
break;
if (kind > 9)
kind = 9;
jjCheckNAdd(4);
break;
case 5:
if (curChar == 47)
jjAddStates(0, 1);
break;
case 6:
if (curChar == 47)
jjCheckNAddStates(2, 4);
break;
case 7:
if ((0xffffffffffffdbffL & l) != 0L)
jjCheckNAddStates(2, 4);
break;
case 8:
if ((0x2400L & l) != 0L && kind > 5)
kind = 5;
break;
case 9:
if (curChar == 10 && kind > 5)
kind = 5;
break;
case 10:
if (curChar == 13)
jjstateSet[jjnewStateCnt++] = 9;
break;
case 11:
if (curChar == 42)
jjCheckNAddTwoStates(12, 13);
break;
case 12:
if ((0xfffffbffffffffffL & l) != 0L)
jjCheckNAddTwoStates(12, 13);
break;
case 13:
if (curChar == 42)
jjAddStates(5, 6);
break;
case 14:
if ((0xffff7fffffffffffL & l) != 0L)
jjCheckNAddTwoStates(15, 13);
break;
case 15:
if ((0xfffffbffffffffffL & l) != 0L)
jjCheckNAddTwoStates(15, 13);
break;
case 16:
if (curChar == 47 && kind > 6)
kind = 6;
break;
default:
break;
}
} while (i != startsAt);
} else if (curChar < 128) {
long l = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 3:
case 4:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 9)
kind = 9;
jjCheckNAdd(4);
break;
case 7:
jjAddStates(2, 4);
break;
case 12:
jjCheckNAddTwoStates(12, 13);
break;
case 14:
case 15:
jjCheckNAddTwoStates(15, 13);
break;
default:
break;
}
} while (i != startsAt);
} else {
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 7:
if ((jjbitVec0[i2] & l2) != 0L)
jjAddStates(2, 4);
break;
case 12:
if ((jjbitVec0[i2] & l2) != 0L)
jjCheckNAddTwoStates(12, 13);
break;
case 14:
case 15:
if ((jjbitVec0[i2] & l2) != 0L)
jjCheckNAddTwoStates(15, 13);
break;
default:
break;
}
} while (i != startsAt);
}
if (kind != 0x7fffffff) {
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 17 - (jjnewStateCnt = startsAt)))
return curPos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return curPos;
}
}
}
private int jjStopStringLiteralDfa_3(int pos, long active0) {
switch (pos) {
default:
return -1;
}
}
private int jjStartNfa_3(int pos, long active0) {
return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
}
private int jjStartNfaWithStates_3(int pos, int kind, int state) {
jjmatchedKind = kind;
jjmatchedPos = pos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return pos + 1;
}
return jjMoveNfa_3(state, pos + 1);
}
private int jjMoveStringLiteralDfa0_3() {
switch (curChar) {
case 59:
return jjStopAtPos(0, 15);
default:
return jjMoveNfa_3(3, 0);
}
}
private int jjMoveNfa_3(int startState, int curPos) {
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 8;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (; ; ) {
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64) {
long l = 1L << curChar;
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 3:
if ((0x3ff000000000000L & l) != 0L) {
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(0, 1);
} else if (curChar == 45) {
if (kind > 12)
kind = 12;
jjCheckNAdd(4);
}
break;
case 0:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(0, 1);
break;
case 1:
if (curChar == 46)
jjCheckNAdd(2);
break;
case 2:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAdd(2);
break;
case 4:
if ((0x3ff200000000000L & l) == 0L)
break;
if (kind > 12)
kind = 12;
jjCheckNAdd(4);
break;
case 6:
jjAddStates(7, 8);
break;
default:
break;
}
} while (i != startsAt);
} else if (curChar < 128) {
long l = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 3:
if ((0x7fffffe87fffffeL & l) != 0L) {
if (kind > 12)
kind = 12;
jjCheckNAdd(4);
} else if (curChar == 123)
jjCheckNAdd(6);
break;
case 4:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 12)
kind = 12;
jjCheckNAdd(4);
break;
case 5:
if (curChar == 123)
jjCheckNAdd(6);
break;
case 6:
if ((0xdfffffffffffffffL & l) != 0L)
jjCheckNAddTwoStates(6, 7);
break;
case 7:
if (curChar == 125)
kind = 21;
break;
default:
break;
}
} while (i != startsAt);
} else {
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 6:
if ((jjbitVec0[i2] & l2) != 0L)
jjAddStates(7, 8);
break;
default:
break;
}
} while (i != startsAt);
}
if (kind != 0x7fffffff) {
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 8 - (jjnewStateCnt = startsAt)))
return curPos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return curPos;
}
}
}
private int jjStopStringLiteralDfa_1(int pos, long active0) {
switch (pos) {
default:
return -1;
}
}
private int jjStartNfa_1(int pos, long active0) {
return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
}
private int jjStartNfaWithStates_1(int pos, int kind, int state) {
jjmatchedKind = kind;
jjmatchedPos = pos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return pos + 1;
}
return jjMoveNfa_1(state, pos + 1);
}
private int jjMoveStringLiteralDfa0_1() {
switch (curChar) {
case 58:
return jjStopAtPos(0, 14);
case 59:
return jjStopAtPos(0, 15);
case 125:
return jjStopAtPos(0, 17);
default:
return jjMoveNfa_1(0, 0);
}
}
private int jjMoveNfa_1(int startState, int curPos) {
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 50;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (; ; ) {
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64) {
long l = 1L << curChar;
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 0:
if ((0x3ff000000000000L & l) != 0L) {
if (kind > 7)
kind = 7;
jjCheckNAddStates(9, 22);
} else if (curChar == 47)
jjAddStates(23, 24);
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 7;
else if (curChar == 34)
jjCheckNAddTwoStates(4, 5);
else if (curChar == 45) {
if (kind > 9)
kind = 9;
jjCheckNAdd(1);
}
break;
case 1:
if ((0x3ff200000000000L & l) == 0L)
break;
if (kind > 9)
kind = 9;
jjCheckNAdd(1);
break;
case 3:
if (curChar == 34)
jjCheckNAddTwoStates(4, 5);
break;
case 4:
if ((0xfffffffbffffdbffL & l) != 0L)
jjCheckNAddTwoStates(4, 5);
break;
case 5:
if (curChar == 34 && kind > 22)
kind = 22;
break;
case 6:
if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 7;
break;
case 7:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 8;
break;
case 8:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 9;
break;
case 9:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 23)
kind = 23;
jjstateSet[jjnewStateCnt++] = 10;
break;
case 10:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 11;
break;
case 11:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 12;
break;
case 12:
if ((0x3ff000000000000L & l) != 0L && kind > 23)
kind = 23;
break;
case 13:
if (curChar == 47)
jjAddStates(23, 24);
break;
case 14:
if (curChar == 47)
jjCheckNAddStates(25, 27);
break;
case 15:
if ((0xffffffffffffdbffL & l) != 0L)
jjCheckNAddStates(25, 27);
break;
case 16:
if ((0x2400L & l) != 0L && kind > 5)
kind = 5;
break;
case 17:
if (curChar == 10 && kind > 5)
kind = 5;
break;
case 18:
if (curChar == 13)
jjstateSet[jjnewStateCnt++] = 17;
break;
case 19:
if (curChar == 42)
jjCheckNAddTwoStates(20, 21);
break;
case 20:
if ((0xfffffbffffffffffL & l) != 0L)
jjCheckNAddTwoStates(20, 21);
break;
case 21:
if (curChar == 42)
jjAddStates(28, 29);
break;
case 22:
if ((0xffff7fffffffffffL & l) != 0L)
jjCheckNAddTwoStates(23, 21);
break;
case 23:
if ((0xfffffbffffffffffL & l) != 0L)
jjCheckNAddTwoStates(23, 21);
break;
case 24:
if (curChar == 47 && kind > 6)
kind = 6;
break;
case 25:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAddStates(9, 22);
break;
case 26:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(26, 27);
break;
case 27:
if (curChar == 46)
jjCheckNAdd(28);
break;
case 28:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAdd(28);
break;
case 29:
if ((0x3ff000000000000L & l) != 0L)
jjCheckNAddStates(30, 32);
break;
case 30:
if (curChar == 46)
jjCheckNAdd(31);
break;
case 31:
if ((0x3ff000000000000L & l) != 0L)
jjCheckNAddTwoStates(31, 33);
break;
case 34:
if ((0x3ff000000000000L & l) != 0L)
jjCheckNAddStates(33, 35);
break;
case 35:
if (curChar == 46)
jjCheckNAdd(36);
break;
case 36:
if ((0x3ff000000000000L & l) != 0L)
jjCheckNAddTwoStates(36, 38);
break;
case 39:
if ((0x3ff000000000000L & l) != 0L)
jjCheckNAddStates(36, 41);
break;
case 40:
if (curChar == 46)
jjCheckNAdd(41);
break;
case 41:
if ((0x3ff000000000000L & l) != 0L)
jjCheckNAddStates(42, 46);
break;
default:
break;
}
} while (i != startsAt);
} else if (curChar < 128) {
long l = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 0:
if ((0x7fffffe87fffffeL & l) != 0L) {
if (kind > 9)
kind = 9;
jjCheckNAdd(1);
} else if (curChar == 123) {
if (kind > 18)
kind = 18;
}
break;
case 1:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 9)
kind = 9;
jjCheckNAdd(1);
break;
case 2:
if (curChar == 123 && kind > 18)
kind = 18;
break;
case 4:
if ((0xffffffffefffffffL & l) != 0L)
jjAddStates(47, 48);
break;
case 7:
if ((0x7e0000007eL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 8;
break;
case 8:
if ((0x7e0000007eL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 9;
break;
case 9:
if ((0x7e0000007eL & l) == 0L)
break;
if (kind > 23)
kind = 23;
jjstateSet[jjnewStateCnt++] = 10;
break;
case 10:
if ((0x7e0000007eL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 11;
break;
case 11:
if ((0x7e0000007eL & l) != 0L)
jjstateSet[jjnewStateCnt++] = 12;
break;
case 12:
if ((0x7e0000007eL & l) != 0L && kind > 23)
kind = 23;
break;
case 15:
jjAddStates(25, 27);
break;
case 20:
jjCheckNAddTwoStates(20, 21);
break;
case 22:
case 23:
jjCheckNAddTwoStates(23, 21);
break;
case 32:
if (curChar == 109 && kind > 25)
kind = 25;
break;
case 33:
if (curChar == 101)
jjstateSet[jjnewStateCnt++] = 32;
break;
case 37:
if (curChar == 120 && kind > 26)
kind = 26;
break;
case 38:
if (curChar == 101)
jjstateSet[jjnewStateCnt++] = 37;
break;
case 42:
if (curChar == 109 && kind > 27)
kind = 27;
break;
case 43:
if (curChar == 109)
jjCheckNAdd(42);
break;
case 44:
if (curChar == 99)
jjCheckNAdd(42);
break;
case 45:
if (curChar == 110 && kind > 27)
kind = 27;
break;
case 46:
if (curChar == 105)
jjstateSet[jjnewStateCnt++] = 45;
break;
case 47:
if (curChar == 112)
jjAddStates(49, 50);
break;
case 48:
if (curChar == 116 && kind > 27)
kind = 27;
break;
case 49:
if (curChar == 99 && kind > 27)
kind = 27;
break;
default:
break;
}
} while (i != startsAt);
} else {
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 4:
if ((jjbitVec0[i2] & l2) != 0L)
jjAddStates(47, 48);
break;
case 15:
if ((jjbitVec0[i2] & l2) != 0L)
jjAddStates(25, 27);
break;
case 20:
if ((jjbitVec0[i2] & l2) != 0L)
jjCheckNAddTwoStates(20, 21);
break;
case 22:
case 23:
if ((jjbitVec0[i2] & l2) != 0L)
jjCheckNAddTwoStates(23, 21);
break;
default:
break;
}
} while (i != startsAt);
}
if (kind != 0x7fffffff) {
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 50 - (jjnewStateCnt = startsAt)))
return curPos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return curPos;
}
}
}
private int jjStopStringLiteralDfa_2(int pos, long active0) {
switch (pos) {
default:
return -1;
}
}
private int jjStartNfa_2(int pos, long active0) {
return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
}
private int jjStartNfaWithStates_2(int pos, int kind, int state) {
jjmatchedKind = kind;
jjmatchedPos = pos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return pos + 1;
}
return jjMoveNfa_2(state, pos + 1);
}
private int jjMoveStringLiteralDfa0_2() {
switch (curChar) {
case 59:
return jjStartNfaWithStates_2(0, 15, 3);
default:
return jjMoveNfa_2(4, 0);
}
}
private int jjMoveNfa_2(int startState, int curPos) {
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 5;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (; ; ) {
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64) {
long l = 1L << curChar;
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 4:
if (kind > 19)
kind = 19;
jjCheckNAdd(3);
if ((0x3ff000000000000L & l) != 0L) {
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(0, 1);
}
break;
case 0:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAddTwoStates(0, 1);
break;
case 1:
if (curChar == 46)
jjCheckNAdd(2);
break;
case 2:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 7)
kind = 7;
jjCheckNAdd(2);
break;
case 3:
if (kind > 19)
kind = 19;
jjCheckNAdd(3);
break;
default:
break;
}
} while (i != startsAt);
} else if (curChar < 128) {
long l = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 4:
if ((0xdfffffffffffffffL & l) != 0L) {
if (kind > 19)
kind = 19;
jjCheckNAdd(3);
} else if (curChar == 125) {
if (kind > 20)
kind = 20;
}
break;
case 3:
if ((0xdfffffffffffffffL & l) == 0L)
break;
kind = 19;
jjCheckNAdd(3);
break;
default:
break;
}
} while (i != startsAt);
} else {
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
MatchLoop:
do {
switch (jjstateSet[--i]) {
case 4:
case 3:
if ((jjbitVec0[i2] & l2) == 0L)
break;
if (kind > 19)
kind = 19;
jjCheckNAdd(3);
break;
default:
break;
}
} while (i != startsAt);
}
if (kind != 0x7fffffff) {
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt)))
return curPos;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return curPos;
}
}
}
static final int[] jjnextStates = {
6, 11, 7, 8, 10, 14, 16, 6, 7, 26, 27, 29, 30, 33, 34, 35,
38, 39, 40, 43, 44, 46, 47, 14, 19, 15, 16, 18, 22, 24, 29, 30,
33, 34, 35, 38, 39, 40, 43, 44, 46, 47, 41, 43, 44, 46, 47, 4,
5, 48, 49,
};
public static final String[] jjstrLiteralImages = {
"", null, null, null, null, null, null, null, null, null, null, null, null,
"\72", "\72", "\73", "\173", "\175", null, null, null, null, null, null, null, null,
null, null, "\54", "\52", "\43", "\56", "\133", "\135", "\75",};
public static final String[] lexStateNames = {
"DEFAULT",
"IN_RULE",
"JAVA_CODE_RULE",
"IN_PSEUDOCLASS",
};
public static final int[] jjnewLexState = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3, -1, -1, 1, 0, 2, -1, 1, 0, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
};
static final long[] jjtoToken = {
0x7fefff281L,
};
static final long[] jjtoSkip = {
0x7eL,
};
protected SimpleCharStream input_stream;
private final int[] jjrounds = new int[50];
private final int[] jjstateSet = new int[100];
protected char curChar;
public CSSParserTokenManager(SimpleCharStream stream) {
if (SimpleCharStream.staticFlag)
throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
input_stream = stream;
}
public CSSParserTokenManager(SimpleCharStream stream, int lexState) {
this(stream);
SwitchTo(lexState);
}
public void ReInit(SimpleCharStream stream) {
jjmatchedPos = jjnewStateCnt = 0;
curLexState = defaultLexState;
input_stream = stream;
ReInitRounds();
}
private void ReInitRounds() {
int i;
jjround = 0x80000001;
for (i = 50; i-- > 0; )
jjrounds[i] = 0x80000000;
}
public void ReInit(SimpleCharStream stream, int lexState) {
ReInit(stream);
SwitchTo(lexState);
}
public void SwitchTo(int lexState) {
if (lexState >= 4 || lexState < 0)
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
else
curLexState = lexState;
}
protected Token jjFillToken() {
Token t = Token.newToken(jjmatchedKind);
t.kind = jjmatchedKind;
String im = jjstrLiteralImages[jjmatchedKind];
t.image = (im == null) ? input_stream.GetImage() : im;
t.beginLine = input_stream.getBeginLine();
t.beginColumn = input_stream.getBeginColumn();
t.endLine = input_stream.getEndLine();
t.endColumn = input_stream.getEndColumn();
return t;
}
int curLexState = 0;
int defaultLexState = 0;
int jjnewStateCnt;
int jjround;
int jjmatchedPos;
int jjmatchedKind;
public Token getNextToken() {
int kind;
Token specialToken = null;
Token matchedToken;
int curPos = 0;
EOFLoop:
for (; ; ) {
try {
curChar = input_stream.BeginToken();
} catch (java.io.IOException e) {
jjmatchedKind = 0;
matchedToken = jjFillToken();
return matchedToken;
}
switch (curLexState) {
case 0:
try {
input_stream.backup(0);
while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
curChar = input_stream.BeginToken();
} catch (java.io.IOException e1) {
continue EOFLoop;
}
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_0();
break;
case 1:
try {
input_stream.backup(0);
while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
curChar = input_stream.BeginToken();
} catch (java.io.IOException e1) {
continue EOFLoop;
}
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
break;
case 2:
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_2();
break;
case 3:
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_3();
break;
}
if (jjmatchedKind != 0x7fffffff) {
if (jjmatchedPos + 1 < curPos)
input_stream.backup(curPos - jjmatchedPos - 1);
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
matchedToken = jjFillToken();
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
return matchedToken;
} else {
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
continue EOFLoop;
}
}
int error_line = input_stream.getEndLine();
int error_column = input_stream.getEndColumn();
String error_after = null;
boolean EOFSeen = false;
try {
input_stream.readChar();
input_stream.backup(1);
} catch (java.io.IOException e1) {
EOFSeen = true;
error_after = curPos <= 1 ? "" : input_stream.GetImage();
if (curChar == '\n' || curChar == '\r') {
error_line++;
error_column = 0;
} else
error_column++;
}
if (!EOFSeen) {
input_stream.backup(1);
error_after = curPos <= 1 ? "" : input_stream.GetImage();
}
throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
}
}
}