This package provides an easy way to write formal grammars.
To use it, run the following commands:
$ latex formal-grammar.ins $ pdflatex formal-grammar.dtx
The first command generates the file
formal-grammar.sty that should be placed in the same folder than your main document. The second command generates the file
formal-grammar.pdf (you may require multiple runs to adjust internal references), which is the documentation for the package.
This package is provided under the terms of the LaTeX Project Public License, version 1.3 or later.
The initial author of this package is Martin Vassor.
Thanks to Enrico Gregorio (egreg) for suggesting improvements. Thanks to Fangyi Zhou for the "center |" feature in
formal-grammar (Commit: #4c3727ef)
Download the contents of this package in one zip archive (235.5k).
formal-grammar – Typeset formal grammars
This package provides a new environment and associated commands to typeset BNF grammars. It allows to easily write formal grammars. Its original motivation was to typeset grammars for beamer presentations, therefore, there are macros to emphasize or downplay some parts of the grammar (which is the main novelty compared to other BNF packages).
|Licenses||The LaTeX Project Public License 1.3|
|Copyright||2021–2022 Martin Vassor|
|Contained in||TeX Live as formal-grammar|
MiKTeX as formal-grammar