pegasus
pegasus copied to clipboard
pegasus-dot Unhandled exception NilAssertionError
Attempting to generate a dot file with the json generated from arithmetic.grammar
results in an error.
Reproducing:
❯ bin/pegasus < grammars/arithmetic.grammar > grammars/arithmetic.json
❯ bin/pegasus-dot < grammars/arithmetic.json
digraph G {
q1 -> q5 [label="open_parenth"]
q1 -> q6 [label="number"]
Unhandled exception: Nil assertion failed (NilAssertionError)
from /opt/homebrew/Cellar/crystal/1.5.0/share/crystal/src/array.cr:1143:18 in '__crystal_main'
from /opt/homebrew/Cellar/crystal/1.5.0/share/crystal/src/crystal/main.cr:115:5 in 'main'
crystal info:
❯ crystal --version
Crystal 1.5.0 (2022-07-06)
LLVM: 14.0.6
Default target: aarch64-apple-darwin21.5.0
Thank you for the thorough report! I'll take a look as soon as I have time.
I believe this is fixed by 5820a51342f8465834c8359a6a5ea6c0650dee45. Sorry it took so long! It was a pretty straightforward bug; I just haven't had a lot of time to maintain pegasus.