📄 cppparsertokenmanager.java
字号:
if ((0x20000000200000L & l) != 0L && kind > 120) kind = 120; break; case 55: if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 54; break; case 57: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(58); break; case 58: if ((0x7e0000007eL & l) == 0L) break; if (kind > 121) kind = 121; jjCheckNAdd(58); break; case 59: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(60); break; case 60: if ((0x7e0000007eL & l) == 0L) break; if (kind > 122) kind = 122; jjCheckNAddTwoStates(60, 61); break; case 61: if ((0x20100000201000L & l) != 0L && kind > 122) kind = 122; break; case 62: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(63); break; case 63: if ((0x7e0000007eL & l) != 0L) jjCheckNAddTwoStates(63, 64); break; case 64: if ((0x20000000200000L & l) != 0L && kind > 123) kind = 123; break; case 65: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(66); break; case 66: if ((0x7e0000007eL & l) != 0L) jjCheckNAddStates(60, 62); break; case 67: if ((0x100000001000L & l) != 0L && kind > 124) kind = 124; break; case 68: if ((0x20000000200000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 67; break; case 69: if ((0x20000000200000L & l) != 0L && kind > 124) kind = 124; break; case 70: if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 69; break; case 77: if ((0x2000000020L & l) != 0L) jjAddStates(78, 79); break; case 80: if ((0x104000001040L & l) != 0L && kind > 126) kind = 126; break; case 81: if (curChar == 76) jjAddStates(66, 67); 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) jjstateSet[jjnewStateCnt++] = 8; break; case 20: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(6, 8); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 82 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}static private final int jjMoveStringLiteralDfa0_1(){ switch(curChar) { case 10: return jjStopAtPos(0, 8); default : return 1; }}static private final int jjMoveStringLiteralDfa0_3(){ switch(curChar) { case 10: return jjStopAtPos(0, 12); default : return 1; }}static private final int jjMoveStringLiteralDfa0_2(){ switch(curChar) { case 42: return jjMoveStringLiteralDfa1_2(0x400L); default : return 1; }}static private final int jjMoveStringLiteralDfa1_2(long active0){ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x400L) != 0L) return jjStopAtPos(1, 10); break; default : return 2; } return 2;}static final int[] jjnextStates = { 72, 73, 75, 0, 76, 77, 20, 21, 23, 7, 9, 46, 47, 48, 49, 50, 51, 53, 55, 57, 59, 62, 65, 35, 36, 37, 38, 39, 40, 42, 44, 1, 2, 5, 16, 18, 20, 21, 25, 23, 20, 21, 27, 23, 29, 31, 20, 21, 30, 23, 40, 42, 44, 51, 53, 55, 60, 61, 63, 64, 66, 68, 70, 74, 2, 5, 6, 19, 3, 4, 10, 11, 13, 15, 22, 24, 26, 28, 78, 79, };public static final String[] jjstrLiteralImages = {"", null, null, null, null, null, null, null, null, null, null, null, null, null, "\173", "\175", "\133", "\135", "\50", "\51", "\72\72", "\72", "\73", "\54", "\77", "\56\56\56", "\75", "\52\75", "\57\75", "\45\75", "\53\75", "\55\75", "\74\74\75", "\76\76\75", "\46\75", "\136\75", "\174\75", "\174\174", "\46\46", "\174", "\136", "\46", "\75\75", "\41\75", "\74", "\76", "\74\75", "\76\75", "\74\74", "\76\76", "\53", "\55", "\52", "\57", "\45", "\53\53", "\55\55", "\176", "\41", "\56", "\55\76", "\56\52", "\55\76\52", "\141\165\164\157", "\142\162\145\141\153", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", "\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", "\144\145\154\145\164\145", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", "\145\156\165\155", "\145\170\164\145\162\156", "\146\154\157\141\164", "\146\157\162", "\146\162\151\145\156\144", "\147\157\164\157", "\151\146", "\151\156\154\151\156\145", "\151\156\164", "\154\157\156\147", "\156\145\167", "\160\162\151\166\141\164\145", "\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\144\145\143\154\141\162\145\144", "\162\145\147\151\163\164\145\162", "\162\145\164\165\162\156", "\163\150\157\162\164", "\163\151\147\156\145\144", "\163\151\172\145\157\146", "\163\164\141\164\151\143", "\163\164\162\165\143\164", "\143\154\141\163\163", "\163\167\151\164\143\150", "\164\145\155\160\154\141\164\145", "\164\150\151\163", "\164\162\171", "\164\171\160\145\144\145\146", "\165\156\151\157\156", "\165\156\163\151\147\156\145\144", "\166\151\162\164\165\141\154", "\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", "\157\160\145\162\141\164\157\162", "\164\162\165\145", "\146\141\154\163\145", "\164\150\162\157\167", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "\146\151\156\141\154\154\171", null, };public static final String[] lexStateNames = { "DEFAULT", "IN_LINE_COMMENT", "IN_COMMENT", "PREPROCESSOR_OUTPUT", };public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, 1, 2, 3, 0, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, };static final long[] jjtoToken = { 0xffffffffffffc001L, 0xffffffffffffffffL, 0x7L, };static final long[] jjtoSkip = { 0x15feL, 0x0L, 0x0L, };static final long[] jjtoMore = { 0x2a00L, 0x0L, 0x0L, };static protected SimpleCharStream input_stream;static private final int[] jjrounds = new int[82];static private final int[] jjstateSet = new int[164];static protected char curChar;public CPPParserTokenManager(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); input_stream = stream;}public CPPParserTokenManager(SimpleCharStream stream, int lexState){ this(stream); SwitchTo(lexState);}static public void ReInit(SimpleCharStream stream){ jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds();}static private final void ReInitRounds(){ int i; jjround = 0x80000001; for (i = 82; i-- > 0;) jjrounds[i] = 0x80000000;}static public void ReInit(SimpleCharStream stream, int lexState){ ReInit(stream); SwitchTo(lexState);}static 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;}static 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;}static int curLexState = 0;static int defaultLexState = 0;static int jjnewStateCnt;static int jjround;static int jjmatchedPos;static int jjmatchedKind;public static 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; } for (;;) { switch(curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100000600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 9) { jjmatchedKind = 9; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 11) { jjmatchedKind = 11; } break; case 3: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_3(); if (jjmatchedPos == 0 && jjmatchedKind > 13) { jjmatchedKind = 13; } 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 ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (java.io.IOException e1) { } } 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 + -