Commit Graph

92 Commits

Author SHA1 Message Date
rocky
feec241da8 Misc: long lists, DRY 2/3 grammars, '%' count
parse{2,3,r}.py: DRY Python expressions between Python 2 and 3
pysource.py, fragment.py, parser.py: handle long lists by grouping in chunks of 32
and 256
bin/uncompyle6: count %s properly
2016-05-02 21:25:16 -04:00
rocky
119bb9bb26 Bug 2016-05-01 21:14:25 -04:00
rocky
4455b5e280 Add test for last fix.
Drop 2.5 test until we figure out what's wrong
2016-05-01 21:07:10 -04:00
rocky
0a32a16d88 Python 3.0..3.2 bug in LOAD_FAST/STORE_LOCAL
LOAD_FAST         '__locals__'
STORE_LOCALS      ''

Also have to adjust doc constants for this crap

astnode.py: minor format change
2016-04-30 09:12:03 -04:00
rocky
4aa703d727 Test optimized Python code and Python 3.2 2016-04-30 06:54:01 -04:00
rocky
f3a4e6ee54 Pevious commit grammar change is Python 3.5 and up 2016-04-30 04:03:38 -04:00
rocky
43f5c5dcca Python 3.5 if statments decompyle
Sometimes it doesn't need JUMP_FORWARD _come_from _come_from

For example:

def handle2(module):
    if module == 'foo':
        try:
            module = 1
        except ImportError as exc:
            module = exc

    return module

And:

if __name__:
    for i in (1, 2):
        x = 3
