📄 gocllexer.java
字号:
} catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = LPAREN; int _saveIndex; try { // for error handling match('('); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = MINUS; int _saveIndex; try { // for error handling match('-'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NOT_EQUAL; int _saveIndex; try { // for error handling match("<>"); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = PLUS; int _saveIndex; try { // for error handling match('+'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mRBRACE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = RBRACE; int _saveIndex; try { // for error handling match('}'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = RBRACK; int _saveIndex; try { // for error handling match(']'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = RPAREN; int _saveIndex; try { // for error handling match(')'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = SEMI; int _saveIndex; try { // for error handling match(';'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = SLASH; int _saveIndex; try { // for error handling match('/'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = STAR; int _saveIndex; try { // for error handling match('*'); } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mINT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = INT; int _saveIndex; try { // for error handling { int _cnt132=0; _loop132: do { if (((LA(1) >= '0' && LA(1) <= '9'))) { matchRange('0','9'); } else { if ( _cnt132>=1 ) { break _loop132; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } _cnt132++; } while (true); } } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_3); } else { throw ex; } } 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 mREAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = REAL; int _saveIndex; try { // for error handling mINT(false); { if ((LA(1)=='.')) { match('.'); mINT(false); } else { } } { if ((LA(1)=='E'||LA(1)=='e')) { { switch ( LA(1)) { case 'e': { match('e'); break; } case 'E': { match('E'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } { switch ( LA(1)) { case '+': { match('+'); break; } case '-': { match('-'); break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } mINT(false); } else { } } } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } 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 mRANGE_OR_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = RANGE_OR_INT; int _saveIndex; try { // for error handling boolean synPredMatched140 = false; if ((((LA(1) >= '0' && LA(1) <= '9')) && (true))) { int _m140 = mark(); synPredMatched140 = true; inputState.guessing++; try { { mINT(false); match(".."); } } catch (RecognitionException pe) { synPredMatched140 = false; } rewind(_m140); inputState.guessing--; } if ( synPredMatched140 ) { mINT(false); if ( inputState.guessing==0 ) { _ttype = INT; } } else { boolean synPredMatched142 = false; if ((((LA(1) >= '0' && LA(1) <= '9')) && (true))) { int _m142 = mark(); synPredMatched142 = true; inputState.guessing++; try { { mINT(false); match('.'); mINT(false); } } catch (RecognitionException pe) { synPredMatched142 = false; } rewind(_m142); inputState.guessing--; } if ( synPredMatched142 ) { mREAL(false); if ( inputState.guessing==0 ) { _ttype = REAL; } } else { boolean synPredMatched145 = false; if ((((LA(1) >= '0' && LA(1) <= '9')) && (true))) { int _m145 = mark(); synPredMatched145 = true; inputState.guessing++; try { { mINT(false); { switch ( LA(1)) { case 'e': { match('e'); break; } case 'E': { match('E'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } } } catch (RecognitionException pe) { synPredMatched145 = false; } rewind(_m145); inputState.guessing--; } if ( synPredMatched145 ) { mREAL(false); if ( inputState.guessing==0 ) { _ttype = REAL; } } else if (((LA(1) >= '0' && LA(1) <= '9')) && (true)) { mINT(false); if ( inputState.guessing==0 ) { _ttype = INT; } } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } }} } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_0); } else { throw ex; } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -