You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
WIP Python-2.6 but don't remove opcodes
The scheme for turning 2.6 bytecode into 2.7 psuedo bytecode I think is a lose. I won't work for fragment handling. Instead, change the grammar and syntax rules This also has the benefits: * We see how code generation changed over releases by looking at grammar and semantic rules rather than arbitrary code * We can better assocate with what's running (in a sense this is a restatement of broken fragment handling) * With the right structure in place we are in a better position to handle 2.5, 2.4, etc. That is, after a while, the incremental changes to get say from python 2.3 bytecode to python 2.7 are great. Conflicts: uncompyle6/parsers/astnode.py
This commit is contained in:
@@ -594,6 +594,12 @@ def get_python_parser(version, debug_parser, compile_mode='exec'):
|
||||
p = parse26.Python26Parser(debug_parser)
|
||||
else:
|
||||
p = parse26.Python26ParserSingle(debug_parser)
|
||||
elif version == 2.7:
|
||||
import uncompyle6.parsers.parse27 as parse27
|
||||
if compile_mode == 'exec':
|
||||
p = parse27.Python27Parser(debug_parser)
|
||||
else:
|
||||
p = parse27.Python27ParserSingle(debug_parser)
|
||||
else:
|
||||
import uncompyle6.parsers.parse2 as parse2
|
||||
if compile_mode == 'exec':
|
||||
|
Reference in New Issue
Block a user