-
Notifications
You must be signed in to change notification settings - Fork 9
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
Grammar railroad diagram #23
Comments
Hello @mingodad, thanks for creating this issue, it is an interesting feature. Maybe the same output can also be generated by providing a target language description file? It could be thought of a possibility to turn a unicc parser into a EBNF-format for this website by just specifiying |
It seems to me that it's more code and complicated to use https://github.com/phorward/unicc/tree/master/targets |
You're partly right. The current features there don't satisfy to resolve your proposal. Well, the feature is probably useful, but I think it shouldn't make it into unicc, as unicc is not actively continued right now and there also no plans to do so by me currently. You should either bring this feature to unicc2, as this is the only candidate for an improved version of unicc, or create a fork of unicc-v1 with the features you would like to add. |
I've just added unicc grammar to https://mingodad.github.io/parsertl-playground/playground/ an |
Hello @mingodad, thanks for sharing, looks fine and works! |
Based on the
debug.c:dump_productions
function I created adebug.c:dump_ebnf
function to output an EBNF grammar understood on https://www.bottlecaps.de/rr/ui to generate railroad diagrams (https://en.wikipedia.org/wiki/Syntax_diagram) and as example bellow is the one forparse.par
.Copy and paste the EBNF shown bellow on https://www.bottlecaps.de/rr/ui in the TAB Edit Grammar then switch to the TAB View Diagram.
The text was updated successfully, but these errors were encountered: