Open mingodad opened 2 years ago
@mingodad wow, this looks like great work! What do you think we should add to this repository? Would you be interesting in submitting a PR? I would happily review, thanks!
Why not add the capability to export the grammar like I did manually directly in the pegquasi
itself ?
Hi @michaelfig I added you to the assignees along with me. Looks like fun! Let's discuss sometime. No rush.
Looking through the code I think that adding an option to export the grammar to a format that can be recognized by https://www.bottlecaps.de/rr/ui to generate a navigable railroad diagram (https://en.wikipedia.org/wiki/Syntax_diagram) would make it easier to develop/debug/document
jessica
.For example I manually created a grammar compatible with chpeg / cpp-peglib that can parse
pegquasi
grammars on their playgrounds (https://chrishixon.github.io/chpeg/playground/ , https://yhirose.github.io/cpp-peglib/) :And with a variant of that I could do a basic conversion of
jessica
to a peg format that can be used at https://www.bottlecaps.de/convert/ to be converted and generate a navigable railroad diagram.Copy and paste the grammar shown bellow on https://www.bottlecaps.de/convert/ on the
Input grammar:
textarea and then click theConvert
button then click theView Diagram
button (that will appear after the conversion) to view the navigable railroad diagram.