From d42858cae48969fc32de817dd01fc49126e2ff40 Mon Sep 17 00:00:00 2001 From: rocky Date: Mon, 5 Mar 2018 00:03:33 -0500 Subject: [PATCH] additional while1 grammar rules for 2.3-2.6 --- uncompyle6/parsers/parse23.py | 3 +++ uncompyle6/parsers/parse24.py | 2 +- uncompyle6/parsers/parse26.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/uncompyle6/parsers/parse23.py b/uncompyle6/parsers/parse23.py index da1a1f82..cc8462c9 100644 --- a/uncompyle6/parsers/parse23.py +++ b/uncompyle6/parsers/parse23.py @@ -32,6 +32,9 @@ class Python23Parser(Python24Parser): while1stmt ::= _while1test l_stmts_opt JUMP_BACK POP_TOP POP_BLOCK COME_FROM + while1stmt ::= _while1test l_stmts_opt JUMP_BACK + POP_TOP POP_BLOCK + while1stmt ::= _while1test l_stmts_opt JUMP_BACK COME_FROM POP_TOP POP_BLOCK COME_FROM diff --git a/uncompyle6/parsers/parse24.py b/uncompyle6/parsers/parse24.py index 6a18b317..a178a9d9 100644 --- a/uncompyle6/parsers/parse24.py +++ b/uncompyle6/parsers/parse24.py @@ -33,8 +33,8 @@ class Python24Parser(Python25Parser): import_cont ::= filler LOAD_CONST alias # Python 2.5+ omits POP_TOP POP_BLOCK - while1stmt ::= SETUP_LOOP l_stmts JUMP_BACK POP_TOP POP_BLOCK COME_FROM while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK POP_TOP POP_BLOCK COME_FROM + while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK POP_TOP POP_BLOCK # Python 2.5+: # call_stmt ::= expr POP_TOP diff --git a/uncompyle6/parsers/parse26.py b/uncompyle6/parsers/parse26.py index 8af0bb0d..7268ab8e 100644 --- a/uncompyle6/parsers/parse26.py +++ b/uncompyle6/parsers/parse26.py @@ -135,6 +135,7 @@ class Python26Parser(Python2Parser): setup_finally ::= STORE_NAME SETUP_FINALLY LOAD_NAME DELETE_NAME while1stmt ::= SETUP_LOOP l_stmts JUMP_BACK COME_FROM + while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK whilestmt ::= SETUP_LOOP testexpr l_stmts_opt jb_pop POP_BLOCK _come_froms whilestmt ::= SETUP_LOOP testexpr l_stmts_opt jb_cf_pop bp_come_from