📄 javalexer.java
字号:
newline(); } break; } default: { if ( _cnt105>=1 ) { break _loop105; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } } _cnt105++; } while (true); } if ( inputState.guessing==0 ) { _ttype = Token.SKIP; } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mSL_COMMIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = SL_COMMIT; int _saveIndex; match("//"); { _loop109: do { if ((_tokenSet_0.member(LA(1)))) { { match(_tokenSet_0); } } else { break _loop109; } } while (true); } { switch ( LA(1)) { case '\n': { match('\n'); break; } case '\r': { match('\r'); { if ((LA(1)=='\n')) { match('\n'); } else { } } break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( inputState.guessing==0 ) { _ttype = Token.SKIP; newline(); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ML_COMMENT; int _saveIndex; match("/*"); { _loop115: do { if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff'))) { match('\r'); match('\n'); if ( inputState.guessing==0 ) { newline(); } } else if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')))&&( LA(2)!='/' )) { match('*'); } else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true)) { match('\r'); if ( inputState.guessing==0 ) { newline(); } } else if ((LA(1)=='\n')) { match('\n'); if ( inputState.guessing==0 ) { newline(); } } else if ((_tokenSet_1.member(LA(1)))) { { match(_tokenSet_1); } } else { break _loop115; } } while (true); } match("*/"); if ( inputState.guessing==0 ) { _ttype = Token.SKIP; } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = CHAR_LITERAL; int _saveIndex; match('\''); { if ((LA(1)=='\\')) { mESC(false); } else if ((_tokenSet_2.member(LA(1)))) { { match(_tokenSet_2); } } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } match('\''); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ESC; int _saveIndex; match('\\'); { switch ( LA(1)) { case 'n': { match('n'); break; } case 'r': { match('r'); break; } case 't': { match('t'); break; } case 'b': { match('b'); break; } case 'f': { match('f'); break; } case '"': { match('"'); break; } case '\'': { match('\''); break; } case '\\': { match('\\'); break; } case 'u': { { int _cnt126=0; _loop126: do { if ((LA(1)=='u')) { match('u'); } else { if ( _cnt126>=1 ) { break _loop126; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } _cnt126++; } while (true); } mHEX_DIGIT(false); mHEX_DIGIT(false); mHEX_DIGIT(false); mHEX_DIGIT(false); break; } case '0': case '1': case '2': case '3': { matchRange('0','3'); { if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_0.member(LA(2))) && (true) && (true)) { matchRange('0','7'); { if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_0.member(LA(2))) && (true) && (true)) { matchRange('0','7'); } else if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) { } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } else if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) { } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } break; } case '4': case '5': case '6': case '7': { matchRange('4','7'); { if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_0.member(LA(2))) && (true) && (true)) { matchRange('0','7'); } else if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) { } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = STRING_LITERAL; int _saveIndex; match('"'); { _loop122: do { if ((LA(1)=='\\')) { mESC(false); } else if ((_tokenSet_3.member(LA(1)))) { { match(_tokenSet_3); } } else { break _loop122; } } while (true); } match('"'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = HEX_DIGIT; int _saveIndex; { switch ( LA(1)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { matchRange('0','9'); break; } case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': { matchRange('A','F'); break; } case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': { matchRange('a','f'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = VOCAB; int _saveIndex; matchRange('\3','\377'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = IDENT; int _saveIndex; { switch ( LA(1)) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { matchRange('a','z'); break; } case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': { matchRange('A','Z'); break; } case '_': { match('_'); break; } case '$': { match('$'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } { _loop136: do { switch ( LA(1)) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { matchRange('a','z'); break; } case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': { matchRange('A','Z'); break; } case '_': { match('_'); break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { matchRange('0','9'); break; } case '$': { match('$'); break; } default: { break _loop136; } } } while (true); } _ttype = testLiteralsTable(_ttype); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NUM_INT; int _saveIndex; Token f1=null; Token f2=null; Token f3=null; Token f4=null; boolean isDecimal=false; Token t=null; switch ( LA(1)) { case '.': { match('.'); if ( inputState.guessing==0 ) { _ttype = DOT; } { if (((LA(1) >= '0' && LA(1) <= '9'))) { {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -