rocky
c03a8186b5
Address whileTrue if cond .. -> while cond .. bug
...
Reinstate Python standard library bisect test
2016-09-25 16:59:32 -04:00
rocky
8bc76f19b9
Tidy use of SETUP_ ops
...
Also possibly remove a bug in decompiling Python 3.0 .. 3.2 which doesn't
have SETUP_WITH
2016-09-23 19:22:09 -04:00
rocky
fa1a6347e9
Weaken testing for controlfow branch
...
We have more equivalent programs now
2016-09-23 04:58:29 -04:00
rocky
760532b218
Add COME_FROM_LOOP
...
Note: we have regressed in --verify and some tests,
but I believe that's because we are producing more equivalant
(if uglier) programs. That's a separate problem though.
2016-09-22 08:24:02 -04:00
rocky
88f2ad1f5a
Merge branch 'master' into controlflow
2016-09-22 01:33:29 -04:00
rocky
d271e886d9
Fix pytest grammar test failure
...
dict and set comprehensions are only in 2.7+
2016-09-22 01:32:00 -04:00
rocky
c0b4a5e703
Fix some Test failures
...
Fix py.test pytest/test_grammar.py -
Comprehension sorts of things removed from parser that
don't exist in earlier pythons
scanners/tok.py Add back in "to" when needed
2016-09-22 01:27:58 -04:00
rocky
b6dee24289
First step towards managing control flow decoding
2016-09-21 21:30:57 -04:00
R. Bernstein
0e9ebca1a5
Merge pull request #56 from rocky/fstring
...
merge fstring changes from moagstar
2016-09-21 20:44:35 -04:00
moagstar
f3b9a5936e
fixed generation of FSTRING_CONVERSION_MAP in < python 2.7
2016-09-21 22:13:25 +02:00
moagstar
bae3d2e361
merge fstring changes from moagstar
2016-09-21 22:04:46 +02:00
rocky
4f83a87a00
Python 2 & 3 scanner code ever so slightly closer
2016-09-21 07:06:30 -04:00
rocky
d8b7c3d813
Small NEWS doc typo
2016-09-21 03:26:44 -04:00
rocky
c119965d96
Small changes
2016-09-18 17:23:49 -04:00
rocky
b02754c954
Get ready for release 2.8.3
release-2.8.3
2016-09-11 19:22:07 -04:00
rocky
23770fca64
Tidy a bit
2016-09-11 03:39:19 -04:00
rocky
71591152ef
3.0 .. 3.4 bug in whileTrue
2016-09-09 22:27:13 -04:00
rocky
251de4338a
3.1 scanner small fixes
2016-09-09 18:23:43 -04:00
rocky
03e8995d18
ret_cond adjustment for < 2.7 and ...
...
"<= 2.6" -> "< 2.7" since python 2.6's version is 2.6000001
2016-09-09 15:55:15 -04:00
rocky
dd661bc94a
Start accepting Python 3.1 bytecode
2016-09-09 15:32:46 -04:00
rocky
c4e6af6e4f
Add 3.6 parser
2016-09-08 05:44:45 -04:00
rocky
57d1f3b9f9
More testing
...
- travis:
* 2.7.12 - bump from 2.7.11
* 3.3.6
test_pyenvlib: add --weak-verify to
Makefile: check-3.2.6 needs --weak-verify
2016-09-08 05:09:36 -04:00
rocky
2d11ffb669
Python 3.0-3.2 *args processing
2016-09-08 03:54:57 -04:00
rocky
b7f1f1b028
3.2 (and down to 3.0?) bug in fn name and kwargs
2016-09-08 02:35:06 -04:00
rocky
0fce4c6dc3
Another 3.5+ erroneous RETURN_END_IF misclassify
2016-09-07 04:03:21 -04:00
rocky
c44d4898cb
But in Python 3.5+ erroneosly adding RETURN_END_IF
2016-09-07 03:37:48 -04:00
rocky
fecae9f902
Fix 3.3 named bug and ...
...
Parse 3.4 parameters correctly.
Allow test_pyenvlib to do 3.3.6
2016-09-06 02:15:47 -04:00
rocky
60b25f7596
Python 3.x bug in getting parameter of ** argument
2016-09-05 22:33:59 -04:00
rocky
318311818e
Python 2.6- try/except control flow detection
2016-09-05 04:02:37 -04:00
rocky
c7788e4545
disassemble -> ingest where appropriate
...
As part of tokenization for (de)parsing, we need to do something like a
disassembly, but is is really a little different.
Disassembly, strictly speaking, is done by the xdis module now.
What "ingestion" does is massage the instruction tokens to a form that is
more amenable for parsing.
In sum, ingestion is different than disassembly, although disassembly is
generally the first part of ingestion.
2016-09-04 11:43:02 -04:00
rocky
979bca4fe0
Small cleanup/code optimization
2016-09-04 10:02:20 -04:00
rocky
47a56d3387
Python 2.3--2.6 bug in parsing try-middle
...
Note: it looks like COME_FROMs need to be classified better
with respect to whether they are from an except or not
we are getting if/else vs except nesting errors.
2016-09-04 09:28:47 -04: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
8f95ec9882
Python 2.7 "return None" bug
...
Same as 2.3-2.6 "return None".
2016-09-03 10:27:21 -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
4d046eb0bd
Add hartmut Goebel's changes before 2.4
2016-09-03 00:50:18 -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
136f935e26
Fix Python 3.x named param and kwargs bug
2016-09-02 06:30:39 -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
c9f364df9f
Python 3.x bug in handling var number of args
2016-08-31 06:20:29 -04:00
rocky
6189ce3c04
Bug in 3.x detecting "if" structure and ...
...
scanner3.py: bug in 3.x detecting "if" structure
Make scanner2.py look more like scanner3.py
verify.py: add weak-verify which tests Pytyon syntax, but not code
2016-08-31 04:07:42 -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
e4cc126b38
Get ready for release 2.8.2
release-2.8.2
2016-08-29 21:48:21 -04:00
rocky
da458bdce7
Correct PYPY bit logic in previous commit
2016-08-27 20:19:12 -04:00
rocky
f47aecae9f
PYPY bugs and inspired changes ...
...
verify.py: Show co_flags when different.
pysource.py: PYPY also generates normal tryfinallystmt code
test_pyenvlib.py: allow pypy-5.3.1
2016-08-27 19:32:42 -04:00
rocky
ddc5460030
Start to handle Python 3.1 bytecode
2016-08-26 20:50:08 -04:00