Search in sources :

Example 31 with Token

use of antlr.Token in project cxf by apache.

the class IDLLexer method mNONZERODIGIT.

protected final void mNONZERODIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype;
    Token _token = null;
    int _begin = text.length();
    _ttype = NONZERODIGIT;
    int _saveIndex;
    matchRange('1', '9');
    if (_createToken && _token == null && _ttype != Token.SKIP) {
        _token = makeToken(_ttype);
        _token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
    }
    _returnToken = _token;
}
Also used : Token(antlr.Token) CommonToken(antlr.CommonToken) ANTLRHashString(antlr.ANTLRHashString)

Example 32 with Token

use of antlr.Token in project cxf by apache.

the class IDLLexer method mSTRING_LITERAL.

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;
    _saveIndex = text.length();
    match('"');
    text.setLength(_saveIndex);
    {
        _loop342: do {
            if ((LA(1) == '\\')) {
                mESC(false);
            } else if ((_tokenSet_7.member(LA(1)))) {
                matchNot('"');
            } else {
                break _loop342;
            }
        } while (true);
    }
    _saveIndex = text.length();
    match('"');
    text.setLength(_saveIndex);
    if (_createToken && _token == null && _ttype != Token.SKIP) {
        _token = makeToken(_ttype);
        _token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
    }
    _returnToken = _token;
}
Also used : Token(antlr.Token) CommonToken(antlr.CommonToken) ANTLRHashString(antlr.ANTLRHashString)

Example 33 with Token

use of antlr.Token in project cxf by apache.

the class IDLLexer method mSTAR.

public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype;
    Token _token = null;
    int _begin = text.length();
    _ttype = STAR;
    int _saveIndex;
    match('*');
    if (_createToken && _token == null && _ttype != Token.SKIP) {
        _token = makeToken(_ttype);
        _token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
    }
    _returnToken = _token;
}
Also used : Token(antlr.Token) CommonToken(antlr.CommonToken) ANTLRHashString(antlr.ANTLRHashString)

Example 34 with Token

use of antlr.Token in project cxf by apache.

the class IDLLexer method mRBRACK.

public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype;
    Token _token = null;
    int _begin = text.length();
    _ttype = RBRACK;
    int _saveIndex;
    match(']');
    if (_createToken && _token == null && _ttype != Token.SKIP) {
        _token = makeToken(_ttype);
        _token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
    }
    _returnToken = _token;
}
Also used : Token(antlr.Token) CommonToken(antlr.CommonToken) ANTLRHashString(antlr.ANTLRHashString)

Example 35 with Token

use of antlr.Token in project cxf by apache.

the class IDLLexer method mOR.

public final void mOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype;
    Token _token = null;
    int _begin = text.length();
    _ttype = OR;
    int _saveIndex;
    match('|');
    if (_createToken && _token == null && _ttype != Token.SKIP) {
        _token = makeToken(_ttype);
        _token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
    }
    _returnToken = _token;
}
Also used : Token(antlr.Token) CommonToken(antlr.CommonToken) ANTLRHashString(antlr.ANTLRHashString)

Aggregations

Token (antlr.Token)75 CommonToken (antlr.CommonToken)66 ANTLRHashString (antlr.ANTLRHashString)64 NoViableAltForCharException (antlr.NoViableAltForCharException)18 RecognitionException (antlr.RecognitionException)3 CharStreamException (antlr.CharStreamException)2 CharStreamIOException (antlr.CharStreamIOException)2 TokenStreamException (antlr.TokenStreamException)2 TokenStreamIOException (antlr.TokenStreamIOException)2 TokenStreamRecognitionException (antlr.TokenStreamRecognitionException)2 AST (antlr.collections.AST)2 Constructor (java.lang.reflect.Constructor)2 GroovyLexer (org.codehaus.groovy.antlr.parser.GroovyLexer)2 GroovyRecognizer (org.codehaus.groovy.antlr.parser.GroovyRecognizer)2 ASTPair (antlr.ASTPair)1 CharScanner (antlr.CharScanner)1 NoViableAltException (antlr.NoViableAltException)1 BadLocationException (javax.swing.text.BadLocationException)1