This may have the undesirable property that assert statements might get
tagged with equivalant low-level Python code that uses "raise
AssertionError", but so be it.
Fixes#103
scanner26.py: make scanner2.py and scanner26.py more alike
scanner2.py: check that return stmt is last in list. (May change)
main.py: show filename on verify error
test/*: add more
- Use xdis 3.0.0 protocol load_module. Needs bump in requirements.txt
and _pkg_info_.py
- Start Python 1.5 decompiling - another round of work is needed to remove
bugs
- small cleanups
This bug had possibly caused lots of grammar pollution which may need
addressing.
We want to process COME_FROMs to the same offset to be in *descending*
order so we have the larger range or biggest instruction interval
last. (I think they are sorted in increasing order, but for safety
we sort them). That way, specific COME_FROM tags will match up
properly. For example, a "loop" with an "if" nested in it should have
the "loop" tag last so the grammar rule matches that properly
Adjust Python 3 grammar for more COME_FROM -> COME_FROM_LOOP. And
remove optional COME_FROM_LOOP where possible. Previously, the
optional-ness was a result of inner nestings gobbling up the
COME_FROM.
We'll probably want to go back and fix this up in Python2.
Fix py.test pytest/test_grammar.py -
Comprehension sorts of things removed from parser that
don't exist in earlier pythons
scanners/tok.py Add back in "to" when needed
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.