Skip to content

Commit 2118134

Browse files
committed
grammar show-options mess
1 parent e03d9db commit 2118134

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

decompyle3/bin/decompile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,15 @@ def main_bin(
159159
# if timestamp:
160160
# print(time.strftime(timestampfmt))
161161

162+
show_grammar = {
163+
"rules": False,
164+
"transition": False,
165+
"reduce": show_grammar,
166+
"errorstack": "full",
167+
"context": True,
168+
"dups": False,
169+
}
170+
162171
numproc = 1
163172
if numproc <= 1:
164173
show_ast = {"before": tree or tree_plus, "after": tree_plus}

decompyle3/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def decompile_file(
191191
outstream: Optional[TextIO] = None,
192192
showasm: Optional[str] = None,
193193
showast={},
194-
showgrammar=False,
194+
showgrammar=dict(PARSER_DEFAULT_DEBUG),
195195
source_encoding=None,
196196
mapstream=None,
197197
do_fragments=False,

decompyle3/semantics/pysource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def __init__(
247247
self.version = version
248248
self.p = get_python_parser(
249249
version,
250-
debug_parser=dict(debug_parser),
250+
debug_parser=debug_parser,
251251
compile_mode=compile_mode,
252252
is_pypy=is_pypy,
253253
)

0 commit comments

Comments
 (0)