Open mingodad opened 2 years ago
That's clever. What do you propose we do with it?
There are places where it would be nice to inline the rules in the diagram, e.g.
I hope it'll help document the language and also debug/develop the grammar, you can download the railroad diagram and add to the documentation.
Also notice that the railroad diagram is navigable so we can click on [spacing_type]
to jump to it's definition, if the definition is not singular it always appear separated.
If you compare the diagrams on https://www.json.org/json-en.html they are more readable. In general the reference manual gives a fuller definition and description.
Using this tool https://www.bottlecaps.de/convert/ to convert https://github.com/The-OpenROAD-Project/OpenROAD/blob/429a272dae6e384dcdc7ebc99bdc4ecb0f66f8a1/src/odb/src/lef/lef/lef.y and https://raw.githubusercontent.com/The-OpenROAD-Project/OpenROAD/7f985d5e0a07ebb08ccff8c4453abec95d747a26/src/odb/src/def/def/def.y into an EBNF understood by https://www.bottlecaps.de/rr/ui and manually replacing the tokens (search & replace
K_*
by/*K_*/*
) we can have a navigable railroad diagram.Copy and paste one of the
EBNF
shown bellow on https://www.bottlecaps.de/rr/ui on the tabEdit Grammar
then click the tabView Diagram
: