You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
CONTINUE handling in 2.6.9
This commit is contained in:
@@ -24,11 +24,6 @@ class Python2Parser(PythonParser):
|
||||
super(Python2Parser, self).__init__(AST, 'stmts', debug=debug_parser)
|
||||
self.new_rules = set()
|
||||
|
||||
def p_list_comprehension2(self, args):
|
||||
"""
|
||||
list_for ::= expr _for designator list_iter JUMP_BACK
|
||||
"""
|
||||
|
||||
def p_print(self, args):
|
||||
'''
|
||||
stmt ::= print_items_stmt
|
||||
|
@@ -66,11 +66,14 @@ class Python26Parser(Python2Parser):
|
||||
"""
|
||||
jmp_false ::= JUMP_IF_FALSE
|
||||
jmp_true ::= JUMP_IF_TRUE
|
||||
jmp_true ::= JUMP_IF_TRUE POP_TOP
|
||||
jmp_false ::= JUMP_IF_FALSE POP_TOP
|
||||
jf_pop ::= JUMP_FORWARD come_from_pop
|
||||
jf_pop ::= JUMP_ABSOLUTE come_from_pop
|
||||
jb_pop ::= JUMP_BACK come_from_pop
|
||||
jmp_true ::= JUMP_IF_TRUE POP_TOP
|
||||
jmp_false ::= JUMP_IF_FALSE POP_TOP
|
||||
jf_pop ::= JUMP_FORWARD come_from_pop
|
||||
jf_pop ::= JUMP_ABSOLUTE come_from_pop
|
||||
jb_pop ::= JUMP_BACK come_from_pop
|
||||
|
||||
jb_cont ::= JUMP_BACK
|
||||
jb_cont ::= CONTINUE
|
||||
|
||||
jb_cf_pop ::= JUMP_BACK come_froms POP_TOP
|
||||
ja_cf_pop ::= JUMP_ABSOLUTE come_from_pop
|
||||
@@ -121,6 +124,7 @@ class Python26Parser(Python2Parser):
|
||||
def p_comp26(self, args):
|
||||
'''
|
||||
list_for ::= expr _for designator list_iter JUMP_BACK come_froms POP_TOP
|
||||
list_for ::= expr _for designator list_iter jb_cont
|
||||
|
||||
list_iter ::= list_if JUMP_BACK
|
||||
list_compr ::= BUILD_LIST_0 DUP_TOP
|
||||
|
@@ -8,6 +8,11 @@ class Python27Parser(Python2Parser):
|
||||
super(Python27Parser, self).__init__(debug_parser)
|
||||
self.customized = {}
|
||||
|
||||
def p_list_comprehension27(self, args):
|
||||
"""
|
||||
list_for ::= expr _for designator list_iter JUMP_BACK
|
||||
"""
|
||||
|
||||
def p_try27(self, args):
|
||||
"""
|
||||
try_middle ::= JUMP_FORWARD COME_FROM except_stmts
|
||||
|
Reference in New Issue
Block a user