Commit Graph

466 Commits

Author SHA1 Message Date
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
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
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
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 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
rocky
1087613a27 Handle 3.6 Format String conversions !r, !s, !a 2016-08-25 07:26:01 -04:00
rocky
a67891c563 Get ready for release 2.8.1 2016-08-20 22:14:36 -04:00
rocky
31413be7a1 Python 2.2 doesn't have opcode LIST_APPEND 2016-08-16 12:45:43 -04:00
rocky
98a6f47ad6 Python 2.2 scanner bug: don't mung IMPORT_NAME op 2016-08-16 06:38:09 -04:00
rocky
2e3e6658ee Small pypy LOOKUP_METHOD cleanups 2016-08-16 06:09:10 -04:00
R. Bernstein
85c562cb36 Merge pull request #49 from moagstar/master
Fixed a bug with FORMAT_VALUE with sub expressions.
2016-08-16 05:33:09 -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
rocky
a65443ee02 Fix pypy semantic action bug in CALL_METHOD 2016-08-14 22:59:34 -04:00
rocky
7ccbd419c6 Correct SET_LINENO handling in Python 2.2
Add more  2.2 tests
2016-08-13 20:25:19 -04:00
rocky
d8598f61e4 Start handling Python 2.2 bytecode and...
Fix some bugs in Python 2.3-2.5 bytecode handling
2016-08-13 07:16:50 -04:00
DanielBradburn
5d27832d6f resolve merge conflicts from pull request 2016-08-10 08:20:51 +02:00
rocky
6b98432082 Merge branch 'master' of github.com:rocky/python-uncompyle6 2016-08-03 08:21:44 -04:00
rocky
109e813058 Get ready for release 2.8.0 2016-08-03 08:20:32 -04:00
rocky
b49d30266f Tidy assembly output a little more 2016-08-01 08:42:52 -04:00
rocky
65a16327ce Moagstar's 3.6 wordcode + formattedValue rules 2016-08-01 03:16:26 -04:00
rocky
fff09db66e WIP try to keep line numbers the same 2016-07-30 14:25:43 -04:00
rocky
3ef0325cb8 Small changes 2016-07-29 19:54:16 -04:00
rocky
3a6f9d8f24 Fix 3.5 misclassifying RETURN_VALUE
We use location of SETUP_EXCEPT instructions to disambiguate.
2016-07-29 08:56:23 -04:00
Daniel Bradburn
d14865c1be Starting adding python 3.6 support to uncompyle 2016-07-28 09:07:12 +02:00
rocky
152935ab26 while1 bug applied to Python 2.3 and 2.4 2016-07-28 01:23:29 -04:00
rocky
5c9c0228ee PyPy 3.2 bug confusing RETURN_END_IF for except
Also fix a instruction formatting bug
2016-07-28 00:41:40 -04:00
rocky
ac121076e6 Split out 3.5 parser 2016-07-27 19:09:25 -04:00