summaryrefslogtreecommitdiff
path: root/support/splint/tex/ftokenset.sty
blob: efcef1e95e16d887b6c40d8152e3ee34a38fdd7e (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
% Copyright 2012-2022, Alexander Shibakov
% This file is part of SPLinT
%
% SPLinT is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% SPLinT is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with SPLinT.  If not, see <http://www.gnu.org/licenses/>.

% typesetting tokens in \flex's grammar
\prettywordpair{SECT2PROLOG}{{$\hbox{SECT}_2\, \hbox{PROLOG}$}}

\prettywordpairwvis{CHAR}{{\bf char}}{char}
\prettywordpairwvis{NUMBER}{{\bf num}}{num}
\prettywordpairwvis{NAME}{{\cyr\lqq{\rm name}\rqq}}{name}
\prettywordpairwvis{OPTION_OP}{\hbox{$\langle\hbox{\.{option}}\rangle$}}{option}
\prettywordpairwvis{EOF_OP}{\hbox{$\langle\hbox{\.{EOF}}\rangle$}}{EOF}

\def\prettyccepairwvis#1#2{%
    \prettywordpairwvis{#1}{\hbox{$\csname xccl@#1\endcsname$}}{#2}%
    \prettyccep@irwvis#1.{#2}%
}

\def\prettyccep@irwvis CCE_#1.#2{%
    \prettywordpairwvis{CCE_NEG_#1}{\hbox{$\csname xccl@CCE_NEG_#1\endcsname$}}{neg #2}%
}

\prettyccepairwvis{CCE_ALNUM}{alphan}
\prettyccepairwvis{CCE_ALPHA}{alpha}
\prettyccepairwvis{CCE_BLANK}{ .}
\prettyccepairwvis{CCE_GRAPH}{beta}
\prettyccepairwvis{CCE_DIGIT}{0}
\prettyccepairwvis{CCE_XDIGIT}{0..Z}
\prettyccepairwvis{CCE_SPACE}{ }
\prettyccepairwvis{CCE_LOWER}{a..z}
\prettyccepairwvis{CCE_UPPER}{A..Z}
\prettyccepairwvis{CCE_PRINT}{zzz}
\prettyccepairwvis{CCE_PUNCT}{.}
\prettyccepairwvis{CCE_CNTRL}{->}
%
\prettywordpairwvis{BEGIN_REPEAT_POSIX}{{\.{\{}$_{\rm p}$}}{\lbchar p}
\prettywordpairwvis{END_REPEAT_POSIX}{{\.{\}}$_{\rm p}$}}{\rbchar p}
\prettywordpairwvis{BEGIN_REPEAT_FLEX}{{\.{\{}$_{\rm f}$}}{\lbchar f}
\prettywordpairwvis{END_REPEAT_FLEX}{{\.{\}}$_{\rm f}$}}{\rbchar f}
\prettywordpairwvis{CCL_OP_DIFF}{\hbox{$\setminus$}}{\benignescape}
\prettywordpairwvis{CCL_OP_UNION}{\hbox{$\cup$}}{U}% see lstokenset.sty for setting up context-dependent indexing/display
\prettywordpairwvis{OPT_OUTFILE}{\hbox{$\langle\hbox{\.{outfile}}\rangle$}}{outfile}
\prettywordpairwvis{OPT_EXTRA_TYPE}{\hbox{$\langle\hbox{\.{extra type}}\rangle$}}{extra type}
\prettywordpairwvis{OPT_PREFIX}{\hbox{$\langle\hbox{\.{prefix}}\rangle$}}{prefix}
\prettywordpairwvis{OPT_YYCLASS}{\hbox{$\langle\hbox{\.{yyclass}}\rangle$}}{yyclass}
\prettywordpairwvis{OPT_HEADER}{\hbox{$\langle\hbox{\.{header}}\rangle$}}{header}
\prettywordpairwvis{OPT_TABLES}{\hbox{$\langle\hbox{\.{tables}}\rangle$}}{tables}

\prettywordpairwvis{TOP_OP}{\hbox{$\langle\hbox{\.{top}}\rangle$}}{top_op}
\prettywordpairwvis{POINTER_OP}{\hbox{$\langle\hbox{\.{pointer*}}\rangle$}}{pointer_op}
\prettywordpairwvis{ARRAY_OP}{\hbox{$\langle\hbox{\.{array}}\rangle$}}{array_op}
\prettywordpairwvis{DEF_OP}{\hbox{$\langle\hbox{\.{def}}\rangle$}}{def_op}
\prettywordpairwvis{OPT_OTHER}{\hbox{$\langle\hbox{\.{other}}\rangle$}}{other_op}
\prettywordpairwvis{OPT_DEPRECATED}{\hbox{$\langle\hbox{\.{deprecated}}\rangle$}}{deprecated_op}
\prettywordpairwvis{RE_DEF}{\hbox{$\langle\hbox{\.{def}$_{\rm re}$}\rangle$}}{def_re}

\prettywordpairwvis{SCDECL}{\hbox{$\langle\hbox{\bf state}\rangle$}}{state}
\prettywordpairwvis{XSCDECL}{\hbox{$\langle\hbox{\bf xtate}\rangle$}}{xtate}
\prettywordpairwvis{\\n}{\hbox{{\sixpoint\.{\\}}\.{n}}}{\benignescape n}
\prettywordpairwvis{-}{\hbox{\rm--}}{--}