Commit Graph

134 Commits

Author SHA1 Message Date
rocky
bf5a6237d8 Isolate listcomp rule in 2.7 2017-11-30 10:30:08 -05:00
rocky
c4bfe38ee0 Reduce 3.x rules, esp. listcomp 2017-11-29 19:03:11 -05:00
rocky
43c3154a55 NT designatore -> store to match AST 2017-11-29 05:05:15 -05:00
rocky
fb695616a6 NT call_function -> call to match AST 2017-11-28 22:13:23 -05:00
rocky
8454264cfc One more genexpr -> generator_exp 2017-11-28 18:00:42 -05:00
rocky
c241b12308 Grammar isolation fixes 2017-11-27 05:16:08 -05:00
rocky
a5e3d01dd3 Work around grammar remove rule bug...
And reinstate source to a current 3.3 bug (which we don't detect).
But at least it is noted for future work.
2017-11-26 08:07:00 -05:00
rocky
af38064a1b remove unpack_list rule and ...
tidy things a bit more
2017-11-25 00:32:13 -05:00
rocky
f7ff4c2d41 Grammar cleanup: import_as_cont -> import_as 2017-11-18 10:26:57 -05:00
rocky
0c0a534a48 Track spark_parser changes 2017-11-18 09:49:14 -05:00
rocky
7beac3f646 Remove parts of erroneous 2.7 test for now 2017-11-06 12:56:50 -05:00
rocky
6b6755d599 Fix 3.{3,4} pytest. Remove dup find_jump_targets 2017-11-06 12:27:43 -05:00
rocky
9dd881fae1 Start allowing node names in template engine
These are now used to assert we have the right node type.

Simplify import_from
2017-10-13 11:16:58 -04:00
rocky
adc9b99106 More spark-parser 2.7.0 compatabilithy changes 2017-10-10 15:11:08 -04:00
rocky
1392b18bd7 Adjust for spark-parser 2.7.0 incompatabilities 2017-10-10 14:14:26 -04:00
rocky
b3359439f9 if bug in lambda with ifelse
A synergy of Python's irregular lambda, its custom ifelse syntax and its
marvelous indentation regime. Fixes #130
2017-10-05 11:00:55 -04:00
rocky
8b67f2ccd0 Python 3 compatibility 2017-09-21 11:47:42 -04:00
rocky
aadea7224d Unit test for format-specifiers
And in the process we catch some small bugs
2017-09-21 11:25:51 -04:00
rocky
c7b9e54e59 Update Table-driven info...
Start a pysource unit test.
2017-09-20 00:06:50 -04:00
rocky
d1e02afb4b Misc cleanups...
remove code now in xdis
require at least xdis 3.5.4
PyPy tolerance in validate testing
2017-08-15 09:41:39 -04:00
rocky
f4ceb6304d Allow 3-part version string lookups, e.g 2.7.1
We allow a float here, but if passed a string like
'2.7'. or  '2.7.13', accept that in looking up
either a scanner or a parser.
2017-08-13 09:17:07 -04:00
Daniel Bradburn
038692dbf9 Double star arg only test is no longer expected to fail 2017-05-10 22:57:48 +02:00
Daniel Bradburn
ca1679e636 Added support for support for Python 3.6 CALL_FUNCTION_KW 2017-05-10 21:49:42 +02:00
rocky
4f2ae2f603 More accurate ranges of try blocks in 3.x 2017-03-05 00:05:52 -05:00
Daniel Bradburn
cb3c5e7119 validation now uses xdis for python2 support 2017-03-04 20:23:39 +01:00
Daniel Bradburn
d1e118afa3 marked all function call tests as failing until they pass across all python versions 2017-03-04 13:04:31 +01:00
Daniel Bradburn
f7da8fd8ab added minimal examples for various function call opcodes 2017-03-04 12:44:11 +01:00
Daniel Bradburn
3b1dd9d1c4 added property based test for verifying uncompylation of function calls. A number of minimal examples for the various function call opcodes have been generated with the majority marked as expected failure until python 3.6 opcode support is complete. I'm hoping this will make it easier to figure out what needs to be done to support the new opcodes and changed semntics for function calls 2017-03-04 12:43:12 +01:00
Daniel Bradburn
91fd1ce732 reduced errors when generating function call instances 2017-03-03 21:38:53 +01:00
Daniel Bradburn
a46e7cbfa4 added test file for function calls 2017-03-03 21:06:31 +01:00
Daniel Bradburn
b0493d1984 fixed typo 2017-01-18 22:34:12 +01:00
Daniel Bradburn
7f37c60c42 added some more test cases for BUILD_CONST_KEY_MAP 2017-01-18 22:33:44 +01:00
Daniel Bradburn
e2fd308928 simplified test cases for test_build_const_key_map 2017-01-17 23:07:27 +01:00
Daniel Bradburn
6d7cec002a added validation code for checking decompilation of an expression 2017-01-17 22:40:31 +01:00
rocky
c7c0a98982 Python 2.5 mistaken try/else 2016-12-18 00:56:07 -05:00
rocky
65858a4c74 Grammar check: ELSE on RHS is ok. 2016-12-09 22:22:01 -05:00
rocky
cbcfd53dae Python 2.6 grammary bug and..
__pkginfo.py__: Bump spark_parser version for parse_flags 'dups'
2016-11-23 21:44:53 -05:00
rocky
f8917aaf88 Remove redundant 2.7 (and 2.x) grammar rules 2016-11-22 17:31:36 -05:00
rocky
c8550d5c9e Split out print_docstring
move from pysource.py to new helper.py
2016-11-22 05:29:50 -05:00
rocky
2bc316d6f0 more 2.7 control flow bug fixing 2016-11-20 06:55:08 -05:00
rocky
f2a3721d7d Start to improve detect_structure for 2.7 and 2.x
Add debug flag to find_jump_targets to show the structure we found.
When there are control-flow bugs, it's often reflected here.

scanner3.py: make code make more similar to 2.x code
2016-11-20 02:38:59 -05:00
rocky
63e4c9343f Clean up annotation grammar a little 2016-11-01 15:50:19 -04:00
rocky
ccdd37611c More complete annotate handling
Still have a bit of work to do though.
2016-10-28 19:55:17 -04:00
rocky
2e355b6245 Expand annotate return to Python 3.4 2016-10-28 11:33:54 -04:00
rocky
9849f06ff6 Expand annotate handling to 3.3
(and possibly 3.2)

- DRY Python 3.1-3.3 grammar a little
2016-10-28 09:01:41 -04:00
rocky
9b7d978944 Move fstring rules inside a 3.6+ check 2016-10-22 11:48:52 -04:00
moagstar
cec80e696c further work on supporting single and multiple fstring decompilation 2016-10-20 20:44:27 +02:00
moagstar
7beaa9f36c urther work on fstrings for python 3.6 - there is a new opcode build_string which is used to improve fstring performance, but broke the fstring support in uncompyle 2016-10-19 23:32:15 +02:00
rocky
051efb80f5 PY3: COME_FROM -> COME_FROM_FINALLY as appropriate
We now have all WITH_ op jumps associated in the grammar

Also, some COME_FROM_LOOP grammar fixes
2016-09-27 03:27:41 -04:00
rocky
c87710dd4b Python 3 COME_FROM -> COME_FROM_WITH appropriately 2016-09-26 08:09:05 -04:00