<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% 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 &lt;http://www.gnu.org/licenses/&gt;.

\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)
                    % parser initialization, optimization
\input yyinput.sty  % input functions
\input yyparse.sty  % parser machinery
\input flex.sty     % lexer functions
\input yyfaststack.sty % sped up stack access functions
\input yyunion.sty

\def\yycomplain#1{\immediate\write16{#1}} % lexer errors

% modify the input routine to recognize \yyendgame; the somewhat verbose end of
% the section is necessary to gracefully handle parser failures: the \endparse
% control sequence must appear outside of any \vb block for \cleanupparse
% to do its job; the \yyinput reads \vb blocks in pairs so the closing \vb{} is
% necessary and is removed by \removefinalvb (see limbo.sty and brack.pl for
% details).

\expandafter\def\expandafter\multicharswitch\expandafter
{\multicharswitch\yyendgame{\yyinput\yyeof\yyeof\endparseinput\removefinalvb}}

\genericparser 
    name: grabstates, 
    ptables: cweb/ddptab.tex, % \flex\ secion 1 parser 
    ltables: cweb/ssfstab.tex, % small scanner for \flex\ options
    tokens: {}, 
    asetup: \let\setflexstates\relax, 
    dsetup: {}, 
    rsetup: {},
    optimization: {};%

\let\parsernamespace\grabstatesnamespace
\let\yylexreturn\yylexreturnregular
\def\yyBEGIN#1{\yyerrterminate}

% stage two parsing macros

\let\nx\noexpand

\def\preparsegrabstates{%
    \let\postparse\postparsegrabstates
    \basicparserinit
    \yyparse
}

\def\postparsegrabstates{%
    \ifyyparsefail % do nothing if parsing failed
        \yybreak{}%
    \else % Stage three, process the parsed table
        \yybreak{%
            \restorecslist{bootstrap-flex}\yyflunion % 
            \the\table\relax
        }%
    \yycontinue
}

\fillpstack{fs1}{%
    \preparsegrabstates
    \relax
}

% ignore in text production examples (there is no way or need to parse them anyway)

\long\def\beginprod#1\endprod{}

\let\begincprod\beginprod

\def\nameproc#1\with#2{%
    #2{}{}{}{}{}% pretend the name is empty
}

\def\frexproc#1\with#2{%
    #2{}{}{}% pretend the regex is empty
}

\def\prodstyle#1{}

\newwrite\stlist
</pre></body></html>