rocky
278af38df6
conditional -> if_exp ...
...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
04f8619cf1
Better docstring recognition
2020-02-02 13:02:37 -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
a5e7eb19c6
Reinstate some tests
2019-11-18 06:59:27 -05:00
rocky
f8bfde4a8e
Get ready for release 3.4.0
2019-08-24 07:58:42 -04:00
Grigory Trenin
31f7d14eab
Test case for #284
2019-08-12 02:09:51 +03:00
rocky
fd580f3c60
Python 2.6 generator rule with 'and' conditional
...
Fixes #283 .
2019-08-05 10:36:08 -04:00
rocky
b57ca392a2
2.7 confusion around "and" vs comprehension "if"
...
Fixes #225
2019-05-08 16:27:41 -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
7898fa157b
extend Python 2.6- lastc grammar-rule
...
Fixes #192
2018-10-05 12:37:16 -04:00
rocky
80b68af2d3
More 2.6 control flow logix futzing
2018-05-09 11:12:16 -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
01ad91b519
Another 2.6 try parse bug
2018-03-06 18:19:01 -05:00
rocky
ccd42077c1
Better 2.6 tryifelse detection
2018-03-06 17:23:08 -05:00
rocky
ca3f822c81
More 2.6 while-loop control flow parsing
2018-03-06 13:16:22 -05:00
rocky
8278c72a6f
Python 2.6 while1 if/and handling
2018-03-06 09:39:13 -05:00
rocky
fac5d31f34
Adjust that 2.2-2.6 "while" may not have COME_FROM
2018-03-05 00:21:54 -05:00
rocky
185ec4e306
Fix 2.6 IF/THEN misclassification..
...
with an exception condition
2018-01-13 00:58:16 -05:00
rocky
abcb769fdf
Fix 2.6- parsing of "for .. try/else" ...
...
with "continue" inside
2018-01-09 08:36:21 -05:00
rocky
c953701623
Slightly better 3.x list comprehension handling
2017-12-04 14:15:06 -05:00
rocky
6ecaa16cd5
More weirdness testing
2017-12-03 20:29:55 -05:00
rocky
c791a45aae
Handle a wierd 2.6 conditional false expression...
...
from 2.6. test_grammar
2017-12-03 19:56:14 -05:00
rocky
0df29f344e
Fix some really weird Python 2.6 constructs
...
From 2.6's test grammar.
2017-12-03 18:41:31 -05:00
rocky
260bfd176e
Fix bug in 2.6- except_cond3
2017-12-03 06:16:29 -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
03a5ad3d94
NT funcdef -> function_def to match AST
2017-12-01 21:36:23 -05:00
rocky
d332bde104
Loops in Python 2.4-2.6 loop come_from
...
Looks like Python 2.4-2.6 may have a COME_FROM(_LOOP)
before the jump_back.
Fixes Issue #123
2017-07-05 06:12:14 -04:00
rocky
cf21fff38b
Predidence of cmp_list: x == y == z
...
The x, y, z should not have parenthesis around pairs of them
(x == y) or (y == z)
2017-02-28 01:25:33 -05:00
rocky
1e324e0e8d
Misc changes
...
scanner26.py: make scanner2.py and scanner26.py more alike
scanner2.py: check that return stmt is last in list. (May change)
main.py: show filename on verify error
test/*: add more
2016-11-26 21:41:45 -05:00
rocky
31d387749b
More AST checking
...
Small fixes in output format
2016-11-16 07:28:19 -05:00
rocky
647248dfc8
A couple more 2.6 (and below) bugs fixed
...
* Detect "return None" inside if statement
* another case of triple ==, ==, ==
scanner2.py: detect_structure: descriminate more on parent type
2016-09-04 04:10:08 -04:00
rocky
f4ac13ef0f
Python 2.5-2.6 generator bug
...
Adjust for variable position of list iteration node in a genexpr node
2016-09-03 21:37:32 -04:00
rocky
75c718bc5c
Python 2.2..2.6 bug in a == b == c == d
...
Fix was to remove some come froms. Feels a little hacky though.
2016-09-03 10:05:55 -04:00
rocky
b6fd9088b8
Python 2.3..2.6 "return" bug
...
In Python 2.6 and possibly down to 2.3 we need to issue "return" not
"return None" inside a generator. So check for that "return None"
inside n_return and issue "return" for that.
2016-09-03 08:04:52 -04:00
rocky
52a35e6c62
Fix Python 2.4-2.6 comp_for text generation...
...
Makefile: tolerate pypy 5.3.x
Rest: fix semantic action rule for comp_for and test this
2016-09-03 00:30:48 -04:00
rocky
f1bb40f485
Python 2.6- bug: RETURN_ENDIF, POP_TOP ..
...
POP_TOP should be excluded as a potentional statement beginning
2016-09-02 21:08:44 -04:00
rocky
f5eeed6759
2.6- bug: while..and: stmt - on one line
...
If 2.6 or before POP_BLOCK after a JUMP_IF_FALSE does not
constitute a new statement. The POP_BLOCK is really part
of the JUMP_IF_FALSE. In Python 2.7+ it's a single op.
2016-09-01 20:44:17 -04:00
rocky
1d567d5d9a
Handle Python 2.6 and below "except <cond>, <var>"
2016-09-01 02:20:07 -04:00
rocky
6f2cdc164d
Handle Python 2 vs 3 raise syntax change
...
raise_stmt ::= "raise" expression "," expression
becomes:
raise_stmt ::= "raise" expression from expression
raise expr, expr -> raise
2016-08-30 00:42:24 -04:00
rocky
5b2198a4a6
A 2.6 comprehension bug
2016-06-29 21:24:19 -04:00
rocky
e0eba6998f
Python packaging - yet again.
...
Did I ever mention how much Python sucks at packaging?
2016-05-13 22:59:15 -04:00