Package antlr.collections.impl

Examples of antlr.collections.impl.ASTArray


        classBlock();
        cb_AST = (AST) returnAST;
        if ( inputState.guessing == 0 )
        {
            classDefinition_AST = (AST) currentAST.root;
            classDefinition_AST = (AST) astFactory.make( (new ASTArray( 6 )).add( astFactory.create( CLASS_DEF,
                                                                                                     "CLASS_DEF" ) ).add( modifiers ).add( tmp35_AST ).add( sc_AST ).add( ic_AST ).add( cb_AST ) );
            currentAST.root = classDefinition_AST;
            currentAST.child = classDefinition_AST != null && classDefinition_AST.getFirstChild() != null ? classDefinition_AST.getFirstChild() : classDefinition_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here


        classBlock();
        cb_AST = (AST) returnAST;
        if ( inputState.guessing == 0 )
        {
            interfaceDefinition_AST = (AST) currentAST.root;
            interfaceDefinition_AST = (AST) astFactory.make( (new ASTArray( 5 )).add( astFactory.create( INTERFACE_DEF,
                                                                                                         "INTERFACE_DEF" ) ).add( modifiers ).add( tmp37_AST ).add( ie_AST ).add( cb_AST ) );
            currentAST.root = interfaceDefinition_AST;
            currentAST.child = interfaceDefinition_AST != null && interfaceDefinition_AST.getFirstChild() != null ? interfaceDefinition_AST.getFirstChild() : interfaceDefinition_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here

        {
            classTypeSpec_AST = (AST) currentAST.root;

            if ( addImagNode )
            {
                classTypeSpec_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( TYPE,
                                                                                                       "TYPE" ) ).add( classTypeSpec_AST ) );
            }

            currentAST.root = classTypeSpec_AST;
            currentAST.child = classTypeSpec_AST != null && classTypeSpec_AST.getFirstChild() != null ? classTypeSpec_AST.getFirstChild() : classTypeSpec_AST;
View Full Code Here

        {
            builtInTypeSpec_AST = (AST) currentAST.root;

            if ( addImagNode )
            {
                builtInTypeSpec_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( TYPE,
                                                                                                         "TYPE" ) ).add( builtInTypeSpec_AST ) );
            }

            currentAST.root = builtInTypeSpec_AST;
            currentAST.child = builtInTypeSpec_AST != null && builtInTypeSpec_AST.getFirstChild() != null ? builtInTypeSpec_AST.getFirstChild() : builtInTypeSpec_AST;
View Full Code Here

            }
        }
        if ( inputState.guessing == 0 )
        {
            superClassClause_AST = (AST) currentAST.root;
            superClassClause_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( EXTENDS_CLAUSE,
                                                                                                      "EXTENDS_CLAUSE" ) ).add( id_AST ) );
            currentAST.root = superClassClause_AST;
            currentAST.child = superClassClause_AST != null && superClassClause_AST.getFirstChild() != null ? superClassClause_AST.getFirstChild() : superClassClause_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here

            }
        }
        if ( inputState.guessing == 0 )
        {
            implementsClause_AST = (AST) currentAST.root;
            implementsClause_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( IMPLEMENTS_CLAUSE,
                                                                                                      "IMPLEMENTS_CLAUSE" ) ).add( implementsClause_AST ) );
            currentAST.root = implementsClause_AST;
            currentAST.child = implementsClause_AST != null && implementsClause_AST.getFirstChild() != null ? implementsClause_AST.getFirstChild() : implementsClause_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here

        }
        match( RCURLY );
        if ( inputState.guessing == 0 )
        {
            classBlock_AST = (AST) currentAST.root;
            classBlock_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( OBJBLOCK,
                                                                                                "OBJBLOCK" ) ).add( classBlock_AST ) );
            currentAST.root = classBlock_AST;
            currentAST.child = classBlock_AST != null && classBlock_AST.getFirstChild() != null ? classBlock_AST.getFirstChild() : classBlock_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here

            }
        }
        if ( inputState.guessing == 0 )
        {
            interfaceExtends_AST = (AST) currentAST.root;
            interfaceExtends_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( EXTENDS_CLAUSE,
                                                                                                      "EXTENDS_CLAUSE" ) ).add( interfaceExtends_AST ) );
            currentAST.root = interfaceExtends_AST;
            currentAST.child = interfaceExtends_AST != null && interfaceExtends_AST.getFirstChild() != null ? interfaceExtends_AST.getFirstChild() : interfaceExtends_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here

                            constructorBody();
                            s_AST = (AST) returnAST;
                            if ( inputState.guessing == 0 )
                            {
                                field_AST = (AST) currentAST.root;
                                field_AST = (AST) astFactory.make( (new ASTArray( 4 )).add( astFactory.create( CTOR_DEF,
                                                                                                               "CTOR_DEF" ) ).add( mods_AST ).add( h_AST ).add( s_AST ) );
                                currentAST.root = field_AST;
                                currentAST.child = field_AST != null && field_AST.getFirstChild() != null ? field_AST.getFirstChild() : field_AST;
                                currentAST.advanceChildToEnd();
                            }
                        }
                        else if ( (_tokenSet_10.member( LA( 1 ) )) && (_tokenSet_11.member( LA( 2 ) )) )
                        {
                            typeSpec( false );
                            t_AST = (AST) returnAST;
                            {
                                if ( (LA( 1 ) == IDENT) && (LA( 2 ) == LPAREN) )
                                {
                                    AST tmp68_AST = null;
                                    tmp68_AST = astFactory.create( LT( 1 ) );
                                    match( IDENT );
                                    match( LPAREN );
                                    parameterDeclarationList();
                                    param_AST = (AST) returnAST;
                                    match( RPAREN );
                                    declaratorBrackets( t_AST );
                                    rt_AST = (AST) returnAST;
                                    {
                                        switch ( LA( 1 ) )
                                        {
                                            case LITERAL_throws :
                                            {
                                                throwsClause();
                                                tc_AST = (AST) returnAST;
                                                break;
                                            }
                                            case LCURLY :
                                            case SEMI :
                                            {
                                                break;
                                            }
                                            default :
                                            {
                                                throw new NoViableAltException( LT( 1 ),
                                                                                getFilename() );
                                            }
                                        }
                                    }
                                    {
                                        switch ( LA( 1 ) )
                                        {
                                            case LCURLY :
                                            {
                                                compoundStatement();
                                                s2_AST = (AST) returnAST;
                                                break;
                                            }
                                            case SEMI :
                                            {
                                                AST tmp71_AST = null;
                                                tmp71_AST = astFactory.create( LT( 1 ) );
                                                match( SEMI );
                                                break;
                                            }
                                            default :
                                            {
                                                throw new NoViableAltException( LT( 1 ),
                                                                                getFilename() );
                                            }
                                        }
                                    }
                                    if ( inputState.guessing == 0 )
                                    {
                                        field_AST = (AST) currentAST.root;
                                        field_AST = (AST) astFactory.make( (new ASTArray( 7 )).add( astFactory.create( METHOD_DEF,
                                                                                                                       "METHOD_DEF" ) ).add( mods_AST ).add( (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( TYPE,
                                                                                                                                                                                                                                "TYPE" ) ).add( rt_AST ) ) ).add( tmp68_AST ).add( param_AST ).add( tc_AST ).add( s2_AST ) );
                                        currentAST.root = field_AST;
                                        currentAST.child = field_AST != null && field_AST.getFirstChild() != null ? field_AST.getFirstChild() : field_AST;
                                        currentAST.advanceChildToEnd();
                                    }
                                }
                                else if ( (LA( 1 ) == IDENT) && (_tokenSet_12.member( LA( 2 ) )) )
                                {
                                    variableDefinitions( mods_AST,
                                                         t_AST );
                                    v_AST = (AST) returnAST;
                                    AST tmp72_AST = null;
                                    tmp72_AST = astFactory.create( LT( 1 ) );
                                    match( SEMI );
                                    if ( inputState.guessing == 0 )
                                    {
                                        field_AST = (AST) currentAST.root;
                                        field_AST = v_AST;
                                        currentAST.root = field_AST;
                                        currentAST.child = field_AST != null && field_AST.getFirstChild() != null ? field_AST.getFirstChild() : field_AST;
                                        currentAST.advanceChildToEnd();
                                    }
                                }
                                else
                                {
                                    throw new NoViableAltException( LT( 1 ),
                                                                    getFilename() );
                                }

                            }
                        }
                        else
                        {
                            throw new NoViableAltException( LT( 1 ),
                                                            getFilename() );
                        }
                }
            }
        }
        else if ( (LA( 1 ) == LITERAL_static) && (LA( 2 ) == LCURLY) )
        {
            match( LITERAL_static );
            compoundStatement();
            s3_AST = (AST) returnAST;
            if ( inputState.guessing == 0 )
            {
                field_AST = (AST) currentAST.root;
                field_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( STATIC_INIT,
                                                                                               "STATIC_INIT" ) ).add( s3_AST ) );
                currentAST.root = field_AST;
                currentAST.child = field_AST != null && field_AST.getFirstChild() != null ? field_AST.getFirstChild() : field_AST;
                currentAST.advanceChildToEnd();
            }
        }
        else if ( (LA( 1 ) == LCURLY) )
        {
            compoundStatement();
            s4_AST = (AST) returnAST;
            if ( inputState.guessing == 0 )
            {
                field_AST = (AST) currentAST.root;
                field_AST = (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( INSTANCE_INIT,
                                                                                               "INSTANCE_INIT" ) ).add( s4_AST ) );
                currentAST.root = field_AST;
                currentAST.child = field_AST != null && field_AST.getFirstChild() != null ? field_AST.getFirstChild() : field_AST;
                currentAST.advanceChildToEnd();
            }
View Full Code Here

        varInitializer();
        v_AST = (AST) returnAST;
        if ( inputState.guessing == 0 )
        {
            variableDeclarator_AST = (AST) currentAST.root;
            variableDeclarator_AST = (AST) astFactory.make( (new ASTArray( 5 )).add( astFactory.create( VARIABLE_DEF,
                                                                                                        "VARIABLE_DEF" ) ).add( mods ).add( (AST) astFactory.make( (new ASTArray( 2 )).add( astFactory.create( TYPE,
                                                                                                                                                                                                               "TYPE" ) ).add( d_AST ) ) ).add( id_AST ).add( v_AST ) );
            currentAST.root = variableDeclarator_AST;
            currentAST.child = variableDeclarator_AST != null && variableDeclarator_AST.getFirstChild() != null ? variableDeclarator_AST.getFirstChild() : variableDeclarator_AST;
            currentAST.advanceChildToEnd();
        }
View Full Code Here

TOP

Related Classes of antlr.collections.impl.ASTArray

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.