Package antlr.collections

Examples of antlr.collections.AST


 
  public final void throwsClause() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST throwsClause_AST = null;
   
    nls();
    AST tmp178_AST = null;
    tmp178_AST = astFactory.create(LT(1));
    astFactory.makeASTRoot(currentAST, tmp178_AST);
    match(LITERAL_throws);
    nls();
    identifier();
View Full Code Here


 
  public final void compoundStatement() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST compoundStatement_AST = null;
   
    openBlock();
    astFactory.addASTChild(currentAST, returnAST);
    compoundStatement_AST = (AST)currentAST.root;
    returnAST = compoundStatement_AST;
View Full Code Here

    AST mods
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST constructorDefinition_AST = null;
    Token  id = null;
    AST id_AST = null;
    AST param_AST = null;
    AST tc_AST = null;
    AST cb_AST = null;
    Token first = cloneToken(LT(1));
    if (mods != null) {
    first.setLine(mods.getLine());
    first.setColumn(mods.getColumn());
    }
View Full Code Here

 
  public final void multipleAssignmentDeclarationStart() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST multipleAssignmentDeclarationStart_AST = null;
   
    {
    _loop221:
    do {
      switch ( LA(1)) {
      case FINAL:
      case ABSTRACT:
      case STRICTFP:
      case LITERAL_static:
      case LITERAL_private:
      case LITERAL_public:
      case LITERAL_protected:
      case LITERAL_transient:
      case LITERAL_native:
      case LITERAL_threadsafe:
      case LITERAL_synchronized:
      case LITERAL_volatile:
      {
        modifier();
        astFactory.addASTChild(currentAST, returnAST);
        nls();
        astFactory.addASTChild(currentAST, returnAST);
        break;
      }
      case AT:
      {
        annotation();
        astFactory.addASTChild(currentAST, returnAST);
        nls();
        astFactory.addASTChild(currentAST, returnAST);
        break;
      }
      default:
      {
        break _loop221;
      }
      }
    } while (true);
    }
    AST tmp182_AST = null;
    tmp182_AST = astFactory.create(LT(1));
    astFactory.addASTChild(currentAST, tmp182_AST);
    match(LITERAL_def);
    nls();
    astFactory.addASTChild(currentAST, returnAST);
    AST tmp183_AST = null;
    tmp183_AST = astFactory.create(LT(1));
    astFactory.addASTChild(currentAST, tmp183_AST);
    match(LPAREN);
    multipleAssignmentDeclarationStart_AST = (AST)currentAST.root;
    returnAST = multipleAssignmentDeclarationStart_AST;
View Full Code Here

 
  public final void multipleAssignmentDeclaration() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST multipleAssignmentDeclaration_AST = null;
    AST mods_AST = null;
    AST t_AST = null;
    Token first = cloneToken(LT(1));
   
    modifiers();
    mods_AST = (AST)returnAST;
    {
    switch ( LA(1)) {
    case IDENT:
    case LITERAL_void:
    case LITERAL_boolean:
    case LITERAL_byte:
    case LITERAL_char:
    case LITERAL_short:
    case LITERAL_int:
    case LITERAL_float:
    case LITERAL_long:
    case LITERAL_double:
    {
      typeSpec(false);
      t_AST = (AST)returnAST;
      break;
    }
    case LPAREN:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    AST tmp184_AST = null;
    tmp184_AST = astFactory.create(LT(1));
    astFactory.makeASTRoot(currentAST, tmp184_AST);
    match(LPAREN);
    nls();
    typeNamePairs(mods_AST,first);
    astFactory.addASTChild(currentAST, returnAST);
    match(RPAREN);
    AST tmp186_AST = null;
    tmp186_AST = astFactory.create(LT(1));
    astFactory.makeASTRoot(currentAST, tmp186_AST);
    match(ASSIGN);
    nls();
    assignmentExpression(0);
View Full Code Here

 
  public final void constructorBody() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST constructorBody_AST = null;
    AST eci_AST = null;
    AST bb1_AST = null;
    AST bb2_AST = null;
    Token first = LT(1);
   
    match(LCURLY);
    nls();
    {
View Full Code Here

/** Catch obvious constructor calls, but not the expr.super(...) calls */
  public final void explicitConstructorInvocation() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST explicitConstructorInvocation_AST = null;
    Token  lp1 = null;
    AST lp1_AST = null;
    Token  lp2 = null;
    AST lp2_AST = null;
   
    {
    switch ( LA(1)) {
    case LT:
    {
      typeArguments();
      astFactory.addASTChild(currentAST, returnAST);
      break;
    }
    case LITERAL_super:
    case LITERAL_this:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    switch ( LA(1)) {
    case LITERAL_this:
    {
      match(LITERAL_this);
      lp1 = LT(1);
      lp1_AST = astFactory.create(lp1);
      astFactory.makeASTRoot(currentAST, lp1_AST);
      match(LPAREN);
      argList();
      astFactory.addASTChild(currentAST, returnAST);
      match(RPAREN);
      if ( inputState.guessing==0 ) {
        lp1_AST.setType(CTOR_CALL);
      }
      break;
    }
    case LITERAL_super:
    {
      match(LITERAL_super);
      lp2 = LT(1);
      lp2_AST = astFactory.create(lp2);
      astFactory.makeASTRoot(currentAST, lp2_AST);
      match(LPAREN);
      argList();
      astFactory.addASTChild(currentAST, returnAST);
      match(RPAREN);
      if ( inputState.guessing==0 ) {
        lp2_AST.setType(SUPER_CTOR_CALL);
      }
      break;
    }
    default:
    {
View Full Code Here

    AST mods, AST t, Token first
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST listOfVariables_AST = null;
   
    variableDeclarator(getASTFactory().dupTree(mods),
                           getASTFactory().dupTree(t),first);
    astFactory.addASTChild(currentAST, returnAST);
    {
View Full Code Here

    AST mods, AST t,Token first
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST variableDeclarator_AST = null;
    AST id_AST = null;
    AST v_AST = null;
   
    variableName();
    id_AST = (AST)returnAST;
    {
    switch ( LA(1)) {
View Full Code Here

    AST mods, Token first
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST typeNamePairs_AST = null;
    AST t_AST = null;
    AST tn_AST = null;
   
    {
    if ((_tokenSet_24.member(LA(1))) && (_tokenSet_31.member(LA(2)))) {
      typeSpec(false);
      t_AST = (AST)returnAST;
View Full Code Here

TOP

Related Classes of antlr.collections.AST

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.