Skip to content

Commit

Permalink
grammar show-options mess
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Nov 21, 2024
1 parent e03d9db commit 2118134
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions decompyle3/bin/decompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ def main_bin(
# if timestamp:
# print(time.strftime(timestampfmt))

show_grammar = {
"rules": False,
"transition": False,
"reduce": show_grammar,
"errorstack": "full",
"context": True,
"dups": False,
}

numproc = 1
if numproc <= 1:
show_ast = {"before": tree or tree_plus, "after": tree_plus}
Expand Down
2 changes: 1 addition & 1 deletion decompyle3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def decompile_file(
outstream: Optional[TextIO] = None,
showasm: Optional[str] = None,
showast={},
showgrammar=False,
showgrammar=dict(PARSER_DEFAULT_DEBUG),
source_encoding=None,
mapstream=None,
do_fragments=False,
Expand Down
2 changes: 1 addition & 1 deletion decompyle3/semantics/pysource.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(
self.version = version
self.p = get_python_parser(
version,
debug_parser=dict(debug_parser),
debug_parser=debug_parser,
compile_mode=compile_mode,
is_pypy=is_pypy,
)
Expand Down

0 comments on commit 2118134

Please sign in to comment.