rocky
6d3b934bf2
Pretty-print constant tuples
2016-10-13 22:59:59 -04:00
rocky
7eb9210b0c
Start to track line breaks on lists
2016-10-13 06:37:53 -04:00
rocky
52691c4e8a
Map expression with source-directed linebreaks ...
...
for Python 3.4 and 3.5
2016-10-10 21:12:44 -04:00
rocky
f067148b6c
Start using source linebreaks in formatting...
...
.. large literals like maps and dicts, and tuples
2016-10-10 18:28:02 -04:00
rocky
97ce330b00
Python 1.5 scanner and parser and ..
...
.. slightly improved Forgot to check in files before.
Handle Python pre 2.2. classes
2016-10-10 12:09:00 -04:00
rocky
f41426e94b
Simpify python 2.1 grammar Fix bug with -t ...
...
Wasn't showing source text when -t option was given
2016-10-08 21:52:10 -04:00
rocky
056f600da1
Start Python 2.1 bytecode decompile
2016-10-07 22:42:30 -04:00
rocky
d2b477ae7d
Add tuple comma when not in BUILD_LIST_n
...
Fixes issue #57
bin/uncompile.py: --verify now works on a single bytecode file. We will
set the output to be something created by tempfile.mktemps
2016-10-04 23:58:35 -04:00
moagstar
f3b9a5936e
fixed generation of FSTRING_CONVERSION_MAP in < python 2.7
2016-09-21 22:13:25 +02:00
moagstar
bae3d2e361
merge fstring changes from moagstar
2016-09-21 22:04:46 +02:00
rocky
c119965d96
Small changes
2016-09-18 17:23:49 -04:00
rocky
03e8995d18
ret_cond adjustment for < 2.7 and ...
...
"<= 2.6" -> "< 2.7" since python 2.6's version is 2.6000001
2016-09-09 15:55:15 -04:00
rocky
2d11ffb669
Python 3.0-3.2 *args processing
2016-09-08 03:54:57 -04:00
rocky
b7f1f1b028
3.2 (and down to 3.0?) bug in fn name and kwargs
2016-09-08 02:35:06 -04:00
rocky
fecae9f902
Fix 3.3 named bug and ...
...
Parse 3.4 parameters correctly.
Allow test_pyenvlib to do 3.3.6
2016-09-06 02:15:47 -04:00
rocky
c7788e4545
disassemble -> ingest where appropriate
...
As part of tokenization for (de)parsing, we need to do something like a
disassembly, but is is really a little different.
Disassembly, strictly speaking, is done by the xdis module now.
What "ingestion" does is massage the instruction tokens to a form that is
more amenable for parsing.
In sum, ingestion is different than disassembly, although disassembly is
generally the first part of ingestion.
2016-09-04 11:43:02 -04:00
rocky
979bca4fe0
Small cleanup/code optimization
2016-09-04 10:02:20 -04:00
rocky
647248dfc8
A couple more 2.6 (and below) bugs fixed
...
* Detect "return None" inside if statement
* another case of triple ==, ==, ==
scanner2.py: detect_structure: descriminate more on parent type
2016-09-04 04:10:08 -04:00
rocky
f4ac13ef0f
Python 2.5-2.6 generator bug
...
Adjust for variable position of list iteration node in a genexpr node
2016-09-03 21:37:32 -04:00
rocky
8f95ec9882
Python 2.7 "return None" bug
...
Same as 2.3-2.6 "return None".
2016-09-03 10:27:21 -04:00
rocky
b6fd9088b8
Python 2.3..2.6 "return" bug
...
In Python 2.6 and possibly down to 2.3 we need to issue "return" not
"return None" inside a generator. So check for that "return None"
inside n_return and issue "return" for that.
2016-09-03 08:04:52 -04:00
rocky
52a35e6c62
Fix Python 2.4-2.6 comp_for text generation...
...
Makefile: tolerate pypy 5.3.x
Rest: fix semantic action rule for comp_for and test this
2016-09-03 00:30:48 -04:00
rocky
136f935e26
Fix Python 3.x named param and kwargs bug
2016-09-02 06:30:39 -04:00
rocky
1d567d5d9a
Handle Python 2.6 and below "except <cond>, <var>"
2016-09-01 02:20:07 -04:00
rocky
c9f364df9f
Python 3.x bug in handling var number of args
2016-08-31 06:20:29 -04:00
rocky
6f2cdc164d
Handle Python 2 vs 3 raise syntax change
...
raise_stmt ::= "raise" expression "," expression
becomes:
raise_stmt ::= "raise" expression from expression
raise expr, expr -> raise
2016-08-30 00:42:24 -04:00
rocky
f47aecae9f
PYPY bugs and inspired changes ...
...
verify.py: Show co_flags when different.
pysource.py: PYPY also generates normal tryfinallystmt code
test_pyenvlib.py: allow pypy-5.3.1
2016-08-27 19:32:42 -04:00
rocky
1087613a27
Handle 3.6 Format String conversions !r, !s, !a
2016-08-25 07:26:01 -04:00
rocky
a65443ee02
Fix pypy semantic action bug in CALL_METHOD
2016-08-14 22:59:34 -04:00
rocky
d8598f61e4
Start handling Python 2.2 bytecode and...
...
Fix some bugs in Python 2.3-2.5 bytecode handling
2016-08-13 07:16:50 -04:00
rocky
65a16327ce
Moagstar's 3.6 wordcode + formattedValue rules
2016-08-01 03:16:26 -04:00
rocky
3a6f9d8f24
Fix 3.5 misclassifying RETURN_VALUE
...
We use location of SETUP_EXCEPT instructions to disambiguate.
2016-07-29 08:56:23 -04:00
rocky
5ffd9b2be7
2.6 and 2.7 while1 grammar rule
...
Fixes issue #40
2016-07-27 13:19:42 -04:00
rocky
5e801b5d74
Python 2.7 set comprehension bug
2016-07-27 08:36:33 -04:00
rocky
2523b340cd
separate semantic action version differences
...
Added customize_for_version which
uses is_pypy and version to adjust tables
2016-07-27 07:32:55 -04:00
rocky
c3f6fa32db
Customize tables better for specific Python versions
2016-07-27 06:56:02 -04:00
rocky
6dc9d3ab2f
Small code clean up
2016-07-27 06:01:49 -04:00
rocky
ecbbc7dfea
Custom PyPy rules for tryfinallysmt, assign{2,3}
2016-07-26 16:49:14 -04:00
rocky
6c5bd6289f
More PyPy grammar rules
...
* assert one and two-arg form
* trystmt
Simplify adding multiple grammar rules
2016-07-26 10:21:12 -04:00
rocky
f0a8505887
Add grammar for PyPy 2-arg assert
2016-07-25 22:36:02 -04:00
rocky
04cc80b0d6
PyPy BUILD_MAP_n. Reinstate bytecode tests
2016-07-25 21:53:56 -04:00
rocky
476eb50868
Handle PyPy JUMP_IF_NOT_DEBUG
...
Update README.rst to note PyPY and reorganize a little
2016-07-25 09:18:03 -04:00
rocky
1c50e34c30
PyPy support
...
* Use proper PYPY 32 opcodes
* handle opcodes LOOKUP_METHOD and CALL_METHOD
* Administrative stuff for PyPy
2016-07-24 18:54:51 -04:00
rocky
7c4316d4fb
Start handling pypy 2.7
...
Need to understand whether we care compiling pypy.
Pypy 2.7 list comprehensions are different and use
its own opcode.
2016-07-21 02:58:50 -04:00
rocky
063e517a7c
Better parse error formatting
...
Start to move away for compiler-oriented terminology:
Favor "instructions" over "tokens".
Syntax error -> Parse error.
2016-07-17 16:27:17 -04:00
rocky
cd8cbf9200
Add 3.5 matrix mult ops
...
We now run 3.5 verifycation so we need to remove some
of the tests that fail to verify pending fixing.
2016-07-15 12:12:19 -04:00
rocky
0ee52aeeef
Isolate pseudo op IMPORT_NAME_CONT
...
I think this is a holdover from pre 2.3 days. Possibly it can be dropped altogether.
2016-07-14 21:05:09 -04:00
rocky
c9d1f72424
Attempt to get 3.5 RETURN_END_IF working
...
This feels hacky and I'm not sure is quite right.
Untili we understand better what to do though, we'll
go with it.
2016-07-14 14:49:57 -04:00
rocky
29990c8da0
3.x __qualname__ = supression
...
Class names have become more complicated so the pattern test
needs to be more complex as well. Sigh
2016-07-14 12:57:48 -04:00
rocky
4e6e38358d
3.x list comprehenions list_if_not, comp_ifnot bug
...
Saw only list_if_not bug, but might also be applicable
to comp_ifnot
2016-07-14 11:30:42 -04:00