Commit Graph

164 Commits

Author SHA1 Message Date
rocky
ddeb5af6d6 compare_chained2 _> compare_chained_right 2023-07-29 12:09:25 -04:00
rocky
843e3585e2 chained-compare1 -> chained-compare-middle 2023-07-29 12:01:14 -04:00
rocky
e8d4d383c6 pycharm lint, isort & black 2022-12-01 17:36:00 -05:00
James Hilliard
ab508e1ec9 Fix ImportError: cannot import name PYTHON_VERSION 2022-11-05 17:17:24 -04:00
rocky
71b1446c9c Push reducechecks from 2.7 into 2.6
Some adaption is needed. These rules may also help earlier 2.x Python as well
2022-08-23 21:36:55 -04:00
rocky
21b4d52a77 Correct 2.6 erroneous ifelse detection 2022-08-23 16:50:50 -04:00
rocky
5c29b9a5e5 remove \n in lambda; 2.6 grammar cleanup 2022-05-14 20:28:24 -04:00
rocky
eba0d37d0f Improve Python 1.x decompiling
Still has bugs, but is much better.
2022-04-30 05:54:22 -04:00
rocky
3490389a66 Correct some Python 2.6 chain compare bugs 2022-03-05 04:03:27 -05: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
3d5b6f4654 return_lambda -> return_expr_lambda
Except those places in 2.6ish code where it is simple a fancy RETURN_VALUE
2022-01-01 21:45:51 -05:00
rocky
15efaffe8d More Python version tuple comparison conversion 2021-10-16 11:41:22 -04:00
rocky
8879708da7 del_stmt -> delete to match Python AST better 2020-09-02 07:14:56 -04:00
rocky
815ae2c5cd for/else detection for older 2.x Pythons 2020-07-06 18:38:14 -04:00
rocky
ef59b9c304 Forelse reduction checks on 2.6 2020-07-06 10:09:42 -04:00
rocky
084e183577 Add reduce check for 2.7 except_handler range 2020-07-05 22:18:07 -04:00
rocky
357f28dd89 Add "comp_if_not" for 2.6- 2020-06-27 11:16:47 -04:00
rocky
a616e1e1c7 "withstmt" -> "with" and fix async for 2020-04-01 09:48:34 -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
0677ddc8fb Constrain ifelsestmt on 2.6 more. 2020-01-15 21:32:39 -05:00
rocky
3c2dafe74c Fix a 2.6 bug found in pyenvlib testing 2020-01-14 22:30:48 -05:00
rocky
d8628e79fb 2.6 "if" vs "if/else" disambiguation via reduction rule. 2020-01-07 20:51:44 -05:00
rocky
bfde66c5e1 Extend "and" reduction-rule test to 2.4 2019-12-14 19:49:26 -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
4e9d8783d1 Add Python 3.0.1 list_comp rule 2019-11-15 21:32:31 -05:00
rocky
7969b19c2b Reinstate Generator rule accidentally removed...
I removed the rule when writing how issue #283 was fixed. What was
supposed to be a temporary change, I accidentally committed.
2019-08-24 08:05:50 -04:00
rocky
f8bfde4a8e Get ready for release 3.4.0 2019-08-24 07:58:42 -04:00
rocky
388d1da970 Fixes #284 2nd problem...
while 1 bug for 2.6
2019-08-10 20:39:02 -04:00
rocky
66294d54f7 Comment what's up in last change. 2019-08-10 18:46:56 -04:00
rocky
55783c2712 Fixes #284 2019-08-08 21:48:12 -04:00
rocky
fd580f3c60 Python 2.6 generator rule with 'and' conditional
Fixes #283.
2019-08-05 10:36:08 -04:00
rocky
e26c7407a0 Small changes to document some of the complexity. 2019-06-23 20:00:00 -04:00
x0ret
e96498eaf0 Adjust ifelsestmtr grammer 2019-06-24 01:28:33 +04:30
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
8a4189bc0e Python 2.6-2.7ish generator handling 2019-04-15 20:32:15 -04:00
rocky
7898fa157b extend Python 2.6- lastc grammar-rule
Fixes #192
2018-10-05 12:37:16 -04:00
rocky
988efa3693 Had botched 2.6 grammar 2018-06-23 13:48:01 -04:00
rocky
bc16cc93d6 More Python 3.0 parse errors 2018-06-23 13:31:16 -04:00
rocky
c148e49670 Python 3.0 chained comparisions 2018-06-23 07:38:34 -04:00
rocky
7fab91eb4e Past fix of conditional_not bleed into 2.5...
and it shouldn't have
2018-05-19 13:00:44 -04:00
rocky
80b68af2d3 More 2.6 control flow logix futzing 2018-05-09 11:12:16 -04:00
rocky
f05b092983 "and" handling before 2.6 is different 2018-05-08 09:29:41 -04:00
rocky
76a66c3460 2.6 if-else-not handling...
For now, we say that conditional-not can't be in an "and".
2018-05-08 09:17:20 -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
41a50b5e46 Handle if not else in lambdas...
Fixes #170
2018-04-25 12:57:09 -04:00
rocky
9d807501af Grammar reduction for 2.6/2.7,3.x 2018-03-27 17:02:03 -04:00
rocky
92d562e600 Need additional try vs try/else checks 2018-03-07 07:38:13 -05:00
rocky
c03cdf1a49 Last 2.6 while1 bug...
before all of 2.6.9 stdlib parses without error.
2018-03-06 18:52:27 -05:00
rocky
01ad91b519 Another 2.6 try parse bug 2018-03-06 18:19:01 -05:00