% Copyright 2012-2024, 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/>.

% this example uses the unoptimized version of the stack for testing purposes;
% it does not affect the performance much; if the optimized stack is desired,
% the optimization related code below can be uncommented

%\def\optimization{5}

\input trt1.sty     % \TeX\ `runtime': temporary register definitions
\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

\let\yylexreturn\yylexreturnregular
\let\setflexstates\relax
\let\parsernamespace\empty

\genericparser
   name: emain,
   ptables: ptab.tex,
   ltables: ltab.tex,
   tokens: {},
   asetup: {},
   dsetup: {},
   rsetup: {},
   optimization: %\optimizeall
   ;

\toemainparser