Package antlr.collections.impl

Examples of antlr.collections.impl.ASTArray


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


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

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

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

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

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

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

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

      _cnt78++;
    } while (true);
    }
    if ( inputState.guessing==0 ) {
      declaration_AST = (TNode)currentAST.root;
      declaration_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NDeclaration)).add(declaration_AST));
      currentAST.root = declaration_AST;
      currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
        declaration_AST.getFirstChild() : declaration_AST;
      currentAST.advanceChildToEnd();
    }
View Full Code Here

    if ( inputState.guessing==0 ) {
     
      AST d2, ds2;
      d2 = astFactory.dupList(d_AST);
      ds2 = astFactory.dupList(ds_AST);
      symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds2).add(d2)));
      pushScope(declName);
     
    }
    {
    _loop245:
    do {
      if ((_tokenSet_1.member(LA(1)))) {
        declaration();
        astFactory.addASTChild(currentAST, returnAST);
      }
      else {
        break _loop245;
      }
     
    } while (true);
    }
    {
    switch ( LA(1)) {
    case VARARGS:
    {
      TNode tmp14_AST = null;
      tmp14_AST = (TNode)astFactory.create(LT(1));
      astFactory.addASTChild(currentAST, tmp14_AST);
      match(VARARGS);
      break;
    }
    case LCURLY:
    case SEMI:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    _loop248:
    do {
      if ((LA(1)==SEMI)) {
        match(SEMI);
      }
      else {
        break _loop248;
      }
     
    } while (true);
    }
    if ( inputState.guessing==0 ) {
      popScope();
    }
    compoundStatement(declName);
    astFactory.addASTChild(currentAST, returnAST);
    if ( inputState.guessing==0 ) {
      functionDef_AST = (TNode)currentAST.root;
      functionDef_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NFunctionDef)).add(functionDef_AST));
      currentAST.root = functionDef_AST;
      currentAST.child = functionDef_AST!=null &&functionDef_AST.getFirstChild()!=null ?
        functionDef_AST.getFirstChild() : functionDef_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.