summaryrefslogtreecommitdiff
path: root/support/splint/examples/expression/expression.sty
blob: ac0d8ba7e51be94356817f177b1dc163ac2808b6 (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
% 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/>.

% 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