Commit Graph

230 Commits

Author SHA1 Message Date
rocky
d0ca7b0363 Loosen check to allow running from 2.4-3.10
We still only can *decompile* 2.4-3.8
2021-10-26 06:21:51 -04:00
rocky
41314f95bb More Python version comparison adjustments 2021-10-19 16:30:56 -04:00
rocky
8ac7a75372 Use tuples not floats in Python release comparison 2021-10-18 11:59:02 -04:00
rocky
e8e006bb8c More Python version comparison conversions 2021-10-16 11:33:03 -04:00
rocky
c68b74a9c6 new dis - Python compisons involving tuples 2021-10-15 23:39:59 -04:00
rocky
184bda1b03 Work around broken modularity in python_parser 2021-08-27 02:13:09 -04:00
rocky
8879708da7 del_stmt -> delete to match Python AST better 2020-09-02 07:14:56 -04:00
rocky
a215ee2f00 Use "co_consts" in docstring detection.
Note: this is an upheaval because we need to pass "code" or at least
"code.co_consts" to the docstring detection routine
2020-07-21 10:31:07 -04:00
rocky
3fb8d90407 Revise for xdis 3.6.0 ...
Simplify xdis imports where we can.
Blacken (most) of those buffers too
2020-05-18 21:49:16 -04:00
rocky
ab6b12be56 Small fixes in fragment parser 2020-04-21 19:58:03 -04:00
rocky
869e48877c Convert to use xdis 4.3.0 or greater 2020-04-16 08:41:53 -04:00
rocky
a616e1e1c7 "withstmt" -> "with" and fix async for 2020-04-01 09:48:34 -04:00
rocky
3afc5a599a Fix one more call to ParseError 2020-03-31 10:46:00 -04:00
rocky
663bc06bb9 Fix one more call to ParseError 2020-03-31 10:44:52 -04:00
rocky
cb35ad906c One more if_exp use (ret_cond) 2020-02-07 16:34:48 -05:00
rocky
278af38df6 conditional -> if_exp ...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
33918bd9d2 More 3.x "if" checking. Abbreviate stmts->sstmt 2020-01-26 02:58:33 -05:00
rocky
58f2e19539 Hack around grammar weakness in 3.5..3.6 for now 2020-01-25 10:12:18 -05:00
rocky
f6f2d8dd05 Start to disambiguate stmts in a loop 2020-01-25 09:14:55 -05:00
rocky
eacc3f5cc7 blacken (reformat) a parser.py 2020-01-18 05:23:16 -05:00
rocky
b333d7afc2 If statement in loop isolation 2020-01-17 10:47:38 -05:00
rocky
d5df411c7a 3.7+ multiple imports of dotted path 2020-01-03 23:22:28 -05:00
rocky
bffbd0b352 3.6+ lambda params; add semantic rule customizing for lambdas 2019-12-23 07:19:40 -05:00
rocky
56bf3e3125 unary_expr -> unary_op 2019-12-14 10:57:19 -05:00
rocky
668141662e unary_expr -> unary_op to match Python AST
former unary_op is now unary_operator
2019-12-11 15:47:46 -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
0b3d6b8add Get ready for release 3.5.0 2019-10-12 19:53:17 -04:00
rocky
24afe072b7 LOAD_CONST -> LOAD_CODE where appropriate 2019-06-19 14:43:07 -04:00
rocky
436260dc9a Small tweak 2019-05-21 17:02:24 -04:00
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
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
820283827f 3.8 "for" block ...
pysource: Tag older semantics for blocks with "expr" and "for_block"
2019-04-10 06:00:16 -04:00
rocky
dcad6cf6ce Fix if return boundary in 3.6+
Fixes #209
2019-03-10 05:59:15 -04:00
rocky
ec42ee540c Small typos 2018-09-20 17:40:23 -04:00
rocky
616e5c82f6 Reinstat expr32 and expr1024 rules...
to speed up handling long literal lists. See also issue #188

Update issue forms to simplfy via putting instructions as comments.
2018-09-19 20:14:42 -04:00
rocky
19ec52eb63 Change AST to SyntaxTree in many places 2018-07-15 12:37:50 -04:00
rocky
b7942bc5f2 Add Python 1.3 decompilation ..
Reduced checking via "make check-short"
2018-06-13 12:26:21 -04:00
rocky
9d3e4a6660 Some Python 1.4 fixes 2018-06-04 02:09:48 -04:00
rocky
7dfade1195 Remove schmutz 2018-06-03 03:53:53 -04:00
rocky
1df5aa0ef9 Better Python 1.4 support 2018-06-03 03:21:15 -04:00
rocky
7237658f1f Start to handle 3.7 2018-04-12 23:49:37 -04:00
rocky
9d807501af Grammar reduction for 2.6/2.7,3.x 2018-03-27 17:02:03 -04:00
rocky
50e59a37c1 Python 2 "for" grammar rule isolation 2018-03-19 16:15:53 -04:00
rocky
c43c9a19aa Move to GPL3 license 2018-02-27 06:40:36 -05:00
rocky
5039a71846 fixes 151 2018-01-29 01:05:22 -05:00
rocky
abf85faf79 small grammar formatting tidy 2018-01-13 08:17:28 -05:00
rocky
a4db92ce72 funcdefdeco -> function_def_deco ...
to match AST grammar more analogously
2018-01-11 01:44:34 -05:00
rocky
0692727605 Stronger while 1 testing...
Make instructions available in reduce tests.
Back off of a while test that was semantically different.
2018-01-08 21:54:28 -05:00
rocky
6aa4376fca Fix another 2.5- try/else (in loop) bug 2018-01-07 08:44:54 -05:00
rocky
6a1e8295b1 Increase test coverage. Remove some epsilon reductionsa 2017-12-14 16:02:48 -05:00