Py-railroad-diagrams

Jul 20, 2023

Generate SVG railroad syntax diagrams, like on JSON.org

Railroad-diagram Generator is a small library for generating railroad diagrams like what JSON.org uses using SVG, with both JS and Python ports.

Railroad diagrams are a way of visually representing a grammar in a form that is more readable than using regular expressions or BNF. They can easily represent any context-free grammar, and some more powerful grammars. There are several railroad-diagram generators out there, but none of them had the visual appeal I wanted, so I wrote my own.



Checkout these related ports:
  • Zphoto - Zooming photo album generator
  • Zint - Barcode generator (library and utilities)
  • Zimg - Image-generator that uses ASCII input files to create PNGs/EDFs
  • Zgv - Graphics viewer for SVGAlib
  • Zbar - ZBar barcode reader
  • Zathura - Customizable lightweight pdf viewer
  • Zathura-ps - PostScript support for Zathura PDF viewer
  • Zathura-pdf-poppler - Poppler render PDF plugin for Zathura PDF viewer
  • Zathura-pdf-mupdf - MuPDF render PDF plugin for Zathura PDF viewer
  • Zathura-djvu - DjVu support for zathura
  • Zathura-cb - Comic book plugin for Zathura PDF viewer
  • Yukon - Real-time capture tool for OpenGL applications
  • Yed - Editor for graphs and diagrams
  • Yafaray - Montecarlo raytracing engine
  • Yacreader - Yet another comic reader