You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
Mege hell
This commit is contained in:
@@ -39,7 +39,7 @@ entry_points = {
|
|||||||
'pydisassemble=uncompyle6.bin.pydisassemble:main',
|
'pydisassemble=uncompyle6.bin.pydisassemble:main',
|
||||||
]}
|
]}
|
||||||
ftp_url = None
|
ftp_url = None
|
||||||
install_requires = ['spark-parser >= 1.8.2, < 1.9.0',
|
install_requires = ['spark-parser >= 1.8.4, < 1.9.0',
|
||||||
'xdis >= 3.6.1, < 3.7.0', 'six']
|
'xdis >= 3.6.1, < 3.7.0', 'six']
|
||||||
license = 'MIT'
|
license = 'MIT'
|
||||||
mailing_list = 'python-debugger@googlegroups.com'
|
mailing_list = 'python-debugger@googlegroups.com'
|
||||||
|
4
test/simple_source/bug25/01_inplace_true_divide.py
Normal file
4
test/simple_source/bug25/01_inplace_true_divide.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Force INPLACE_TRUE_DIVIDE opcode
|
||||||
|
from __future__ import division
|
||||||
|
x = len(__file__)
|
||||||
|
x /= 2
|
@@ -411,12 +411,12 @@ class PythonParser(GenericASTBuilder):
|
|||||||
|
|
||||||
def p_setcomp(self, args):
|
def p_setcomp(self, args):
|
||||||
"""
|
"""
|
||||||
comp_iter ::= comp_if
|
|
||||||
comp_iter ::= comp_for
|
comp_iter ::= comp_for
|
||||||
comp_iter ::= comp_body
|
comp_iter ::= comp_body
|
||||||
comp_body ::= gen_comp_body
|
comp_body ::= gen_comp_body
|
||||||
gen_comp_body ::= expr YIELD_VALUE POP_TOP
|
gen_comp_body ::= expr YIELD_VALUE POP_TOP
|
||||||
|
|
||||||
|
comp_iter ::= comp_if
|
||||||
comp_if ::= expr jmp_false comp_iter
|
comp_if ::= expr jmp_false comp_iter
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@@ -58,19 +58,22 @@ class Python25Parser(Python26Parser):
|
|||||||
withasstmt ::= expr setupwithas designator suite_stmts_opt
|
withasstmt ::= expr setupwithas designator suite_stmts_opt
|
||||||
POP_BLOCK LOAD_CONST COME_FROM WITH_CLEANUP END_FINALLY
|
POP_BLOCK LOAD_CONST COME_FROM WITH_CLEANUP END_FINALLY
|
||||||
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1
|
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1
|
||||||
stmt ::= classdefdeco
|
|
||||||
classdefdeco ::= classdefdeco1 designator
|
classdefdeco ::= classdefdeco1 designator
|
||||||
classdefdeco1 ::= expr classdefdeco1 CALL_FUNCTION_1
|
classdefdeco1 ::= expr classdefdeco1 CALL_FUNCTION_1
|
||||||
classdefdeco1 ::= expr classdefdeco2 CALL_FUNCTION_1
|
classdefdeco1 ::= expr classdefdeco2 CALL_FUNCTION_1
|
||||||
classdefdeco2 ::= LOAD_CONST expr mkfunc CALL_FUNCTION_0 BUILD_CLASS
|
classdefdeco2 ::= LOAD_CONST expr mkfunc CALL_FUNCTION_0 BUILD_CLASS
|
||||||
|
kv3 ::= expr expr STORE_MAP
|
||||||
|
kvlist ::= kvlist kv3
|
||||||
mkfuncdeco ::= expr mkfuncdeco CALL_FUNCTION_1
|
mkfuncdeco ::= expr mkfuncdeco CALL_FUNCTION_1
|
||||||
ret_cond ::= expr jmp_false_then expr RETURN_END_IF POP_TOP ret_expr_or_cond
|
ret_cond ::= expr jmp_false_then expr RETURN_END_IF POP_TOP ret_expr_or_cond
|
||||||
|
return_if_lambda ::= RETURN_END_IF_LAMBDA POP_TOP
|
||||||
return_if_stmt ::= ret_expr RETURN_END_IF POP_TOP
|
return_if_stmt ::= ret_expr RETURN_END_IF POP_TOP
|
||||||
return_if_stmts ::= return_if_stmt
|
return_if_stmts ::= return_if_stmt
|
||||||
return_stmt ::= ret_expr RETURN_END_IF POP_TOP
|
return_stmt ::= ret_expr RETURN_END_IF POP_TOP
|
||||||
return_stmt ::= ret_expr RETURN_VALUE POP_TOP
|
return_stmt ::= ret_expr RETURN_VALUE POP_TOP
|
||||||
stmt ::= conditional_lambda
|
|
||||||
setupwithas ::= DUP_TOP LOAD_ATTR ROT_TWO LOAD_ATTR CALL_FUNCTION_0 setup_finally
|
setupwithas ::= DUP_TOP LOAD_ATTR ROT_TWO LOAD_ATTR CALL_FUNCTION_0 setup_finally
|
||||||
|
stmt ::= classdefdeco
|
||||||
|
stmt ::= conditional_lambda
|
||||||
""")
|
""")
|
||||||
super(Python25Parser, self).add_custom_rules(tokens, customize)
|
super(Python25Parser, self).add_custom_rules(tokens, customize)
|
||||||
if self.version == 2.5:
|
if self.version == 2.5:
|
||||||
|
Reference in New Issue
Block a user