-
Notifications
You must be signed in to change notification settings - Fork 2
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
implement a tool for verifying language grammars #12
Conversation
It's a simple parser based on `lexbase`; there's not much too it. The interface is structured around an iterator.
Ambiguity detection and checking for non-terminating rules is missing, but can still be implemented later on.
It's still missing much of the planned functionality.
This ensures the grammar for each language is correct before merging. No code is actually generated for the languages at the moment, but it will be in the future. Koch and the passtool are quick enough to build, so the executables aren't shared between the `binaries` job and `languages` job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
Wow, I thought this tool might have been out of reach for a while, but this is really nice. 🚀
I didn't merge it in case there was more to it than waiting for the merge of the other PR, apologies if that was the only blocker. |
No no, it's all good. The reason I wanted to wait with merging was so that I can update CI to test |
The
passtool
currently only performs some basic checks (i.e., whetherall references name existing rules and that no duplicate productions
are introduced).
In the future, it'll also provide code-generation facilities for
automating the creation of validation layers for languages. The idea is
to reduced the overhead of removing, changing, or adding new
intermediate languages as much as possible.
The tool is ran as part of CI to make sure all language grammars are
valid.