-
Notifications
You must be signed in to change notification settings - Fork 66
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
Unable to generate optimized grammar #84
Comments
Hello Xavier, I'll take a look later today. @breml interestingly, it panics on https://github.com/mna/pigeon/blob/master/ast/ast_optimize.go#L243 where you had left a TODO comment to check for missing references, looks like that's what happens. Martin |
Thanks for your response, @mna! And yes, I've seen the |
Took a quick look, it turns out the grammar has the same rule defined twice ( I tried removing the first definition (with the invalid reference) and it builds correctly. I'll leave the issue open, though, in case Lucas wants to use it to add better error reporting in the optimizer (as hinted in the todo comment). Martin |
Thank you so much, @mna 🙌 It actually works much better now, after renaming the rule on line 90 to |
Hello,
First, thanks a lot for maintaining this project, it's a great library! I'm currently using it in https://github.com/bytesparadise/libasciidoc and it's working really well 🙌
However, since 9fec389 was merged, I've been getting the following error when running the command below in the project's root:
The grammar in my project is already quite big: https://github.com/bytesparadise/libasciidoc/blob/master/pkg/parser/asciidoc-grammar.peg and unfortunalely the stack trace does not give much information about the rule(s) that cause the error, so I can't really narrow down the grammar to a simpler form :/
Note: building and running
pigeon
with the previous commit works like a charm.The text was updated successfully, but these errors were encountered: