Package org.python.pydev.parser.jython

Examples of org.python.pydev.parser.jython.SimpleNode


    }

    //try_stmt: ('try' ':' suite (except_clause ':' suite)+ #diagram:break
    //           ['else' ':' suite] | 'try' ':' suite 'finally' ':' suite)
    final public void try_stmt() throws ParseException {
        SimpleNode tryNode;
        int i = 0;
        begin_try_stmt();
        tryNode = (SimpleNode) jjtree.peekNode();
        suite();
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case EXCEPT:
                label_20: while (true) {
                    except_clause(tryNode);
                    i++;
                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                        case EXCEPT:
                            ;
                            break;
                        default:
                            jj_la1[72] = jj_gen;
                            break label_20;
                    }
                }
                switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                    case ELSE:
                        begin_try_else_stmt();
                        suite();
                        SimpleNode jjtn001 = builder.openNode(JJTTRYELSE_STMT);
                        boolean jjtc001 = true;
                        jjtree.openNodeScope(jjtn001);
                        jjtreeOpenNodeScope(jjtn001);
                        try {
                            jjtree.closeNodeScope(jjtn001, 2);
                            jjtc001 = false;
                            jjtreeCloseNodeScope(jjtn001);
                            i++;
                        } finally {
                            if (jjtc001) {
                                jjtree.closeNodeScope(jjtn001, 2);
                                jjtreeCloseNodeScope(jjtn001);
                            }
                        }
                        break;
                    default:
                        jj_la1[73] = jj_gen;
                        ;
                }
                SimpleNode jjtn003 = builder.openNode(JJTTRY_STMT);
                boolean jjtc003 = true;
                jjtree.openNodeScope(jjtn003);
                jjtreeOpenNodeScope(jjtn003);
                try {
                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                        case FINALLY:
                            begin_finally_stmt();
                            suite();
                            SimpleNode jjtn002 = builder.openNode(JJTTRYFINALLY_OUTER_STMT);
                            boolean jjtc002 = true;
                            jjtree.openNodeScope(jjtn002);
                            jjtreeOpenNodeScope(jjtn002);
                            try {
                                jjtree.closeNodeScope(jjtn002, 2);
                                jjtc002 = false;
                                jjtreeCloseNodeScope(jjtn002);
                                i++;
                            } finally {
                                if (jjtc002) {
                                    jjtree.closeNodeScope(jjtn002, 2);
                                    jjtreeCloseNodeScope(jjtn002);
                                }
                            }
                            break;
                        default:
                            jj_la1[74] = jj_gen;
                            ;
                    }
                } catch (Throwable jjte003) {
                    if (jjtc003) {
                        jjtree.clearNodeScope(jjtn003);
                        jjtc003 = false;
                    } else {
                        jjtree.popNode();
                    }
                    if (jjte003 instanceof RuntimeException) {
                        {
                            if (true)
                                throw (RuntimeException) jjte003;
                        }
                    }
                    if (jjte003 instanceof ParseException) {
                        {
                            if (true)
                                throw (ParseException) jjte003;
                        }
                    }
                    {
                        if (true)
                            throw (Error) jjte003;
                    }
                } finally {
                    if (jjtc003) {
                        jjtree.closeNodeScope(jjtn003, i);
                        jjtreeCloseNodeScope(jjtn003);
                    }
                }
                break;
            case FINALLY:
                begin_finally_stmt();
                SimpleNode jjtn004 = builder.openNode(JJTTRYFINALLY_STMT);
                boolean jjtc004 = true;
                jjtree.openNodeScope(jjtn004);
                jjtreeOpenNodeScope(jjtn004);
                try {
                    suite();
View Full Code Here


    }

    //this is the 'try' ':'  it is needed because we need that scope closing for getting the specials.
    final public void begin_try_stmt() throws ParseException {
        /*@bgen(jjtree) begin_try_stmt */
        SimpleNode jjtn000 = builder.openNode(JJTBEGIN_TRY_STMT);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            jj_consume_token(TRY);
View Full Code Here

        }
    }

    final public void begin_try_else_stmt() throws ParseException {
        /*@bgen(jjtree) begin_try_else_stmt */
        SimpleNode jjtn000 = builder.openNode(JJTBEGIN_TRY_ELSE_STMT);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            jj_consume_token(ELSE);
View Full Code Here

        }
    }

    final public void begin_finally_stmt() throws ParseException {
        /*@bgen(jjtree) begin_finally_stmt */
        SimpleNode jjtn000 = builder.openNode(JJTBEGIN_FINALLY_STMT);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            jj_consume_token(FINALLY);
View Full Code Here

    }

    //except_clause: 'except' [test [as test]]
    final public void except_clause(SimpleNode tryNode) throws ParseException {
        /*@bgen(jjtree) except_clause */
        SimpleNode jjtn000 = builder.openNode(JJTEXCEPT_CLAUSE);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            begin_except_clause();
View Full Code Here

        }
    }

    final public void begin_except_clause() throws ParseException {
        /*@bgen(jjtree) begin_except_clause */
        SimpleNode jjtn000 = builder.openNode(JJTBEGIN_EXCEPT_CLAUSE);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            jj_consume_token(EXCEPT);
View Full Code Here

    }

    //with_stmt: 'with' with_item (',' with_item)*  ':' suite
    final public void with_stmt() throws ParseException {
        /*@bgen(jjtree) with_stmt */
        SimpleNode jjtn000 = builder.openNode(JJTWITH_STMT);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            jj_consume_token(WITH);
View Full Code Here

    }

    //with_item: test ['as' expr]
    final public void with_item() throws ParseException {
        /*@bgen(jjtree) with_item */
        SimpleNode jjtn000 = builder.openNode(JJTWITH_ITEM);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            test();
View Full Code Here

    }

    //suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
    final public void suite() throws ParseException {
        /*@bgen(jjtree) suite */
        SimpleNode jjtn000 = builder.openNode(JJTSUITE);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            try {
View Full Code Here

    }

    //test: or_test ['if' or_test 'else' test] | lambdef
    final public void test() throws ParseException {
        /*@bgen(jjtree) test */
        SimpleNode jjtn000 = builder.openNode(JJTTEST);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        try {
            switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.SimpleNode

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.