Open mingodad opened 3 years ago
This is neat! You mention a tool you wrote to do the conversion - is it available somewhere so that we could maybe integrate this in the build-process to auto-generate documentation ?
(sorry for the delay, just seeing this :) )
There is this online tool https://www.bottlecaps.de/convert/ form the same author of the railroad diagram tool.
Also I extended bison/byacc/lemon here https://github.com/mingodad/lalr-parser-test to also generate an EBNF compatible with https://www.bottlecaps.de/rr/ui
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
verilog/parser/verilog.y
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.