You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Some Python 1.4 fixes
This commit is contained in:
@@ -622,11 +622,11 @@ def get_python_parser(
|
|||||||
if version < 3.0:
|
if version < 3.0:
|
||||||
if version < 2.2:
|
if version < 2.2:
|
||||||
if version == 1.4:
|
if version == 1.4:
|
||||||
import uncompyle6.parsers.parse15 as parse14
|
import uncompyle6.parsers.parse14 as parse14
|
||||||
if compile_mode == 'exec':
|
if compile_mode == 'exec':
|
||||||
p = parse14.Python15Parser(debug_parser)
|
p = parse14.Python14Parser(debug_parser)
|
||||||
else:
|
else:
|
||||||
p = parse14.Python15ParserSingle(debug_parser)
|
p = parse14.Python14ParserSingle(debug_parser)
|
||||||
elif version == 1.5:
|
elif version == 1.5:
|
||||||
import uncompyle6.parsers.parse15 as parse15
|
import uncompyle6.parsers.parse15 as parse15
|
||||||
if compile_mode == 'exec':
|
if compile_mode == 'exec':
|
||||||
|
@@ -15,6 +15,14 @@ class Python14Parser(Python15Parser):
|
|||||||
# FIXME: should check that this indeed around __doc__
|
# FIXME: should check that this indeed around __doc__
|
||||||
stmt ::= doc_junk
|
stmt ::= doc_junk
|
||||||
doc_junk ::= LOAD_CONST POP_TOP
|
doc_junk ::= LOAD_CONST POP_TOP
|
||||||
|
|
||||||
|
# Not sure why later Python's omit the COME_FROM
|
||||||
|
jb_pop14 ::= JUMP_BACK COME_FROM POP_TOP
|
||||||
|
|
||||||
|
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt
|
||||||
|
jb_pop14
|
||||||
|
POP_BLOCK else_suitel COME_FROM
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
||||||
|
Reference in New Issue
Block a user