while Python 2.7.5 while1
rocky opened this issue · 1 comments
rocky commented
Decompiling https://github.com/rocky/python-uncompyle6/blob/master/test/bytecode_2.7.5/01_while1.pyc
should give:
ms = 0
if ms == 1:
while 1:
pass
Even with recent changes I get:
$ uncompyle2 bytecode_2.7.5/01_while1.pyc
# 2018.07.16 05:45:17 EDT
#Embedded file name: simple_source/bug275/01_while1.py
--- This code section failed: ---
0 LOAD_CONST 0
3 STORE_NAME 'ms'
6 LOAD_NAME 'ms'
9 LOAD_CONST 1
12 COMPARE_OP '=='
15 POP_JUMP_IF_FALSE '27'
18 SETUP_LOOP '27'
21 JUMP_ABSOLUTE '21'
24_0 COME_FROM '18'
24 JUMP_FORWARD '27'
27_0 COME_FROM '24'
Syntax error at or near `COME_FROM' token at offset 24_0
### Can't uncompyle bytecode_2.7.5/01_while1.pyc
Traceback (most recent call last):
File "/home/rocky/.pyenv/versions/2.7.15/lib/python2.7/site-packages/uncompyle2/__init__.py", line 197, in main
uncompyle_file(infile, outstream, showasm, showast, deob)
File "/home/rocky/.pyenv/versions/2.7.15/lib/python2.7/site-packages/uncompyle2/__init__.py", line 130, in uncompyle_file
uncompyle(version, co, outstream, showasm, showast, deob)
File "/home/rocky/.pyenv/versions/2.7.15/lib/python2.7/site-packages/uncompyle2/__init__.py", line 98, in uncompyle
ast = walker.build_ast(tokens, customize)
File "/home/rocky/.pyenv/versions/2.7.15/lib/python2.7/site-packages/uncompyle2/Walker.py", line 1449, in build_ast
raise ParserError(e, tokens)
ParserError: --- This code section failed: ---
0 LOAD_CONST 0
3 STORE_NAME 'ms'
6 LOAD_NAME 'ms'
9 LOAD_CONST 1
12 COMPARE_OP '=='
15 POP_JUMP_IF_FALSE '27'
18 SETUP_LOOP '27'
21 JUMP_ABSOLUTE '21'
24_0 COME_FROM '18'
24 JUMP_FORWARD '27'
27_0 COME_FROM '24'
Syntax error at or near `COME_FROM' token at offset 24_0
# decompiled 0 files: 0 okay, 1 failed, 0 verify failed
# 2018.07.16 05:45:17 EDT
wibiti commented
Should be fixed now.