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

pegasus-dot Unhandled exception NilAssertionError #7

Open
masukomi opened this issue Jul 11, 2022 · 2 comments
Open

pegasus-dot Unhandled exception NilAssertionError #7

masukomi opened this issue Jul 11, 2022 · 2 comments

Comments

@masukomi
Copy link

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
@masukomi masukomi changed the title pegasas-dot Unhandled exception NilAssertionError pegasus-dot Unhandled exception NilAssertionError Jul 11, 2022
@DanilaFe
Copy link
Owner

Thank you for the thorough report! I'll take a look as soon as I have time.

@DanilaFe
Copy link
Owner

I believe this is fixed by 5820a51. Sorry it took so long! It was a pretty straightforward bug; I just haven't had a lot of time to maintain pegasus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants