rocky
5d1bf2dd9b
adjust "assert" transformation due to grammar ...
...
simplification
2020-02-01 22:27:17 -05:00
rocky
de1e7d423c
A more correct offset2inst_index update.
2020-02-01 21:02:45 -05:00
rocky
7c012ebdfc
Remove duplicate stmt
2020-01-31 15:50:46 -05:00
rocky
f27b72ab05
Work around 2.7 phony come-froms in ifelsesmt
2020-01-31 15:49:29 -05:00
rocky
fdf4496a2d
Track grammar "stmt" simplifications class ...
...
* NAME_MODULE constant
* QUAL_NAME constant
2020-01-29 15:37:58 -05:00
rocky
e80e72e6ab
ifelsestmt transform must object types more
2020-01-26 10:12:26 -05:00
rocky
118e21b2cd
A recent changed bolixed docstrings...
...
fixa
2020-01-26 03:30:57 -05:00
rocky
33918bd9d2
More 3.x "if" checking. Abbreviate stmts->sstmt
2020-01-26 02:58:33 -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
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
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
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
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
a532aa5b0e
3.7+ use attribute_w_parens like we do in pre 3.7
2020-01-16 11:43:29 -05:00
rocky
5cdf057a47
Correct handling "if" in dictcomp in semantic actions for 3.x
2020-01-15 02:36:19 -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
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
rocky
ec3a9978fc
Better 3.6+ nested format strings
2020-01-13 19:08:54 -05:00
rocky
54f4806021
More fstring bugs -- nested fstring grammar rules
2020-01-13 08:04:53 -05:00
rocky
de282af05d
Fix some fstring formats bugs...
...
* Need parens around a lambda in an format string.
* handle format string specifier + width
Note: other format-string bugs remain.
2020-01-13 06:40:18 -05:00
rocky
f56ad56021
Wacky string at beginning of fn which is not docstring...
...
3.7.6 test_fstring.py tests this.
2020-01-12 22:59:06 -05:00
rocky
aaba4ecb2b
Better try/else/finally for 3.x
2020-01-11 21:33:22 -05:00
rocky
7af6b6bc06
Fix 3.0..3.3 keyword-only parameters semantic actions
2020-01-11 11:06:59 -05:00
rocky
061da83863
3.7 "import" fix
2020-01-11 07:37:28 -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
07f16fa040
need to relax node checking on tryelsesmtl3...
...
now that except_handler_else is derived from except_handler.
2020-01-09 23:24:42 -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
7d24910b3c
"with .. as" with tuples need parens in 3.0 so always add ().
2020-01-08 12:02:34 -05:00
rocky
a98bc444f7
Remove long suffix "L" on ints in bytecode for > 3.0
2020-01-08 11:54:45 -05:00
rocky
a3beccc874
Another case where we need code to set the generator bit..
...
via a dead-code "yield".
2020-01-06 17:22:50 -05:00
rocky
839eb6fe0b
bogus "yield" insertion not needed in 2.x
2020-01-06 15:02:40 -05:00
rocky
078cca335a
Seomtiems we need to add "yield"...
...
in order to get the generator bit flag set, such as in 3.x where the
yield is optimized away.
2020-01-06 14:57:11 -05:00
rocky
63a88b8eea
Some Python 3.x lambda params are in reverse order
2020-01-06 10:54:14 -05:00