Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sort declaration unparsing #2767

Merged
merged 7 commits into from
Aug 4, 2022
2 changes: 2 additions & 0 deletions pyk/src/pyk/ktool/kprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def prettyPrintKast(kast: KAst, symbol_table: SymbolTable, debug=False):
if 'klabel' not in kast.att and kast.klabel:
kast = kast.update_atts({'klabel': kast.klabel.name})
sortStr = prettyPrintKast(kast.sort, symbol_table, debug=debug)
if not kast.items:
return 'syntax ' + sortStr
ehildenb marked this conversation as resolved.
Show resolved Hide resolved
productionStr = ' '.join([prettyPrintKast(pi, symbol_table, debug=debug) for pi in kast.items])
attStr = prettyPrintKast(kast.att, symbol_table, debug=debug)
return 'syntax ' + sortStr + ' ::= ' + productionStr + ' ' + attStr
Expand Down