gkd
A set of tools to help programming in LaTex.
pip install gkd, and append contents of gkd.tex to your Tex sources.
GKDBNF: The best LaTex BNF package you've ever seen?
This relies on paperbnf.
Usage
\begin{GKDBNF}{some_unique_id}
!Expressions! <e> ::= <e> ( <e> )
| let <n> = <e> in <e>
| !$\lambda$! <n> . <e>
| <\mathtt{atom}>
\end{GKDBNF}
Remember to place a blank line in the end of GKDBNF block.
How to write this BNF?
Follow the syntax and lexer rules:
Valid BNF Syntax:
<atom> ::= NONTERMINAL
| TERMINAL
| TERMINAL2
| '|'
<prod> ::= NONTERMINAL '::=' <atom>+ NEWLINE
| TERMINAL NONTERMINAL '::=' <atom>+ NEWLINE
| TERMINAL2 NONTERMINAL '::=' <atom>+ NEWLINE
| '|' <atom>+ <NEWLINE>
Lexer rule by regex:
NEWLINE = [\r\n]+
NONTERMINAL = <.*?>
TERMINAL2 = !.*?!
Term = \S+
Whitespace tokens are ignored.
Metadata
Release files for gkd 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gkd-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gkd-0.1-py3-none-any.whl
| Download URL | gkd-0.1-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27a06e1db811f0cdf10db4b359b0ce3a23110b4c117aab8d837a157bf0703049
|
|
BLAKE2b-256 checksum How to use checksums |
50bdede5176bc35a66d5e2bba039674e30cc965fbac6f4364d801500c84c3316
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|