Package antlr

Examples of antlr.Token


    public final void mBOR(boolean _createToken) throws RecognitionException,
                                                CharStreamException,
                                                TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = BOR;
        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;
    }
View Full Code Here


    public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException,
                                                       CharStreamException,
                                                       TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = BOR_ASSIGN;
        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;
    }
View Full Code Here

    public final void mLOR(boolean _createToken) throws RecognitionException,
                                                CharStreamException,
                                                TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = LOR;
        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;
    }
View Full Code Here

    public final void mBAND(boolean _createToken) throws RecognitionException,
                                                 CharStreamException,
                                                 TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = BAND;
        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;
    }
View Full Code Here

    public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException,
                                                        CharStreamException,
                                                        TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = BAND_ASSIGN;
        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;
    }
View Full Code Here

    public final void mLAND(boolean _createToken) throws RecognitionException,
                                                 CharStreamException,
                                                 TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = LAND;
        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;
    }
View Full Code Here

    public final void mSEMI(boolean _createToken) throws RecognitionException,
                                                 CharStreamException,
                                                 TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = SEMI;
        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;
    }
View Full Code Here

    public final void mWS(boolean _createToken) throws RecognitionException,
                                               CharStreamException,
                                               TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = WS;
        int _saveIndex;

        {
            int _cnt256 = 0;
            _loop256 : do
            {
                switch ( LA( 1 ) )
                {
                    case ' ' :
                    {
                        match( ' ' );
                        break;
                    }
                    case '\t' :
                    {
                        match( '\t' );
                        break;
                    }
                    case '\u000c' :
                    {
                        match( '\f' );
                        break;
                    }
                    case '\n' :
                    case '\r' :
                    {
                        {
                            if ( (LA( 1 ) == '\r') && (LA( 2 ) == '\n') && (true) && (true) )
                            {
                                match( "\r\n" );
                            }
                            else if ( (LA( 1 ) == '\r') && (true) && (true) && (true) )
                            {
                                match( '\r' );
                            }
                            else if ( (LA( 1 ) == '\n') )
                            {
                                match( '\n' );
                            }
                            else
                            {
                                throw new NoViableAltForCharException( (char) LA( 1 ),
                                                                       getFilename(),
                                                                       getLine(),
                                                                       getColumn() );
                            }

                        }
                        newline();
                        break;
                    }
                    default :
                    {
                        if ( _cnt256 >= 1 )
                        {
                            break _loop256;
                        }
                        else
                        {
                            throw new NoViableAltForCharException( (char) LA( 1 ),
                                                                   getFilename(),
                                                                   getLine(),
                                                                   getColumn() );
                        }
                    }
                }
                _cnt256++;
            }
            while ( true );
        }
        _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;
    }
View Full Code Here

    public final void mSL_COMMENT(boolean _createToken) throws RecognitionException,
                                                       CharStreamException,
                                                       TokenStreamException
    {
        int _ttype;
        Token _token = null;
        int _begin = text.length();
        _ttype = SL_COMMENT;
        int _saveIndex;

        match( "//" );
        {
            _loop260 : do
            {
                if ( (_tokenSet_0.member( LA( 1 ) )) )
                {
                    {
                        match( _tokenSet_0 );
                    }
                }
                else
                {
                    break _loop260;
                }

            }
            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() );
                }
            }
        }
        _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;
    }
View Full Code Here

    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( "/*" );
        {
            _loop266 : do
            {
                if ( (LA( 1 ) == '\r') && (LA( 2 ) == '\n') && ((LA( 3 ) >= '\u0003' && LA( 3 ) <= '\uffff')) && ((LA( 4 ) >= '\u0003' && LA( 4 ) <= '\uffff')) )
                {
                    match( '\r' );
                    match( '\n' );
                    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' );
                    newline();
                }
                else if ( (LA( 1 ) == '\n') )
                {
                    match( '\n' );
                    newline();
                }
                else if ( (_tokenSet_1.member( LA( 1 ) )) )
                {
                    {
                        match( _tokenSet_1 );
                    }
                }
                else
                {
                    break _loop266;
                }

            }
            while ( true );
        }
        match( "*/" );
        _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;
    }
View Full Code Here

TOP

Related Classes of antlr.Token

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.