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
rocky
5e1340a2fc
3.8 exception handling
2019-04-11 12:09:24 -04:00
rocky
f3cd1ee3f3
Add FIXME not for attribute parenthesis
2018-11-12 03:48:44 -05:00
rocky
19ec52eb63
Change AST to SyntaxTree in many places
2018-07-15 12:37:50 -04:00
rocky
93e889e82a
Python 3.0 comprehensions are a snowflake
2018-06-24 16:46:56 -04:00
rocky
34ec41f274
Improve 3.0 list comprehensions
2018-06-24 06:56:30 -04:00
rocky
3daf3732c3
Fix Python 3.0 "and" parse rule
2018-06-23 23:04:17 -04:00
rocky
bc16cc93d6
More Python 3.0 parse errors
2018-06-23 13:31:16 -04:00
rocky
f547ec9291
Better is_pypy defaults
2018-06-19 12:26:22 -04:00
rocky
66ebb15d42
Previous two releases botched iterated list comprehensions
2018-06-14 10:32:54 -04:00
rocky
79bed3419f
last change left 3.2 finding comp_iter broken
2018-06-10 04:56:57 -04:00
rocky
0353b74a7a
3.0 list comprehensions
2018-06-09 23:14:04 -04:00
rocky
67910e7d8e
Python 3.0 set comprehensions
2018-06-09 22:51:07 -04:00
rocky
61fa4fe391
Some Python 3.0 fixes...
...
Needs more in this direction though.
2018-06-09 10:05:23 -04:00
rocky
189605ea2c
Adjust showtree() calls
2018-05-13 14:23:52 -04:00