-
Notifications
You must be signed in to change notification settings - Fork 33
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 #167
Comments
Very cute! Question: I'm a bit confused about all the Also, there appears to be some oversimplification of func_type, which now allows params and results to occur in any order. Similarly with the locals in functions, which can be interleaved with instructions. |
Thank you for pointing this out I'll review the menhir grammar. |
After some work I found easier to replace
|
I did some fixes (shown on the previous message) could you have a look at it to see if you've pointed out has been resolved ? One of the objectives of the railroad diagrams is to help visualize the whole grammar and spot possible logical errors. |
I've done a experimental tool to convert bison grammars to a kind of EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams see bellow the converted
interpreter/text/parser.mly
and with some hand made changes to allow view it at https://www.bottlecaps.de/rr/ui the order of the rules could be changed to a better view of the railroad diagrams. Copy and paste the EBNF bellow on https://www.bottlecaps.de/rr/ui tab Edit Grammar then switch to the tab View Diagram.The text was updated successfully, but these errors were encountered: