📄 expressionparsertokenmanager.java
字号:
break;
case 77:
if (curChar == 78 && kind > 10)
kind = 10;
break;
case 78:
if (curChar == 69)
jjstateSet[jjnewStateCnt++] = 77;
break;
case 79:
if (curChar == 72)
jjstateSet[jjnewStateCnt++] = 78;
break;
case 80:
if (curChar == 116)
jjAddStates(47, 48);
break;
case 81:
if (curChar == 101 && kind > 6)
kind = 6;
break;
case 82:
if (curChar == 117)
jjstateSet[jjnewStateCnt++] = 81;
break;
case 83:
if (curChar == 114)
jjstateSet[jjnewStateCnt++] = 82;
break;
case 84:
if (curChar == 110 && kind > 10)
kind = 10;
break;
case 85:
if (curChar == 101)
jjstateSet[jjnewStateCnt++] = 84;
break;
case 86:
if (curChar == 104)
jjstateSet[jjnewStateCnt++] = 85;
break;
case 87:
if (curChar == 78)
jjAddStates(45, 46);
break;
case 88:
if (curChar == 76 && kind > 8)
kind = 8;
break;
case 89:
if (curChar == 76)
jjstateSet[jjnewStateCnt++] = 88;
break;
case 90:
if (curChar == 85)
jjstateSet[jjnewStateCnt++] = 89;
break;
case 91:
if (curChar == 84 && kind > 14)
kind = 14;
break;
case 92:
if (curChar == 79)
jjstateSet[jjnewStateCnt++] = 91;
break;
case 93:
if (curChar == 110)
jjAddStates(43, 44);
break;
case 94:
if (curChar == 108 && kind > 8)
kind = 8;
break;
case 95:
if (curChar == 108)
jjstateSet[jjnewStateCnt++] = 94;
break;
case 96:
if (curChar == 117)
jjstateSet[jjnewStateCnt++] = 95;
break;
case 97:
if (curChar == 116 && kind > 14)
kind = 14;
break;
case 98:
if (curChar == 111)
jjstateSet[jjnewStateCnt++] = 97;
break;
case 102:
if ((0x100000001000L & l) != 0L && kind > 20)
kind = 20;
break;
case 105:
if ((0x2000000020L & l) != 0L)
jjAddStates(57, 58);
break;
case 109:
if ((0x2000000020L & l) != 0L)
jjAddStates(59, 60);
break;
case 112:
if ((0x4000000040L & l) != 0L && kind > 22)
kind = 22;
break;
case 117:
if ((0x2000000020L & l) != 0L)
jjAddStates(61, 62);
break;
case 121:
if ((0x2000000020L & l) != 0L)
jjAddStates(63, 64);
break;
case 127:
if ((0x2000000020L & l) != 0L)
jjAddStates(65, 66);
break;
case 131:
if ((0x2000000020L & l) != 0L)
jjAddStates(67, 68);
break;
case 135:
if ((0x100000001000000L & l) != 0L)
jjCheckNAdd(136);
break;
case 136:
if ((0x7e0000007eL & l) == 0L)
break;
if (kind > 16)
kind = 16;
jjCheckNAdd(136);
break;
case 138:
if ((0x100000001000000L & l) != 0L)
jjCheckNAdd(139);
break;
case 139:
if ((0x7e0000007eL & l) != 0L)
jjCheckNAddTwoStates(139, 102);
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);
do
{
switch(jjstateSet[--i])
{
case 4:
case 65:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
if (kind > 26)
kind = 26;
jjCheckNAdd(65);
break;
case 44:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjAddStates(16, 18);
break;
case 53:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjAddStates(13, 15);
break;
case 62:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
jjAddStates(35, 36);
break;
default : break;
}
} while(i != startsAt);
}
if (kind != 0x7fffffff)
{
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 141 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = JavaCharStream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
static final int[] jjnextStates = {
114, 115, 120, 121, 124, 125, 130, 131, 104, 105, 108, 109, 112, 53, 54, 56,
44, 45, 47, 100, 101, 102, 135, 137, 138, 140, 102, 44, 45, 49, 47, 53,
54, 58, 56, 62, 63, 108, 109, 112, 126, 127, 112, 96, 98, 90, 92, 83,
86, 76, 79, 46, 48, 50, 55, 57, 59, 106, 107, 110, 111, 118, 119, 122,
123, 128, 129, 132, 133,
};
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;
}
}
private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
case 0:
return ((jjbitVec4[i2] & l2) != 0L);
case 48:
return ((jjbitVec5[i2] & l2) != 0L);
case 49:
return ((jjbitVec6[i2] & l2) != 0L);
case 51:
return ((jjbitVec7[i2] & l2) != 0L);
case 61:
return ((jjbitVec8[i2] & l2) != 0L);
default :
if ((jjbitVec3[i1] & l1) != 0L)
return true;
return false;
}
}
public static final String[] jjstrLiteralImages = {
"", null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, "\50", "\51", null, "\76", "\74", "\74\75", "\76\75", null, "\53",
"\55", "\52", "\57", "\136", "\45", "\54", };
public static final String[] lexStateNames = {
"DEFAULT",
};
static final long[] jjtoToken = {
0xfffe771ffc1L,
};
static final long[] jjtoSkip = {
0x3eL,
};
static protected JavaCharStream input_stream;
static private final int[] jjrounds = new int[141];
static private final int[] jjstateSet = new int[282];
static protected char curChar;
public ExpressionParserTokenManager(JavaCharStream 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);
input_stream = stream;
}
public ExpressionParserTokenManager(JavaCharStream stream, int lexState)
{
this(stream);
SwitchTo(lexState);
}
static public void ReInit(JavaCharStream stream)
{
jjmatchedPos = jjnewStateCnt = 0;
curLexState = defaultLexState;
input_stream = stream;
ReInitRounds();
}
static private final void ReInitRounds()
{
int i;
jjround = 0x80000001;
for (i = 141; i-- > 0;)
jjrounds[i] = 0x80000000;
}
static public void ReInit(JavaCharStream stream, int lexState)
{
ReInit(stream);
SwitchTo(lexState);
}
static 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;
}
static protected Token jjFillToken()
{
Token t = Token.newToken(jjmatchedKind);
t.kind = jjmatchedKind;
String im = jjstrLiteralImages[jjmatchedKind];
t.image = (im == null) ? JavaCharStream.GetImage() : im;
t.beginLine = JavaCharStream.getBeginLine();
t.beginColumn = JavaCharStream.getBeginColumn();
t.endLine = JavaCharStream.getEndLine();
t.endColumn = JavaCharStream.getEndColumn();
return t;
}
static int curLexState = 0;
static int defaultLexState = 0;
static int jjnewStateCnt;
static int jjround;
static int jjmatchedPos;
static int jjmatchedKind;
public static Token getNextToken()
{
Token matchedToken;
int curPos = 0;
EOFLoop :
for (;;)
{
try
{
curChar = JavaCharStream.BeginToken();
}
catch(java.io.IOException e)
{
jjmatchedKind = 0;
matchedToken = jjFillToken();
return matchedToken;
}
try { JavaCharStream.backup(0);
while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
curChar = JavaCharStream.BeginToken();
}
catch (java.io.IOException e1) { continue EOFLoop; }
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_0();
if (jjmatchedKind != 0x7fffffff)
{
if (jjmatchedPos + 1 < curPos)
JavaCharStream.backup(curPos - jjmatchedPos - 1);
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
return matchedToken;
}
else
{
continue EOFLoop;
}
}
int error_line = JavaCharStream.getEndLine();
int error_column = JavaCharStream.getEndColumn();
String error_after = null;
boolean EOFSeen = false;
try { JavaCharStream.readChar(); JavaCharStream.backup(1); }
catch (java.io.IOException e1) {
EOFSeen = true;
error_after = curPos <= 1 ? "" : JavaCharStream.GetImage();
if (curChar == '\n' || curChar == '\r') {
error_line++;
error_column = 0;
}
else
error_column++;
}
if (!EOFSeen) {
JavaCharStream.backup(1);
error_after = curPos <= 1 ? "" : JavaCharStream.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 + -