You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty cool. I'll keep that site in mind in the future. Also, it's pretty cool that you have a transpiler for grammars.
As you know (because you've created an issue there before), the work is currently being done on https://github.com/apaz-cli/pgen. The plan is that I'm going to have it generate the tokenizer and parser for Daisho.
Unfortunately, my tokenizer generator works from an NFA state machine description, not from a regex like EBNF is expecting. So, it may be hard to convert. Similarly, my grammar files are completely procedural, essentially a programming language of their own. So, no converting to EBNF there either.
With that said, I'll mess around with it. It may be cool for visualizing the grammar for the grammar of the tokenizer and parser files for pgen, which are not written in themselves, but (confusingly) in normal PEG.
Using a modified peg/leg from here https://github.com/mingodad/peg to convert the
grammar/Grammar.peg
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 before some minor manual fixes (basically comment out what is not accepted)
peg -e syntax.peg
.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.
The text was updated successfully, but these errors were encountered: