I’m happy to announce that DrawGrammar is now available on OPAM.
DrawGrammar is a tool to draw… railroad diagrams of EBNF grammars.
It can now draw syntax diagrams directly from the
.etex files of the OCaml manual, generating images like:
$ draw_grammar --syntax ocaml-etex-ebnf types.etex
Drawing types.etex (as ocaml-etex-ebnf) to types.etex.png
You can find more examples in the “Examples” tab of the interactive demo.
If the community feels like these diagrams would be a valuable addition to the OCaml manual, I’m willing to help integrating them there.