You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
2.4 "import *" grammar rule
This commit is contained in:
@@ -19,6 +19,7 @@ class Python24Parser(Python25Parser):
|
||||
|
||||
importstmt ::= filler LOAD_CONST import_as
|
||||
importfrom ::= filler LOAD_CONST IMPORT_NAME importlist2 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_cont
|
||||
@@ -26,9 +27,12 @@ class Python24Parser(Python25Parser):
|
||||
# Python 2.5+ omits POP_TOP POP_BLOCK
|
||||
while1stmt ::= SETUP_LOOP l_stmts JUMP_BACK POP_TOP POP_BLOCK COME_FROM
|
||||
|
||||
# Python 2.5+:
|
||||
# call_stmt ::= expr POP_TOP
|
||||
# expr ::= yield
|
||||
call_stmt ::= yield
|
||||
|
||||
# Python 2.5+ adds POP_TOP
|
||||
# Python 2.5+ adds POP_TOP at the end
|
||||
gen_comp_body ::= expr YIELD_VALUE
|
||||
'''
|
||||
|
||||
|
Reference in New Issue
Block a user