rocky
28d9e66a53
Redo the way we handle complex literals and 3.7+ bug fixes...
...
In 3.7+ remove assert_expr* parser rules
Fix "call" precidence in 3.7+ for it children
2019-12-19 06:40:13 -05:00
rocky
8470bded59
Bugs found in test_complex.py
...
list comprehensions from 3.x closures didn't handle nested for's
before 3.6.
Handle nanj and infj.
2019-12-17 18:27:43 -05:00
rocky
d39169dbda
Add 3.7 async listcomp
2019-12-16 00:14:16 -05:00
rocky
996719688a
Merge branch 'master' of github.com:rocky/python-uncompyle6
2019-12-15 21:18:44 -05:00
rocky
af9f6b05fa
Add 3.7 "async for" in generator
2019-12-15 21:18:37 -05:00
rocky
e93b70bcce
Fix Python 3.x pringing superclasses...
...
class Description: not class Description("Description").
Introduced in not catching LOAD_CONST->LOAD_STR change
2019-12-15 10:49:24 -05:00
rocky
cc55fa1de1
binary_expr -> bin_op to match Python AST
...
I know binary_expr is more natural, but as with things Python we
sometimes sacrifice elegance and clarity for Python Fascism.
2019-12-11 13:35:21 -05:00
rocky
c6ddefcef5
Merging in recent 3.7 and 3.8 improvements from decompyle6
...
This rebases 3.7, 3.8 ...decompilation off of 3.7ish rather than a 3.4
base.
Add more 3.7 and 3.8 tests
2019-12-08 17:54:59 -05:00
rocky
6659fffc0d
Two Bugs ...
...
2.7: more stringent comparison and comp_if testing
2.6-2.7: fix botched dict constant translation
2019-11-18 06:49:36 -05:00
rocky
2da5a5649f
Python 3.5 tolerance
2019-11-10 12:04:21 -05:00
rocky
0a5fcc51d8
Pypy 3.6 fixes and tests
2019-10-29 11:43:09 -04:00
rocky
d41ef3e5dc
Pypy 3.6 tolerance
2019-10-28 14:46:45 -04:00
rocky
ebb0342b38
WIP pypy3.6 handling
2019-10-28 13:20:51 -04:00
rocky
163e47fb49
Fragment fixes (and workarounds)
...
fragments.py: add more parent offsets. blacken buffer
parser3.py: additional grammar rules for fragment parser
Misc small typos and corrections
2019-10-12 12:22:27 -04:00
rocky
0cf32f1b70
Better 1.5 parameter tuple handling...
...
Tidy README.rst
2019-10-10 17:20:00 -04:00
rocky
1ebfde6927
Add tree transformation phase...
...
if ... else if ... -> if ... elif ..
if .. : raise AsssertionError -> assert
Add options --tree=before --tree=after -T expanded to include this
This code ported from decompyle3. x0ret did all the heavy lifting.
2019-08-21 09:00:09 -04:00
rocky
71bdc8dc6a
Merge branch 'master' of github.com:rocky/python-uncompyle6
2019-07-18 05:27:05 -04:00
rocky
71735ca7ef
Note that CALL_METHOD is used in 3.7+
...
and not just Pypy anymore
2019-07-18 05:26:33 -04:00
x0ret
2e01f42f65
Fixes #278
2019-07-14 01:12:42 +04:30
rocky
cc531cf90a
Fix call to code_deparse call in deparse_code2str
...
Fixes #275
2019-07-05 06:06:14 -04:00
rocky
ecab7d7b09
Python 2.4 unpack rule needs adjusting for exceptions
2019-07-03 20:08:23 -04:00
x0ret
76eef9a149
Handle if elif else case for 3.5
2019-06-29 06:57:23 -04:00
rocky
c8b945fb56
Handling if elif else more
2019-06-29 06:57:23 -04:00
rocky
887a006849
if/elif for 2.5-2.7
...
Specifically simple_source/03_if_elif.py
2019-06-23 21:29:15 -04:00
rocky
9d6d6a355d
Start to reinstate elif's
2019-06-21 07:13:05 -04:00
rocky
b39112b601
One more deparse_code removal
2019-06-16 22:30:56 -04:00
rocky
d369017122
remove deprecated deparse_code
2019-06-16 21:57:56 -04:00
rocky
76dcaf9bf0
Tweaks to x0ret's anotation type handling
...
- match AST names a little better: AnnAssign -> ann_assign...
- localize Annotation type grammar change only when we have it
- Add reduce rule to combine assignment and annotate declaration
- Add annotation-type test from Python 3.6
- Docuemnt what's up with annotation types
2019-06-11 11:02:25 -04:00
rocky
354796fffd
One more LOAD_CONST->LOAD_STR artifact
2019-06-09 11:10:14 -04:00
rocky
c8fc6a704c
LOAD_CONST->LOAD_STR bugs and 3.4 kwargsonly
2019-06-09 02:18:21 -04:00
rocky
9d47b99932
Another LOAD_STR/CONST isolation in < 3.0
2019-06-08 11:40:48 -04:00
rocky
64e35b09db
Small simplification
2019-06-06 09:10:44 -04:00
rocky
a0d4daf5ff
Small typo
2019-06-06 08:44:19 -04:00
x0ret
39c12704a8
fix unicode docstring again, handling unicode string in py2, fix docstring indentation
2019-05-28 15:11:44 +04:30
x0ret
a5cdb50154
towards supporting unicode: docstring
2019-05-27 17:00:08 +04:30
rocky
59b8f18486
Fix 3.7 list comprehension bug
2019-05-21 07:01:27 -04:00
rocky
44e1288e2f
Less dishonest COME_FROMs
...
Addresses all of the problems seen in 3.7 datetime.py.
However we limit COME_FROMs only to forward jumps, not back (which in the case of Python code right now means looping) jumps.
2019-05-13 23:15:55 -04:00
x0ret
009a74da7d
fix UnboundLocalError
2019-05-13 19:41:42 +04:30
rocky
b94cce7b12
Revise format string handling
...
fstring_single{1,2} -> format_value{1,2} to match Python AST names
better
2019-05-13 09:40:32 -04:00
rocky
6df65a87bc
Fix precidence between list_if and if_expr in 3.x
2019-05-05 08:16:29 -04:00
rocky
bc49469704
delete_subscr -> delete_subscript ...
...
to better (but not exactly) match the Python AST
2019-05-04 19:43:00 -04:00
rocky
293e7b0367
store_subscript precedence fix and...
...
Allow format specifier "%p" to indicate a nonterminal name,
like "%c" allows.
store_subscr -> store_subscript to match Python AST a little closer.
2019-05-02 06:43:53 -04:00
rocky
132a9acdb4
Was mssing 2.5 cond3 semantic rule
2019-04-23 13:09:14 -04:00
rocky
05db6194ec
Use up right 3.x opcodes in jump detection...
...
A small but pervasive, and I guess important change. More correct COME_FROMs
are now coming out. A number of grammar changes then in 3.0, 3.5, and 3.8
2019-04-23 05:14:29 -04:00
rocky
b2dd58a85e
Hacky attemp to add more 3.x annotate information in
2019-04-18 02:26:50 -04:00
rocky
2ea8c3b1b1
3.7 and 3.8 chained compare fixups
2019-04-16 10:19:16 -04:00
rocky
701d2af54e
Improve Python 2.7 generator handling
2019-04-15 23:14:44 -04:00
rocky
b4c66d4307
Was missing some 3.7 and 3.7 semantic actions...
...
Possibly some as a result of the last refactor?
2019-04-15 08:11:31 -04:00
rocky
9b550b9dda
PEP E225 with a nod to Deepcommit
2019-04-14 06:11:16 -04:00
rocky
a891aa0706
More 3.8 try blocks
2019-04-11 16:42:28 -04:00