You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Fix more Python 1.4 decompilation bugs
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# Python 1.4 aifc.py
|
# Python 1.4 aifc.py
|
||||||
|
# Something weird about the final "print" and PRINT_NL_CONT followed by PRINT_NL
|
||||||
def _readmark(self, markers):
|
def _readmark(self, markers):
|
||||||
if self._markers: print 'marker',
|
if self._markers: print 'marker',
|
||||||
else: print 'markers',
|
else: print 'markers',
|
||||||
|
11
test/simple_source/bug14/02_continue.py
Normal file
11
test/simple_source/bug14/02_continue.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Python 1.4 cgi.py
|
||||||
|
# Bug was in "continue" detection.
|
||||||
|
# 1.4 doesn't have lnotab and our CONTINUE detection is off.
|
||||||
|
def parse_multipart(params, pdict):
|
||||||
|
while params:
|
||||||
|
if params.has_key('name'):
|
||||||
|
params = None
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
return None
|
@@ -25,6 +25,10 @@ class Python14Parser(Python15Parser):
|
|||||||
|
|
||||||
print_items_nl_stmt ::= expr PRINT_ITEM_CONT print_items_opt PRINT_NEWLINE_CONT
|
print_items_nl_stmt ::= expr PRINT_ITEM_CONT print_items_opt PRINT_NEWLINE_CONT
|
||||||
|
|
||||||
|
|
||||||
|
# 1.4 doesn't have linenotab, and although this shouldn't
|
||||||
|
# be a show stopper, our CONTINUE detection is off here.
|
||||||
|
continue ::= JUMP_BACK
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
||||||
|
Reference in New Issue
Block a user