Package antlr.collections

Examples of antlr.collections.AST


    int lc_stmt
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST assignmentExpression_AST = null;
   
    conditionalExpression(lc_stmt);
    astFactory.addASTChild(currentAST, returnAST);
    {
    switch ( LA(1)) {
    case ASSIGN:
    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 STAR_STAR_ASSIGN:
    {
      {
      switch ( LA(1)) {
      case ASSIGN:
      {
        AST tmp195_AST = null;
        tmp195_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp195_AST);
        match(ASSIGN);
        break;
      }
      case PLUS_ASSIGN:
      {
        AST tmp196_AST = null;
        tmp196_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp196_AST);
        match(PLUS_ASSIGN);
        break;
      }
      case MINUS_ASSIGN:
      {
        AST tmp197_AST = null;
        tmp197_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp197_AST);
        match(MINUS_ASSIGN);
        break;
      }
      case STAR_ASSIGN:
      {
        AST tmp198_AST = null;
        tmp198_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp198_AST);
        match(STAR_ASSIGN);
        break;
      }
      case DIV_ASSIGN:
      {
        AST tmp199_AST = null;
        tmp199_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp199_AST);
        match(DIV_ASSIGN);
        break;
      }
      case MOD_ASSIGN:
      {
        AST tmp200_AST = null;
        tmp200_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp200_AST);
        match(MOD_ASSIGN);
        break;
      }
      case SR_ASSIGN:
      {
        AST tmp201_AST = null;
        tmp201_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp201_AST);
        match(SR_ASSIGN);
        break;
      }
      case BSR_ASSIGN:
      {
        AST tmp202_AST = null;
        tmp202_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp202_AST);
        match(BSR_ASSIGN);
        break;
      }
      case SL_ASSIGN:
      {
        AST tmp203_AST = null;
        tmp203_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp203_AST);
        match(SL_ASSIGN);
        break;
      }
      case BAND_ASSIGN:
      {
        AST tmp204_AST = null;
        tmp204_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp204_AST);
        match(BAND_ASSIGN);
        break;
      }
      case BXOR_ASSIGN:
      {
        AST tmp205_AST = null;
        tmp205_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp205_AST);
        match(BXOR_ASSIGN);
        break;
      }
      case BOR_ASSIGN:
      {
        AST tmp206_AST = null;
        tmp206_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp206_AST);
        match(BOR_ASSIGN);
        break;
      }
      case STAR_STAR_ASSIGN:
      {
        AST tmp207_AST = null;
        tmp207_AST = astFactory.create(LT(1));
        astFactory.makeASTRoot(currentAST, tmp207_AST);
        match(STAR_STAR_ASSIGN);
        break;
      }
View Full Code Here


*/
  public final void nlsWarn() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST nlsWarn_AST = null;
   
    {
    boolean synPredMatched576 = false;
    if (((_tokenSet_69.member(LA(1))) && (_tokenSet_1.member(LA(2))))) {
      int _m576 = mark();
View Full Code Here

/** An open block is not allowed to have closure arguments. */
  public final void openBlock() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST openBlock_AST = null;
    AST bb_AST = null;
    Token first = LT(1);
   
    match(LCURLY);
    nls();
    blockBody(EOF);
View Full Code Here

 
  public final void variableName() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST variableName_AST = null;
   
    AST tmp210_AST = null;
    tmp210_AST = astFactory.create(LT(1));
    astFactory.addASTChild(currentAST, tmp210_AST);
    match(IDENT);
    variableName_AST = (AST)currentAST.root;
    returnAST = variableName_AST;
View Full Code Here

 
  public final void expressionStatementNoCheck() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST expressionStatementNoCheck_AST = null;
    AST head_AST = null;
    AST cmd_AST = null;
    boolean isPathExpr = false;
   
    expression(LC_STMT);
    head_AST = (AST)returnAST;
    astFactory.addASTChild(currentAST, returnAST);
View Full Code Here

/** A formal parameter for a method or closure. */
  public final void parameterDeclaration() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST parameterDeclaration_AST = null;
    AST pm_AST = null;
    AST t_AST = null;
    Token  id = null;
    AST id_AST = null;
    AST exp_AST = null;
    Token first = LT(1);boolean spreadParam = false;
   
    parameterModifiersOpt();
    pm_AST = (AST)returnAST;
    {
View Full Code Here

 
  public final void parameterModifiersOpt() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST parameterModifiersOpt_AST = null;
    Token first = LT(1);int seenDef = 0;
   
    {
    _loop263:
    do {
      switch ( LA(1)) {
      case FINAL:
      {
        AST tmp212_AST = null;
        tmp212_AST = astFactory.create(LT(1));
        astFactory.addASTChild(currentAST, tmp212_AST);
        match(FINAL);
        nls();
        break;
View Full Code Here

    boolean addImplicit
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST closableBlockParamsOpt_AST = null;
   
    boolean synPredMatched266 = false;
    if (((_tokenSet_74.member(LA(1))) && (_tokenSet_75.member(LA(2))))) {
      int _m266 = mark();
      synPredMatched266 = true;
View Full Code Here

*/
  public final void implicitParameters() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST implicitParameters_AST = null;
    Token first = LT(1);
   
    if ( inputState.guessing==0 ) {
      implicitParameters_AST = (AST)currentAST.root;
      implicitParameters_AST = (AST)astFactory.make( (new ASTArray(1)).add(create(IMPLICIT_PARAMETERS,"IMPLICIT_PARAMETERS",first,LT(1))));
      currentAST.root = implicitParameters_AST;
      currentAST.child = implicitParameters_AST!=null &&implicitParameters_AST.getFirstChild()!=null ?
        implicitParameters_AST.getFirstChild() : implicitParameters_AST;
      currentAST.advanceChildToEnd();
    }
    implicitParameters_AST = (AST)currentAST.root;
    returnAST = implicitParameters_AST;
  }
View Full Code Here

            parser.compilationUnit();
        } catch (OutOfMemoryError e) {
            log.error("Out of memory while processing: " + packagePath + "/" + file);
            throw e;
        }
        AST ast = parser.getAST();

        // modify the Java AST into a Groovy AST (just token types)
        Visitor java2groovyConverter = new Java2GroovyConverter(tokenNames);
        AntlrASTProcessor java2groovyTraverser = new PreOrderTraversal(java2groovyConverter);
        java2groovyTraverser.process(ast);
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.