rocky
c68b74a9c6
new dis - Python compisons involving tuples
2021-10-15 23:39:59 -04:00
Bernd Lörwald
f2f49104ea
parsers: parse2: fix: also emit expr32 if count perfectly divisible by 1024
...
expr1024 requires expr32, but a build_count of 1024 would emit only the
expr1024 rule and rely on luck of it being emitted somewhere else.
Emit expr32 rule either if there is a expr32 use or a expr1024 use to avoid.
2020-12-28 01:42:42 +01:00
rocky
8879708da7
del_stmt -> delete to match Python AST better
2020-09-02 07:14:56 -04:00
rocky
7deeee8502
Push "with" grammar improvements back to 3.6
2020-06-04 05:53:21 -04:00
rocky
4796fb9e70
"or" rule regularization + regressions from xdis
2020-04-16 23:45:39 -04:00
rocky
e8e7d2086d
whileelse in 3.6 sometimes has come froms...
...
also remove extra "L. " in token printing
2020-04-04 10:12:12 -04:00
rocky
a616e1e1c7
"withstmt" -> "with" and fix async for
2020-04-01 09:48:34 -04:00
rocky
8836444be2
Correct ifelsestmtc rules for 3.x
2020-02-09 08:14:44 -05:00
rocky
65707fa0f8
FIx bug that snuck in last commit.
2020-02-08 12:01:56 -05:00
rocky
b0931275a2
Need more precise "assert" for 3.8...
...
Add rule for ifelsestmtl which is needed in 3.8
2020-02-08 11:46:19 -05:00
rocky
7c73536b4a
3.6 "assert" and "or" handling bugs
2020-02-08 07:27:31 -05:00
rocky
c93a7a728b
Add decompyle3 ifelsestmt reduction rule...
...
and Go over 3.3 and 3.7 runtests excludes
2020-02-07 19:22:23 -05:00
rocky
cb35ad906c
One more if_exp use (ret_cond)
2020-02-07 16:34:48 -05:00
rocky
278af38df6
conditional -> if_exp ...
...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
cf505545c0
3.6 iflastlstmt rule checking again
2020-02-01 12:00:08 -05:00
rocky
45c725feae
3.6 iflaststmtl doesn't follow ifstmt rules...
...
like iflaststmt does. test_dbm_dumb.py shows this
2020-02-01 11:20:58 -05:00
rocky
cdc5642715
More reduction checks...
...
Those in reduce check as well as those listed in parse{2,3}.
3.6 iflastsmtl needs ifstmt checking.
2020-02-01 07:10:30 -05:00
rocky
4f4850d9f7
Restrict "and" reduction checking to Python 3.6
2020-02-01 04:42:46 -05:00
rocky
cb1b2a8759
Typo in last commit
2020-01-31 19:11:13 -05:00
rocky
d64158b299
No iflastlstmt reduce check for python < 3.6...
...
just yet
2020-01-31 19:07:28 -05:00
rocky
2ea8a2ef7f
was getting testlastl reduce rule from wrong place
2020-01-31 17:37:47 -05:00
rocky
258fac3201
limit 3.x scope of ifelstmt reduction check to 3.6
...
at least for now. Again, we need major cleanup of this stuff, but that
will be done later.
2020-01-31 16:22:32 -05:00
rocky
41f1d1ec09
Remove dup statement
2020-01-31 13:18:23 -05:00
rocky
89c2805c27
Start to clean up parse3 reduction rule checks...
...
A lot more work is needed, but this is a start.
2020-01-31 13:10:35 -05:00
rocky
e639a30157
Add some decompyle reduction-check goodness here
2020-01-31 12:20:12 -05:00
rocky
13ca1117ad
3.x "if" in loop grammar separation
2020-01-26 10:32:29 -05:00
rocky
71e9b0d96d
More "if" in loop parse separation
2020-01-26 09:25:04 -05:00
rocky
1fff81736f
parser if-stmt restriction thing & 3.x exclusions
2020-01-26 08:27:49 -05:00
rocky
33918bd9d2
More 3.x "if" checking. Abbreviate stmts->sstmt
2020-01-26 02:58:33 -05:00
rocky
dac277f1fa
Back off loop separate rules, a little for now
2020-01-25 18:07:05 -05:00
rocky
a50263518a
3.x if loop separation
2020-01-25 17:32:28 -05:00
rocky
73fb9f6b96
Make sure "stmts" stays the start rule
2020-01-25 16:14:36 -05:00
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
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
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
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
b84c89e817
Bang on getting 3.x "try" vs "try/else" disambiguated
2020-01-11 22:36:07 -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
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
7b76d55e55
Start to fold in 3.7 reduction-rule goodness into 3.6
2020-01-08 19:50:05 -05:00
rocky
13d9bcaaa9
Some reorg and Lame attempt to disasmbiguate "and" and "if .. if"...
...
More work is needed.
2020-01-08 10:31:19 -05:00