summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/backnaur/backnaur.sty
blob: aba486f18bce7174c15b373cee89e85c3e9aebaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
%%
%% This is file `backnaur.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% backnaur.dtx  (with options: `package')
%% 
%% Copyright (C) 2019 by Adrian P Robson
%%    adrian.robson@nepsweb.co.uk
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% 
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Adrian Robson.
%% 
%% This work consists of the files backnaur.dtx and
%%                                 backnaur.ins
%% and the derived files           backnaur.sty and
%%                                 backnaur.pdf
%% 
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesPackage{backnaur}
[2019/06/18 3.1 Typesetting for Backus-Naur Form (BNF) definitions]
\newenvironment{bnf}%
{\begin{eqnarray}}%
{\end{eqnarray}\ignorespacesafterend}
\newenvironment{bnf*}%
{\begin{eqnarray*}}%
{\end{eqnarray*}\ignorespacesafterend}
\newcommand{\bnfpn}[1]{\langle \textrm{#1} \rangle}
\newcommand{\bnfor}{\; \mid \;}
\newcommand{\bnfsp}{\;}
\newcommand{\bnfes}{\lambda}
\newcommand{\bnf@tsfont}[1]{\texttt{#1}}
\newcommand{\bnfts}[1]{\bnf@tsfont{#1}}
\newcommand{\bnftd}[1]{\textit{#1}}
\newcommand{\bnfsk}{\dots}
\newcommand{\bnfpo}{\models}
\newcommand{\bnfprod}{\@ifstar{\bnf@prodnn}{\bnf@prodyn}}
\newcommand{\bnf@prodyn}[2]{\bnfpn{#1} & \bnfpo & #2}
\newcommand{\bnf@prodnn}[2]{\nonumber \bnfpn{#1} & \bnfpo & #2}
\newcommand{\bnfmore}{\@ifstar{\bnf@morenn}{\bnf@moreyn}}
\newcommand{\bnf@moreyn}[1]{ &  & #1}
\newcommand{\bnf@morenn}[1]{\nonumber &  & #1}
\DeclareOption{tsrm}{\renewcommand{\bnf@tsfont}[1]{\textrm{#1}}}
\DeclareOption{perp}{\renewcommand{\bnfes}{\perp}}
\DeclareOption{epsilon}{\renewcommand{\bnfes}{\epsilon}}
\DeclareOption{altpo}{\renewcommand{\bnfpo}{::=}}
\ProcessOptions\relax
\endinput
%%
%% End of file `backnaur.sty'.