Package antlr

Examples of antlr.NoViableAltException


                                match( EQUAL );
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( LT( 1 ),
                                                                getFilename() );
                            }
                        }
                    }
                    relationalExpression();
View Full Code Here


                                            match( GE );
                                            break;
                                        }
                                        default :
                                        {
                                            throw new NoViableAltException( LT( 1 ),
                                                                            getFilename() );
                                        }
                                    }
                                }
                                shiftExpression();
                                astFactory.addASTChild( currentAST,
                                                        returnAST );
                            }
                            else
                            {
                                break _loop169;
                            }

                        }
                        while ( true );
                    }
                    break;
                }
                case LITERAL_instanceof :
                {
                    AST tmp176_AST = null;
                    tmp176_AST = astFactory.create( LT( 1 ) );
                    astFactory.makeASTRoot( currentAST,
                                            tmp176_AST );
                    match( LITERAL_instanceof );
                    typeSpec( true );
                    astFactory.addASTChild( currentAST,
                                            returnAST );
                    break;
                }
                default :
                {
                    throw new NoViableAltException( LT( 1 ),
                                                    getFilename() );
                }
            }
        }
        relationalExpression_AST = (AST) currentAST.root;
View Full Code Here

                                match( BSR );
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( LT( 1 ),
                                                                getFilename() );
                            }
                        }
                    }
                    additiveExpression();
View Full Code Here

                                match( MINUS );
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( LT( 1 ),
                                                                getFilename() );
                            }
                        }
                    }
                    multiplicativeExpression();
View Full Code Here

                                match( MOD );
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( LT( 1 ),
                                                                getFilename() );
                            }
                        }
                    }
                    unaryExpression();
View Full Code Here

                unaryExpression_AST = (AST) currentAST.root;
                break;
            }
            default :
            {
                throw new NoViableAltException( LT( 1 ),
                                                getFilename() );
            }
        }
        returnAST = unaryExpression_AST;
    }
View Full Code Here

                            astFactory.addASTChild( currentAST,
                                                    returnAST );
                        }
                        else
                        {
                            throw new NoViableAltException( LT( 1 ),
                                                            getFilename() );
                        }
                    }
                }
                unaryExpressionNotPlusMinus_AST = (AST) currentAST.root;
                break;
            }
            default :
            {
                throw new NoViableAltException( LT( 1 ),
                                                getFilename() );
            }
        }
        returnAST = unaryExpressionNotPlusMinus_AST;
    }
