rocky
08009f9fc7
improve list comprehensions
2024-02-25 08:19:18 -05:00
rocky
5b3ea47bac
Correct long-literals for Python 2.7
2022-10-16 19:33:51 -04:00
rocky
2264ccb1d5
A partial reduce-action sync with decompyle3
...
Start us add _check prefixes and _invalid to the end of check methods
2022-09-30 02:45:52 -04:00
rocky
14aa0ce8f0
sort a list
2022-08-23 20:17:06 -04:00
rocky
21b4d52a77
Correct 2.6 erroneous ifelse detection
2022-08-23 16:50:50 -04:00
rocky
8e5faa933f
Handle long 2.x bytecode literals more efficiently
2022-04-27 13:47:56 -04:00
rocky
deea74b6a8
ret_expr -> return_expr
...
This matches Python's AST a little more closely
2022-01-03 21:56:07 -05:00
rocky
3234673422
mklambda -> lambda_body matches Python AST better
...
Note: we can't use "lambda" since that is a reserved word
2021-12-26 18:48:51 -05:00
rocky
15efaffe8d
More Python version tuple comparison conversion
2021-10-16 11:41:22 -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
4796fb9e70
"or" rule regularization + regressions from xdis
2020-04-16 23:45:39 -04:00
rocky
4dc64063d1
Small change
2020-02-01 11:14:19 -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
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
ac0b0ff7b6
DRY Python 2 reduction check code a little
2020-01-12 04:50:45 -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
9a77dfaf95
Use copysign() in 2.6 nuke -0.0 test if < 2.6
2020-01-07 04:39:34 -05:00
rocky
14468fe8c9
Go over 2.5 for reduction rules and tests
2020-01-06 23:34:18 -05:00
rocky
19cac525ee
Accomodate "return" in an except handler
2020-01-06 18:57:05 -05:00
rocky
8e2c290e96
Disambiguate 2.7 "try" and "try/else"
...
will expand to other 2.x versions later
2020-01-06 18:29:10 -05:00
rocky
3c5ad58e25
Add 2.x if vs if/else reduction rule check
2020-01-05 21:07:24 -05:00
rocky
668141662e
unary_expr -> unary_op to match Python AST
...
former unary_op is now unary_operator
2019-12-11 15:47:46 -05:00
rocky
6546bbdaf9
Fix 2.x false tryelsestmtl detection...
...
With grammar reduction tests. Same as tryelsestmt. Lots of stdlib tests work
now. (More remain though.)
2019-12-09 16:19:10 -05:00
rocky
7d9c4ce8ca
Better try/else detection
2019-12-09 14:04:57 -05:00
rocky
d11a9ea126
Remember rocky: use off2int() in offset testing!
2019-12-08 21:42:49 -05:00
rocky
4926474efc
Add jump range check for 2.7 assert_expr_and
2019-12-08 21:37:45 -05:00
rocky
ebb0342b38
WIP pypy3.6 handling
2019-10-28 13:20:51 -04:00
rocky
24afe072b7
LOAD_CONST -> LOAD_CODE where appropriate
2019-06-19 14:43:07 -04:00
rocky
bc49469704
delete_subscr -> delete_subscript ...
...
to better (but not exactly) match the Python AST
2019-05-04 19:43:00 -04:00
rocky
5c58a4816f
Fix 2.x delete statements expression confusion
2019-04-23 15:48:14 -04:00
rocky
9b550b9dda
PEP E225 with a nod to Deepcommit
2019-04-14 06:11:16 -04:00
Yiming Wang
5d99322078
Better assert and AssertionError determine for Python 2.7
2019-01-05 13:32:08 -05:00
rocky
de6dec6ecd
Control flow bits again
2018-11-11 14:11:23 -05:00
rocky
616e5c82f6
Reinstat expr32 and expr1024 rules...
...
to speed up handling long literal lists. See also issue #188
Update issue forms to simplfy via putting instructions as comments.
2018-09-19 20:14:42 -04:00
rocky
19ec52eb63
Change AST to SyntaxTree in many places
2018-07-15 12:37:50 -04:00
rocky
096563cf91
Fix Python 1.5- bug in handling unpack list
2018-06-04 10:49:20 -04:00
rocky
c481d97866
A more uniform way to track opcodes seen...
...
use a set rather than these boolean variables. Done in 3.x
only for now. May do more later..
2018-04-18 12:01:46 -04:00
rocky
9d807501af
Grammar reduction for 2.6/2.7,3.x
2018-03-27 17:02:03 -04:00
rocky
8b7d5d3270
Merge branch 'master' into grammar-cleanup
2018-03-25 20:57:51 -04:00
rocky
626f690a5a
More grammar specialization by instruction
2018-03-25 20:38:21 -04:00
rocky
39cef6a41b
More raise vs. assert hacky distinctions
2018-03-25 17:56:35 -04:00
rocky
116fbb33e0
Merge branch 'master' of github.com:rocky/python-uncompyle6
2018-03-25 17:36:46 -04:00
rocky
631940887f
Additional Python 2.x assert vs raise testing
2018-03-25 17:35:18 -04:00
rocky
7fb94176b1
Less ambigouus 2.x grammar rule for BUILD_MAP
2018-03-25 12:09:42 -04:00
rocky
0c3db340fa
2.7 bug confusing "or" with "if" and "assert"
2018-03-21 13:18:18 -04:00
rocky
50e59a37c1
Python 2 "for" grammar rule isolation
2018-03-19 16:15:53 -04:00
rocky
51dec051df
Slightly better assert detection
2018-03-08 08:31:50 -05:00