2016-04-30 03:51:54 -04:00
rocky
2c7fcf9e62 Back off if_else_ternary pending
Fails on Python 3.4 investigation
Python 3.5 works though
2016-04-10 21:59:06 -04:00
rocky
5a813621cb Test administrivia 2016-04-10 21:27:41 -04:00
rocky
9f7d36f8fb Handle Ternary "or". Remove mention of uncompyle3
uncompyle3 removed per Mysterie's request
[Fixes Issue #5]
2016-04-07 07:18:46 -04:00
rocky
4e57c3da5b remove uncompyle3 and make test work again
* uncompyle3 removed by request
* make test on python 2.7 is failing on some python3 and python3.5
  bytecodes. Remove for now.
2016-03-11 02:10:07 -05:00
rocky
551e2174cb Add Python 3.5 tests that we can do. 2016-01-07 04:32:20 -05:00
rocky
bc2a36b9f7 Start 3.4 library verify tests 2016-01-02 16:48:59 -05:00
rocky
54a0af733b Verify 3.4 bytecode. verify API call bug fixed. 2016-01-02 07:50:09 -05:00
rocky
2927921856 Python 3 class deparsing. stop earlier in uncompyle6 on a syntax error. 2016-01-02 05:38:22 -05:00
rocky
7d42329c31 Work on MAKE_CLOSURE rules for Python 3.3 2016-01-01 21:55:14 -05:00
rocky
09ef875b3e Remove tests we will never use 2015-12-31 11:37:06 -05:00
rocky
4d5a3bc449 Add a few tests from Python 2.7 standard library 2015-12-31 10:57:59 -05:00
rocky
8d90e33832 Handle Python 3.3 > dotted class names 2015-12-31 10:56:12 -05:00
rocky
b82a8b90d5 Allow Python 3.5 to decomplyle other versions. No Python 3.5
bytecode support just yet though.
2015-12-30 23:46:29 -05:00
rocky
d5b023aec4 Parses another variation of Python3 try/except. Reinstate some tests 2015-12-30 19:05:58 -05:00
rocky
e50bebb7c8 Reinstate list comprehension test. I think we've found/fixed the
initialization bug.
2015-12-30 18:51:22 -05:00
rocky
657eeb7de8 Towards Python3 getting try/except working more often. 2015-12-30 09:46:52 -05:00
rocky
a30f3625ac Fix Python 2 cross deparsing pythond bytecode tuples co_consts,
co_names, co_varnames. Reinstate cross Python 2-3 uncompiling
2015-12-29 22:11:45 -05:00
rocky
34841abe14 scanner3: Python 2.6 compatibility: change set initializations. Get rid
of * import
opcode_*: only a little of the much-needed larger cleanup
Makefile: remove 3.x bytecode checking from Python 2.x for now. DRY
Makefile a little bit (but more is needed)
2015-12-29 08:30:49 -05:00
rocky
820fdb4771 Fix up Python 2.x's ability to get code from Python 3.x's bytecode 2015-12-27 19:36:02 -05:00
rocky
d774222eb1 defer some tests 2015-12-27 17:11:58 -05:00
rocky
7c5b8d803c More tests 2015-12-27 16:50:45 -05:00
rocky
c508413689 3.2 bytecode 2015-12-27 15:19:53 -05:00
rocky
44cd349cc7 DRY Python3 scanner code. Some cross version handling fixed.
Some Python 3.2 and 3.3 deparse fixes.
2015-12-27 04:43:35 -05:00
rocky
4640e7dece Running native on Python 3.3 needs more work 2015-12-26 19:32:32 -05:00
rocky
ce8c7a4dc2 Add ok-2.7 tests for 3.4 full testing 2015-12-26 19:25:46 -05:00
rocky
6bd61deccc Add verify tests. Add Python 2.6 bytecode and use. 2015-12-26 19:14:53 -05:00
rocky
69a8404edb For testing we can't 3.3 bytecodes on 2.7 yet, so use 3.2 2015-12-26 10:24:02 -05:00
rocky
008bd79719 Fix up Python 3.2, 3.3, and 3.4 cross-version scanners
Try travis 2.6 and 3.3
2015-12-26 10:19:26 -05:00
rocky
7a2703634f Fix up looping by reinstating JUMP_ABSOLUTE -> JUMP_BACK or CONTINUE
get jump offsets into jump attributes. Fix up 3.2 scanner paritally
and use that in 3.4 for in cross version disassembly.
2015-12-26 03:06:03 -05:00
rocky
fe9c8d5734 Python3 try/except handling improvements. Add Walker exception and use
that: fixes erroneous uncompyle success message on parse error.
2015-12-26 00:12:02 -05:00
rocky
0409cee6a9 WIP redo try/except for Python3 2015-12-25 17:57:53 -05:00
rocky
ea8bea4cd8 Get ready for releaes 2.0.0 2015-12-25 00:31:29 -05:00
rocky
c0d50c4d96 Improve Python3 class definition handling 2015-12-24 19:21:36 -05:00
rocky
e3a5d487eb Show embeded timestamp of byte-decompiled file 2015-12-24 11:30:57 -05:00
rocky
0c45fcfab9 WIP: Python3 exceptions 2015-12-23 20:08:07 -05:00
rocky
d47415a677 Start Python3 class(superclass) handling 2015-12-23 15:42:52 -05:00
rocky
f630fe15fb parse2.py, pysource.py: add buildclass nonterminal to structure tree
better and make more similar to Python3
load.py: handle magic errors better
main.py: correct use when passing a .py instead of a .pyc better and a message
err when file not found.
pysource.py: fix up main docstring; code moved from main.py
2015-12-23 13:49:56 -05:00
rocky
35592b50ed Allow comments in grammar rules. Start working on Python3 class (not
finished). More test organization.
2015-12-22 11:44:04 -05:00
rocky
41cceb5931 Remove Python2 buitin "print" from Python3's grammr. Start class tests 2015-12-22 05:50:00 -05:00
rocky
4f0fe90eef Add spark option to show grammer. Revise uncompyle options. Start to reorganize
tests more
2015-12-22 03:56:50 -05:00
rocky
6a49cd2c69 Bug in for loop with try. Add more of 2.7's COME_FROM statements.
spark.py: add tracing reduce rules. main: reduce cutsines.
Start history
2015-12-21 21:08:08 -05:00
rocky
6b0bb124ea Start Python3 execption handling 2015-12-21 15:41:21 -05:00
rocky
d75083c9db Regularize test names. 2015-12-21 12:34:19 -05:00