📄 parsertokenmanager.java
字号:
jjstateSet[jjnewStateCnt++] = 15;
break;
case 15:
if ((0xff000000000000L & l) != 0L)
jjCheckNAdd(13);
break;
case 16:
if ((0xfffffcfaffffd9ffL & l) == 0L)
break;
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 17:
if (curChar == 40)
jjCheckNAddTwoStates(18, 19);
break;
case 18:
if ((0xfffffcfeffffd9ffL & l) != 0L)
jjCheckNAddTwoStates(18, 19);
break;
case 19:
if (curChar != 41)
break;
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 20:
if ((0xfffffcfeffffd9ffL & l) == 0L)
break;
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 21:
if (curChar == 59)
jjCheckNAddStates(3, 5);
break;
case 22:
if ((0x2400L & l) != 0L && kind > 5)
kind = 5;
break;
case 23:
if (curChar == 10 && kind > 5)
kind = 5;
break;
case 25:
if ((0xfffff7ffffffffffL & l) != 0L)
jjCheckNAddStates(6, 8);
break;
case 26:
if ((0xffffffffffffdbffL & l) != 0L)
jjCheckNAddStates(6, 8);
break;
case 27:
if (curChar == 13)
jjCheckNAdd(23);
break;
default : break;
}
} while(i != startsAt);
}
else if (curChar < 128)
{
long l = 1L << (curChar & 077);
MatchLoop: do
{
switch(jjstateSet[--i])
{
case 28:
case 20:
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 0:
if ((0xffffffffd7ffffffL & l) != 0L)
{
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
}
else if (curChar == 91)
jjstateSet[jjnewStateCnt++] = 1;
break;
case 24:
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
jjCheckNAddStates(6, 8);
break;
case 1:
if ((0xffffffffd7ffffffL & l) != 0L)
jjCheckNAddStates(9, 11);
break;
case 3:
jjAddStates(16, 17);
break;
case 5:
jjCheckNAddStates(9, 11);
break;
case 6:
if (curChar == 93 && kind > 76)
kind = 76;
break;
case 8:
if ((0xffffffffefffffffL & l) != 0L)
jjCheckNAddStates(0, 2);
break;
case 9:
if (curChar == 92)
jjAddStates(18, 20);
break;
case 10:
if ((0x14404410000000L & l) != 0L)
jjCheckNAddStates(0, 2);
break;
case 16:
if ((0xffffffffd7ffffffL & l) == 0L)
break;
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 18:
jjAddStates(21, 22);
break;
case 25:
case 26:
jjCheckNAddStates(6, 8);
break;
default : break;
}
} while(i != startsAt);
}
else
{
int hiByte = (int)(curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
MatchLoop: do
{
switch(jjstateSet[--i])
{
case 28:
case 20:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
break;
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 0:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
break;
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
break;
case 24:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjCheckNAddStates(6, 8);
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
{
if (kind > 78)
kind = 78;
jjCheckNAddTwoStates(17, 20);
}
break;
case 1:
case 5:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjCheckNAddStates(9, 11);
break;
case 3:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjAddStates(16, 17);
break;
case 8:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjAddStates(0, 2);
break;
case 18:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjAddStates(21, 22);
break;
case 25:
case 26:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjCheckNAddStates(6, 8);
break;
default : break;
}
} while(i != startsAt);
}
if (kind != 0x7fffffff)
{
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 28 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
static final int[] jjnextStates = { 8, 9, 11, 22, 24, 25, 26, 22, 27, 2, 5, 6, 8, 9, 13, 11, 3, 4, 10, 12, 14, 18, 19, };
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
case 0:
return ((jjbitVec2[i2] & l2) != 0L);
default :
if ((jjbitVec0[i1] & l1) != 0L)
return true;
return false;
}
}
public static final String[] jjstrLiteralImages = {
"", null, null, null, null, null, null, null, null, "\77\116\117\116\105",
"\77\104\105\106\101\125\114\124", "\50", "\51", "\133", "\135", "\73\53", "\141\142\163\164\162\141\143\164",
"\141\143\143\145\163\163", "\141\154\154\157\167\145\144\55\143\154\141\163\163\145\163",
"\141\154\154\157\167\145\144\55\146\154\157\141\164\163", "\141\154\154\157\167\145\144\55\147\162\141\155\155\141\162",
"\141\154\154\157\167\145\144\55\151\156\164\145\147\145\162\163", "\141\154\154\157\167\145\144\55\160\141\162\145\156\164\163",
"\141\154\154\157\167\145\144\55\163\164\162\151\156\147\163", "\141\154\154\157\167\145\144\55\163\171\155\142\157\154\163",
"\141\154\154\157\167\145\144\55\166\141\154\165\145\163", "\101\116\131",
"\141\163\163\157\143\151\141\164\145\144\55\146\141\143\145\164", "\142\165\151\154\144", "\143\141\162\144\151\156\141\154\151\164\171",
"\143\157\155\155\145\156\164", "\143\157\155\160\157\163\151\164\145", "\143\157\156\143\162\145\164\145",
"\143\162\145\141\164\145\55\141\143\143\145\163\163\157\162", "\144\145\146\141\165\154\164", "\144\145\146\143\154\141\163\163",
"\145\170\143\154\165\163\151\166\145", "\106\114\117\101\124", "\151\156\143\154\165\144\145",
"\151\156\150\145\162\151\164", "\151\156\151\164\151\141\154\151\172\145\162\55\157\156\154\171",
"\111\116\123\124\101\116\103\105", "\111\116\124\105\107\105\122",
"\151\156\166\145\162\163\145\55\163\154\157\164", "\151\163\55\141", "\154\157\143\141\154",
"\155\165\154\164\151\163\154\157\164", "\156\157\55\151\156\150\145\162\151\164",
"\156\157\156\55\162\145\141\143\164\151\166\145", "\156\157\164\145", "\157\146",
"\157\166\145\162\162\151\144\145\55\155\145\163\163\141\147\145", "\160\141\164\164\145\162\156\55\155\141\164\143\150",
"\120\122\111\126\101\124\105", "\160\162\157\160\141\147\141\164\151\157\156", "\120\125\102\114\111\103",
"\162\141\156\147\145", "\162\145\141\143\164\151\166\145", "\162\145\141\144",
"\162\145\141\144\55\157\156\154\171", "\162\145\141\144\55\167\162\151\164\145", "\162\157\154\145",
"\163\151\156\147\154\145\55\163\154\157\164", "\163\150\141\162\145\144", "\163\154\157\164", "\163\157\165\162\143\145",
"\163\164\157\162\141\147\145", "\123\124\122\111\116\107", "\163\165\142\163\154\157\164\55\157\146",
"\123\131\115\102\117\114", "\164\171\160\145", "\165\163\145\162\55\146\141\143\145\164",
"\166\141\154\165\145", "\126\111\123\111\102\111\114\111\124\131", "\166\145\162\163\151\157\156",
"\167\162\151\164\145", null, null, null, null, null, };
public static final String[] lexStateNames = {
"DEFAULT",
};
static final long[] jjtoToken = { 0xfffffffffffffe01L, 0x7fffL, };
static final long[] jjtoSkip = { 0x3eL, 0x0L, };
static final long[] jjtoSpecial = { 0x20L, 0x0L, };
protected SimpleCharStream input_stream;
private final int[] jjrounds = new int[28];
private final int[] jjstateSet = new int[56];
protected char curChar;
public ParserTokenManager(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 ParserTokenManager(SimpleCharStream stream, int lexState)
{
this(stream);
SwitchTo(lexState);
}
public void ReInit(SimpleCharStream stream)
{
jjmatchedPos = jjnewStateCnt = 0;
curLexState = defaultLexState;
input_stream = stream;
ReInitRounds();
}
private final void ReInitRounds()
{
int i;
jjround = 0x80000001;
for (i = 28; i-- > 0;)
jjrounds[i] = 0x80000000;
}
public void ReInit(SimpleCharStream stream, int lexState)
{
ReInit(stream);
SwitchTo(lexState);
}
public void SwitchTo(int lexState)
{
if (lexState >= 1 || 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();
matchedToken.specialToken = specialToken;
return matchedToken;
}
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();
if (jjmatchedKind != 0x7fffffff)
{
if (jjmatchedPos + 1 < curPos)
input_stream.backup(curPos - jjmatchedPos - 1);
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
matchedToken.specialToken = specialToken;
return matchedToken;
}
else
{
if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
if (specialToken == null)
specialToken = matchedToken;
else
{
matchedToken.specialToken = specialToken;
specialToken = (specialToken.next = matchedToken);
}
}
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);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -