;
}
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);