scribble-bettergrammar
scribble-bettergrammar copied to clipboard
A Scribble library for typesetting grammars better
scribble-bettergrammar
A library for typesetting racketgrammars, but better.
It supports defining and reusing grammars, annotations for differences and
changes between grammars, automatically computing the difference between two
grammars (using sexp-diff), rendering grammar differences with both
highlighting and annotations to emphasize what has changed between grammars, and
creating new grammar typesetters akin to racket, racketblock, and racketblock0.
Currently only comes with built-in style for HTML backend, but it should be simple to write your own TeX style.
Install via raco pkg install scribble-bettergrammar (or install
scribble-bettergrammar-lib or scribble-bettergrammar-doc separately).
An example from the docs:
