1156 Commits

Author SHA1 Message Date
rocky
66b3e35a5b 3.+ More loop-isolation grammar separation...
but also back off some isolation separation for now.
2020-01-25 11:46:03 -05:00
rocky
58f2e19539 Hack around grammar weakness in 3.5..3.6 for now 2020-01-25 10:12:18 -05:00
rocky
f6f2d8dd05 Start to disambiguate stmts in a loop 2020-01-25 09:14:55 -05:00
rocky
13b1ec7ad8 Better "ifstmt" reduction rule and ...
Tidy 3.7 grammar a little
Disable a number of 3.0 bytecode for now. Will Go over later.
2020-01-25 00:04:37 -05:00
rocky
c90ff5176c Add 3.x try reduction rule 2020-01-24 20:48:04 -05:00
rocky
4067a30573 Fix bug introduced by a recent refactoring 2020-01-24 03:11:51 -05:00
rocky
7e91daf043 3.7 "if" body tweak . 2020-01-23 21:38:47 -05:00
rocky
e76e9b7ab6 ifelsestmt reduce check tracking parse rule change 2020-01-23 20:04:53 -05:00
rocky
eeb48818f3 Largish rework: scan while1stmt for jump out ..
to disambiguate.

For this, we use the self.opc JUMP_OPS sets.
For this, we neeed to store opc in the parse object.

DRY uses of "last = min(last, len(tokens))
2020-01-23 13:02:29 -05:00
rocky
5951f974d5 Fix 3.8 grammar rule bug: "for" with "if"/"return" 2020-01-23 06:07:34 -05:00
rocky
29715bb8bf 3.8 ifelsestmt grammar rule...
and remove optional "c_stmts" in 3.7 "ifelsesmt" rule. We may
have to come back and add something, but when we do we'll be more
careful and this is probably all for the better.
2020-01-22 22:50:27 -05:00
rocky
e17d9c806a ifstmt reduction vs extended_args 2020-01-22 19:14:52 -05:00
rocky
bc50825460 Conditional jumps to extended-arg JUMP_BACK...
this is a major reworking. But it leads the way forward to a
simpler grammar.
2020-01-22 05:32:27 -05:00
rocky
b91df57a82 Add "ifelsestmt" reduce rule checking 2020-01-21 16:03:12 -05:00
rocky
73eab178ae Towards syncing with decompyle3 2020-01-21 06:36:54 -05:00
rocky
b333d7afc2 If statement in loop isolation 2020-01-17 10:47:38 -05:00
rocky
d9bc5a345b Don't check iflaststml on 3.2 just yet 2020-01-17 05:42:49 -05:00
rocky
af76218abf More parser changes to reinstate what was working in 3.6.2...
However, again, probably more precise since we isolate loop rules better

However, again, this isnt' the full store. Semantics were incorrect in
Release 3.6.2 and they still are.
2020-01-17 05:36:20 -05:00
rocky
273c4bcbf0 Remove unused rule...
found by test_grammar.py
2020-01-17 05:01:44 -05:00
rocky
027c9a7dc0 Fix "for ... if" bug introduced since 3.6.2...
However we've isolated and documented the 3.x grammar a little bit better
2020-01-17 04:41:16 -05:00
rocky
39459168b0 More stringent "ifstmt" checks on 3.x 2020-01-16 14:02:04 -05:00
rocky
172239f50b More accurate 3.6 "ifsmt" and "ifelsesmt" 2020-01-16 04:11:12 -05:00
rocky
af1fe8f176 3.7 and 2.6 coexistance in handling jump targets 2020-01-15 21:38:53 -05:00
rocky
0677ddc8fb Constrain ifelsestmt on 2.6 more. 2020-01-15 21:32:39 -05:00
rocky
3fbe0b90e3 Fix typo bug introduced in refactoring. 2020-01-15 19:47:03 -05:00
rocky
968f86011b 3.6+ if/else in loops where jump offsets are "large" 2020-01-15 04:43:53 -05:00
rocky
3c2dafe74c Fix a 2.6 bug found in pyenvlib testing 2020-01-14 22:30:48 -05:00
rocky
5f230fa177 Add 3.7 "testfalsel" for looping conditions 2020-01-14 18:41:39 -05:00
rocky
ac0b0ff7b6 DRY Python 2 reduction check code a little 2020-01-12 04:50:45 -05:00
rocky
8fda09459c tryelsestmtl3 needs more checks 2020-01-11 22:50:18 -05:00
rocky
021c5cad2a Ooops - stray debug left in 2020-01-11 22:37:40 -05:00
rocky
b84c89e817 Bang on getting 3.x "try" vs "try/else" disambiguated 2020-01-11 22:36:07 -05:00
rocky
c3d7ba6dad 3.7 "imports" and "or" 2020-01-11 07:23:23 -05:00
rocky
6cef42f6c7 3.7+ "or" disambiguation and assert2 handling 2020-01-10 20:44:28 -05:00
rocky
eba8f04e29 DRY reducecheck code 2020-01-10 15:36:24 -05:00
rocky
d1bc30e2f1 3.7 testtrue with asserts 2020-01-10 14:04:47 -05:00
rocky
fd2b551661 Forgot to add testtrue check 2020-01-10 10:29:24 -05:00
rocky
505946d747 Add "testtrue" reduction rule...
only for 3.7 for now.
2020-01-10 10:26:40 -05:00
rocky
fedd5e0ba5 Better "try" vs. "try"/"else" disambiguation ...
via reduction check that was originally only in 2.7
2020-01-09 22:37:02 -05:00
rocky
7bcebf8656 Move some parse2 reduction rules into reducecheck 2020-01-09 21:24:04 -05:00
rocky
8b74d8f855 Fix bug in handling 3.5- complex annotation return...
Go over runtests.sh for 3.5
2020-01-09 19:55:22 -05:00
rocky
778c8d6003 Forgot to add this file. 2020-01-09 04:39:27 -05:00
rocky
5fc54015e4 3.7+ or reduction rule again 2020-01-09 04:32:15 -05:00
rocky
14f889561b 3.7+ multiple "and" parser generalize 2020-01-09 03:37:17 -05:00
rocky
7dee584a46 3.7+ "or" handling in listcomp 2020-01-09 03:15:30 -05:00
rocky
7c03cc466d More 2.7 compatibility 2020-01-09 01:35:50 -05:00
rocky
086ceaf176 More 2.7 compatibility 2020-01-09 01:34:41 -05:00
rocky
30d8830957 Fix 2.x compatibility 2020-01-09 01:32:15 -05:00
rocky
199fb532bf Move code from parse37base to reducechecks 2020-01-08 22:24:41 -05:00
rocky
b0d931b760 Small changes 2020-01-08 20:43:32 -05:00