diff --git a/uncompyle6/parser.py b/uncompyle6/parser.py index 94185d41..f92e9908 100644 --- a/uncompyle6/parser.py +++ b/uncompyle6/parser.py @@ -227,6 +227,8 @@ class PythonParser(GenericASTBuilder): suite_stmts ::= continue_stmts suite_stmts_opt ::= suite_stmts + + # passtmt is needed for semantic actions to add "pass" suite_stmts_opt ::= passstmt else_suite ::= suite_stmts diff --git a/uncompyle6/parsers/parse3.py b/uncompyle6/parsers/parse3.py index 01a3c0af..030838bc 100644 --- a/uncompyle6/parsers/parse3.py +++ b/uncompyle6/parsers/parse3.py @@ -679,10 +679,6 @@ class Python3Parser(PythonParser): if opname_base == 'BUILD_TUPLE': rule = ('load_closure ::= %s%s' % (('LOAD_CLOSURE ' * v), opname)) self.add_unique_rule(rule, opname, token.attr, customize) - rule = ('build_tuple ::= ' + 'expr1024 ' * int(v//1024) + - 'expr32 ' * int((v//32) % 32) + - 'expr ' * (v % 32) + opname) - self.add_unique_rule(rule, opname, token.attr, customize) elif opname == 'LOOKUP_METHOD': # A PyPy speciality - DRY with parse2 self.add_unique_rule("load_attr ::= expr LOOKUP_METHOD",