Misc fixups/cleanups

* parse3.py Had botched if-for-else test by grammar addition
* semantics/*.py: Show errorstack in failed parse when -g (requires sparck 1.2.0)
* some optimization in scanner3
This commit is contained in:
rocky
2016-05-12 09:27:25 -04:00
parent 8d51456f59
commit 6f6f1db576
6 changed files with 41 additions and 9 deletions

View File

@@ -1800,7 +1800,9 @@ def deparse_code(version, co, out=sys.stdout, showasm=False, showast=False,
print(t)
debug_parser = dict(PARSER_DEFAULT_DEBUG)
debug_parser['reduce'] = showgrammar
if showgrammar:
debug_parser['reduce'] = showgrammar
debug_parser['errorstack'] = True
# Build AST from disassembly.
deparsed = SourceWalker(version, out, scanner, showast=showast,