rocky
c90ff5176c
Add 3.x try reduction rule
2020-01-24 20:48:04 -05:00
rocky
10695d882e
Fix bug in 3.7 chained comparison semantic action
2020-01-24 06:14:28 -05:00
rocky
5c31fdc362
Fix bug in 3.6 handling kwonly params ...
...
when there are annotation args
2020-01-24 05:47:41 -05:00
rocky
5616f56442
Remove unreachable code from make_function36.py...
...
with respect to picking out MAKE_FUNCTION attributes.
Fill in runtests.sh exclude lists
2020-01-24 05:05:56 -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
0421863cd3
I said 3.4 compatibility!
2020-01-23 13:58:50 -05:00
rocky
e0f5cb2bd2
3.4- compliance
2020-01-23 13:51:46 -05:00
rocky
28a80a0132
3.6+ extended arg handling; sync with decompyle3..
...
Use 3.8 scanner now.
TODO: Need to investigate what's up with 3.7/01_extended_arg.py
2020-01-23 13:35:22 -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
96c9058cc1
Mini-sync with decompyle3:
...
go over runtests.sh 3.8 excludes
2020-01-23 07:00:53 -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
018583069b
3.7+ bug in handling extended arg
2020-01-22 14:31:45 -05:00
rocky
ed64e7b443
Check that the jumps to jump fix jumps to a *jump*
2020-01-22 07:07:57 -05:00
rocky
5d64664857
Python 2.6.9 compatibility
2020-01-22 06:27:31 -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
d2f59189dd
Add missing code for n_assert_invert
2020-01-21 21:54:09 -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
f4e6382cc1
Specialize "classdef" nonterminal for 3.6+
2020-01-21 04:56:11 -05:00
rocky
67c37f1a03
blacken yet another buffer
2020-01-21 04:46:04 -05:00
rocky
beac1d3567
Fix a bug in 3.6+ keyword-only argument passing
2020-01-21 04:37:58 -05:00
rocky
e466e826b3
Small bug in 3.6+ in finding class name
2020-01-20 22:43:20 -05:00
rocky
eacc3f5cc7
blacken (reformat) a parser.py
2020-01-18 05:23:16 -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
7ec1d0e17b
Merge branch 'master' of github.com:rocky/python-uncompyle6
2020-01-17 04:44:59 -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
6d368d2b30
parens around consts when taking attr again
2020-01-16 22:15:28 -05:00
rocky
39459168b0
More stringent "ifstmt" checks on 3.x
2020-01-16 14:02:04 -05:00
rocky
a532aa5b0e
3.7+ use attribute_w_parens like we do in pre 3.7
2020-01-16 11:43:29 -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
5cdf057a47
Correct handling "if" in dictcomp in semantic actions for 3.x
2020-01-15 02:36:19 -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
e2cbf5f4bd
small tweak to last change
2020-01-14 13:03:24 -05:00
rocky
bb8c5ac5a0
Sync 3.7+ n_call code with decompyle6
2020-01-14 12:45:02 -05:00
rocky
cbd45a93ab
Warn about byte type when decompiling Python3 from Python2
2020-01-14 12:07:42 -05:00
rocky
0706f18b1d
3.7 test_fstring now works.
2020-01-14 00:09:04 -05:00
rocky
73937ffeb4
Handle set/dictionary comprehensions in format strings
2020-01-13 23:49:17 -05:00
rocky
a918055a31
3.6+ nested format strings again
2020-01-13 21:25:20 -05:00