Package org.python.pydev.parser.jython

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


                    ;
            }
            if (fromName == null && level == 0) {
                {
                    if (true)
                        throw new ParseException("Expecting to find '.' or name in import.");
                }
            }
            grammarActions.findTokenAndAdd("import");
            jj_consume_token(IMPORT);
            switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                case MULTIPLY:
                    jj_consume_token(MULTIPLY);
                    grammarActions.addSpecialToken("*", STRATEGY_ADD_AFTER_PREV);
                    break;
                case NAME:
                    importName = import_as_name();
                    if (fromName != null && fromName.equals("__future__"))
                        handleFutureImports(importName);
                    label_11: while (true) {
                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                            case COMMA:
                                ;
                                break;
                            default:
                                jj_la1[46] = jj_gen;
                                break label_11;
                        }
                        grammarActions.findTokenAndAdd(",");
                        jj_consume_token(COMMA);
                        importName = import_as_name();
                        if (fromName != null && fromName.equals("__future__"))
                            handleFutureImports(importName);
                    }
                    break;
                case LPAREN:
                    temporaryToken = grammarActions.createSpecialStr("(");
                    jj_consume_token(LPAREN);
                    grammarActions.addSpecialToken(temporaryToken, STRATEGY_BEFORE_NEXT);
                    importName = import_as_name();
                    if (fromName != null && fromName.equals("__future__"))
                        handleFutureImports(importName);
                    label_12: while (true) {
                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                            case COMMA:
                                ;
                                break;
                            default:
                                jj_la1[47] = jj_gen;
                                break label_12;
                        }
                        if (state != 0) {
                            {
                                if (true)
                                    throw new ParseException("Invalid syntax: 2 commas cannot be grouped.", getToken(1));
                            }
                        }
                        state = 1;
                        grammarActions.findTokenAndAdd(",");
                        jj_consume_token(COMMA);
                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                            case NAME:
                                state = 0;
                                importName = import_as_name();
                                if (fromName != null && fromName.equals("__future__"))
                                    handleFutureImports(importName);
                                break;
                            default:
                                jj_la1[48] = jj_gen;
                                ;
                        }
                    }
                    try {
                        grammarActions.findTokenAndAdd(")");
                        jj_consume_token(RPAREN);
                    } catch (ParseException e) {
                        handleRParensNearButNotCurrent(e);
                    }
                    break;
                default:
                    jj_la1[49] = jj_gen;
                    jj_consume_token(-1);
                    throw new ParseException();
            }
            jjtree.closeNodeScope(jjtn000, true);
            jjtc000 = false;
            jjtreeCloseNodeScope(jjtn000);
            grammarActions.setImportFromLevel(level);
View Full Code Here


                decorated();
                break;
            default:
                jj_la1[57] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
        }
    }
View Full Code Here

                }
                break;
            default:
                jj_la1[65] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
        }
    }
View Full Code Here

                                    jj_consume_token(AS);
                                    break;
                                default:
                                    jj_la1[66] = jj_gen;
                                    jj_consume_token(-1);
                                    throw new ParseException();
                            }
                            test();
                            break;
                        default:
                            jj_la1[67] = jj_gen;
View Full Code Here

    /**
     * This is called when recognized an indent but the new line was not recognized.
     */
    protected final void handleNoNewlineInSuiteFound() throws ParseException {
        addAndReport(new ParseException("No new line found.", getCurrentToken()), "Handle no new line in suite");
    }
View Full Code Here

                        }
                        break;
                    default:
                        jj_la1[73] = jj_gen;
                        jj_consume_token(-1);
                        throw new ParseException();
                }
            } catch (ParseException e) {
                handleNoSuiteMatch(e);
            } catch (EmptySuiteException e) {
View Full Code Here

                old_lambdef();
                break;
            default:
                jj_la1[77] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
        }
    }
View Full Code Here

                    }
                    break;
                default:
                    jj_la1[80] = jj_gen;
                    jj_consume_token(-1);
                    throw new ParseException();
            }
        } catch (Throwable jjte000) {
            if (jjtc000) {
                jjtree.clearNodeScope(jjtn000);
                jjtc000 = false;
View Full Code Here

                comparison();
                break;
            default:
                jj_la1[83] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
        }
    }
View Full Code Here

                            }
                            break;
                        default:
                            jj_la1[86] = jj_gen;
                            jj_consume_token(-1);
                            throw new ParseException();
                    }
                }
        }
    }
View Full Code Here

TOP

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

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.