diff options
Diffstat (limited to 'support/splint/examples/expression/expression.w')
-rw-r--r-- | support/splint/examples/expression/expression.w | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/support/splint/examples/expression/expression.w b/support/splint/examples/expression/expression.w index 9e96ea44d0..1f6a2f6b61 100644 --- a/support/splint/examples/expression/expression.w +++ b/support/splint/examples/expression/expression.w @@ -1,4 +1,4 @@ -@q Copyright 2012-2020, Alexander Shibakov@> +@q Copyright 2012-2024, Alexander Shibakov@> @q This file is part of SPLinT@> @q SPLinT is free software: you can redistribute it and/or modify@> @@ -16,9 +16,12 @@ \input limbo.sty \def\optimization{5} \input yy.sty +\input dcols.sty \modenormal +\initauxstream -@** Parser file. This is an example parser for expressions. It takes +@** Parser file. +This is an example parser for expressions. It takes advantage of some of the features of \splint\ generated parsers, although anything that takes more than a straightforward setup is omitted. @@ -140,8 +143,6 @@ as they have to be inserted in a place that is aware of the internal definitions definitions are used. @<\.{expression} parser \Cee\ postamble@>= -#define YYPRINT(file, type, value) @[yyprint (file, type, value)@] - static void yyprint (FILE *file, int type, YYSTYPE value){} @ Union of types. Empty as well. @@ -175,7 +176,7 @@ int [0-9]+ void define_all_states( void ){} @ @<Lexer options@>= -@G +@G(fs1) %option bison-bridge %option noyywrap nounput noinput reentrant %option noyy_top_state @@ -206,13 +207,14 @@ int [0-9]+ @[TeX_( "/iftracebadchars" );@]@; @[TeX_( " /yycomplain{invalid character(s): /the/yytext}" );@]@; @[TeX_( "/fi" );@]@; - @[TeX_( "/yylexreturn{$undefined}" );@]@; + @[TeX_( "/yyerrterminate" );@]@; @*Test file. The test file includes a handy list of debugging options that can be activated to see the inner workings of the parser and scanner routines. @(test.txx@>= @G +\chardef\other=12 % needed for some macros to work \input expression.sty \iffalse @@ -240,7 +242,7 @@ scanner routines. \bye @g -@**Index. -\immediate\closeout\exampletable +@**Index.\global\let\secrangedisplay\empty% do not show the current section range anymore +\global\topskip=9pt \def\Tex{\TeX\ output} \def\TeXx{\TeX\ output} |