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
e39c6c7f0a
Fix "with as" indenting and decorated "async def"
...
Misc other improvements: make check-short now is short
2019-12-18 09:14:09 -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
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
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
e2914ed552
More excpet_cond futzing
2019-07-03 19:26:36 -04:00
rocky
999f1fb0f9
Mostly x0ret's while(1)/if fixes ..
...
plus a potential test
2019-06-29 07:01:45 -04:00
rocky
e26c7407a0
Small changes to document some of the complexity.
2019-06-23 20:00:00 -04:00
rocky
9d6d6a355d
Start to reinstate elif's
2019-06-21 07:13:05 -04:00
rocky
efe0914814
See above.
2019-06-11 10:35:53 -04:00
rocky
9d47b99932
Another LOAD_STR/CONST isolation in < 3.0
2019-06-08 11:40:48 -04:00
rocky
59b012df6f
localize LOAD_STR change to Python 3
2019-06-08 11:01:58 -04:00
rocky
44d7cbcf6f
LOAD_CONST->LOAD_STR for Python 3.x
2019-06-08 02:28:27 -04:00
rocky
1cc08d9598
Make precedence table top-bottom order reference...
...
in https://docs.python.org/2/reference/expressions.html#operator-precedence or
https://docs.python.org/3/reference/expressions.html#operator-precedence
.
2019-05-13 09:41:16 -04:00
x0ret
d99e78d46d
set precedences value for format strings
2019-05-13 09:41:09 -04:00
rocky
6d8d9fd83b
Go over precedence in calls
2019-05-11 23:32:24 -04:00
rocky
f2f17740ee
2.7 if_expr_true restriction ...
...
condition_true -> if_expr_true
condition_lambda -> if_expr_lambda
These correspond to the Python AST names better.
2019-05-05 16:09:10 -04:00
rocky
393e5c9303
IfExp precidence handling in 2.6...
...
2.7 still has a bug
2019-05-05 09:48:20 -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
7ecfb74e9a
testtrue expr check nuked because of 3.7
2019-05-02 14:01:51 -04:00
rocky
2813e2212f
tidy "not" precedence.
2019-05-02 11:44:20 -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
5c58a4816f
Fix 2.x delete statements expression confusion
2019-04-23 15:48:14 -04:00
rocky
f1b69a8a28
Add rule for 3.x comp_for
2019-04-22 18:42:21 -04:00
rocky
726045a05e
Basic 3.8+ "for" loop handling...
...
More Makefile mangling
2019-04-10 11:26:58 -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
19ec52eb63
Change AST to SyntaxTree in many places
2018-07-15 12:37:50 -04:00
rocky
269f4f2e1b
2.6, 2.7 Parse if else inside list comprehension
...
Fixes #171
2018-04-28 20:44:09 -04:00
rocky
c0022ed5b7
Typo
2018-04-25 13:05:56 -04:00
rocky
41a50b5e46
Handle if not else in lambdas...
...
Fixes #170
2018-04-25 12:57:09 -04:00
rocky
1b2b45642b
3.6 try except-as bug
2018-03-22 23:54:12 -04:00
rocky
28bfb453f5
Localize call_kw precedence to 3.6
2018-03-22 14:21:36 -04:00
rocky
7fc7e083c3
A couple of 3.6 bugs...
...
remove parens around decorators by adjusting precidence
Partial handling of quotes within 3.6 format strings
2018-03-21 19:54:28 -04:00
rocky
9f66694056
dictcomp_func -> dict_comp_func...
...
to match AST better. Also adds a correction in last commit,
including set_comp -> set_comp_expr where apprpriate
Note: can't use dict_comp as that was already used.
But dict_comp_func is matches AST better than dictcomp_func
2018-03-05 11:12:15 -05:00
rocky
02b1554da3
grammar and semantics for dict comp with "if"
...
Fixes #162
2018-03-05 07:52:02 -05:00
rocky
e9d1b86a5b
Revise comprehension walking in 3.x...
...
less rigidly and with less magic and more verbiage as to what's going on
2018-02-27 11:13:55 -05:00
rocky
a2b6ebc669
grammar tree -> parse tree
2018-02-22 14:34:42 -05:00
rocky
09efb24a3e
Start distinguishing AST from grammar tree
2018-02-22 11:17:09 -05:00
rocky
be03b22d32
Clean up fragments code for "for"...
...
And make a little more precise.
tag "store" part of "for" in consts.
2018-02-03 11:12:12 -05:00
rocky
a4db92ce72
funcdefdeco -> function_def_deco ...
...
to match AST grammar more analogously
2018-01-11 01:44:34 -05:00
rocky
acdefb4f70
NT return_stmt -> return to match AST
2017-12-14 11:03:15 -05:00
rocky
4cd4ad22b6
NT passtmt -> pass to match AST
2017-12-14 05:31:17 -05:00
rocky
b544827192
NT: "forstmt" renamed to "for" to match AST
2017-12-12 12:33:27 -05:00
rocky
ef08677287
Reinstate kwargs1...
...
was just missing the semantic action rule for it
2017-12-07 13:24:55 -05:00
rocky
7daf95fcb4
NT break_stmt, continue_stmt -> break, continue...
...
to match AST
2017-12-06 01:48:44 -05:00
rocky
f8d6998b22
NT continue_stmt -> continue to match AST
2017-12-06 01:45:08 -05:00
rocky
c953701623
Slightly better 3.x list comprehension handling
2017-12-04 14:15:06 -05:00