Package uk.co.badgersinfoil.metaas.impl.antlr

Examples of uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree


    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:392:1: parameterDeclaration : ( basicParameterDeclaration | parameterRestDeclaration );
    public final parameterDeclaration_return parameterDeclaration() throws RecognitionException {
        parameterDeclaration_return retval = new parameterDeclaration_return();
        retval.start = input.LT(1);

        LinkedListTree root_0 = null;

        basicParameterDeclaration_return basicParameterDeclaration103 = null;

        parameterRestDeclaration_return parameterRestDeclaration104 = null;
View Full Code Here


    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:396:1: basicParameterDeclaration : ( CONST )? ident ( typeExpression )? ( parameterDefault )? -> ^( PARAM ( CONST )? ident ( typeExpression )? ( parameterDefault )? ) ;
    public final basicParameterDeclaration_return basicParameterDeclaration() throws RecognitionException {
        basicParameterDeclaration_return retval = new basicParameterDeclaration_return();
        retval.start = input.LT(1);

        LinkedListTree root_0 = null;

        Token CONST105=null;
        ident_return ident106 = null;

        typeExpression_return typeExpression107 = null;

        parameterDefault_return parameterDefault108 = null;


        LinkedListTree CONST105_tree=null;
        RewriteRuleTokenStream stream_CONST=new RewriteRuleTokenStream(adaptor,"token CONST");
        RewriteRuleSubtreeStream stream_ident=new RewriteRuleSubtreeStream(adaptor,"rule ident");
        RewriteRuleSubtreeStream stream_typeExpression=new RewriteRuleSubtreeStream(adaptor,"rule typeExpression");
        RewriteRuleSubtreeStream stream_parameterDefault=new RewriteRuleSubtreeStream(adaptor,"rule parameterDefault");
        try {
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:2: ( ( CONST )? ident ( typeExpression )? ( parameterDefault )? -> ^( PARAM ( CONST )? ident ( typeExpression )? ( parameterDefault )? ) )
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:4: ( CONST )? ident ( typeExpression )? ( parameterDefault )?
            {
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:4: ( CONST )?
            int alt27=2;
            int LA27_0 = input.LA(1);

            if ( (LA27_0==CONST) ) {
                alt27=1;
            }
            switch (alt27) {
                case 1 :
                    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:4: CONST
                    {
                    CONST105=(Token)input.LT(1);
                    match(input,CONST,FOLLOW_CONST_in_basicParameterDeclaration1349); if (failed) return retval;
                    if ( backtracking==0 ) stream_CONST.add(CONST105);


                    }
                    break;

            }

            pushFollow(FOLLOW_ident_in_basicParameterDeclaration1352);
            ident106=ident();
            _fsp--;
            if (failed) return retval;
            if ( backtracking==0 ) stream_ident.add(ident106.getTree());
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:17: ( typeExpression )?
            int alt28=2;
            int LA28_0 = input.LA(1);

            if ( (LA28_0==COLON) ) {
                alt28=1;
            }
            switch (alt28) {
                case 1 :
                    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:17: typeExpression
                    {
                    pushFollow(FOLLOW_typeExpression_in_basicParameterDeclaration1354);
                    typeExpression107=typeExpression();
                    _fsp--;
                    if (failed) return retval;
                    if ( backtracking==0 ) stream_typeExpression.add(typeExpression107.getTree());

                    }
                    break;

            }

            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:33: ( parameterDefault )?
            int alt29=2;
            int LA29_0 = input.LA(1);

            if ( (LA29_0==ASSIGN) ) {
                alt29=1;
            }
            switch (alt29) {
                case 1 :
                    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:397:33: parameterDefault
                    {
                    pushFollow(FOLLOW_parameterDefault_in_basicParameterDeclaration1357);
                    parameterDefault108=parameterDefault();
                    _fsp--;
                    if (failed) return retval;
                    if ( backtracking==0 ) stream_parameterDefault.add(parameterDefault108.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: typeExpression, ident, parameterDefault, CONST
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            if ( backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (LinkedListTree)adaptor.nil();
            // 398:3: -> ^( PARAM ( CONST )? ident ( typeExpression )? ( parameterDefault )? )
            {
                // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:398:6: ^( PARAM ( CONST )? ident ( typeExpression )? ( parameterDefault )? )
                {
                LinkedListTree root_1 = (LinkedListTree)adaptor.nil();
                root_1 = (LinkedListTree)adaptor.becomeRoot(adaptor.create(PARAM, "PARAM"), root_1);

                // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:398:14: ( CONST )?
                if ( stream_CONST.hasNext() ) {
                    adaptor.addChild(root_1, stream_CONST.next());
View Full Code Here

    return newFor(init==null      ? null : AS3FragmentParser.parseForInit(init),
                  condition==null ? null : AS3FragmentParser.parseForCond(condition),
                  iterate==null   ? null : AS3FragmentParser.parseForIter(iterate));
  }
  public static LinkedListTree newFor(LinkedListTree init, LinkedListTree condition, LinkedListTree iterate) {
    LinkedListTree forStmt = ASTUtils.newAST(AS3Parser.FOR, "for");
    forStmt.appendToken(TokenBuilder.newSpace());
    forStmt.appendToken(TokenBuilder.newLParen());
    if (init != null) {
      forStmt.addChildWithTokens(init);
    } else {
      LinkedListTree initStmt = ASTUtils.newPlaceholderAST(AS3Parser.FOR_INIT);
      forStmt.addChildWithTokens(initStmt);
    }
    forStmt.appendToken(TokenBuilder.newSemi());
    forStmt.appendToken(TokenBuilder.newSpace());
    if (condition != null) {
      forStmt.addChildWithTokens(condition);
    } else {
      LinkedListTree condStmt = ASTUtils.newPlaceholderAST(AS3Parser.FOR_CONDITION);
      forStmt.addChildWithTokens(condStmt);
    }
    forStmt.appendToken(TokenBuilder.newSemi());
    forStmt.appendToken(TokenBuilder.newSpace());
    if (iterate != null) {
      forStmt.addChildWithTokens(iterate);
    } else {
      LinkedListTree iterStmt = ASTUtils.newPlaceholderAST(AS3Parser.FOR_ITERATOR);
      forStmt.addChildWithTokens(iterStmt);
    }
    forStmt.appendToken(TokenBuilder.newRParen());
    return forStmt;
  }
View Full Code Here

        InOperator_stack.push(new InOperator_scope());

        parameterDefault_return retval = new parameterDefault_return();
        retval.start = input.LT(1);

        LinkedListTree root_0 = null;

        Token ASSIGN109=null;
        assignmentExpression_return assignmentExpression110 = null;


        LinkedListTree ASSIGN109_tree=null;


          ((InOperator_scope)InOperator_stack.peek()).allowed = true;

        try {
View Full Code Here

    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:410:1: parameterRestDeclaration : REST ( ident )? -> ^( PARAM REST ( ident )? ) ;
    public final parameterRestDeclaration_return parameterRestDeclaration() throws RecognitionException {
        parameterRestDeclaration_return retval = new parameterRestDeclaration_return();
        retval.start = input.LT(1);

        LinkedListTree root_0 = null;

        Token REST111=null;
        ident_return ident112 = null;


        LinkedListTree REST111_tree=null;
        RewriteRuleTokenStream stream_REST=new RewriteRuleTokenStream(adaptor,"token REST");
        RewriteRuleSubtreeStream stream_ident=new RewriteRuleSubtreeStream(adaptor,"rule ident");
        try {
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:411:2: ( REST ( ident )? -> ^( PARAM REST ( ident )? ) )
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:411:4: REST ( ident )?
            {
            REST111=(Token)input.LT(1);
            match(input,REST,FOLLOW_REST_in_parameterRestDeclaration1415); if (failed) return retval;
            if ( backtracking==0 ) stream_REST.add(REST111);

            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:411:9: ( ident )?
            int alt30=2;
            int LA30_0 = input.LA(1);

            if ( ((LA30_0>=GET && LA30_0<=USE)||LA30_0==XML||LA30_0==IDENT||LA30_0==DYNAMIC||(LA30_0>=IS && LA30_0<=AS)) ) {
                alt30=1;
            }
            switch (alt30) {
                case 1 :
                    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:411:9: ident
                    {
                    pushFollow(FOLLOW_ident_in_parameterRestDeclaration1417);
                    ident112=ident();
                    _fsp--;
                    if (failed) return retval;
                    if ( backtracking==0 ) stream_ident.add(ident112.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: ident, REST
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            if ( backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (LinkedListTree)adaptor.nil();
            // 412:3: -> ^( PARAM REST ( ident )? )
            {
                // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:412:6: ^( PARAM REST ( ident )? )
                {
                LinkedListTree root_1 = (LinkedListTree)adaptor.nil();
                root_1 = (LinkedListTree)adaptor.becomeRoot(adaptor.create(PARAM, "PARAM"), root_1);

                adaptor.addChild(root_1, stream_REST.next());
                // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:412:19: ( ident )?
                if ( stream_ident.hasNext() ) {
View Full Code Here

  public static LinkedListTree newForIn(String declaration, String expression) {
    return newForIn(AS3FragmentParser.parseForInVar(declaration),
                    AS3FragmentParser.parseExpr(expression));
  }
  public static LinkedListTree newForIn(LinkedListTree declaration, LinkedListTree expression) {
    LinkedListTree forStmt = ASTUtils.newAST(AS3Parser.FOR_IN, "for");
    forStmt.appendToken(TokenBuilder.newSpace());
    genForInSetup(forStmt, declaration, expression);
    return forStmt;
  }
View Full Code Here

  public static LinkedListTree newForEachIn(String declaration, String expression) {
    return newForEachIn(AS3FragmentParser.parseForInVar(declaration),
                        AS3FragmentParser.parseExpr(expression));
  }
  public static LinkedListTree newForEachIn(LinkedListTree declaration, LinkedListTree expression) {
    LinkedListTree forStmt = ASTUtils.newAST(AS3Parser.FOR_EACH, "for");
    forStmt.appendToken(TokenBuilder.newSpace());
    forStmt.appendToken(TokenBuilder.newEach());
    genForInSetup(forStmt, declaration, expression);
    return forStmt;
  }
View Full Code Here

    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:414:1: block : LCURLY ( blockEntry )* RCURLY -> ^( BLOCK ( blockEntry )* ) ;
    public final block_return block() throws RecognitionException {
        block_return retval = new block_return();
        retval.start = input.LT(1);

        LinkedListTree root_0 = null;

        Token LCURLY113=null;
        Token RCURLY115=null;
        blockEntry_return blockEntry114 = null;


        LinkedListTree LCURLY113_tree=null;
        LinkedListTree RCURLY115_tree=null;
        RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");
        RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");
        RewriteRuleSubtreeStream stream_blockEntry=new RewriteRuleSubtreeStream(adaptor,"rule blockEntry");
        try {
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:415:2: ( LCURLY ( blockEntry )* RCURLY -> ^( BLOCK ( blockEntry )* ) )
            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:415:4: LCURLY ( blockEntry )* RCURLY
            {
            LCURLY113=(Token)input.LT(1);
            match(input,LCURLY,FOLLOW_LCURLY_in_block1441); if (failed) return retval;
            if ( backtracking==0 ) stream_LCURLY.add(LCURLY113);

            // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:415:11: ( blockEntry )*
            loop31:
            do {
                int alt31=2;
                int LA31_0 = input.LA(1);

                if ( (LA31_0==LCURLY||LA31_0==SEMI||(LA31_0>=STRING_LITERAL && LA31_0<=CONST)||LA31_0==LPAREN||(LA31_0>=SUPER && LA31_0<=IF)||(LA31_0>=THROW && LA31_0<=TRY)||(LA31_0>=RETURN && LA31_0<=SWITCH)||(LA31_0>=DEFAULT && LA31_0<=FOR)||(LA31_0>=WHILE && LA31_0<=VOID)||(LA31_0>=IDENT && LA31_0<=INTERNAL)||LA31_0==LBRACK||LA31_0==DYNAMIC||LA31_0==LT||(LA31_0>=IS && LA31_0<=AS)||(LA31_0>=PLUS && LA31_0<=DIV)||(LA31_0>=INC && LA31_0<=BNOT)||(LA31_0>=E4X_ATTRI && LA31_0<=NEW)) ) {
                    alt31=1;
                }


                switch (alt31) {
              case 1 :
                  // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:415:11: blockEntry
                  {
                  pushFollow(FOLLOW_blockEntry_in_block1443);
                  blockEntry114=blockEntry();
                  _fsp--;
                  if (failed) return retval;
                  if ( backtracking==0 ) stream_blockEntry.add(blockEntry114.getTree());

                  }
                  break;

              default :
                  break loop31;
                }
            } while (true);

            RCURLY115=(Token)input.LT(1);
            match(input,RCURLY,FOLLOW_RCURLY_in_block1446); if (failed) return retval;
            if ( backtracking==0 ) stream_RCURLY.add(RCURLY115);


            // AST REWRITE
            // elements: blockEntry
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            if ( backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (LinkedListTree)adaptor.nil();
            // 416:3: -> ^( BLOCK ( blockEntry )* )
            {
                // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:416:6: ^( BLOCK ( blockEntry )* )
                {
                LinkedListTree root_1 = (LinkedListTree)adaptor.nil();
                root_1 = (LinkedListTree)adaptor.becomeRoot(adaptor.create(BLOCK, "BLOCK"), root_1);

                // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:416:14: ( blockEntry )*
                while ( stream_blockEntry.hasNext() ) {
                    adaptor.addChild(root_1, stream_blockEntry.next());
View Full Code Here

  public static LinkedListTree newWhile(String condition) {
    return newWhile(AS3FragmentParser.parseExpr(condition));
  }
  public static LinkedListTree newWhile(LinkedListTree condition) {
    LinkedListTree whileStmt = ASTUtils.newAST(AS3Parser.WHILE, "while");
    whileStmt.appendToken(TokenBuilder.newSpace());
    whileStmt.addChildWithTokens(condition(condition));
    return whileStmt;
  }
View Full Code Here

    // C:\\catalysts\\agents\\agent01-1\\work\\7bc39bdff21d327d\\src\\main\\antlr\\org\\asdt\\core\\internal\\antlr\\AS3.g:419:1: blockEntry : statement ;
    public final blockEntry_return blockEntry() throws RecognitionException {
        blockEntry_return retval = new blockEntry_return();
        retval.start = input.LT(1);

        LinkedListTree root_0 = null;

        statement_return statement116 = null;


View Full Code Here

TOP

Related Classes of uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree

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.