You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Last 2.6 while1 bug...
before all of 2.6.9 stdlib parses without error.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,3 +6,16 @@ def PipeClient(address):
|
||||
else:
|
||||
raise
|
||||
return
|
||||
|
||||
# From 2.6.9 sre.py
|
||||
# Bug was parsing inner while1. Our massaging adds a COME_FROM
|
||||
# possibly in the wrong place. When control flow is
|
||||
# redone possibly all of this mess will disappear.
|
||||
def _parse(source, state, this, group, char):
|
||||
while 1:
|
||||
if this:
|
||||
while 1:
|
||||
raise RuntimeError
|
||||
else:
|
||||
raise IndexError
|
||||
return
|
||||
|
@@ -133,7 +133,7 @@ class Python26Parser(Python2Parser):
|
||||
setup_finally ::= STORE_FAST SETUP_FINALLY LOAD_FAST DELETE_FAST
|
||||
setup_finally ::= STORE_NAME SETUP_FINALLY LOAD_NAME DELETE_NAME
|
||||
|
||||
while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK _come_froms
|
||||
while1stmt ::= SETUP_LOOP l_stmts_opt come_from_opt JUMP_BACK _come_froms
|
||||
|
||||
# Sometimes JUMP_BACK is misclassified as CONTINUE.
|
||||
# workaround until we have better control flow in place
|
||||
|
Reference in New Issue
Block a user