View Full Code Here

                                    match( LITERAL_super );
                                    break;
                                }
                                default :
                                {
                                    throw new NoViableAltException( LT( 1 ),
                                                                    getFilename() );
                                }
                            }
                        }
                        break;
                    }
                    case LPAREN :
                    {
                        lp = LT( 1 );
                        lp_AST = astFactory.create( lp );
                        astFactory.makeASTRoot( currentAST,
                                                lp_AST );
                        match( LPAREN );
                        if ( inputState.guessing == 0 )
                        {
                            lp_AST.setType( METHOD_CALL );
                        }
                        argList();
                        astFactory.addASTChild( currentAST,
                                                returnAST );
                        match( RPAREN );
                        break;
                    }
                    default :
                        if ( (LA( 1 ) == LBRACK) && (LA( 2 ) == RBRACK) )
                        {
                            {
                                int _cnt191 = 0;
                                _loop191 : do
                                {
                                    if ( (LA( 1 ) == LBRACK) )
                                    {
                                        lbc = LT( 1 );
                                        lbc_AST = astFactory.create( lbc );
                                        astFactory.makeASTRoot( currentAST,
                                                                lbc_AST );
                                        match( LBRACK );
                                        if ( inputState.guessing == 0 )
                                        {
                                            lbc_AST.setType( ARRAY_DECLARATOR );
                                        }
                                        match( RBRACK );
                                    }
                                    else
                                    {
                                        if ( _cnt191 >= 1 )
                                        {
                                            break _loop191;
                                        }
                                        else
                                        {
                                            throw new NoViableAltException( LT( 1 ),
                                                                            getFilename() );
                                        }
                                    }

                                    _cnt191++;
                                }
                                while ( true );
                            }
                            AST tmp200_AST = null;
                            tmp200_AST = astFactory.create( LT( 1 ) );
                            astFactory.makeASTRoot( currentAST,
                                                    tmp200_AST );
                            match( DOT );
                            AST tmp201_AST = null;
                            tmp201_AST = astFactory.create( LT( 1 ) );
                            astFactory.addASTChild( currentAST,
                                                    tmp201_AST );
                            match( LITERAL_class );
                        }
                        else if ( (LA( 1 ) == LBRACK) && (_tokenSet_4.member( LA( 2 ) )) )
                        {
                            lb = LT( 1 );
                            lb_AST = astFactory.create( lb );
                            astFactory.makeASTRoot( currentAST,
                                                    lb_AST );
                            match( LBRACK );
                            if ( inputState.guessing == 0 )
                            {
                                lb_AST.setType( INDEX_OP );
                            }
                            expression();
                            astFactory.addASTChild( currentAST,
                                                    returnAST );
                            match( RBRACK );
                        }
                        else
                        {
                            break _loop192;
                        }
                }
            }
            while ( true );
        }
        {
            switch ( LA( 1 ) )
            {
                case INC :
                {
                    in = LT( 1 );
                    in_AST = astFactory.create( in );
                    astFactory.makeASTRoot( currentAST,
                                            in_AST );
                    match( INC );
                    if ( inputState.guessing == 0 )
                    {
                        in_AST.setType( POST_INC );
                    }
                    break;
                }
                case DEC :
                {
                    de = LT( 1 );
                    de_AST = astFactory.create( de );
                    astFactory.makeASTRoot( currentAST,
                                            de_AST );
                    match( DEC );
                    if ( inputState.guessing == 0 )
                    {
                        de_AST.setType( POST_DEC );
                    }
                    break;
                }
                case EOF :
                case RCURLY :
                case RPAREN :
                case SEMI :
                case ASSIGN :
                case RBRACK :
                case STAR :
                case COMMA :
                case COLON :
                case PLUS_ASSIGN :
                case MINUS_ASSIGN :
                case STAR_ASSIGN :
                case DIV_ASSIGN :
                case MOD_ASSIGN :
                case SR_ASSIGN :
                case BSR_ASSIGN :
                case SL_ASSIGN :
                case BAND_ASSIGN :
                case BXOR_ASSIGN :
                case BOR_ASSIGN :
                case QUESTION :
                case LOR :
                case LAND :
                case BOR :
                case BXOR :
                case BAND :
                case NOT_EQUAL :
                case EQUAL :
                case LT :
                case GT :
                case LE :
                case GE :
                case LITERAL_instanceof :
                case SL :
                case SR :
                case BSR :
                case PLUS :
                case MINUS :
                case DIV :
                case MOD :
                {
                    break;
                }
                default :
                {
                    throw new NoViableAltException( LT( 1 ),
                                                    getFilename() );
                }
            }
        }
        postfixExpression_AST = (AST) currentAST.root;
View Full Code Here

                            {
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( LT( 1 ),
                                                                getFilename() );
                            }
                        }
                    }
                    break;
                }
                case LBRACK :
                {
                    newArrayDeclarator();
                    astFactory.addASTChild( currentAST,
                                            returnAST );
                    {
                        switch ( LA( 1 ) )
                        {
                            case LCURLY :
                            {
                                arrayInitializer();
                                astFactory.addASTChild( currentAST,
                                                        returnAST );
                                break;
                            }
                            case EOF :
                            case RCURLY :
                            case LPAREN :
                            case RPAREN :
                            case SEMI :
                            case ASSIGN :
                            case LBRACK :
                            case RBRACK :
                            case DOT :
                            case STAR :
                            case COMMA :
                            case COLON :
                            case PLUS_ASSIGN :
                            case MINUS_ASSIGN :
                            case STAR_ASSIGN :
                            case DIV_ASSIGN :
                            case MOD_ASSIGN :
                            case SR_ASSIGN :
                            case BSR_ASSIGN :
                            case SL_ASSIGN :
                            case BAND_ASSIGN :
                            case BXOR_ASSIGN :
                            case BOR_ASSIGN :
                            case QUESTION :
                            case LOR :
                            case LAND :
                            case BOR :
                            case BXOR :
                            case BAND :
                            case NOT_EQUAL :
                            case EQUAL :
                            case LT :
                            case GT :
                            case LE :
                            case GE :
                            case LITERAL_instanceof :
                            case SL :
                            case SR :
                            case BSR :
                            case PLUS :
                            case MINUS :
                            case DIV :
                            case MOD :
                            case INC :
                            case DEC :
                            {
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( LT( 1 ),
                                                                getFilename() );
                            }
                        }
                    }
                    break;
                }
                default :
                {
                    throw new NoViableAltException( LT( 1 ),
                                                    getFilename() );
                }
            }
        }
        newExpression_AST = (AST) currentAST.root;
View Full Code Here

                constant_AST = (AST) currentAST.root;
                break;
            }
            default :
            {
                throw new NoViableAltException( LT( 1 ),
                                                getFilename() );
            }
        }
        returnAST = constant_AST;
    }
View Full Code Here

TOP

Related Classes of antlr.NoViableAltException

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.