rocky
04da2fb8df
Improve 3.4 ifelse inside a lambda
...
Fixes #426
2024-07-13 22:46:31 -04:00
rocky
7787166ddf
Add grammar rule involving RETURN_END_IF
2024-07-13 17:47:21 -04:00
rocky
156188f8bb
withasstmt -> with_as
...
This matches Python's AST naamae better. Some linting and
sorting of dictionary keys done as well.
2024-03-08 04:10:33 -05:00
Jakub Wilk
7a2348e4cc
Fix typos
2024-01-19 23:20:13 +01:00
rocky
dcc9d1a571
Fix spelling via "codespell"
2023-12-17 10:52:32 -05:00
James Hilliard
ab508e1ec9
Fix ImportError: cannot import name PYTHON_VERSION
2022-11-05 17:17:24 -04:00
rocky
deea74b6a8
ret_expr -> return_expr
...
This matches Python's AST a little more closely
2022-01-03 21:56:07 -05:00
rocky
165115289a
dict_unmap -> dict_unpack matches Python AST better
2021-12-26 19:03:58 -05:00
rocky
23551ea70f
unmap_dict -> dict_doublestar ...
...
This matches Python's AST (Dict) better. Variations or specializations
of an AST name, e.g. "unmap" should come at the end, not the beginning.
2021-12-23 22:57:15 -05:00
rocky
0645738775
Revise Python version comparisions
...
And set scanner.show_asm for 3.6
2021-10-19 05:54:54 -04:00
rocky
15efaffe8d
More Python version tuple comparison conversion
2021-10-16 11:41:22 -04:00
rocky
4bbdbe3894
Remove bogus async_with rule
2020-09-10 17:19:13 -04:00
rocky
a616e1e1c7
"withstmt" -> "with" and fix async for
2020-04-01 09:48:34 -04:00
rocky
5355cb5404
async with rules back to 3.5 and ...
...
add precidence on cascaded "await" expressions
2020-02-08 20:31:06 -05:00
rocky
d43972313a
Cut-n-paste grammar rule bug
2020-01-25 19:06:41 -05:00
rocky
66b3e35a5b
3.+ More loop-isolation grammar separation...
...
but also back off some isolation separation for now.
2020-01-25 11:46:03 -05:00
rocky
58f2e19539
Hack around grammar weakness in 3.5..3.6 for now
2020-01-25 10:12:18 -05:00
rocky
fedd5e0ba5
Better "try" vs. "try"/"else" disambiguation ...
...
via reduction check that was originally only in 2.7
2020-01-09 22:37:02 -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
f1496cad4d
3.0 return_if_stmt and...
...
* Some grammar cleanup
* add more grammar debugging
2019-11-16 17:32:48 -05:00
rocky
373916f57c
Pypy 3.5 tolerance
2019-11-09 21:56:36 -05: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
0c4ab699b5
3.4+ while handling with returns ...
...
these while loops don't have a JUMP_BACK in them
2019-04-15 12:03:11 -04:00
rocky
400943bb6a
3.8 async for/with...
...
More is needed though.
2019-04-13 22:22:37 -04:00
rocky
3d49b499fb
Move 3.6 return_if_lambda rule back to 3.5
2019-03-10 14:01:57 -04:00
cclauss
6cbaef4ba5
Travis CI: Run more f-string tests on Python 3.7
2019-01-12 20:24:08 +01:00
rocky
cd62e54c88
Correct (3.7) use fof BUILD_MAP_UNPACK_WITH_CALL
2018-04-21 00:41:14 -04:00
rocky
27f67e6fca
Fix some 3.6/3.7 bugs
2018-04-19 10:00:40 -04:00
rocky
c481d97866
A more uniform way to track opcodes seen...
...
use a set rather than these boolean variables. Done in 3.x
only for now. May do more later..
2018-04-18 12:01:46 -04:00
rocky
7d110f17bc
3.6 decompilation problems
2018-03-29 17:21:22 -04:00
rocky
94a81a36b7
3.5, 3.6 loop if/continue handling
2018-03-28 09:23:34 -04:00
rocky
d90c44b454
3.5+ handle then before "if" jump going to loop
2018-03-27 19:24:29 -04:00
rocky
cfb4ad625f
3.5 *() arg without further args
2018-03-25 22:24:32 -04: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
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
f82edae5a1
add_custom_rules -> customize_grammar_rules
2017-12-13 17:25:19 -05:00
rocky
41228a5ba9
DRY 3.{5,6} SETUP_WITH a little bit
2017-12-11 21:48:36 -05:00
rocky
b84c35acf5
DRY code; localize 3.{5,6} grammar rules..
...
helper.py, pysource: has code to flatten list used in n_list and n_build_tuple_unpack_with_call
parse3{5,6}.py: localize grammar rules with BEFORE_ASYNC_WITH
2017-12-11 21:26:58 -05:00
rocky
c787c27901
Get ready for release 2.14.1
2017-12-10 17:41:58 -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
7d8c17cb93
grammar isolation and reduction
2017-12-07 12:27:22 -05:00
rocky
b6413b6e6e
Skirt around control-flow problems...
...
Tag some of the weaknesses if we can't address them now
2017-12-07 08:55:45 -05:00
rocky
a7005f6a77
2.7 exec stmt grammar rule isolation/reduction
2017-12-02 09:23:18 -05:00
rocky
ac819cd1b9
whileTrue grammar reduction
2017-12-02 07:53:19 -05:00
rocky
fc33a4a72d
Python 3.5 grammar reduction
2017-12-01 22:26:58 -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
41adcef8f8
Isolate unmap_dict rule in 3.5
2017-11-30 11:03:12 -05:00
rocky
ac4d4d1da9
NT dictcomp -> dict_comp to match AST
2017-11-30 08:50:00 -05:00
rocky
43c3154a55
NT designatore -> store to match AST
2017-11-29 05:05:15 -05:00