macros.tex 1.46 KB
Newer Older
1

2
\newcommand{\todo}[1]{{\Huge\bfseries TODO: #1}}
3

MARCHE Claude's avatar
MARCHE Claude committed
4 5
\newcommand{\why}{\textsf{Why3}\xspace}
\newcommand{\whyml}{\textsf{Why3ML}\xspace}
MARCHE Claude's avatar
MARCHE Claude committed
6 7 8
\newcommand{\eg}{\emph{e.g.}}

% BNF grammar
9
\newcommand{\keyword}[1]{\texttt{#1}}
MARCHE Claude's avatar
MARCHE Claude committed
10 11 12 13 14 15 16 17 18
\newcommand{\indextt}[1]{\index{#1@\protect\keyword{#1}}}
\newcommand{\indexttbs}[1]{\index{#1@\protect\keywordbs{#1}}}
\newif\ifspace
\newif\ifnewentry
\newcommand{\addspace}{\ifspace ~ \spacefalse \fi}
\newcommand{\term}[2]{\addspace\hbox{\lstinline|#1|%
\ifthenelse{\equal{#2}{}}{}{\indexttbase{#2}{#1}}}\spacetrue}
\newcommand{\nonterm}[2]{%
  \ifthenelse{\equal{#2}{}}%
19
             {\addspace\hbox{\textsl{#1}\ifnewentry\index{#1@\textsl{#1}}\fi}\spacetrue}%
MARCHE Claude's avatar
MARCHE Claude committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
             {\addspace\hbox{\textsl{#1}\footnote{#2}\ifnewentry\index{grammar entries!\textsl{#1}}\fi}\spacetrue}}
\newcommand{\repetstar}{$^*$\spacetrue}
\newcommand{\repetplus}{$^+$\spacetrue}
\newcommand{\repetone}{$^?$\spacetrue}
\newcommand{\lparen}{\addspace(}
\newcommand{\rparen}{)}
\newcommand{\orelse}{\addspace$\mid$\spacetrue}
\newcommand{\sep}{ \\[2mm] \spacefalse\newentrytrue}
\newcommand{\newl}{ \\ & & \spacefalse}
\newcommand{\alt}{ \\ & $\mid$ & \spacefalse}
\newcommand{\is}{ & $::=$ & \newentryfalse}
\newenvironment{syntax}{\begin{tabular}{@{}rrll@{}}\spacefalse\newentrytrue}{\end{tabular}}
\newcommand{\synt}[1]{$\spacefalse#1$}
\newcommand{\emptystring}{$\epsilon$}
\newcommand{\below}{See\; below}
35

MARCHE Claude's avatar
MARCHE Claude committed
36
%%% Local Variables:
37
%%% mode: latex
MARCHE Claude's avatar
MARCHE Claude committed
38
%%% TeX-master: "manual"
MARCHE Claude's avatar
MARCHE Claude committed
39 40
%%% TeX-PDF-mode: t
%%% End: