import_as -> alias; and reinstate rule

This commit is contained in:
rocky
2017-11-29 10:38:18 -05:00
parent ff43403a05
commit 7775bdabd5
7 changed files with 15 additions and 16 deletions

View File

@@ -26,12 +26,12 @@ class Python24Parser(Python25Parser):
# 2.5+ has two LOAD_CONSTs, one for the number '.'s in a relative import
# keep positions similar to simplify semantic actions
importstmt ::= filler LOAD_CONST import_as
importstmt ::= filler LOAD_CONST alias
importfrom ::= filler LOAD_CONST IMPORT_NAME importlist POP_TOP
importstar ::= filler LOAD_CONST IMPORT_NAME IMPORT_STAR
importmultiple ::= filler LOAD_CONST import_as imports_cont
import_cont ::= filler LOAD_CONST import_as
importmultiple ::= filler LOAD_CONST alias imports_cont
import_cont ::= filler LOAD_CONST alias
# Python 2.5+ omits POP_TOP POP_BLOCK
while1stmt ::= SETUP_LOOP l_stmts JUMP_BACK POP_TOP POP_BLOCK COME_FROM