R. Bernstein
5035d5433b
Revert "fix bug : not generate all files when use "-ro""
2017-01-11 07:09:18 -05:00
jlugjb
e851c0d46a
fix bug : not generate all files when use "-ro"
...
when use the args of "-ro outdir inputdir", only the first file is generated, other files is covered.
2017-01-11 17:02:36 +08:00
rocky
66518baed0
Misc cleanups
...
Favor "decompile" over "uncompyle" since "decompile" is in common use
Reduce size of pysource.py by splitting out constants
2017-01-08 09:26:19 -05:00
rocky
0afcd31bd5
On --verify if we can't unbuffer output, don't
2016-12-30 05:07:41 -05:00
rocky
a92e6c9688
Bugs in Python 2.6- "and" and "lambda" handling ..
...
and clean up verify output
2016-12-28 04:54:11 -05:00
rocky
d22931cb49
Get ready for release 2.9.7
...
Some of the many lint things. Linting is kind of stupid though.
2016-12-04 09:36:30 -05:00
rocky
1e324e0e8d
Misc changes
...
scanner26.py: make scanner2.py and scanner26.py more alike
scanner2.py: check that return stmt is last in list. (May change)
main.py: show filename on verify error
test/*: add more
2016-11-26 21:41:45 -05:00
rocky
abcd10628a
Add --linemaps: shows line number correspondences
2016-11-20 21:11:38 -05:00
rocky
79863ae122
Merge branch 'master' into line-mappings
2016-11-18 09:04:03 -05:00
rocky
d7f898b4fb
New feature: show line number correspondences
...
Option --linemap on uncompile show how original source-code line numbers
map to uncompiled source lines
2016-11-18 09:02:00 -05:00
rocky
31d387749b
More AST checking
...
Small fixes in output format
2016-11-16 07:28:19 -05:00
rocky
6fb879d0d8
Detect some erroneous decompilations
...
Until we can actually prevent these in grammar rules, we will warn of
improper decompilations.
Also, we now stop when we hit a decompile error. Previously we were not.
2016-11-10 22:29:39 -05:00
rocky
cd3cf5ec29
Use L. for line number prefix in asm and AST
2016-11-03 21:26:12 -04:00
rocky
0826129112
DRY Python 2.x unmangle_classname
...
main.py: small typo: Disassembled -> Decompiled
2016-10-20 06:35:01 -04:00
rocky
78ef16e4d7
Change meta data info in uncompyle6:
...
* Show file size of source when possible,
i.e. in Python 3.x
* Show full information about python interpreter
used to decompile
2016-10-15 19:24:05 -04:00
rocky
8b240a80e7
Get ready for release 2.9.0 ...
...
- Use xdis 3.0.0 protocol load_module. Needs bump in requirements.txt
and _pkg_info_.py
- Start Python 1.5 decompiling - another round of work is needed to remove
bugs
- small cleanups
2016-10-10 09:33:49 -04:00
rocky
2e1bd2dc13
Use .py extension in disassembled files more often
2016-10-06 04:05:38 -04:00
rocky
c7788e4545
disassemble -> ingest where appropriate
...
As part of tokenization for (de)parsing, we need to do something like a
disassembly, but is is really a little different.
Disassembly, strictly speaking, is done by the xdis module now.
What "ingestion" does is massage the instruction tokens to a form that is
more amenable for parsing.
In sum, ingestion is different than disassembly, although disassembly is
generally the first part of ingestion.
2016-09-04 11:43:02 -04:00
rocky
6189ce3c04
Bug in 3.x detecting "if" structure and ...
...
scanner3.py: bug in 3.x detecting "if" structure
Make scanner2.py look more like scanner3.py
verify.py: add weak-verify which tests Pytyon syntax, but not code
2016-08-31 04:07:42 -04:00
rocky
177a422b87
Show magic number in output
...
Fix bugs due to removal of token.format()
2016-07-27 09:44:05 -04:00
rocky
ecbbc7dfea
Custom PyPy rules for tryfinallysmt, assign{2,3}
2016-07-26 16:49:14 -04:00
rocky
7c4316d4fb
Start handling pypy 2.7
...
Need to understand whether we care compiling pypy.
Pypy 2.7 list comprehensions are different and use
its own opcode.
2016-07-21 02:58:50 -04:00
rocky
7b7a9fa4cf
Python 3.4 assertion handling. Improve verify
...
3.4 has jump optimization like 3.5.
verify.py: show mismatch on verification mismatch
2016-07-14 05:20:30 -04:00
rocky
7cc55f0c5f
Back off showing verification errors
...
Pending why this failing in make.
2016-07-13 13:47:30 -04:00
rocky
fd0d8d2567
Travis workaround
...
Not sure what's up with 01-class on 3.4. remove for now.
More info in 2.7.11 on what failed.
2016-07-13 13:00:03 -04:00
rocky
73df5f3737
3.4 set comprehension if bug
2016-06-18 23:43:50 -04:00
rocky
4398b5b2e0
Use xdis for code, magics, and marshal
2016-05-27 19:18:06 -04:00
rocky
207edbd53d
Small changes
...
test_pyenvlib.py: cleanup code a little
uncompyle6/main.py: more explicit decompile msg
2016-05-20 22:19:17 -04:00
rocky
134b67d952
Misc small changes
...
Go over history yet again
code cleanups.
2016-05-16 10:15:55 -04:00
rocky
5babde61c4
Misc changes
...
Back off of some validation tests for now.
2016-05-12 11:22:00 -04:00
rocky
739ce7b1fd
Go over history yet again.
2016-05-08 16:44:17 -04:00
rocky
b11f6d94f7
come_from_opt handles and/or precidence properly
...
main.py: give a better error message when file is not found.
2016-05-08 15:51:54 -04:00
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
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
2e91de8355
Start using our replacement for inspect.iscode
2015-12-30 18:44:27 -05:00
rocky
b3ede4b64b
Walker->SourceWalker Traverser->FragmentsWalker
2015-12-30 17:04:18 -05:00
rocky
f77c4b53c4
Marshal loading of = >python 3.4 from Python < 3.4
2015-12-28 14:56:53 -05:00
rocky
6f0a252693
Add Python3 marshal codes and start to handle cross-version Python code
...
object types, introducing scan.Code3
2015-12-28 14:17:28 -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
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
e3a5d487eb
Show embeded timestamp of byte-decompiled file
2015-12-24 11:30:57 -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
217b1b6f54
main.py, pysource.py DRY deparse_code from main. Is better on showing
...
exception errrors such as when a pyc file is not found
uncompyle6: Hook in --grammar option to showing grammar.
rules. Default now does not show timestamp.
2015-12-22 05:15: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
9cdcdfd305
Part of a much needed cleanup. Move semantics routines into its own
...
directory. Move out lots of stuff from __init__ to their own files.
Add file loading tests. Document AST handling a tad more complete.
2015-12-20 23:03:35 -05:00