https://github.com/yegor256/naive-ebnf
LaTeX package for printing EBNF in plain text format
https://github.com/yegor256/naive-ebnf
context-free-grammar ebnf ebnf-syntax formal-grammar latex latex-package
Last synced: 5 months ago
JSON representation
LaTeX package for printing EBNF in plain text format
- Host: GitHub
- URL: https://github.com/yegor256/naive-ebnf
- Owner: yegor256
- License: mit
- Created: 2023-01-28T08:06:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T07:59:35.000Z (9 months ago)
- Last Synced: 2024-10-19T00:59:11.910Z (8 months ago)
- Topics: context-free-grammar, ebnf, ebnf-syntax, formal-grammar, latex, latex-package
- Language: TeX
- Homepage: https://ctan.org/pkg/naive-ebnf
- Size: 185 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# EBNF Diagrams in LaTeX
[](https://github.com/yegor256/naive-ebnf/actions/workflows/l3build.yml)
[](https://ctan.org/pkg/naive-ebnf)
[](https://github.com/yegor256/naive-ebnf/blob/master/LICENSE.txt)This LaTeX package helps you typeset an [Extended Backus-Naur Form][EBNF]
(EBNF) using plain text format.First, [install it][LaTeX]
from [CTAN](https://ctan.org/pkg/naive-ebnf)
and then use in the preamble:```text
\documentclass{article}
\usepackage{naive-ebnf}
\begin{document}
\begin{ebnf}
:=
| "$\lambda$" "."
| "(" ")"
\end{ebnf}
\end{document}
```Otherwise, you can download [`naive-ebnf.sty`][sty] and add to your project.
## How to Contribute
If you want to contribute yourself, make a fork, then create a branch,
then run `l3build ctan` in the root directory.
It should compile everything without errors. If not, submit an issue and wait.
Otherwise, make your changes and then run `l3build ctan` again. If the build is
still clean, submit a pull request.[EBNF]: https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form
[LaTeX]: https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages
[sty]: https://raw.githubusercontent.com/yegor256/naive-ebnf/gh-pages/naive-ebnf/naive-ebnf.sty