rocky
15057bed1d
Fix bugs in scanner.last_instr()...
...
And ave instruction stream self.insts like we do in Python 3 so we
can start simplifying code.
2017-12-15 20:34:34 -05:00
rocky
3ce5e0ab0e
Update comment
2017-12-14 05:22:59 -05:00
rocky
63820c4300
Continue parse2/scanner2 refactor
2017-12-14 04:00:22 -05:00
rocky
94a18c1a95
Back off of previous refactor a little bit
2017-12-13 21:26:52 -05:00
rocky
303e134359
Simplify scanner2 so it relies less on custimize dict
2017-12-13 21:02:40 -05:00
rocky
acc3e441ac
Fix "or" bug in 2.6- seen via chained comparisons
2017-12-13 07:27:10 -05:00
rocky
b139e21ca3
Isolation of <= 3.5 bogus COME_FROM workaround
...
Fixes #144
2017-12-12 12:12:29 -05:00
rocky
36fbafa0f8
Bang on 3.6 CALL_FUNCTION(_VAR)_KW
2017-12-12 11:01:34 -05:00
rocky
3705f6d096
Start to handle CALL_FUNCTION_EX more accurately
2017-12-11 08:24:27 -05:00
rocky
41bfa3fc01
Back off 3.5 control flow for now
2017-12-07 15:25:32 -05:00
rocky
b6413b6e6e
Skirt around control-flow problems...
...
Tag some of the weaknesses if we can't address them now
2017-12-07 08:55:45 -05:00
rocky
32f3d947bb
Grammar "COME_FROM"_from cleanups ...
...
tryelse constructs in 2.x fixed up
_come_from -> _come_froms (COME_FROM*)
consolidate come_froms rule into sincle parser.py
2017-12-03 05:10:59 -05:00
rocky
93949e8222
Small grammar isolation bugs
2017-12-02 10:57:32 -05:00
rocky
5872caee54
Correct hacky version number
2017-12-02 09:53:05 -05:00
rocky
a7005f6a77
2.7 exec stmt grammar rule isolation/reduction
2017-12-02 09:23:18 -05:00
rocky
6d0f72f13b
Fix bug in 2.6 tryelse get test_grammar working...
...
localize grammar rules
2017-12-02 01:35:43 -05:00
rocky
bf5a6237d8
Isolate listcomp rule in 2.7
2017-11-30 10:30:08 -05:00
rocky
dded92b85d
Narrow unused classdefdeco2 rules
2017-11-28 12:49:37 -05:00
rocky
2674ec893a
Grammar reduction
2017-11-27 04:56:01 -05:00
rocky
17f5b35b1d
More grammar isolation
2017-11-26 16:34:10 -05:00
rocky
b7003914c9
localize 2 and 3 argument BUILD_SLICE...
...
Nontermninal name matches AST anme now. Add test.
2017-11-25 21:10:11 -05:00
rocky
902941102f
2.7 continue-detection bug
2017-11-16 00:22:24 -05:00
rocky
e9b60ddbf0
Better Python 3 ENDIF detection
...
If we have
COMPARE_OP exception-match
POP_JUMP_IF...
....
RETURN_VALUE
Then RETURN_VALUE can't be RETURN_END_IF
2017-11-08 23:05:01 -05:00
rocky
0bb793239b
Add 3.6+ grammar for except's ending in RETURN...
...
Not totally out of the maze in 3.6 control flow...
There are still problems with erroneous RETURN_VALUEs becoming RETURN_END_IF,
2017-11-08 10:31:38 -05:00
rocky
4c77170ddf
Small fixes and tweaks:
...
parser.py: handle errors when no tokens have been produced.
scanner3{,0}.py: DRY custom scanner 3.0 rem_or code.
scanner3.py misc other small tweaks
2017-11-07 12:48:03 -05:00
rocky
3e4889bcd7
Small tweaks to sync up better with scanner2.py
2017-11-06 13:30:49 -05:00
rocky
6b6755d599
Fix 3.{3,4} pytest. Remove dup find_jump_targets
2017-11-06 12:27:43 -05:00
rocky
4a904951f4
Move refactored find-jump-targets from 3.6 to 3.x
2017-11-06 11:54:01 -05:00
rocky
124267849c
Move refactored ingest from 3.6 to 3.x...
...
We are getting away from working with bytecode in favor of
working with full-fledged structured instructions
Up next: find_jump_targets()
2017-11-06 09:43:49 -05:00
rocky
9379922c89
Iterate over instruction, not bytecode
2017-11-06 00:46:49 -05:00
rocky
b83d6c64ed
Python 3.6 control flow bug...
...
Much more is needed, but it's a start
2017-10-29 23:52:58 -04:00
rocky
5df09540b5
Python 3.6-inspired instruction size cleanup
...
Revise and generalize for Python 3.6+ instructions vs < 3.6 instuctions.
Used more of the generalized methods in xdis and remove some (but not
all) of the magic numbers.
This is a lot of changes, but not all of the refactoring needed. Much
crap still remains. Also, there are still bugs in handling 3.6 bytecodes.
2017-10-29 11:46:28 -04:00
rocky
9cfd7d669e
Get ready for release 2.13.0
2017-10-10 22:08:10 -04:00
rocky
92f5981661
Misc bugs
2017-10-10 16:08:24 -04:00
rocky
1392b18bd7
Adjust for spark-parser 2.7.0 incompatabilities
2017-10-10 14:14:26 -04:00
rocky
1d7a3c6444
Document hacky customize arg count better.
2017-09-30 18:02:35 -04:00
rocky
7b38d2f1f8
Adjust for xdis opcode JUMP_OPS. release 2.12.0
2017-09-25 20:01:31 -04:00
rocky
5bef5683e4
Match Python 3.4's terms a little names better
2017-09-10 00:48:54 -04:00
rocky
4e1467adc8
Revert last revert
2017-09-09 08:08:40 -04:00
rocky
7cdf0abb43
Revert last change
2017-09-09 08:03:04 -04:00
rocky
9b336251a7
New-style Python classes only, please.
2017-09-09 07:47:21 -04:00
rocky
7844456e1e
Skeletal support for Python 3.7
...
Largely failing though.
2017-08-31 10:12:09 -04:00
rocky
d138a01bf1
xdis's "exception match" is now "exception-match"
2017-07-17 22:42:57 -04:00
rocky
27ab6fe2f5
Use xdis 3.5.0's opcode sets
2017-07-08 20:41:46 -04:00
rocky
2e164763eb
Start supporting Pypy 3.5 (5.7.1-beta)
2017-07-08 17:47:32 -04:00
rocky
0893652943
Work around not having real flow-control analysis
2017-06-29 20:49:01 -04:00
rocky
6efd7afda3
continue non-detection in Python 2.7
...
fixes issue 122
2017-06-29 20:27:07 -04:00
rocky
af3d46b35c
Use xdis' instruction offset calculation fns..
...
next_offset, op_size, has_argument
2017-06-24 06:43:04 -04:00
rocky
c7f8edd5ef
Simplify access to L65536 ...
...
and fix use in scanner26.py. Thanks to AnythingTechPro
2017-06-09 18:22:02 -04:00
rocky
b733a1b036
BUILD_{MAP,TUPLE}_UNPACK & CALL_FUNCTION_EX_KW...
...
Bang on these in 3.6. Not totally succesfull right now.
In fact a regression on one of the test cases
2017-06-05 23:51:51 -04:00