-
Notifications
You must be signed in to change notification settings - Fork 16
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
Create railroad diagrams #8
Comments
Any thoughts on how to achieve this? Would you go through an intermediate definition? |
@Hypercubed , sorry I missed your comment. I can generate both AST Schemas and PEG geometry definitions from a Heron grammar. An example output is here https://github.com/cdiggins/heron-language/blob/master/spec.md generated by the tool: https://github.com/cdiggins/heron-language/blob/master/tools/gen-spec.js |
So I think that grammKit, just needs something like the PEG grammar definitions but cleaned up a bit. |
If I understand correctly the outputs in the heron-language repo are PEG format, while GrammKit takes PEGjs, Ohm, or EBNF. Unless you know a decent way to convert Myna grammar (or PEG) to PEGjs it might be better to process the rules directly into the intermediate format GrammKit uses (basically the output of PEGjs#parse). This is my attempt so far: https://github.com/Hypercubed/f-flat_node/blob/master/bin/gen-spec.js#L22 It works, but not great... I'm still not sure the correct "translations" of some rules. |
https://github.com/dundalek/GrammKit
The text was updated successfully, but these errors were encountered: