rocky
7fa851765d
Regularize "or" so args are in 1..2 and ...
...
correct "return None" semantic action
2020-05-18 22:55:26 -04:00
rocky
d7c3b8454b
3.8 needs call_stmt -> call
...
Simplify/regularize how "return" works
2020-05-18 22:26:18 -04:00
rocky
4365022f40
Adapt decompyle3's 3.8 try/return grammar rules
2020-05-17 10:18:10 -04:00
rocky
3e1300eb23
Bugs in nested async for...
...
* Generalize asyc_for rule
Fix bug in picking out comprehension iterator in async for
* fix bug in getting expression in such a comprehension
* Add %[n]{%x} pattern to template_engine()
2020-04-29 10:12:54 -04:00
rocky
869e48877c
Convert to use xdis 4.3.0 or greater
2020-04-16 08:41:53 -04:00
rocky
5c6365d8a1
Go over "yield" and other precedence
2020-04-09 20:27:07 -04:00
rocky
a616e1e1c7
"withstmt" -> "with" and fix async for
2020-04-01 09:48:34 -04:00
rocky
e2d349f781
Handle nested async for in for...
...
and Better async comprehension detection.
Still more work is needed. See commented-out section in
test/simple_source/bug37/02_async_for_generator.py
2020-03-31 12:05:39 -04:00
rocky
63d6054640
One more ParserError() upgrade
2020-03-31 10:29:52 -04:00
rocky
5fde4f2e05
Show token number in parser error listing...
...
But only if -g is given
2020-03-31 10:12:52 -04:00
rocky
946d74ad36
Fix bug in 3.0 name module detection
2020-02-10 08:58:48 -05:00
rocky
6525ade805
Comment tweaks
2020-02-06 20:37:40 -05:00
rocky
73951840b6
Correct last commit
2020-02-06 20:19:29 -05:00
rocky
3438e76865
"return locals()" change to track grammar change
2020-02-06 20:08:00 -05:00
rocky
a99d8da0b4
Fix Recent CI bug
2020-02-06 05:10:57 -05:00
rocky
73e6409594
Fix recent CI bug
2020-02-06 05:09:17 -05:00
rocky
e41cd9be84
hide __qualname__ and name modules again...
...
due to recent grammar change
2020-02-06 03:19:56 -05:00
rocky
6f4ec21ae2
__modname__ and __qualname__ detection...
...
since grammar has simplified.
May still need work for Python < 3.0
2020-02-02 19:09:50 -05:00
rocky
9aae8f85c7
Bug introduced by last commit
2020-02-02 13:11:03 -05:00
rocky
38e2b8a10b
Go over docstring handling
2020-02-02 05:37:07 -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
33918bd9d2
More 3.x "if" checking. Abbreviate stmts->sstmt
2020-01-26 02:58:33 -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
f4e6382cc1
Specialize "classdef" nonterminal for 3.6+
2020-01-21 04:56:11 -05:00
rocky
6d368d2b30
parens around consts when taking attr again
2020-01-16 22:15:28 -05:00
rocky
5cdf057a47
Correct handling "if" in dictcomp in semantic actions for 3.x
2020-01-15 02:36:19 -05:00
rocky
a918055a31
3.6+ nested format strings again
2020-01-13 21:25:20 -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
a98bc444f7
Remove long suffix "L" on ints in bytecode for > 3.0
2020-01-08 11:54:45 -05:00
rocky
dba95c5200
3.7+ imports yet again
2020-01-05 00:13:53 -05:00
rocky
077f192711
Improve 3.7+ dotted imports
2020-01-03 21:22:55 -05:00
rocky
825add1af7
3.7+ "if not" in list comprehension and other bug fixes
2020-01-03 09:01:48 -05:00
rocky
c42e16fafe
Fix 3.7+ import as
2020-01-01 22:59:07 -05:00
rocky
566143b515
Python 3.7+ optimized if in comprehension
2019-12-28 18:09:00 -05:00
rocky
37301ab49e
Was dropping docstrings! Add in decompyle make_function36
2019-12-27 11:41:03 -05:00
rocky
97e3a7eb02
Split out make_function.py into v2 and v3 versions
...
A custom 3.3 make_function will be coming soon.
2019-12-27 03:32:15 -05:00
rocky
bffbd0b352
3.6+ lambda params; add semantic rule customizing for lambdas
2019-12-23 07:19:40 -05:00
rocky
28d9e66a53
Redo the way we handle complex literals and 3.7+ bug fixes...
...
In 3.7+ remove assert_expr* parser rules
Fix "call" precidence in 3.7+ for it children
2019-12-19 06:40:13 -05:00
rocky
8470bded59
Bugs found in test_complex.py
...
list comprehensions from 3.x closures didn't handle nested for's
before 3.6.
Handle nanj and infj.
2019-12-17 18:27:43 -05:00
rocky
d39169dbda
Add 3.7 async listcomp
2019-12-16 00:14:16 -05:00
rocky
996719688a
Merge branch 'master' of github.com:rocky/python-uncompyle6
2019-12-15 21:18:44 -05:00
rocky
af9f6b05fa
Add 3.7 "async for" in generator
2019-12-15 21:18:37 -05:00
rocky
e93b70bcce
Fix Python 3.x pringing superclasses...
...
class Description: not class Description("Description").
Introduced in not catching LOAD_CONST->LOAD_STR change
2019-12-15 10:49:24 -05:00
rocky
cc55fa1de1
binary_expr -> bin_op to match Python AST
...
I know binary_expr is more natural, but as with things Python we
sometimes sacrifice elegance and clarity for Python Fascism.
2019-12-11 13:35:21 -05:00
rocky
c6ddefcef5
Merging in recent 3.7 and 3.8 improvements from decompyle6
...
This rebases 3.7, 3.8 ...decompilation off of 3.7ish rather than a 3.4
base.
Add more 3.7 and 3.8 tests
2019-12-08 17:54:59 -05:00
rocky
6659fffc0d
Two Bugs ...
...
2.7: more stringent comparison and comp_if testing
2.6-2.7: fix botched dict constant translation
2019-11-18 06:49:36 -05:00
rocky
2da5a5649f
Python 3.5 tolerance
2019-11-10 12:04:21 -05:00