| 1 |
%% |
| 2 |
%% This is file `lwarp-simplebnf.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `simplebnf') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
\LWR@ProvidesPackagePass{simplebnf}[2023-11-25] |
| 19 |
\ExplSyntaxOn |
| 20 |
|
| 21 |
\VerifyEnvironment[lwarp][simplebnf]{bnf} |
| 22 |
{A7E8911B9291D4EB7C1CD8366CD75341}{3B45D7D9107687D718F5303B6632776C} |
| 23 |
|
| 24 |
\RenewDocumentEnvironment { bnf } { d() O{llcll} +b } |
| 25 |
{ |
| 26 |
\begin{lateximage}[bnf:\space\detokenize{#3}]?% |
| 27 |
|
| 28 |
\IfNoValueF { #1 } |
| 29 |
{ \keys_set:nn { simplebnf } { #1 } } |
| 30 |
|
| 31 |
\__simplebnf_build_grammar:n { #3 } |
| 32 |
|
| 33 |
\begin{@simplebnf_tblr_env}[expand=\l__simplebnf_table_tl]{#2} |
| 34 |
\tl_use:N \l__simplebnf_table_tl |
| 35 |
\end{@simplebnf_tblr_env} |
| 36 |
\end{lateximage}% lwarp |
| 37 |
} |
| 38 |
{ } |
| 39 |
|
| 40 |
\VerifyEnvironment[lwarp][simplebnf]{bnfgrammar} |
| 41 |
{E7326E6CAE6E35827E866B4A08C5CEA8}{A9B27A2478E8BD67B19E94ECF8A44F14} |
| 42 |
|
| 43 |
\RenewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b } |
| 44 |
{ |
| 45 |
\msg_warning:nn { simplebnf } { dep } |
| 46 |
\begin{center} |
| 47 |
\begin{lateximage}[bnf:\space\detokenize{#4}]?% |
| 48 |
\begin{tabular}{#1} |
| 49 |
\@dep__simplebnf_typeset_grammar:nnn { #2 } { #3 } { #4 } |
| 50 |
\tl_use:N \l__simplebnf_table_tl |
| 51 |
\end{tabular} |
| 52 |
\end{lateximage}% lwarp |
| 53 |
\end{center} |
| 54 |
} |
| 55 |
{ } |
| 56 |
|
| 57 |
\ExplSyntaxOff |
| 58 |
|
| 59 |
\endinput |
| 60 |
%% |
| 61 |
%% End of file `lwarp-simplebnf.sty'. |