Open mingodad opened 2 years ago
Thanks for the report! Any particular part of syntax which is not clear? Maybe we could also improve the documentation.
The manual fixes are due to my extension to peg/leg not handling conversion of some escape sequences to match what https://www.bottlecaps.de/rr/ui expects.
Notice that this is a basically the grammar without actions and the rule/definition separator changed from <-
to ::=
and the alternative/choice separator from /
to |
.
For the ngs-lang end user documentation probably a cleanup of all space
tokens will make it more useful.
OK. Thanks!
Using a modified peg/leg from here https://github.com/mingodad/peg to convert the gramar in an EBNF understood by https://www.bottlecaps.de/rr/ui to generate a nice railroad diagram (https://en.wikipedia.org/wiki/Syntax_diagram) to help show/understand the syntax.
Command to generate
leg -e syntax.leg
then some minor manual fixes are still needed.Copy and paste the EBNF shown bellow at https://www.bottlecaps.de/rr/ui on the tab Edit Grammar then click on the tab View Diagram.