You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Better Python 1.4 support
This commit is contained in:
@@ -270,14 +270,14 @@ check-3.4-ok:
|
|||||||
2.6:
|
2.6:
|
||||||
|
|
||||||
#: PyPy 5.0.x with Python 2.7 ...
|
#: PyPy 5.0.x with Python 2.7 ...
|
||||||
pypy-2.7 5.0 5.3:
|
pypy-2.7 5.0 5.3 6.0:
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-pypy2.7 --verify
|
$(PYTHON) test_pythonlib.py --bytecode-pypy2.7 --verify
|
||||||
|
|
||||||
#: PyPy 2.4.x with Python 3.2 ...
|
#: PyPy 2.4.x with Python 3.2 ...
|
||||||
pypy-3.2 2.4:
|
pypy-3.2 2.4:
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-pypy3.2 --verify
|
$(PYTHON) test_pythonlib.py --bytecode-pypy3.2 --verify
|
||||||
|
|
||||||
clean: clean-py-dis clean-dis clean-unverified
|
gclean: clean-py-dis clean-dis clean-unverified
|
||||||
|
|
||||||
clean-dis:
|
clean-dis:
|
||||||
find . -name '*_dis' -exec rm -v '{}' ';'
|
find . -name '*_dis' -exec rm -v '{}' ';'
|
||||||
|
BIN
test/bytecode_1.4/bisect.pyc
Normal file
BIN
test/bytecode_1.4/bisect.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/cmp.pyc
Normal file
BIN
test/bytecode_1.4/cmp.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/cmpcache.pyc
Normal file
BIN
test/bytecode_1.4/cmpcache.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/dbhash.pyc
Normal file
BIN
test/bytecode_1.4/dbhash.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/glob.pyc
Normal file
BIN
test/bytecode_1.4/glob.pyc
Normal file
Binary file not shown.
@@ -582,6 +582,8 @@ class PythonParser(GenericASTBuilder):
|
|||||||
## designLists ::=
|
## designLists ::=
|
||||||
## Will need to redo semantic actiion
|
## Will need to redo semantic actiion
|
||||||
|
|
||||||
|
stmt ::= LOAD_CONST POP_TOP
|
||||||
|
|
||||||
store ::= STORE_FAST
|
store ::= STORE_FAST
|
||||||
store ::= STORE_NAME
|
store ::= STORE_NAME
|
||||||
store ::= STORE_GLOBAL
|
store ::= STORE_GLOBAL
|
||||||
@@ -620,7 +622,14 @@ def get_python_parser(
|
|||||||
# a lazy way of doing the import?
|
# a lazy way of doing the import?
|
||||||
|
|
||||||
if version < 3.0:
|
if version < 3.0:
|
||||||
if version == 1.5:
|
if version < 2.2:
|
||||||
|
if version == 1.4:
|
||||||
|
import uncompyle6.parsers.parse15 as parse14
|
||||||
|
if compile_mode == 'exec':
|
||||||
|
p = parse14.Python15Parser(debug_parser)
|
||||||
|
else:
|
||||||
|
p = parse14.Python15ParserSingle(debug_parser)
|
||||||
|
elif version == 1.5:
|
||||||
import uncompyle6.parsers.parse15 as parse15
|
import uncompyle6.parsers.parse15 as parse15
|
||||||
if compile_mode == 'exec':
|
if compile_mode == 'exec':
|
||||||
p = parse15.Python15Parser(debug_parser)
|
p = parse15.Python15Parser(debug_parser)
|
||||||
|
@@ -11,6 +11,10 @@ class Python14Parser(Python15Parser):
|
|||||||
# Nothing here yet, but will need to add UNARY_CALL, BINARY_CALL,
|
# Nothing here yet, but will need to add UNARY_CALL, BINARY_CALL,
|
||||||
# RAISE_EXCEPTION, BUILD_FUNCTION, UNPACK_ARG, UNPACK_VARARG, LOAD_LOCAL,
|
# RAISE_EXCEPTION, BUILD_FUNCTION, UNPACK_ARG, UNPACK_VARARG, LOAD_LOCAL,
|
||||||
# SET_FUNC_ARGS, and RESERVE_FAST
|
# SET_FUNC_ARGS, and RESERVE_FAST
|
||||||
|
|
||||||
|
# FIXME: should check that this indeed around __doc__
|
||||||
|
stmt ::= doc_junk
|
||||||
|
doc_junk ::= LOAD_CONST POP_TOP
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
||||||
|
Reference in New Issue
Block a user