From 047c95a1e57e5aeec71fed3a1f0da783790b0c2f Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 9 Jul 2016 13:13:10 -0400 Subject: [PATCH] 2.3 while1stmt bug --- test/bytecode_2.3/00_assign.pyc | Bin 193 -> 193 bytes test/bytecode_2.3/00_import.pyc | Bin 191 -> 191 bytes test/bytecode_2.3/00_pass.pyc | Bin 110 -> 110 bytes test/bytecode_2.3/05_try_finally_pass.pyc | Bin 138 -> 138 bytes uncompyle6/parsers/parse23.py | 9 ++++++++- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/bytecode_2.3/00_assign.pyc b/test/bytecode_2.3/00_assign.pyc index 4edff9686fb91f4adc997a64384a664727fcfe3f..c441519e027446512b4eccff7d09d9abdf304eea 100644 GIT binary patch delta 16 XcmX@ec#x69`V%jgkYz>KM2?*RE9?b4 delta 16 XcmX@ec#x69`V%i#?pvYoi5xotFsB9P diff --git a/test/bytecode_2.3/00_import.pyc b/test/bytecode_2.3/00_import.pyc index 6e86104b52c796b885bbacb9ce69b0bbdfd9175f..2915366342b9cd724a4e8157c08bef84a3aecc49 100644 GIT binary patch delta 16 XcmdnbxSx^3`V%i#CR=sbM2_tMEbIkc delta 16 XcmdnbxSx^3`V%i#?pvYoi5%MjFlhzg diff --git a/test/bytecode_2.3/00_pass.pyc b/test/bytecode_2.3/00_pass.pyc index 11e5ff0f9942cdf5df65d8775f35e4102054c618..57e4c5b804e8bd403fb7b20cff033fec39677b3e 100644 GIT binary patch delta 14 Vcmd1H|$iM{>01mcZJSG_GSPlHU&-q delta 15 WcmeBT>|$iM{>00*_mTEQ_GSPk)CETX diff --git a/uncompyle6/parsers/parse23.py b/uncompyle6/parsers/parse23.py index 18042e24..22f6c0df 100644 --- a/uncompyle6/parsers/parse23.py +++ b/uncompyle6/parsers/parse23.py @@ -4,7 +4,7 @@ from spark_parser import DEFAULT_DEBUG as PARSER_DEFAULT_DEBUG from uncompyle6.parser import PythonParserSingle -from uncompyle6.parsers.parse2 import Python2Parser +from uncompyle6.parsers.parse24 import Python24Parser class Python23Parser(Python24Parser): @@ -12,6 +12,13 @@ class Python23Parser(Python24Parser): super(Python24Parser, self).__init__(debug_parser) self.customized = {} + def p_misc23(self, args): + ''' + _while1test ::= JUMP_FORWARD JUMP_IF_FALSE POP_TOP COME_FROM + + while1stmt ::= SETUP_LOOP _while1test l_stmts JUMP_BACK COME_FROM POP_TOP POP_BLOCK COME_FROM + ''' + class Python23ParserSingle(Python23Parser, PythonParserSingle): pass