Generate a railroad diagram from BNF, using the railroad-diagrams package to draw beautiful diagrams.
You can install this with npm:
npm install -g bnf-railroad
Then run it with:
bnf-railroad <infile> <outfile>
You can also clone this repo and run the bin/bnf-railroad.mjs
file.
Here's the diagram generated from bnf.bnf: