summaryrefslogtreecommitdiff
path: root/support/splint/tex/ftokenset.sty
diff options
context:
space:
mode:
Diffstat (limited to 'support/splint/tex/ftokenset.sty')
-rw-r--r--support/splint/tex/ftokenset.sty72
1 files changed, 72 insertions, 0 deletions
diff --git a/support/splint/tex/ftokenset.sty b/support/splint/tex/ftokenset.sty
new file mode 100644
index 0000000000..9eb5fbd70d
--- /dev/null
+++ b/support/splint/tex/ftokenset.sty
@@ -0,0 +1,72 @@
+% Copyright 2012-2020, 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
+
+\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--}}{--}
+