Search in sources :

Example 1 with CharStreamIOException

use of antlr.CharStreamIOException in project sonarqube by SonarSource.

the class ValidWhenLexer method nextToken.

public Token nextToken() throws TokenStreamException {
    Token theRetToken = null;
    tryAgain: for (; ; ) {
        Token _token = null;
        int _ttype = Token.INVALID_TYPE;
        resetText();
        try {
            // for char stream error handling
            try {
                // for lexical error handling
                switch(LA(1)) {
                    case '\t':
                    case '\n':
                    case '\r':
                    case ' ':
                        {
                            mWS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '-':
                    case '1':
                    case '2':
                    case '3':
                    case '4':
                    case '5':
                    case '6':
                    case '7':
                    case '8':
                    case '9':
                        {
                            mDECIMAL_LITERAL(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '"':
                    case '\'':
                        {
                            mSTRING_LITERAL(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '[':
                        {
                            mLBRACKET(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ']':
                        {
                            mRBRACKET(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '(':
                        {
                            mLPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ')':
                        {
                            mRPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '*':
                        {
                            mTHIS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '.':
                    case '_':
                    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':
                        {
                            mIDENTIFIER(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '=':
                        {
                            mEQUALSIGN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '!':
                        {
                            mNOTEQUALSIGN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    default:
                        if ((LA(1) == '0') && (LA(2) == 'x')) {
                            mHEX_LITERAL(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (LA(2) == '=')) {
                            mLESSEQUALSIGN(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (LA(2) == '=')) {
                            mGREATEREQUALSIGN(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '0') && (true)) {
                            mOCTAL_LITERAL(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (true)) {
                            mLESSTHANSIGN(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (true)) {
                            mGREATERTHANSIGN(true);
                            theRetToken = _returnToken;
                        } else {
                            if (LA(1) == EOF_CHAR) {
                                uponEOF();
                                _returnToken = makeToken(Token.EOF_TYPE);
                            } else {
                                throw new NoViableAltForCharException((char) LA(1), getFilename(), getLine(), getColumn());
                            }
                        }
                }
                // found SKIP token
                if (_returnToken == null)
                    continue tryAgain;
                _ttype = _returnToken.getType();
                _ttype = testLiteralsTable(_ttype);
                _returnToken.setType(_ttype);
                return _returnToken;
            } catch (RecognitionException e) {
                throw new TokenStreamRecognitionException(e);
            }
        } catch (CharStreamException cse) {
            if (cse instanceof CharStreamIOException) {
                throw new TokenStreamIOException(((CharStreamIOException) cse).io);
            } else {
                throw new TokenStreamException(cse.getMessage());
            }
        }
    }
}
Also used : TokenStreamException(antlr.TokenStreamException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) NoViableAltForCharException(antlr.NoViableAltForCharException) CharStreamException(antlr.CharStreamException) CharStreamIOException(antlr.CharStreamIOException) Token(antlr.Token) CommonToken(antlr.CommonToken) TokenStreamIOException(antlr.TokenStreamIOException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) RecognitionException(antlr.RecognitionException)

Example 2 with CharStreamIOException

use of antlr.CharStreamIOException in project cxf by apache.

the class IDLLexer method nextToken.

public Token nextToken() throws TokenStreamException {
    Token theRetToken = null;
    tryAgain: for (; ; ) {
        Token _token = null;
        int _ttype = Token.INVALID_TYPE;
        resetText();
        try {
            // for char stream error handling
            try {
                // for lexical error handling
                switch(LA(1)) {
                    case ';':
                        {
                            mSEMI(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '?':
                        {
                            mQUESTION(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '(':
                        {
                            mLPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ')':
                        {
                            mRPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '[':
                        {
                            mLBRACK(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ']':
                        {
                            mRBRACK(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '{':
                        {
                            mLCURLY(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '}':
                        {
                            mRCURLY(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '|':
                        {
                            mOR(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '^':
                        {
                            mXOR(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '&':
                        {
                            mAND(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ',':
                        {
                            mCOMMA(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '=':
                        {
                            mASSIGN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '!':
                        {
                            mNOT(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '+':
                        {
                            mPLUS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '-':
                        {
                            mMINUS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '~':
                        {
                            mTILDE(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '*':
                        {
                            mSTAR(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '%':
                        {
                            mMOD(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '\t':
                    case '\n':
                    case '\r':
                    case ' ':
                        {
                            mWS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '#':
                        {
                            mPREPROC_DIRECTIVE(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '\'':
                        {
                            mCHAR_LITERAL(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '"':
                        {
                            mSTRING_LITERAL(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '1':
                    case '2':
                    case '3':
                    case '4':
                    case '5':
                    case '6':
                    case '7':
                    case '8':
                    case '9':
                        {
                            mINT(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '_':
                        {
                            mESCAPED_IDENT(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    default:
                        if ((LA(1) == '<') && (LA(2) == '<')) {
                            mLSHIFT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (LA(2) == '>')) {
                            mRSHIFT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == ':') && (LA(2) == ':')) {
                            mSCOPEOP(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '/') && (LA(2) == '/')) {
                            mSL_COMMENT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '/') && (LA(2) == '*')) {
                            mML_COMMENT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == 'L') && (LA(2) == '\'')) {
                            mWIDE_CHAR_LITERAL(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == 'L') && (LA(2) == '"')) {
                            mWIDE_STRING_LITERAL(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '0') && (LA(2) == 'X' || LA(2) == 'x')) {
                            mHEX(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '.') && ((LA(2) >= '0' && LA(2) <= '9'))) {
                            mFLOAT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == ':') && (true)) {
                            mCOLON(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '.') && (true)) {
                            mDOT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (true)) {
                            mLT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (true)) {
                            mGT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '/') && (true)) {
                            mDIV(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '0') && (true)) {
                            mOCTAL(true);
                            theRetToken = _returnToken;
                        } else if ((_tokenSet_0.member(LA(1))) && (true)) {
                            mIDENT(true);
                            theRetToken = _returnToken;
                        } else {
                            if (LA(1) == EOF_CHAR) {
                                uponEOF();
                                _returnToken = makeToken(Token.EOF_TYPE);
                            } else {
                                throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
                            }
                        }
                }
                // found SKIP token
                if (_returnToken == null)
                    continue tryAgain;
                _ttype = _returnToken.getType();
                _returnToken.setType(_ttype);
                return _returnToken;
            } catch (RecognitionException e) {
                throw new TokenStreamRecognitionException(e);
            }
        } catch (CharStreamException cse) {
            if (cse instanceof CharStreamIOException) {
                throw new TokenStreamIOException(((CharStreamIOException) cse).io);
            }
            throw new TokenStreamException(cse.getMessage());
        }
    }
}
Also used : TokenStreamException(antlr.TokenStreamException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) NoViableAltForCharException(antlr.NoViableAltForCharException) CharStreamException(antlr.CharStreamException) CharStreamIOException(antlr.CharStreamIOException) Token(antlr.Token) CommonToken(antlr.CommonToken) TokenStreamIOException(antlr.TokenStreamIOException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) RecognitionException(antlr.RecognitionException)

Example 3 with CharStreamIOException

use of antlr.CharStreamIOException in project sonar-java by SonarSource.

the class ValidWhenLexer method nextToken.

public Token nextToken() throws TokenStreamException {
    Token theRetToken = null;
    tryAgain: for (; ; ) {
        Token _token = null;
        int _ttype = Token.INVALID_TYPE;
        resetText();
        try {
            // for char stream error handling
            try {
                // for lexical error handling
                switch(LA(1)) {
                    case '\t':
                    case '\n':
                    case '\r':
                    case ' ':
                        {
                            mWS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '-':
                    case '1':
                    case '2':
                    case '3':
                    case '4':
                    case '5':
                    case '6':
                    case '7':
                    case '8':
                    case '9':
                        {
                            mDECIMAL_LITERAL(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '"':
                    case '\'':
                        {
                            mSTRING_LITERAL(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '[':
                        {
                            mLBRACKET(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ']':
                        {
                            mRBRACKET(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '(':
                        {
                            mLPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ')':
                        {
                            mRPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '*':
                        {
                            mTHIS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '.':
                    case '_':
                    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':
                        {
                            mIDENTIFIER(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '=':
                        {
                            mEQUALSIGN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '!':
                        {
                            mNOTEQUALSIGN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    default:
                        if ((LA(1) == '0') && (LA(2) == 'x')) {
                            mHEX_LITERAL(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (LA(2) == '=')) {
                            mLESSEQUALSIGN(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (LA(2) == '=')) {
                            mGREATEREQUALSIGN(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '0') && (true)) {
                            mOCTAL_LITERAL(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (true)) {
                            mLESSTHANSIGN(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (true)) {
                            mGREATERTHANSIGN(true);
                            theRetToken = _returnToken;
                        } else {
                            if (LA(1) == EOF_CHAR) {
                                uponEOF();
                                _returnToken = makeToken(Token.EOF_TYPE);
                            } else {
                                throw new NoViableAltForCharException((char) LA(1), getFilename(), getLine(), getColumn());
                            }
                        }
                }
                // found SKIP token
                if (_returnToken == null)
                    continue tryAgain;
                _ttype = _returnToken.getType();
                _ttype = testLiteralsTable(_ttype);
                _returnToken.setType(_ttype);
                return _returnToken;
            } catch (RecognitionException e) {
                throw new TokenStreamRecognitionException(e);
            }
        } catch (CharStreamException cse) {
            if (cse instanceof CharStreamIOException) {
                throw new TokenStreamIOException(((CharStreamIOException) cse).io);
            } else {
                throw new TokenStreamException(cse.getMessage());
            }
        }
    }
}
Also used : TokenStreamException(antlr.TokenStreamException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) NoViableAltForCharException(antlr.NoViableAltForCharException) CharStreamException(antlr.CharStreamException) CharStreamIOException(antlr.CharStreamIOException) Token(antlr.Token) CommonToken(antlr.CommonToken) TokenStreamIOException(antlr.TokenStreamIOException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) RecognitionException(antlr.RecognitionException)

Example 4 with CharStreamIOException

use of antlr.CharStreamIOException in project ili2db by claeis.

the class SqlLexer method nextToken.

public Token nextToken() throws TokenStreamException {
    Token theRetToken = null;
    tryAgain: for (; ; ) {
        Token _token = null;
        int _ttype = Token.INVALID_TYPE;
        resetText();
        try {
            // for char stream error handling
            try {
                // for lexical error handling
                switch(LA(1)) {
                    case '\t':
                    case '\n':
                    case '\u000c':
                    case '\r':
                    case ' ':
                        {
                            mWS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ',':
                        {
                            mCOMMA(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '.':
                        {
                            mDOT(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '?':
                        {
                            mQUESTION(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '(':
                        {
                            mLPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ')':
                        {
                            mRPAREN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '=':
                        {
                            mEQUALS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '\'':
                        {
                            mSTRING(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '+':
                    case '-':
                    case '0':
                    case '1':
                    case '2':
                    case '3':
                    case '4':
                    case '5':
                    case '6':
                    case '7':
                    case '8':
                    case '9':
                        {
                            mNUMBER(true);
                            theRetToken = _returnToken;
                            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':
                    case '_':
                    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':
                        {
                            mNAME(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    default:
                        {
                            if (LA(1) == EOF_CHAR) {
                                uponEOF();
                                _returnToken = makeToken(Token.EOF_TYPE);
                            } else {
                                throw new NoViableAltForCharException((char) LA(1), getFilename(), getLine(), getColumn());
                            }
                        }
                }
                // found SKIP token
                if (_returnToken == null)
                    continue tryAgain;
                _ttype = _returnToken.getType();
                _returnToken.setType(_ttype);
                return _returnToken;
            } catch (RecognitionException e) {
                throw new TokenStreamRecognitionException(e);
            }
        } catch (CharStreamException cse) {
            if (cse instanceof CharStreamIOException) {
                throw new TokenStreamIOException(((CharStreamIOException) cse).io);
            } else {
                throw new TokenStreamException(cse.getMessage());
            }
        }
    }
}
Also used : TokenStreamException(antlr.TokenStreamException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) NoViableAltForCharException(antlr.NoViableAltForCharException) CharStreamException(antlr.CharStreamException) CharStreamIOException(antlr.CharStreamIOException) Token(antlr.Token) CommonToken(antlr.CommonToken) TokenStreamIOException(antlr.TokenStreamIOException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) RecognitionException(antlr.RecognitionException)

Example 5 with CharStreamIOException

use of antlr.CharStreamIOException in project jbosstools-hibernate by jbosstools.

the class HQLBaseLexer method nextToken.

public Token nextToken() throws TokenStreamException {
    Token theRetToken = null;
    tryAgain: for (; ; ) {
        Token _token = null;
        int _ttype = Token.INVALID_TYPE;
        resetText();
        try {
            // for char stream error handling
            try {
                // for lexical error handling
                switch(LA(1)) {
                    case '=':
                        {
                            mEQ(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '!':
                    case '^':
                        {
                            mNE(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ',':
                        {
                            mCOMMA(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '(':
                        {
                            mOPEN(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ')':
                        {
                            mCLOSE(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '[':
                        {
                            mOPEN_BRACKET(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ']':
                        {
                            mCLOSE_BRACKET(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '|':
                        {
                            mCONCAT(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '+':
                        {
                            mPLUS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '-':
                        {
                            mMINUS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '*':
                        {
                            mSTAR(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '/':
                        {
                            mDIV(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '%':
                        {
                            mMOD(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case ':':
                        {
                            mCOLON(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '?':
                        {
                            mPARAM(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '\'':
                        {
                            mQUOTED_STRING(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '\t':
                    case '\n':
                    case '\r':
                    case ' ':
                        {
                            mWS(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    case '.':
                    case '0':
                    case '1':
                    case '2':
                    case '3':
                    case '4':
                    case '5':
                    case '6':
                    case '7':
                    case '8':
                    case '9':
                        {
                            mNUM_INT(true);
                            theRetToken = _returnToken;
                            break;
                        }
                    default:
                        if ((LA(1) == '<') && (LA(2) == '>')) {
                            mSQL_NE(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (LA(2) == '=')) {
                            mLE(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (LA(2) == '=')) {
                            mGE(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '<') && (true)) {
                            mLT(true);
                            theRetToken = _returnToken;
                        } else if ((LA(1) == '>') && (true)) {
                            mGT(true);
                            theRetToken = _returnToken;
                        } else if ((_tokenSet_0.member(LA(1)))) {
                            mIDENT(true);
                            theRetToken = _returnToken;
                        } else {
                            if (LA(1) == EOF_CHAR) {
                                uponEOF();
                                _returnToken = makeToken(Token.EOF_TYPE);
                            } else {
                                throw new NoViableAltForCharException((char) LA(1), getFilename(), getLine(), getColumn());
                            }
                        }
                }
                // found SKIP token
                if (_returnToken == null)
                    continue tryAgain;
                _ttype = _returnToken.getType();
                _returnToken.setType(_ttype);
                return _returnToken;
            } catch (RecognitionException e) {
                throw new TokenStreamRecognitionException(e);
            }
        } catch (CharStreamException cse) {
            if (cse instanceof CharStreamIOException) {
                throw new TokenStreamIOException(((CharStreamIOException) cse).io);
            } else {
                throw new TokenStreamException(cse.getMessage());
            }
        }
    }
}
Also used : TokenStreamException(antlr.TokenStreamException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) NoViableAltForCharException(antlr.NoViableAltForCharException) CharStreamException(antlr.CharStreamException) CharStreamIOException(antlr.CharStreamIOException) Token(antlr.Token) TokenStreamIOException(antlr.TokenStreamIOException) TokenStreamRecognitionException(antlr.TokenStreamRecognitionException) RecognitionException(antlr.RecognitionException)

Aggregations

CharStreamException (antlr.CharStreamException)6 CharStreamIOException (antlr.CharStreamIOException)6 NoViableAltForCharException (antlr.NoViableAltForCharException)6 RecognitionException (antlr.RecognitionException)6 Token (antlr.Token)6 TokenStreamException (antlr.TokenStreamException)6 TokenStreamIOException (antlr.TokenStreamIOException)6 TokenStreamRecognitionException (antlr.TokenStreamRecognitionException)6 CommonToken (antlr.CommonToken)5