You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Fix one more 3.0 parsing bug
This commit is contained in:
@@ -225,6 +225,11 @@ check-bytecode-2.7:
|
||||
check-bytecode-3.0:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0 --weak-verify
|
||||
|
||||
#: Check deparsing Python 3.0
|
||||
check-bytecode-3.0:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0 --weak-verify
|
||||
# $(PYTHON) test_pythonlib.py --bytecode-3.0-run --verify-run
|
||||
|
||||
#: Check deparsing Python 3.1
|
||||
check-bytecode-3.1:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1 --weak-verify
|
||||
|
@@ -74,6 +74,8 @@ class Python30Parser(Python31Parser):
|
||||
for_block ::= l_stmts_opt _come_froms POP_TOP JUMP_BACK
|
||||
except_handler ::= JUMP_FORWARD COME_FROM_EXCEPT except_stmts
|
||||
POP_TOP END_FINALLY come_froms
|
||||
except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts
|
||||
POP_TOP END_FINALLY
|
||||
return_if_stmt ::= ret_expr RETURN_END_IF POP_TOP
|
||||
and ::= expr JUMP_IF_FALSE POP_TOP expr COME_FROM
|
||||
whilestmt ::= SETUP_LOOP testexpr l_stmts_opt
|
||||
@@ -94,6 +96,8 @@ class Python30Parser(Python31Parser):
|
||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
||||
return_if_lambda ::= RETURN_END_IF_LAMBDA
|
||||
compare_chained1 ::= expr DUP_TOP ROT_THREE COMPARE_OP JUMP_IF_FALSE_OR_POP compare_chained2 COME_FROM
|
||||
except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts END_FINALLY
|
||||
|
||||
""")
|
||||
|
||||
return
|
||||
|
Reference in New Issue
Block a user