rocky
09efb24a3e
Start distinguishing AST from grammar tree
2018-02-22 11:17:09 -05:00
rocky
deb9903a97
DRY and limit STORE_LOCALS
2018-02-19 08:03:09 -05:00
rocky
730b0549d5
Handle 3.6+ FUNCTION_EX a little more generally
2018-02-12 04:26:52 -05:00
rocky
e431e49d77
Isolate Python 3.5 custom parse rules...
...
are isolated into parse35.py now and removed from parse3.py
This causes some code duplicated from parse3.py into parse3{5,6}.py
We will deal with that later.
2018-02-12 03:59:44 -05:00
rocky
230a38d537
Fix Python 3.5 CALL_FUNCTION_VAR handling
2018-02-12 03:07:03 -05:00
rocky
ab4daf2879
Merge branch 'master' of github.com:rocky/python-uncompyle6
2018-01-12 20:14:15 -05:00
rocky
db9eaa7503
3.x while1else checking
2018-01-12 20:14:09 -05:00
rocky
c6e20e4444
Fix whileelse bug
2018-01-11 21:52:33 -05:00
rocky
7883e00b44
Correct 3.6 FUNCTION_EX handling, somewhat
...
Some Python 2.4 compatibility snuck in but I suppose that is not so bad
2018-01-08 23:20:22 -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
a3e61a710f
Towards handling CALL_FUNCTION_EX_KW...
...
more work is needed though
2017-12-14 23:12:37 -05:00
rocky
52f2b9341a
More Python 2/3 grammar restriction
2017-12-14 15:24:01 -05:00
rocky
6c552bec07
Python 2 grammar restricion to match recent Python 3
2017-12-14 14:54:40 -05:00
rocky
eb5706ee4b
Add a missing 3.6 generator rule
2017-12-14 12:15:58 -05:00
rocky
c01ce9e3de
Better grammar specialization for Python 3
2017-12-14 11:42:46 -05:00
rocky
acdefb4f70
NT return_stmt -> return to match AST
2017-12-14 11:03:15 -05:00
rocky
a1082ebae9
Start handling 3.6 CALL_FUNCTION_KW
2017-12-14 08:36:12 -05:00
rocky
4cd4ad22b6
NT passtmt -> pass to match AST
2017-12-14 05:31:17 -05:00
rocky
aac793af09
Start parse2 customize_grammar_rule refactor
2017-12-13 18:56:38 -05:00
rocky
f82edae5a1
add_custom_rules -> customize_grammar_rules
2017-12-13 17:25:19 -05:00
rocky
84b4ac1c51
NT "_for" -> "for_iter" reduces confusion w/ "for"
2017-12-12 12:41:44 -05:00
rocky
b544827192
NT: "forstmt" renamed to "for" to match AST
2017-12-12 12:33:27 -05:00
rocky
36fbafa0f8
Bang on 3.6 CALL_FUNCTION(_VAR)_KW
2017-12-12 11:01:34 -05:00
rocky
ec1be81de7
Grammar specialization of DELETE_xxx in 3.x
2017-12-12 05:30:35 -05:00
rocky
3705f6d096
Start to handle CALL_FUNCTION_EX more accurately
2017-12-11 08:24:27 -05:00
rocky
88fbb691d8
Fix 3.1 and 3.2 named and kwargs parsing..
...
Improve 3.4 coverage and note a 3.5 while bug
2017-12-07 16:47:56 -05:00
rocky
ef08677287
Reinstate kwargs1...
...
was just missing the semantic action rule for it
2017-12-07 13:24:55 -05:00
rocky
08789adbb4
Reduce singletons rules and ..
...
fix recently introduced kwargs bug.
2017-12-07 13:20:08 -05:00
rocky
b8b9b8463c
Fix grammar cover from last commit
2017-12-07 12:34:13 -05:00
rocky
7d8c17cb93
grammar isolation and reduction
2017-12-07 12:27:22 -05:00
rocky
41db5b8848
Fix while1/if parsing in 3.x. Reinstate some tests
2017-12-06 22:47:56 -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
03743fa9fc
Python 3.x raise statement reduction
2017-12-05 05:57:11 -05:00
rocky
e12e278efc
Narrow 3.x mkfunc rules
2017-12-05 05:43:22 -05:00
rocky
2d628acf60
Separate rules for set, tuple, dict from list...
...
Sync fragments.py with pysource
2017-12-05 00:13:17 -05:00
rocky
9506412aba
More tidiness...
...
Shorten/improve description of what's up with add_customize_rules
2017-12-04 10:14:13 -05:00
rocky
53b195ede9
Tidy a little ...
...
parse32.py: Move common grammar rules from parse32.py to parse3.py
parse32 should just have 3.2ish specific stuff.
parse3.py: favor addRule over add_unique_rule
pysource.py: make more clear what's up with comprehensions.
more later.
2017-12-04 09:36:39 -05:00
rocky
3425851dc7
Python 3.x needs conditional_not
2017-12-04 08:40:06 -05:00
rocky
344d2d92c4
NT: load_attr -> attribute to match AST
2017-12-03 13:02:22 -05:00
rocky
5b916567fe
NT try-middle -> except-handler to match AST
2017-12-03 06:30:33 -05:00
rocky
32f3d947bb
Grammar "COME_FROM"_from cleanups ...
...
tryelse constructs in 2.x fixed up
_come_from -> _come_froms (COME_FROM*)
consolidate come_froms rule into sincle parser.py
2017-12-03 05:10:59 -05:00
rocky
eafb32b9a0
NT trystmt -> try_except to match AST
2017-12-02 22:20:45 -05:00
rocky
de594ce7f2
Remove 3-arg raise in 3.x and..
...
add tests in 2.x
2017-12-02 22:07:44 -05:00
rocky
6d0f72f13b
Fix bug in 2.6 tryelse get test_grammar working...
...
localize grammar rules
2017-12-02 01:35:43 -05:00
rocky
8b6ae46a1d
Isolate and reduce 3.x conditionals and lambda rules
2017-12-01 22:03:12 -05:00
rocky
ad822c02d8
opt_come_from_loop -> come_from_loops...
...
ANd remove unused rules associated with COME_FROM_FINALLY
2017-12-01 21:46:56 -05:00
rocky
03a5ad3d94
NT funcdef -> function_def to match AST
2017-12-01 21:36:23 -05:00
rocky
dfdd5c6c1c
NT build_list -> list to match AST
2017-12-01 03:55:31 -05:00
rocky
01b5ed2304
NT mapexpr -> dict to match AST
2017-11-30 15:59:15 -05:00