From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 support/splint/tex/grabstates.sty | 69 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 support/splint/tex/grabstates.sty

(limited to 'support/splint/tex/grabstates.sty')

diff --git a/support/splint/tex/grabstates.sty b/support/splint/tex/grabstates.sty
new file mode 100644
index 0000000000..6fa805168a
--- /dev/null
+++ b/support/splint/tex/grabstates.sty
@@ -0,0 +1,69 @@
+% Copyright 2012-2015, 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/>.
+
+\def\optimization{5}
+
+\input yycommon.sty % general routines for stack and array access
+\input yymisc.sty   % helper macros (stack manipulation, table processing, value stack pointers)
+\input yyinput.sty  % input functions
+\input yyparse.sty  % parser machinery
+\input flex.sty     % lexer functions
+\input yyfaststack.sty % sped up stack access functions
+\input yyboth.sty   % parser initialization, optimization
+\input yyunion.sty
+
+\genericparser 
+    name: main, 
+    ptables: cweb/byytab.tex, 
+    ltables: cweb/lstab.tex, 
+    tokens: {}, 
+    asetup: \let\setflexstates\relax, 
+    dsetup: {}, 
+    rsetup: {},
+    optimization: \optimizeall;%
+
+\let\parsernamespace\mainnamespace
+\let\yylexreturn\yylexreturnregular
+
+% main section macro
+
+\let\nx\noexpand
+
+\expandafter\def\csname parserstack[b]\endcsname#1#2{%
+    \basicparserinit\yyparse#1\yyeof\yyeof\endparseinput\endparse
+    \ifyyparsefail % do nothing if parsing failed
+        \yybreak{}%
+    \else % Stage three, process the parsed table
+        \yybreak{%
+            \restorecslist{bootstrap}\yyunion
+            \the\table\relax
+        }%
+    \yycontinue
+}
+
+\expandafter\def\csname parserstack[]\endcsname#1#2{%
+    \basicparserinit\yyparse#1\yyeof\yyeof\endparseinput\endparse
+    \ifyyparsefail % do nothing if parsing failed
+        \yybreak{}%
+    \else % Stage three, process the parsed table
+        \yybreak{%
+            \restorecslist{bootstrap}\yyunion
+            \the\table\relax
+        }%
+    \yycontinue
+}
+
+\newwrite\stlist
-- 
cgit v1.2.3

