Commit Graph

57 Commits

Author SHA1 Message Date
Daniel Bradburn
ebee84228b Fixed bug in pysource / fragments where the use of deparse_code from fragments could break subsequent calls to deparse_code from pysource due to amending to the global TABLE_DIRECT. 2016-05-25 20:48:35 +02:00
rocky
79f4893cd9 final RETURN removal bug
We want to remove a final return from a module, but otherwise not.
Note we'll no lonager be able to verify functools.pyc as there
is now a return after a raise statement. That will have to be
delt with separately.

May address Issue #17.
2016-05-23 22:41:46 -04:00
rocky
f834b46b84 Fragment fixes
fragments.py:
 * Use "%x" specifier if for iterators
 * Add '%D' interpretation

pysource.py:
  TABLE_DIRECT can get messed up from running fragments
  duplicate "%x" specifier to igore fragment stuff
2016-05-20 06:18:41 -04:00
rocky
9462e33f48 Fix Python 3.x bugs
* class definitions made via closures
* Add "make check-short" to top-level
* parse3.py: Python 3.3 uses STORE_LOGALS
2016-05-17 04:00:54 -04:00
rocky
09a01dc783 Correct bugs in Python 3.2 source generation 2016-05-16 15:50:45 -04:00
rocky
6be6632e96 Bug in Python 3.x genexpr 2016-05-15 19:35:45 -04:00
rocky
2c121545f0 Fix bug in Python 3 lambda expression handling
Some other small cleanup changes
2016-05-15 18:14:22 -04:00
rocky
2fdcdcb154 Fix bug in kvlist handling on Python 2.7
Created from previous DRY code in Python 3
2016-05-15 03:47:30 -04:00
rocky
b9692c9b1f DRY scanner34 and scanner35
handle 3.0..3.4 build maps as key/value pairs
2016-05-15 03:29:08 -04:00
Teyut
ca10f5652f Fix for class decorators 2016-05-13 17:59:12 +02:00
rocky
6f6f1db576 Misc fixups/cleanups
* parse3.py Had botched if-for-else test by grammar addition
* semantics/*.py: Show errorstack in failed parse when -g (requires sparck 1.2.0)
* some optimization in scanner3
2016-05-12 09:27:25 -04:00
rocky
631d7be921 Redo make_function for *, arg
main(*, file='foo') and things like that now work
2016-05-11 20:34:20 -04:00
rocky
b134d08e91 add pos_arg ::= expr to make params of fns clear 2016-05-10 18:05:25 -04:00
rocky
d823dfb5d3 Python 3 "while True" bug 2016-05-09 14:44:34 -04:00
rocky
41f9e9e53e Track recent lc changes in fragment semantics 2016-05-09 06:57:13 -04:00
rocky
e37b197db9 Fix Python 3 list comprehansion closure bug 2016-05-09 05:03:49 -04:00
rocky
debb46b0fe Semantic routine nonterminal typo 2016-05-08 13:49:15 -04:00
rocky
36ffd4c31f Handle Python 3 yield from
Start dealing with MAKE_FUNCTION flags - not done yet.
2016-05-07 11:33:18 -04:00
rocky
039c115679 More Python3 deparsing
- grammar rule genexpr
- More Python3 docstring formatted
2016-05-06 23:51:25 -04:00
rocky
163dfd888d Minor tweaks 2016-05-05 22:09:22 -04:00
rocky
408ba8c564 All Python 2.7 lib files decompile 2016-05-05 21:34:56 -04:00
rocky
6f3a88d7e2 Fix up 3.2 tests
Remove pypy
2016-05-05 04:41:23 -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
119bb9bb26 Bug 2016-05-01 21:14:25 -04:00
rocky
dcbf8d2cf7 Bug in 3.5 constant map parsing 2016-05-01 20:54:42 -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
3e49aa56bb spark -> spark_parser 2016-04-28 19:03:51 -04:00
rocky
40badefe9d Use external spark now. 2016-04-27 23:04:31 -04:00
rocky
7e0526d627 Towards single compilation 2016-04-17 22:47:03 -04: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
8d90e33832 Handle Python 3.3 > dotted class names 2015-12-31 10:56:12 -05:00
rocky
d3a32b6877 Show details on parsing assert failures. 2015-12-30 23:17:57 -05:00
rocky
21e51004ae Remove accidental schmutz. Try using pattr on 3.4 to get fn names 2015-12-30 20:18:20 -05:00
rocky
2e91de8355 Start using our replacement for inspect.iscode 2015-12-30 18:44:27 -05:00
rocky
5bbe2c4a45 Doc changes. 2015-12-30 18:20:50 -05:00
rocky
b3ede4b64b Walker->SourceWalker Traverser->FragmentsWalker 2015-12-30 17:04:18 -05:00
rocky
657eeb7de8 Towards Python3 getting try/except working more often. 2015-12-30 09:46:52 -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
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
3ac3ef24ac Add node and template code to cleanup "for" handling 2015-12-26 10:42:57 -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
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
39f0f7440b Fix bugs in using pysource from fragments. 2015-12-25 10:47:07 -05:00
rocky
1d533cbb23 Two modes of disassembly, one where we show hidden code and one where we don't. 2015-12-25 10:08:12 -05:00
rocky
1088031335 Remove Python3 class __qualname__ assignment. Change LOAD_NAME to
LOAD_CLASSNAME to make parsing more reliable and intentional.
2015-12-24 22:31:24 -05:00
rocky
c0d50c4d96 Improve Python3 class definition handling 2015-12-24 19:21:36 -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