rocky
1fc8ac4700
Interval order COME_FROMs in Python3
...
This bug had possibly caused lots of grammar pollution which may need
addressing.
We want to process COME_FROMs to the same offset to be in *descending*
order so we have the larger range or biggest instruction interval
last. (I think they are sorted in increasing order, but for safety
we sort them). That way, specific COME_FROM tags will match up
properly. For example, a "loop" with an "if" nested in it should have
the "loop" tag last so the grammar rule matches that properly
Adjust Python 3 grammar for more COME_FROM -> COME_FROM_LOOP. And
remove optional COME_FROM_LOOP where possible. Previously, the
optional-ness was a result of inner nestings gobbling up the
COME_FROM.
We'll probably want to go back and fix this up in Python2.
2016-09-26 09:26:51 -04:00
rocky
c87710dd4b
Python 3 COME_FROM -> COME_FROM_WITH appropriately
2016-09-26 08:09:05 -04:00
rocky
c03a8186b5
Address whileTrue if cond .. -> while cond .. bug
...
Reinstate Python standard library bisect test
2016-09-25 16:59:32 -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
moagstar
bae3d2e361
merge fstring changes from moagstar
2016-09-21 22:04:46 +02:00
rocky
71591152ef
3.0 .. 3.4 bug in whileTrue
2016-09-09 22:27:13 -04:00
rocky
2d11ffb669
Python 3.0-3.2 *args processing
2016-09-08 03:54:57 -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
ddc5460030
Start to handle Python 3.1 bytecode
2016-08-26 20:50:08 -04:00
rocky
2e3e6658ee
Small pypy LOOKUP_METHOD cleanups
2016-08-16 06:09:10 -04:00
DanielBradburn
004ce5c491
Fixed bug with FORMAT_VALUE where a sub expression would not be correctly interpreted
2016-08-16 08:24:06 +02:00
DanielBradburn
5d27832d6f
resolve merge conflicts from pull request
2016-08-10 08:20:51 +02:00
Daniel Bradburn
d14865c1be
Starting adding python 3.6 support to uncompyle
2016-07-28 09:07:12 +02:00
rocky
cd8cbf9200
Add 3.5 matrix mult ops
...
We now run 3.5 verifycation so we need to remove some
of the tests that fail to verify pending fixing.
2016-07-15 12:12:19 -04:00
rocky
c9d1f72424
Attempt to get 3.5 RETURN_END_IF working
...
This feels hacky and I'm not sure is quite right.
Untili we understand better what to do though, we'll
go with it.
2016-07-14 14:49:57 -04:00
rocky
7b7a9fa4cf
Python 3.4 assertion handling. Improve verify
...
3.4 has jump optimization like 3.5.
verify.py: show mismatch on verification mismatch
2016-07-14 05:20:30 -04:00
rocky
bc86b73cf0
Document/correct hide_internal and store_locals
2016-07-12 12:07:48 -04:00
rocky
78f24f9c66
Python 3.2 & 3.3 handle STORE_NAME better
2016-07-11 23:24:52 -04:00
rocky
9fdf70f68d
Python 3.(4?) while1 bug
...
Clean up while1 grammar a tad
2016-07-11 10:18:18 -04:00
rocky
59ba8a65cd
Structure detection bugs +
...
Had borked 3.4 grammar rules in
previous refactor
2016-07-10 19:21:55 -04:00
rocky
3cd3f7ccdf
Bugs caused by 3.x jump_forward misclasification
2016-07-10 08:05:18 -04:00
rocky
52b71bb01a
Python 3 better CONTINUE op classification
...
Also document what's up with JUMP_ABSOLUTE
classification
2016-07-10 06:47:34 -04:00
rocky
21da5e787e
Start splitting off 3.4 grammar from rest
2016-07-09 21:11:14 -04:00
rocky
974b11ff55
Another 2.6 while stmt. Clean up grammar a little
2016-07-03 10:50:19 -04:00
rocky
9a2369830d
Python 3.5 if handling...
...
Allow RETURN_END_IF in a return statement
May want to do this in other versions as well, but right now
we only need it here.
2016-06-22 22:09:06 -04:00
rocky
f999e6a33a
Another kind of yield_from on 3.5
2016-06-22 16:48:03 -04:00
rocky
126af429fb
differing ways to do "yield from" in 3.3-3.5
2016-06-22 16:29:58 -04:00
rocky
480e6a125f
Add Python 3.5 yield from and ...
...
* fragments.py: Handle pass stmt sometimes
* scanners: regularize Python 2 scanners some
* test/test_pyenvlib.py: add python 3.5.1 option
2016-06-22 13:08:11 -04:00
rocky
faa630902d
Python 3 comprehension fixes
...
Sync up fragments.py
2016-06-22 10:50:11 -04:00
rocky
f576853f19
More 3.2 LOAD_CONST removal
...
More python3 custom grammar DRYing
2016-06-22 09:52:20 -04:00
rocky
dc88bcf69f
DRY parse grammar a little
...
More LOAD_CONST grammar removal in 3.2
2016-06-22 08:36:01 -04:00
rocky
c77e4a9dc9
Python 3.2 MAKE_FUNCTION adjustment
2016-06-22 02:11:59 -04:00
rocky
051ed90185
Bang on Python 3.2 decompiling.
2016-06-20 23:05:12 -04:00
rocky
1a83c849dc
Python 3 needs Python2's RETURN_END_IF
...
Make python2 and python3 scanner look more the same
2016-06-20 22:12:29 -04:00
rocky
a6fbe4c636
previous 2.7 class decorator bug fixed in 3.x
2016-06-20 20:19:17 -04:00
rocky
f215888374
DRY redundant custom rule checking code
2016-06-20 19:06:45 -04:00
rocky
24d4cfb150
Python 3 set comprehension bug
2016-06-20 18:47:03 -04:00
rocky
59780483a8
Python 3.x class bug using subclass fns
2016-06-20 17:20:47 -04:00
rocky
80cfe62f36
For Python 3: add LOAD_CLASSDEREF op
2016-06-20 13:04:21 -04:00
rocky
8c374904f5
3.x make closure kw args handling bug
2016-06-20 10:01:18 -04:00
rocky
078f15013e
Python 3.x class decorator bug
2016-06-20 00:32:00 -04:00
rocky
8b50dda9ef
Start 3.3 positional and kw parameters
...
Semantic routines need more work.
2016-06-19 19:18:45 -04:00
rocky
bd809dc08b
Another 3.x bug involving jumps
2016-06-19 17:47:43 -04:00
rocky
5c268ee2a6
2.7 and 3.x bug in dict comprehensions
2016-06-19 13:45:07 -04:00
rocky
f8ccb8065e
3.4 tryifelse bug
2016-06-19 11:15:36 -04:00
rocky
5d86a4e536
Python 3 except clause parsing bug
2016-06-19 10:30:39 -04:00