📄 nomparsertokenmanager.java
字号:
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 > 2) kind = 2; jjCheckNAdd(1); } else if ((0x2400L & l) != 0L) { if (kind > 1) kind = 1; } break; case 1: if ((0x3ff000000000000L & l) == 0L) break; kind = 2; jjCheckNAdd(1); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if (curChar == 105) jjstateSet[jjnewStateCnt++] = 8; else if (curChar == 101) jjstateSet[jjnewStateCnt++] = 5; break; case 2: if (curChar == 115) kind = 11; break; case 3: case 7: if (curChar == 111) jjCheckNAdd(2); break; case 4: if (curChar == 99) jjstateSet[jjnewStateCnt++] = 3; break; case 5: if (curChar == 105) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if (curChar == 101) jjstateSet[jjnewStateCnt++] = 5; break; case 8: if (curChar == 99) jjstateSet[jjnewStateCnt++] = 7; break; case 9: if (curChar == 105) jjstateSet[jjnewStateCnt++] = 8; break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 10 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}static final int[] jjnextStates = {};public static final String[] jjstrLiteralImages = {"", null, null, null, "\55", "\54", "\155\145\164\150", "\145\164\150", "\160\162\157\160", "\142\165\164", "\165\156\144\145\143", null, "\150\145\156\151\143\157\163", "\150\145\156", "\144\157", "\164\162\151", "\164\145\164\162\141", "\160\145\156\164", "\150\145\170", "\150\145\160\164", "\157\143\164", "\156\157\156", "\144\145\143", "\143\157\163", "\143\157\156\164", null, null, "\141\156", "\145\156", "\171\156", "\171\154", "\144\151", "\143\171\143\154\157", "\143\150\154\157\162\157", "\146\154\165\157\162\157", "\142\162\157\155\157", "\151\157\144\157", "\156\151\164\162\157", "\157\170\157", "\160\150\145\156\171\154", "\141\155\151\156\157", "\141\154\165\155\151\156\157", "\154\151\164\150\157", "\150\171\144\162\157\170\171", "\145", "\157\154", "\157\151\143\40\141\143\151\144", "\157\171\154\40\143\150\154\157\162\151\144\145", "\156\151\164\162\151\154\145", "\141\154", "\141\155\151\144\145", "\141\155\151\156\145", "\157\156\145", "\157\141\164\145", "\154\151\164\150\151\165\155", "\163\157\144\151\165\155", "\160\157\164\141\163\163\151\165\155", "\162\165\142\151\144\151\165\155", "\143\145\163\151\165\155", "\146\162\141\156\143\151\165\155", "\142\145\162\171\154\154\151\165\155", "\155\141\147\156\145\163\151\165\155", "\143\141\154\143\151\165\155", "\163\164\162\157\156\164\151\165\155", "\142\141\162\151\165\155", "\162\141\144\151\165\155", "\163\143\141\156\144\151\165\155", "\171\164\164\162\151\165\155", "\154\141\156\164\150\141\156\165\155", "\141\143\164\151\156\151\165\155", "\164\151\164\141\156\151\165\155", "\172\151\162\143\157\156\151\165\155", "\150\141\146\156\151\165\155", "\162\165\164\150\145\162\146\157\162\144\151\165\155", "\166\141\156\141\144\151\165\155", "\156\151\157\142\151\165\155", "\164\141\156\164\141\154\165\155", "\144\165\142\156\151\165\155", "\143\150\162\157\155\151\165\155", "\155\157\154\171\142\144\145\156\165\155", "\164\165\156\147\163\164\145\156", "\163\145\141\142\157\162\147\151\165\155", "\155\141\156\147\141\156\145\163\145", "\164\145\143\150\156\145\164\151\165\155", "\162\150\145\156\151\165\155", "\142\157\150\162\151\165\155", "\151\162\157\156", "\162\165\164\150\145\156\151\165\155", "\157\163\155\151\165\155", "\150\141\163\163\151\165\155", "\143\157\142\141\154\164", "\162\150\157\144\151\165\155", "\151\162\151\144\151\165\155", "\155\145\151\164\155\145\162\151\165\155", "\156\151\143\153\145\154", "\160\141\154\154\141\144\151\165\155", "\160\154\141\164\151\156\165\155", "\143\157\160\160\145\162", "\163\151\154\166\145\162", "\147\157\154\144", "\172\151\156\143", "\143\141\144\155\151\165\155", "\155\145\162\143\165\162\171", "\141\154\165\155\151\156\151\165\155", "\147\141\154\154\151\165\155", "\151\156\144\151\165\155", "\164\150\141\154\154\151\165\155", "\147\145\162\155\141\151\156\151\165\155", "\164\151\156", "\154\145\141\144", "\141\162\163\145\156\151\143", "\141\156\164\151\155\157\156\171", "\142\151\163\155\165\164\150", "\163\145\154\145\156\151\165\155", "\164\145\154\154\165\162\151\165\155", "\160\157\154\157\156\151\165\155", "\143\145\162\151\165\155", "\160\162\141\163\145\157\144\171\155\151\165\155", "\156\145\157\144\171\155\151\165\155", "\160\162\157\155\145\164\150\151\165\155", "\163\141\156\141\162\151\165\155", "\145\165\162\157\160\151\165\155", "\147\141\144\157\154\151\156\151\165\155", "\164\145\162\142\151\165\155", "\144\171\163\160\162\157\163\151\165\155", "\150\157\154\155\151\165\155", "\145\162\142\151\165\155", "\164\150\165\154\151\165\155", "\171\164\164\145\162\142\151\165\155", "\154\165\164\145\164\151\165\155", "\164\150\157\162\151\165\155", "\160\162\157\164\141\143\164\151\156\151\165\155", "\165\162\141\156\151\165\155", "\156\145\160\164\165\156\151\165\155", "\160\154\165\164\157\156\151\165\155", "\141\155\145\162\143\151\165\155", "\143\165\162\151\165\155", "\142\145\162\153\145\154\151\165\155", "\143\141\154\151\146\157\162\156\151\165\155", "\145\151\156\163\164\145\151\156\151\165\155", "\146\145\162\155\151\165\155", "\155\145\156\144\145\154\145\166\151\165\155", "\156\157\142\145\154\151\165\155", "\154\141\167\162\145\156\143\151\165\155", };public static final String[] lexStateNames = { "DEFAULT", };static final long[] jjtoToken = { 0xfffffffff9fffff7L, 0xffffffffffffffffL, 0xffffL, };static final long[] jjtoSkip = { 0x6000000L, 0x0L, 0x0L, };protected SimpleCharStream input_stream;private final int[] jjrounds = new int[10];private final int[] jjstateSet = new int[20];protected char curChar;public NomParserTokenManager(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 NomParserTokenManager(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 = 10; 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(); return matchedToken; } try { input_stream.backup(0); while (curChar <= 32 && (0x100000000L & (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(); return matchedToken; } else { 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 + -