summaryrefslogtreecommitdiff
path: root/support/splint/tex/yy.sty
diff options
context:
space:
mode:
Diffstat (limited to 'support/splint/tex/yy.sty')
-rw-r--r--support/splint/tex/yy.sty26
1 files changed, 19 insertions, 7 deletions
diff --git a/support/splint/tex/yy.sty b/support/splint/tex/yy.sty
index 96769a0fc5..cf842ca3b0 100644
--- a/support/splint/tex/yy.sty
+++ b/support/splint/tex/yy.sty
@@ -1,4 +1,4 @@
-% Copyright 2012-2020, Alexander Shibakov
+% Copyright 2012-2024, Alexander Shibakov
% This file is part of SPLinT
%
% SPLinT is free software: you can redistribute it and/or modify
@@ -24,7 +24,6 @@
\def\optimization{0}% created with \csname ... \endcsname
\fi
-\newwrite\tokendefs
\let\nx\noexpand
\input yycommon.sty % general routines for stack and array access
@@ -48,8 +47,9 @@
% 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}}
+\amendswitch\multicharswitch\near\yyeof\by\yyendgame\to\multicharswitch % add a new label
+\replaceaction\multicharswitch\at\yyendgame % replace the new empty action
+ \by{{\yyinput\yyeof\yyeof\endparseinput\removefinalvb}}\to\multicharswitch
\def\indexpseudonamespace{[index]}
@@ -61,11 +61,15 @@
\def\modebootstrap{%
\edef\tokendeffile{\jobname.tok}% so that the name of the token file can track the name of the parser
- \edef\bstrapparser{byytab.tex}% sets \bootstrapmodetrue
+ \ifx\bstrapparser\UNDEFINED\def\bstrapparser{byytab.tex}\fi% sets \bootstrapmodetrue (again)
+ \ifx\bstraptokens\UNDEFINED\def\bstraptokens{}\fi
+ \bootstrapmodetrue % yycommon defines \newif\ifbootstrapmode that sets \ifbootstrapmode to \iffalse
\def\bootstraplexersetup{\let\yylexreturn\yylexreturnbootstrap}% only return tokens whose value is known at bootstrap
\input yybootstrap.sty%
\def\PB##1{}
\def\inlineTeXx##1{}
+ \def\texref##1{}
+ \def\texrefx##1##2{}
}
\def\modenormal{%
@@ -78,8 +82,16 @@
%\def\fgetelemof##1\at##2{% speeds up the lookup
% \csname ##1\parsernamespace\the##2\endcsname
%}%
- \input yyinit.sty%
- \input yytexlex.sty%
+ \input yyinit.sty %
+ \input yytexlex.sty %
+ \input gindex.sty %
+ \input noweb.sty %
+ \xreflocaltrue
+ \let\sectionlistsetup\lxrefseparator
+ \let\inx\inxmod
+ \let\fin\finmod
+ \termindextrue
+ \immediate\openout\gindex=\jobname.gdx
}
\input yydebug.sty