summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/syst-aux.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-02-22 20:29:46 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-02-22 20:29:46 +0100
commit7b271baae19db1528fbe6621bdf50af89a5a336b (patch)
tree4fc24a8f2be20aa90e90f6e1bcb62d69f4946235 /tex/context/base/mkiv/syst-aux.mkiv
parent67b9965fe473d18f13ed4c40f1e4e008eb870322 (diff)
downloadcontext-7b271baae19db1528fbe6621bdf50af89a5a336b.tar.gz
2019-02-22 19:43:00
Diffstat (limited to 'tex/context/base/mkiv/syst-aux.mkiv')
-rw-r--r--tex/context/base/mkiv/syst-aux.mkiv1521
1 files changed, 1129 insertions, 392 deletions
diff --git a/tex/context/base/mkiv/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv
index 77f947753..3004c08b8 100644
--- a/tex/context/base/mkiv/syst-aux.mkiv
+++ b/tex/context/base/mkiv/syst-aux.mkiv
@@ -181,12 +181,9 @@
%D These are not needed any more now that we have wide screens (and bytes come
%D cheap).
-\let\@EA \singleexpandafter
-\let\@EAEAEA \doubleexpandafter
-\let\@EAEAEAEAEAEA\tripleexpandafter
-
-\let\@NX \noexpand
-\def\@EAEA {\expandafter\expandafter} % can often be avoided
+\let\@EA \singleexpandafter % obsolete
+\let\@EAEAEA \doubleexpandafter % obsolete
+\let\@EAEAEAEAEAEA\tripleexpandafter % obsolete
%D Sometimes we pass macros as arguments to commands that don't expand them
%D before interpretation. Such commands can be enclosed with \type {\expanded},
@@ -345,6 +342,18 @@
\let\doifnextoptionalelse \doifelsenextoptional
\let\doifnextoptionalcselse\doifelsenextoptionalcs
+% fails on assignments
+%
+% \unexpanded\def\doifelsenextoptional {\afterassignment\doifelsenextoptional_n \def\m_syst_action_yes}
+% \def\doifelsenextoptional_n {\afterassignment\doifelsenextoptional_n_n\def\m_syst_action_nop}
+% \def\doifelsenextoptional_n_n {\let\if_next_blank_space_token\iffalse
+% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
+%
+% \unexpanded\def\doifelsenextoptionalcs {\afterassignment\doifelsenextoptionalcs_n \let\m_syst_action_yes}
+% \def\doifelsenextoptionalcs_n {\afterassignment\doifelsenextoptionalcs_n_n\let\m_syst_action_nop}
+% \def\doifelsenextoptionalcs_n_n{\let\if_next_blank_space_token\iffalse
+% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
+
\def\syst_helpers_inspect_next_optional_character
{\ifx\nexttoken\blankspace
\expandafter\syst_helpers_reinspect_next_optional_character
@@ -491,8 +500,6 @@
%D \type {\def} comes into action. This way the space after \type {\:} becomes a
%D delimiter of the longer named \type {\reinspectnextcharacter}.
-% try: \expandafter\def\firstofoneargument{\syst_helpers_reinspect_next_character} {...}
-
\let\next\:
\def\:{\let\blankspace= } \:
@@ -514,6 +521,31 @@
\let\:\next
+%D This is much nicer and works too:
+
+% \def\firstofoneargument#1{#1}
+%
+% \expandafter\let\firstofoneargument{\blankspace= }
+%
+% \expandafter\def\firstofoneargument{\syst_helpers_reinspect_next_character
+% } {\let\if_next_blank_space_token\iftrue
+% \futurelet\nexttoken\syst_helpers_inspect_next_character}
+%
+% \expandafter\def\firstofoneargument{\syst_helpers_reinspect_next_optional_character
+% } {\let\if_next_blank_space_token\iftrue
+% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
+%
+% \expandafter\def\firstofoneargument{\syst_helpers_reinspect_next_bgroup_character
+% } {\let\if_next_blank_space_token\iftrue
+% \futurelet\nexttoken\syst_helpers_inspect_next_bgroup_character}
+%
+% \expandafter\def\firstofoneargument{\syst_helpers_reinspect_next_parenthesis_character
+% } {\let\if_next_blank_space_token\iftrue
+% \futurelet\nexttoken\syst_helpers_inspect_next_parenthesis_character}
+%
+% \expandafter\def\firstofoneargument{\syst_helpers_ignore_spacing_blankspace
+% } {\futurelet\nexttoken\syst_helpers_ignore_spacing}
+
%D \macros
%D {setvalue,setgvalue,setevalue,setxvalue,
%D letvalue,letgvalue,getvalue,resetvalue,
@@ -529,7 +561,7 @@
%D \setevalue {name}{...} = \edef\name{...}
%D \setxvalue {name}{...} = \xdef\name{...}
%D \letvalue {name}=\... = \let\name=\...
-%D \letgvalue {name}=\... = \global\let\name=\...
+%D \letgvalue {name}=\... = \glet\name=\...
%D \getvalue {name} = \name
%D \resetvalue {name} = \def\name{}
%D \stoptyping
@@ -537,16 +569,16 @@
%D As we will see, \CONTEXT\ uses these commands many times, which is mainly due to
%D its object oriented and parameter driven character.
-\def\setvalue #1{\expandafter \def\csname#1\endcsname}
+\def\setvalue #1{\expandafter\def \csname#1\endcsname}
\def\setgvalue #1{\expandafter\gdef\csname#1\endcsname}
\def\setevalue #1{\expandafter\edef\csname#1\endcsname}
\def\setxvalue #1{\expandafter\xdef\csname#1\endcsname}
-\def\getvalue #1{\csname#1\endcsname}
-\def\letvalue #1{\expandafter\let\csname#1\endcsname}
-\def\letgvalue #1{\global\expandafter\let\csname#1\endcsname}
-\def\resetvalue #1{\expandafter\let\csname#1\endcsname\empty}
-\def\undefinevalue#1{\expandafter\let\csname#1\endcsname\undefined}
-\def\ignorevalue#1#2{\expandafter\let\csname#1\endcsname\empty}
+\def\getvalue #1{\csname#1\endcsname} % maybe: \begincsname#1\endcsname
+\def\letvalue #1{\expandafter\let \csname#1\endcsname}
+\def\letgvalue #1{\expandafter\glet\csname#1\endcsname}
+\def\resetvalue #1{\expandafter\let \csname#1\endcsname\empty}
+\def\undefinevalue#1{\expandafter\let \csname#1\endcsname\undefined}
+\def\ignorevalue#1#2{\expandafter\let \csname#1\endcsname\empty}
\def\setuvalue #1{\normalprotected\expandafter \def\csname#1\endcsname}
\def\setuevalue #1{\normalprotected\expandafter\edef\csname#1\endcsname}
@@ -562,7 +594,7 @@
%D tokens will save us some $300\times4=1200$ bytes of format file on a 32~bit
%D system. Not that it matters much today. This shortcut is already defined:
-\unexpanded\def\glet{\global\let} \let\globallet\glet
+\let\globallet\glet
%D \macros
%D {doifundefined,doifdefined,
@@ -635,7 +667,7 @@
{\ifcsname#1\endcsname\expandafter\let\csname#1\endcsname\undefined\fi}
\def\globalundefine#1% conditional
- {\ifcsname#1\endcsname\expandafter\global\let\csname#1\endcsname\undefined\fi}
+ {\ifcsname#1\endcsname\expandafter\glet\csname#1\endcsname\undefined\fi}
%D Beware, being \type {\undefined} in \ETEX\ means that the macro {\em is} defined!
%D
@@ -705,6 +737,23 @@
\expandafter\secondoftwoarguments
\fi}
+%D Slightly faster on longer arguments (0.179 downto 0.141):
+%D
+%D \testfeatureonce{100000}{\doifelse{aaaaaaaaaaaaaaa}{bbbbbbbbbbbbbbb}\relax\relax}
+
+% \unexpanded\def\doifelse
+% {\afterassignment\doifelse_n\edef\m_syst_string_one}
+%
+% \unexpanded\def\doifelse_n
+% {\afterassignment\doifelse_n_n\edef\m_syst_string_two}
+%
+% \unexpanded\def\doifelse_n_n
+% {\ifx\m_syst_string_one\m_syst_string_two
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+
%D \macros
%D {doifempty,doifemptyelse,doifnotempty}
%D
@@ -912,6 +961,7 @@
\unexpanded\def\doifelseinset#1#2{\clf_doifelseinset{#1}{#2}}
\unexpanded\def\doifinset #1#2{\clf_doifinset {#1}{#2}}
\unexpanded\def\doifnotinset #1#2{\clf_doifnotinset {#1}{#2}}
+ % \let\firstinset \clf_firstinset
\let\doifinsetelse\doifelseinset
@@ -1348,7 +1398,7 @@
%D
%D Sometimes the action to be undertaken depends on the
%D next character. This macro get this character and puts it in
-%D \type{\firstcharacter}.
+%D \type {\firstcharacter}.
%D
%D \starttyping
%D \getfirstcharacter {string}
@@ -2243,202 +2293,517 @@
% \dotripleempty\test[] xxx\par
% \dotripleempty\test xxx\par
+%D Common:
+
+\newtoks\t_syst_aux
+
+% \def\syst_helpers_empty_spaced_six {\expandafter\m_syst_aux_do\the\t_syst_aux[][][][][][] }
+% \def\syst_helpers_empty_normal_six {\expandafter\m_syst_aux_do\the\t_syst_aux[][][][][][]}
+% \def\syst_helpers_empty_spaced_five {\expandafter\m_syst_aux_do\the\t_syst_aux[][][][][] }
+% \def\syst_helpers_empty_normal_five {\expandafter\m_syst_aux_do\the\t_syst_aux[][][][][]}
+% \def\syst_helpers_empty_spaced_four {\expandafter\m_syst_aux_do\the\t_syst_aux[][][][] }
+% \def\syst_helpers_empty_normal_four {\expandafter\m_syst_aux_do\the\t_syst_aux[][][][]}
+% \def\syst_helpers_empty_spaced_three{\expandafter\m_syst_aux_do\the\t_syst_aux[][][] }
+% \def\syst_helpers_empty_normal_three{\expandafter\m_syst_aux_do\the\t_syst_aux[][][]}
+% \def\syst_helpers_empty_spaced_two {\expandafter\m_syst_aux_do\the\t_syst_aux[][] }
+% \def\syst_helpers_empty_normal_two {\expandafter\m_syst_aux_do\the\t_syst_aux[][]}
+% \def\syst_helpers_empty_spaced_one {\expandafter\m_syst_aux_do\the\t_syst_aux[] }
+% \def\syst_helpers_empty_normal_one {\expandafter\m_syst_aux_do\the\t_syst_aux[]}
+%
+% \def\syst_helpers_single_empty_one_yes {\firstargumenttrue \m_syst_aux_do}
+% \def\syst_helpers_double_empty_two_yes {\secondargumenttrue \expandafter\m_syst_aux_do\the\t_syst_aux}
+% \def\syst_helpers_triple_empty_three_yes {\thirdargumenttrue \expandafter\m_syst_aux_do\the\t_syst_aux}
+% \def\syst_helpers_quadruple_empty_four_yes {\fourthargumenttrue \expandafter\m_syst_aux_do\the\t_syst_aux}
+% \def\syst_helpers_quintuple_empty_five_yes {\fifthargumenttrue \expandafter\m_syst_aux_do\the\t_syst_aux}
+% \def\syst_helpers_sixtuple_empty_six_yes {\sixthargumenttrue \expandafter\m_syst_aux_do\the\t_syst_aux}
+% \def\syst_helpers_seventuple_empty_seven_yes{\seventhargumenttrue\expandafter\m_syst_aux_do\the\t_syst_aux}
+%
+% with
+%
+% \unexpanded\def\dodoubleempty#1%
+% {\syst_helpers_argument_reset
+% \let\m_syst_aux_do#1% alias
+% \let\m_syst_action_yes\syst_helpers_double_empty_one_yes
+% \let\m_syst_action_nop\syst_helpers_double_empty_one_nop
+% \let\if_next_blank_space_token\iffalse
+% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
+%
+% \def\syst_helpers_double_empty_one_yes[#1]%
+% {\firstargumenttrue
+% \t_syst_aux{[{#1}]}% assignment
+% \let\m_syst_action_yes\syst_helpers_double_empty_two_yes
+% \let\m_syst_action_nop\syst_helpers_double_empty_two_nop
+% \let\if_next_blank_space_token\iffalse
+% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
+%
+% But we use this as it keeps the original name visible:
+
+\def\syst_helpers_empty_spaced_six {\the\t_syst_aux[][][][][][] }
+\def\syst_helpers_empty_normal_six {\the\t_syst_aux[][][][][][]}
+\def\syst_helpers_empty_spaced_five {\the\t_syst_aux[][][][][] }
+\def\syst_helpers_empty_normal_five {\the\t_syst_aux[][][][][]}
+\def\syst_helpers_empty_spaced_four {\the\t_syst_aux[][][][] }
+\def\syst_helpers_empty_normal_four {\the\t_syst_aux[][][][]}
+\def\syst_helpers_empty_spaced_three{\the\t_syst_aux[][][] }
+\def\syst_helpers_empty_normal_three{\the\t_syst_aux[][][]}
+\def\syst_helpers_empty_spaced_two {\the\t_syst_aux[][] }
+\def\syst_helpers_empty_normal_two {\the\t_syst_aux[][]}
+\def\syst_helpers_empty_spaced_one {\the\t_syst_aux[] }
+\def\syst_helpers_empty_normal_one {\the\t_syst_aux[]}
+
+\def\syst_helpers_single_empty_one_yes {\firstargumenttrue \the\t_syst_aux}
+\def\syst_helpers_double_empty_two_yes {\secondargumenttrue \the\t_syst_aux}
+\def\syst_helpers_triple_empty_three_yes {\thirdargumenttrue \the\t_syst_aux}
+\def\syst_helpers_quadruple_empty_four_yes {\fourthargumenttrue \the\t_syst_aux}
+\def\syst_helpers_quintuple_empty_five_yes {\fifthargumenttrue \the\t_syst_aux}
+\def\syst_helpers_sixtuple_empty_six_yes {\sixthargumenttrue \the\t_syst_aux}
+\def\syst_helpers_seventuple_empty_seven_yes{\seventhargumenttrue\the\t_syst_aux}
+
%D Single:
+% \unexpanded\def\dosingleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\firstargumenttrue#1}%
+% {\syst_helpers_single_empty_one_nop#1}}
+%
+% \def\syst_helpers_single_empty_one_nop#1%
+% {\firstargumentfalse
+% #1[]}
+
\unexpanded\def\dosingleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\firstargumenttrue#1}%
- {\syst_helpers_single_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_single_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_single_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_single_empty_one_nop#1%
+\def\syst_helpers_single_empty_one_nop
{\firstargumentfalse
- #1[]}
+ \the\t_syst_aux[]}
%D Double
+% \unexpanded\def\dodoubleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\syst_helpers_double_empty_one_yes#1}%
+% {\syst_helpers_double_empty_one_nop#1}}
+%
+% \def\syst_helpers_double_empty_one_yes#1[#2]%
+% {\firstargumenttrue
+% \doifelsenextoptional
+% {\secondargumenttrue#1[{#2}]}%
+% {\syst_helpers_double_empty_two_nop#1{#2}}}
+%
+% \def\syst_helpers_double_empty_one_nop#1%
+% {\firstargumentfalse
+% \secondargumentfalse
+% #1[][]}
+%
+% \def\syst_helpers_double_empty_two_nop
+% {\secondargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_double_empty_one_spaced
+% \else
+% \expandafter\syst_helpers_double_empty_one_normal
+% \fi}
+%
+% \def\syst_helpers_double_empty_one_spaced#1#2{#1[{#2}][] }
+% \def\syst_helpers_double_empty_one_normal#1#2{#1[{#2}][]}
+
\unexpanded\def\dodoubleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\syst_helpers_double_empty_one_yes#1}%
- {\syst_helpers_double_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_double_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_double_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_double_empty_one_yes#1[#2]%
+\def\syst_helpers_double_empty_one_yes[#1]%
{\firstargumenttrue
- \doifelsenextoptional
- {\secondargumenttrue#1[{#2}]}%
- {\syst_helpers_double_empty_two_nop#1{#2}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_double_empty_two_yes
+ \let\m_syst_action_nop\syst_helpers_double_empty_two_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_double_empty_one_nop#1%
+\def\syst_helpers_double_empty_one_nop
{\firstargumentfalse
\secondargumentfalse
- #1[][]}
+ \the\t_syst_aux[][]}
\def\syst_helpers_double_empty_two_nop
{\secondargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_double_empty_one_spaced
+ \expandafter\syst_helpers_empty_spaced_one
\else
- \expandafter\syst_helpers_double_empty_one_normal
+ \expandafter\syst_helpers_empty_normal_one
\fi}
-\def\syst_helpers_double_empty_one_spaced#1#2{#1[{#2}][] }
-\def\syst_helpers_double_empty_one_normal#1#2{#1[{#2}][]}
+% Triple
-% Three
+% \unexpanded\def\dotripleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\syst_helpers_triple_empty_one_yes#1}%
+% {\syst_helpers_triple_empty_one_nop#1}}
+%
+% \def\syst_helpers_triple_empty_one_yes#1[#2]%
+% {\firstargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_triple_empty_two_yes#1{#2}}%
+% {\syst_helpers_triple_empty_two_nop#1{#2}}}
+%
+% \def\syst_helpers_triple_empty_two_yes#1#2[#3]%
+% {\secondargumenttrue
+% \doifelsenextoptional
+% {\thirdargumenttrue#1[{#2}][{#3}]}%
+% {\syst_helpers_triple_empty_three_nop#1{#2}{#3}}}
+%
+% \def\syst_helpers_triple_empty_one_nop#1%
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% #1[][][]}
+%
+% \def\syst_helpers_triple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_triple_empty_two_spaced
+% \else
+% \expandafter\syst_helpers_triple_empty_two_normal
+% \fi}
+%
+% \def\syst_helpers_triple_empty_three_nop
+% {\thirdargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_triple_empty_three_spaced
+% \else
+% \expandafter\syst_helpers_triple_empty_three_normal
+% \fi}
+%
+% \def\syst_helpers_triple_empty_two_spaced #1#2{#1[{#2}][][] }
+% \def\syst_helpers_triple_empty_two_normal #1#2{#1[{#2}][][]}
+% \def\syst_helpers_triple_empty_three_spaced#1#2#3{#1[{#2}][{#3}][] }
+% \def\syst_helpers_triple_empty_three_normal#1#2#3{#1[{#2}][{#3}][]}
\unexpanded\def\dotripleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\syst_helpers_triple_empty_one_yes#1}%
- {\syst_helpers_triple_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_triple_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_triple_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_triple_empty_one_yes#1[#2]%
+\def\syst_helpers_triple_empty_one_yes[#1]%
{\firstargumenttrue
- \doifelsenextoptional
- {\syst_helpers_triple_empty_two_yes#1{#2}}%
- {\syst_helpers_triple_empty_two_nop#1{#2}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_triple_empty_two_yes
+ \let\m_syst_action_nop\syst_helpers_triple_empty_two_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_triple_empty_two_yes#1#2[#3]%
+\def\syst_helpers_triple_empty_two_yes[#1]%
{\secondargumenttrue
- \doifelsenextoptional
- {\thirdargumenttrue#1[{#2}][{#3}]}%
- {\syst_helpers_triple_empty_three_nop#1{#2}{#3}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_triple_empty_three_yes
+ \let\m_syst_action_nop\syst_helpers_triple_empty_three_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_triple_empty_one_nop#1%
+\def\syst_helpers_triple_empty_one_nop
{\firstargumentfalse
\secondargumentfalse
\thirdargumentfalse
- #1[][][]}
+ \the\t_syst_aux[][][]}
\def\syst_helpers_triple_empty_two_nop
{\secondargumentfalse
\thirdargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_triple_empty_two_spaced
+ \expandafter\syst_helpers_empty_spaced_two
\else
- \expandafter\syst_helpers_triple_empty_two_normal
+ \expandafter\syst_helpers_empty_normal_two
\fi}
\def\syst_helpers_triple_empty_three_nop
{\thirdargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_triple_empty_three_spaced
+ \expandafter\syst_helpers_empty_spaced_one
\else
- \expandafter\syst_helpers_triple_empty_three_normal
+ \expandafter\syst_helpers_empty_normal_one
\fi}
-\def\syst_helpers_triple_empty_two_spaced #1#2{#1[{#2}][][] }
-\def\syst_helpers_triple_empty_two_normal #1#2{#1[{#2}][][]}
-\def\syst_helpers_triple_empty_three_spaced#1#2#3{#1[{#2}][{#3}][] }
-\def\syst_helpers_triple_empty_three_normal#1#2#3{#1[{#2}][{#3}][]}
+%D Quadruple:
-%D Four:
+% \unexpanded\def\doquadrupleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\syst_helpers_quadruple_empty_one_yes#1}%
+% {\syst_helpers_quadruple_empty_one_nop#1}}
+%
+% \def\syst_helpers_quadruple_empty_one_yes#1[#2]%
+% {\firstargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_quadruple_empty_two_yes#1{#2}}%
+% {\syst_helpers_quadruple_empty_two_nop#1{#2}}}
+%
+% \def\syst_helpers_quadruple_empty_two_yes#1#2[#3]%
+% {\secondargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_quadruple_empty_three_yes#1{#2}{#3}}%
+% {\syst_helpers_quadruple_empty_three_nop#1{#2}{#3}}}
+%
+% \def\syst_helpers_quadruple_empty_three_yes#1#2#3[#4]%
+% {\thirdargumenttrue
+% \doifelsenextoptional
+% {\fourthargumenttrue#1[{#2}][{#3}][{#4}]}%
+% {\syst_helpers_quadruple_empty_four_nop#1{#2}{#3}{#4}}}
+%
+% \def\syst_helpers_quadruple_empty_one_nop#1%
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% #1[][][][]}
+%
+% \def\syst_helpers_quadruple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quadruple_empty_two_spaced
+% \else
+% \expandafter\syst_helpers_quadruple_empty_two_normal
+% \fi}
+%
+% \def\syst_helpers_quadruple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quadruple_empty_three_spaced
+% \else
+% \expandafter\syst_helpers_quadruple_empty_three_normal
+% \fi}
+%
+% \def\syst_helpers_quadruple_empty_four_nop
+% {\fourthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quadruple_empty_four_spaced
+% \else
+% \expandafter\syst_helpers_quadruple_empty_four_normal
+% \fi}
+%
+% \def\syst_helpers_quadruple_empty_two_spaced #1#2{#1[{#2}][][][] }
+% \def\syst_helpers_quadruple_empty_two_normal #1#2{#1[{#2}][][][]}
+% \def\syst_helpers_quadruple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][] }
+% \def\syst_helpers_quadruple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][]}
+% \def\syst_helpers_quadruple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][] }
+% \def\syst_helpers_quadruple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][]}
\unexpanded\def\doquadrupleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\syst_helpers_quadruple_empty_one_yes#1}%
- {\syst_helpers_quadruple_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_quadruple_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_quadruple_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quadruple_empty_one_yes#1[#2]%
+\def\syst_helpers_quadruple_empty_one_yes[#1]%
{\firstargumenttrue
- \doifelsenextoptional
- {\syst_helpers_quadruple_empty_two_yes#1{#2}}%
- {\syst_helpers_quadruple_empty_two_nop#1{#2}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quadruple_empty_two_yes
+ \let\m_syst_action_nop\syst_helpers_quadruple_empty_two_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quadruple_empty_two_yes#1#2[#3]%
+\def\syst_helpers_quadruple_empty_two_yes[#1]%
{\secondargumenttrue
- \doifelsenextoptional
- {\syst_helpers_quadruple_empty_three_yes#1{#2}{#3}}%
- {\syst_helpers_quadruple_empty_three_nop#1{#2}{#3}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quadruple_empty_three_yes
+ \let\m_syst_action_nop\syst_helpers_quadruple_empty_three_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quadruple_empty_three_yes#1#2#3[#4]%
+\def\syst_helpers_quadruple_empty_three_yes[#1]%
{\thirdargumenttrue
- \doifelsenextoptional
- {\fourthargumenttrue#1[{#2}][{#3}][{#4}]}%
- {\syst_helpers_quadruple_empty_four_nop#1{#2}{#3}{#4}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quadruple_empty_four_yes
+ \let\m_syst_action_nop\syst_helpers_quadruple_empty_four_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quadruple_empty_one_nop#1%
+\def\syst_helpers_quadruple_empty_one_nop
{\firstargumentfalse
\secondargumentfalse
\thirdargumentfalse
\fourthargumentfalse
- #1[][][][]}
+ \the\t_syst_aux[][][][]}
\def\syst_helpers_quadruple_empty_two_nop
{\secondargumentfalse
\thirdargumentfalse
\fourthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quadruple_empty_two_spaced
+ \expandafter\syst_helpers_empty_spaced_three
\else
- \expandafter\syst_helpers_quadruple_empty_two_normal
+ \expandafter\syst_helpers_empty_normal_three
\fi}
\def\syst_helpers_quadruple_empty_three_nop
{\thirdargumentfalse
\fourthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quadruple_empty_three_spaced
+ \expandafter\syst_helpers_empty_spaced_two
\else
- \expandafter\syst_helpers_quadruple_empty_three_normal
+ \expandafter\syst_helpers_empty_normal_two
\fi}
\def\syst_helpers_quadruple_empty_four_nop
{\fourthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quadruple_empty_four_spaced
+ \expandafter\syst_helpers_empty_spaced_one
\else
- \expandafter\syst_helpers_quadruple_empty_four_normal
+ \expandafter\syst_helpers_empty_normal_one
\fi}
-\def\syst_helpers_quadruple_empty_two_spaced #1#2{#1[{#2}][][][] }
-\def\syst_helpers_quadruple_empty_two_normal #1#2{#1[{#2}][][][]}
-\def\syst_helpers_quadruple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][] }
-\def\syst_helpers_quadruple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][]}
-\def\syst_helpers_quadruple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][] }
-\def\syst_helpers_quadruple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][]}
+%D Quintuple:
-%D Five:
+% \unexpanded\def\doquintupleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\syst_helpers_quintuple_empty_one_yes#1}%
+% {\syst_helpers_quintuple_empty_one_nop#1}}
+%
+% \def\syst_helpers_quintuple_empty_one_yes#1[#2]%
+% {\firstargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_quintuple_empty_two_yes#1{#2}}%
+% {\syst_helpers_quintuple_empty_two_nop#1{#2}}}
+%
+% \def\syst_helpers_quintuple_empty_two_yes#1#2[#3]%
+% {\secondargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_quintuple_empty_three_yes#1{#2}{#3}}%
+% {\syst_helpers_quintuple_empty_three_nop#1{#2}{#3}}}
+%
+% \def\syst_helpers_quintuple_empty_three_yes#1#2#3[#4]%
+% {\thirdargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_quintuple_empty_four_yes#1{#2}{#3}{#4}}%
+% {\syst_helpers_quintuple_empty_four_nop#1{#2}{#3}{#4}}}
+%
+% \def\syst_helpers_quintuple_empty_four_yes#1#2#3#4[#5]%
+% {\fourthargumenttrue
+% \doifelsenextoptional
+% {\fifthargumenttrue#1[{#2}][{#3}][{#4}][{#5}]}%
+% {\syst_helpers_quintuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}
+%
+% \def\syst_helpers_quintuple_empty_one_nop#1%
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% #1[][][][][]}
+%
+% \def\syst_helpers_quintuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quintuple_empty_two_spaced
+% \else
+% \expandafter\syst_helpers_quintuple_empty_two_normal
+% \fi}
+%
+% \def\syst_helpers_quintuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quintuple_empty_three_spaced
+% \else
+% \expandafter\syst_helpers_quintuple_empty_three_normal
+% \fi}
+%
+% \def\syst_helpers_quintuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quintuple_empty_four_spaced
+% \else
+% \expandafter\syst_helpers_quintuple_empty_four_normal
+% \fi}
+%
+% \def\syst_helpers_quintuple_empty_five_nop
+% {\fifthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_quintuple_empty_five_spaced
+% \else
+% \expandafter\syst_helpers_quintuple_empty_five_normal
+% \fi}
+%
+% \def\syst_helpers_quintuple_empty_two_spaced #1#2{#1[{#2}][][][][] }
+% \def\syst_helpers_quintuple_empty_two_normal #1#2{#1[{#2}][][][][]}
+% \def\syst_helpers_quintuple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][][] }
+% \def\syst_helpers_quintuple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][][]}
+% \def\syst_helpers_quintuple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][][] }
+% \def\syst_helpers_quintuple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][][]}
+% \def\syst_helpers_quintuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][] }
+% \def\syst_helpers_quintuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][]}
\unexpanded\def\doquintupleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\syst_helpers_quintuple_empty_one_yes#1}%
- {\syst_helpers_quintuple_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_quintuple_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_quintuple_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quintuple_empty_one_yes#1[#2]%
+\def\syst_helpers_quintuple_empty_one_yes[#1]%
{\firstargumenttrue
- \doifelsenextoptional
- {\syst_helpers_quintuple_empty_two_yes#1{#2}}%
- {\syst_helpers_quintuple_empty_two_nop#1{#2}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quintuple_empty_two_yes
+ \let\m_syst_action_nop\syst_helpers_quintuple_empty_two_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quintuple_empty_two_yes#1#2[#3]%
+\def\syst_helpers_quintuple_empty_two_yes[#1]%
{\secondargumenttrue
- \doifelsenextoptional
- {\syst_helpers_quintuple_empty_three_yes#1{#2}{#3}}%
- {\syst_helpers_quintuple_empty_three_nop#1{#2}{#3}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quintuple_empty_three_yes
+ \let\m_syst_action_nop\syst_helpers_quintuple_empty_three_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quintuple_empty_three_yes#1#2#3[#4]%
+\def\syst_helpers_quintuple_empty_three_yes[#1]%
{\thirdargumenttrue
- \doifelsenextoptional
- {\syst_helpers_quintuple_empty_four_yes#1{#2}{#3}{#4}}%
- {\syst_helpers_quintuple_empty_four_nop#1{#2}{#3}{#4}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quintuple_empty_four_yes
+ \let\m_syst_action_nop\syst_helpers_quintuple_empty_four_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quintuple_empty_four_yes#1#2#3#4[#5]%
+\def\syst_helpers_quintuple_empty_four_yes[#1]%
{\fourthargumenttrue
- \doifelsenextoptional
- {\fifthargumenttrue#1[{#2}][{#3}][{#4}][{#5}]}%
- {\syst_helpers_quintuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_quintuple_empty_five_yes
+ \let\m_syst_action_nop\syst_helpers_quintuple_empty_five_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_quintuple_empty_one_nop#1%
+\def\syst_helpers_quintuple_empty_one_nop
{\firstargumentfalse
\secondargumentfalse
\thirdargumentfalse
\fourthargumentfalse
\fifthargumentfalse
- #1[][][][][]}
+ \the\t_syst_aux[][][][][]}
\def\syst_helpers_quintuple_empty_two_nop
{\secondargumentfalse
@@ -2446,9 +2811,9 @@
\fourthargumentfalse
\fifthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quintuple_empty_two_spaced
+ \expandafter\syst_helpers_empty_spaced_four
\else
- \expandafter\syst_helpers_quintuple_empty_two_normal
+ \expandafter\syst_helpers_empty_normal_four
\fi}
\def\syst_helpers_quintuple_empty_three_nop
@@ -2456,83 +2821,192 @@
\fourthargumentfalse
\fifthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quintuple_empty_three_spaced
+ \expandafter\syst_helpers_empty_spaced_three
\else
- \expandafter\syst_helpers_quintuple_empty_three_normal
+ \expandafter\syst_helpers_empty_normal_three
\fi}
\def\syst_helpers_quintuple_empty_four_nop
{\fourthargumentfalse
\fifthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quintuple_empty_four_spaced
+ \expandafter\syst_helpers_empty_spaced_two
\else
- \expandafter\syst_helpers_quintuple_empty_four_normal
+ \expandafter\syst_helpers_empty_normal_two
\fi}
\def\syst_helpers_quintuple_empty_five_nop
{\fifthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_quintuple_empty_five_spaced
+ \expandafter\syst_helpers_empty_spaced_one
\else
- \expandafter\syst_helpers_quintuple_empty_five_normal
+ \expandafter\syst_helpers_empty_normal_one
\fi}
-\def\syst_helpers_quintuple_empty_two_spaced #1#2{#1[{#2}][][][][] }
-\def\syst_helpers_quintuple_empty_two_normal #1#2{#1[{#2}][][][][]}
-\def\syst_helpers_quintuple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][][] }
-\def\syst_helpers_quintuple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][][]}
-\def\syst_helpers_quintuple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][][] }
-\def\syst_helpers_quintuple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][][]}
-\def\syst_helpers_quintuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][] }
-\def\syst_helpers_quintuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][]}
+%D Sixtuple:
-%D Six
+% \unexpanded\def\dosixtupleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\syst_helpers_sixtuple_empty_one_yes#1}
+% {\syst_helpers_sixtuple_empty_one_nop#1}}
+%
+% \def\syst_helpers_sixtuple_empty_one_yes#1[#2]%
+% {\firstargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_sixtuple_empty_two_yes#1{#2}}%
+% {\syst_helpers_sixtuple_empty_two_nop#1{#2}}}
+%
+% \def\syst_helpers_sixtuple_empty_two_yes#1#2[#3]%
+% {\secondargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_sixtuple_empty_three_yes#1{#2}{#3}}%
+% {\syst_helpers_sixtuple_empty_three_nop#1{#2}{#3}}}
+%
+% \def\syst_helpers_sixtuple_empty_three_yes#1#2#3[#4]%
+% {\thirdargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_sixtuple_empty_four_yes#1{#2}{#3}{#4}}%
+% {\syst_helpers_sixtuple_empty_four_nop#1{#2}{#3}{#4}}}
+%
+% \def\syst_helpers_sixtuple_empty_four_yes#1#2#3#4[#5]%
+% {\fourthargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_sixtuple_empty_five_yes#1{#2}{#3}{#4}{#5}}%
+% {\syst_helpers_sixtuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}
+%
+% \def\syst_helpers_sixtuple_empty_five_yes#1#2#3#4#5[#6]%
+% {\fifthargumenttrue
+% \doifelsenextoptional
+% {\sixthargumenttrue#1[{#2}][{#3}][{#4}][{#5}][{#6}]}%
+% {\syst_helpers_sixtuple_empty_six_nop#1{#2}{#3}{#4}{#5}{#6}}}
+%
+% \def\syst_helpers_sixtuple_empty_one_nop#1%
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% #1[][][][][][]}
+%
+% \def\syst_helpers_sixtuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_sixtuple_empty_two_spaced
+% \else
+% \expandafter\syst_helpers_sixtuple_empty_two_normal
+% \fi}
+%
+% \def\syst_helpers_sixtuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_sixtuple_empty_three_spaced
+% \else
+% \expandafter\syst_helpers_sixtuple_empty_three_normal
+% \fi}
+%
+% \def\syst_helpers_sixtuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_sixtuple_empty_four_spaced
+% \else
+% \expandafter\syst_helpers_sixtuple_empty_four_normal
+% \fi}
+%
+% \def\syst_helpers_sixtuple_empty_five_nop
+% {\fifthargumentfalse
+% \sixthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_sixtuple_empty_five_spaced
+% \else
+% \expandafter\syst_helpers_sixtuple_empty_five_normal
+% \fi}
+%
+% \def\syst_helpers_sixtuple_empty_six_nop
+% {\sixthargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_sixtuple_empty_six_spaced
+% \else
+% \expandafter\syst_helpers_sixtuple_empty_six_normal
+% \fi}
+%
+% \def\syst_helpers_sixtuple_empty_two_spaced #1#2{#1[{#2}][][][][][] }
+% \def\syst_helpers_sixtuple_empty_two_normal #1#2{#1[{#2}][][][][][]}
+% \def\syst_helpers_sixtuple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][][][] }
+% \def\syst_helpers_sixtuple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][][][]}
+% \def\syst_helpers_sixtuple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][][][] }
+% \def\syst_helpers_sixtuple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][][][]}
+% \def\syst_helpers_sixtuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][] }
+% \def\syst_helpers_sixtuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][]}
+% \def\syst_helpers_sixtuple_empty_six_spaced #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][] }
+% \def\syst_helpers_sixtuple_empty_six_normal #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][]}
\unexpanded\def\dosixtupleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\syst_helpers_sixtuple_empty_one_yes#1}
- {\syst_helpers_sixtuple_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_sixtuple_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_sixtuple_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_sixtuple_empty_one_yes#1[#2]%
+\def\syst_helpers_sixtuple_empty_one_yes[#1]%
{\firstargumenttrue
- \doifelsenextoptional
- {\syst_helpers_sixtuple_empty_two_yes#1{#2}}%
- {\syst_helpers_sixtuple_empty_two_nop#1{#2}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_sixtuple_empty_two_yes
+ \let\m_syst_action_nop\syst_helpers_sixtuple_empty_two_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_sixtuple_empty_two_yes#1#2[#3]%
+\def\syst_helpers_sixtuple_empty_two_yes[#1]%
{\secondargumenttrue
- \doifelsenextoptional
- {\syst_helpers_sixtuple_empty_three_yes#1{#2}{#3}}%
- {\syst_helpers_sixtuple_empty_three_nop#1{#2}{#3}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_sixtuple_empty_three_yes
+ \let\m_syst_action_nop\syst_helpers_sixtuple_empty_three_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_sixtuple_empty_three_yes#1#2#3[#4]%
+\def\syst_helpers_sixtuple_empty_three_yes[#1]%
{\thirdargumenttrue
- \doifelsenextoptional
- {\syst_helpers_sixtuple_empty_four_yes#1{#2}{#3}{#4}}%
- {\syst_helpers_sixtuple_empty_four_nop#1{#2}{#3}{#4}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_sixtuple_empty_four_yes
+ \let\m_syst_action_nop\syst_helpers_sixtuple_empty_four_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_sixtuple_empty_four_yes#1#2#3#4[#5]%
+\def\syst_helpers_sixtuple_empty_four_yes[#1]%
{\fourthargumenttrue
- \doifelsenextoptional
- {\syst_helpers_sixtuple_empty_five_yes#1{#2}{#3}{#4}{#5}}%
- {\syst_helpers_sixtuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_sixtuple_empty_five_yes
+ \let\m_syst_action_nop\syst_helpers_sixtuple_empty_five_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_sixtuple_empty_five_yes#1#2#3#4#5[#6]%
+\def\syst_helpers_sixtuple_empty_five_yes[#1]%
{\fifthargumenttrue
- \doifelsenextoptional
- {\sixthargumenttrue#1[{#2}][{#3}][{#4}][{#5}][{#6}]}%
- {\syst_helpers_sixtuple_empty_six_nop#1{#2}{#3}{#4}{#5}{#6}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_sixtuple_empty_six_yes
+ \let\m_syst_action_nop\syst_helpers_sixtuple_empty_six_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_sixtuple_empty_one_nop#1%
+\def\syst_helpers_sixtuple_empty_one_nop
{\firstargumentfalse
\secondargumentfalse
\thirdargumentfalse
\fourthargumentfalse
\fifthargumentfalse
\sixthargumentfalse
- #1[][][][][][]}
+ \the\t_syst_aux[][][][][][]}
\def\syst_helpers_sixtuple_empty_two_nop
{\secondargumentfalse
@@ -2541,9 +3015,9 @@
\fifthargumentfalse
\sixthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_sixtuple_empty_two_spaced
+ \expandafter\syst_helpers_empty_spaced_five
\else
- \expandafter\syst_helpers_sixtuple_empty_two_normal
+ \expandafter\syst_helpers_empty_normal_five
\fi}
\def\syst_helpers_sixtuple_empty_three_nop
@@ -2552,9 +3026,9 @@
\fifthargumentfalse
\sixthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_sixtuple_empty_three_spaced
+ \expandafter\syst_helpers_empty_spaced_four
\else
- \expandafter\syst_helpers_sixtuple_empty_three_normal
+ \expandafter\syst_helpers_empty_normal_four
\fi}
\def\syst_helpers_sixtuple_empty_four_nop
@@ -2562,84 +3036,215 @@
\fifthargumentfalse
\sixthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_sixtuple_empty_four_spaced
+ \expandafter\syst_helpers_empty_spaced_three
\else
- \expandafter\syst_helpers_sixtuple_empty_four_normal
+ \expandafter\syst_helpers_empty_normal_three
\fi}
\def\syst_helpers_sixtuple_empty_five_nop
{\fifthargumentfalse
\sixthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_sixtuple_empty_five_spaced
+ \expandafter\syst_helpers_empty_spaced_two
\else
- \expandafter\syst_helpers_sixtuple_empty_five_normal
+ \expandafter\syst_helpers_empty_normal_two
\fi}
\def\syst_helpers_sixtuple_empty_six_nop
{\sixthargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_sixtuple_empty_six_spaced
+ \expandafter\syst_helpers_empty_spaced_one
\else
- \expandafter\syst_helpers_sixtuple_empty_six_normal
+ \expandafter\syst_helpers_empty_normal_one
\fi}
-\def\syst_helpers_sixtuple_empty_two_spaced #1#2{#1[{#2}][][][][][] }
-\def\syst_helpers_sixtuple_empty_two_normal #1#2{#1[{#2}][][][][][]}
-\def\syst_helpers_sixtuple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][][][] }
-\def\syst_helpers_sixtuple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][][][]}
-\def\syst_helpers_sixtuple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][][][] }
-\def\syst_helpers_sixtuple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][][][]}
-\def\syst_helpers_sixtuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][] }
-\def\syst_helpers_sixtuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][]}
-\def\syst_helpers_sixtuple_empty_six_spaced #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][] }
-\def\syst_helpers_sixtuple_empty_six_normal #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][]}
+%D Seventuple:
-%D Seven:
+% \unexpanded\def\doseventupleempty#1%
+% {\syst_helpers_argument_reset
+% \doifelsenextoptional
+% {\syst_helpers_seventuple_empty_one_yes#1}%
+% {\syst_helpers_seventuple_empty_one_nop#1}}
+%
+% \def\syst_helpers_seventuple_empty_one_yes#1[#2]%
+% {\firstargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_seventuple_empty_two_yes#1{#2}}%
+% {\syst_helpers_seventuple_empty_two_nop#1{#2}}}
+%
+% \def\syst_helpers_seventuple_empty_two_yes#1#2[#3]%
+% {\secondargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_seventuple_empty_three_yes#1{#2}{#3}}%
+% {\syst_helpers_seventuple_empty_three_nop#1{#2}{#3}}}
+%
+% \def\syst_helpers_seventuple_empty_three_yes#1#2#3[#4]%
+% {\thirdargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_seventuple_empty_four_yes#1{#2}{#3}{#4}}%
+% {\syst_helpers_seventuple_empty_four_nop#1{#2}{#3}{#4}}}
+%
+% \def\syst_helpers_seventuple_empty_four_yes#1#2#3#4[#5]%
+% {\fourthargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_seventuple_empty_five_yes#1{#2}{#3}{#4}{#5}}%
+% {\syst_helpers_seventuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}
+%
+% \def\syst_helpers_seventuple_empty_five_yes#1#2#3#4#5[#6]%
+% {\fifthargumenttrue
+% \doifelsenextoptional
+% {\syst_helpers_seventuple_empty_six_yes#1{#2}{#3}{#4}{#5}{#6}}%
+% {\syst_helpers_seventuple_empty_six_nop#1{#2}{#3}{#4}{#5}{#6}}}
+%
+% \def\syst_helpers_seventuple_empty_six_yes#1#2#3#4#5#6[#7]%
+% {\sixthargumenttrue
+% \doifelsenextoptional
+% {\seventhargumenttrue#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}]}%
+% {\syst_helpers_seventuple_empty_seven_nop#1{#2}{#3}{#4}{#5}{#6}{#7}}}
+%
+% \def\syst_helpers_seventuple_empty_one_nop#1%
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% #1[][][][][][][]}
+%
+% \def\syst_helpers_seventuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_seventuple_empty_two_spaced
+% \else
+% \expandafter\syst_helpers_seventuple_empty_two_normal
+% \fi}
+%
+% \def\syst_helpers_seventuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_seventuple_empty_three_spaced
+% \else
+% \expandafter\syst_helpers_seventuple_empty_three_normal
+% \fi}
+%
+% \def\syst_helpers_seventuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_seventuple_empty_four_spaced
+% \else
+% \expandafter\syst_helpers_seventuple_empty_four_normal
+% \fi}
+%
+% \def\syst_helpers_seventuple_empty_five_nop
+% {\fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_seventuple_empty_five_spaced
+% \else
+% \expandafter\syst_helpers_seventuple_empty_five_normal
+% \fi}
+%
+% \def\syst_helpers_seventuple_empty_six_nop
+% {\sixthargumentfalse
+% \seventhargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_seventuple_empty_six_spaced
+% \else
+% \expandafter\syst_helpers_seventuple_empty_six_normal
+% \fi}
+%
+% \def\syst_helpers_seventuple_empty_seven_nop
+% {\seventhargumentfalse
+% \if_next_blank_space_token
+% \expandafter\syst_helpers_seventuple_empty_seven_spaced
+% \else
+% \expandafter\syst_helpers_seventuple_empty_seven_normal
+% \fi}
+%
+% \def\syst_helpers_seventuple_empty_two_spaced #1#2{#1[{#2}][][][][][][] }
+% \def\syst_helpers_seventuple_empty_two_normal #1#2{#1[{#2}][][][][][][]}
+% \def\syst_helpers_seventuple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][][][][] }
+% \def\syst_helpers_seventuple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][][][][]}
+% \def\syst_helpers_seventuple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][][][][] }
+% \def\syst_helpers_seventuple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][][][][]}
+% \def\syst_helpers_seventuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][] }
+% \def\syst_helpers_seventuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][]}
+% \def\syst_helpers_seventuple_empty_six_spaced #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][] }
+% \def\syst_helpers_seventuple_empty_six_normal #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][]}
+% \def\syst_helpers_seventuple_empty_seven_spaced#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][] }
+% \def\syst_helpers_seventuple_empty_seven_normal#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]}
\unexpanded\def\doseventupleempty#1%
{\syst_helpers_argument_reset
- \doifelsenextoptional
- {\syst_helpers_seventuple_empty_one_yes#1}%
- {\syst_helpers_seventuple_empty_one_nop#1}}
+ \t_syst_aux{#1}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_one_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_one_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_one_yes#1[#2]%
+\def\syst_helpers_seventuple_empty_one_yes[#1]%
{\firstargumenttrue
- \doifelsenextoptional
- {\syst_helpers_seventuple_empty_two_yes#1{#2}}%
- {\syst_helpers_seventuple_empty_two_nop#1{#2}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_two_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_two_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_two_yes#1#2[#3]%
+\def\syst_helpers_seventuple_empty_two_yes[#1]%
{\secondargumenttrue
- \doifelsenextoptional
- {\syst_helpers_seventuple_empty_three_yes#1{#2}{#3}}%
- {\syst_helpers_seventuple_empty_three_nop#1{#2}{#3}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_three_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_three_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_three_yes#1#2#3[#4]%
+\def\syst_helpers_seventuple_empty_three_yes[#1]%
{\thirdargumenttrue
- \doifelsenextoptional
- {\syst_helpers_seventuple_empty_four_yes#1{#2}{#3}{#4}}%
- {\syst_helpers_seventuple_empty_four_nop#1{#2}{#3}{#4}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_four_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_four_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_four_yes#1#2#3#4[#5]%
+\def\syst_helpers_seventuple_empty_four_yes[#1]%
{\fourthargumenttrue
- \doifelsenextoptional
- {\syst_helpers_seventuple_empty_five_yes#1{#2}{#3}{#4}{#5}}%
- {\syst_helpers_seventuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_five_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_five_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_five_yes#1#2#3#4#5[#6]%
+\def\syst_helpers_seventuple_empty_five_yes[#1]%
{\fifthargumenttrue
- \doifelsenextoptional
- {\syst_helpers_seventuple_empty_six_yes#1{#2}{#3}{#4}{#5}{#6}}%
- {\syst_helpers_seventuple_empty_six_nop#1{#2}{#3}{#4}{#5}{#6}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_six_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_six_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_six_yes#1#2#3#4#5#6[#7]%
+\def\syst_helpers_seventuple_empty_six_yes[#1]%
{\sixthargumenttrue
- \doifelsenextoptional
- {\seventhargumenttrue#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}]}%
- {\syst_helpers_seventuple_empty_seven_nop#1{#2}{#3}{#4}{#5}{#6}{#7}}}
+ \toksapp\t_syst_aux{[{#1}]}%
+ \let\m_syst_action_yes\syst_helpers_seventuple_empty_seven_yes
+ \let\m_syst_action_nop\syst_helpers_seventuple_empty_seven_nop
+ \let\if_next_blank_space_token\iffalse
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\syst_helpers_seventuple_empty_one_nop#1%
+\def\syst_helpers_seventuple_empty_one_nop
{\firstargumentfalse
\secondargumentfalse
\thirdargumentfalse
@@ -2647,7 +3252,7 @@
\fifthargumentfalse
\sixthargumentfalse
\seventhargumentfalse
- #1[][][][][][][]}
+ \the\t_syst_aux[][][][][][][]}
\def\syst_helpers_seventuple_empty_two_nop
{\secondargumentfalse
@@ -2657,9 +3262,9 @@
\sixthargumentfalse
\seventhargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_seventuple_empty_two_spaced
+ \expandafter\syst_helpers_empty_spaced_six
\else
- \expandafter\syst_helpers_seventuple_empty_two_normal
+ \expandafter\syst_helpers_empty_normal_six
\fi}
\def\syst_helpers_seventuple_empty_three_nop
@@ -2669,9 +3274,9 @@
\sixthargumentfalse
\seventhargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_seventuple_empty_three_spaced
+ \expandafter\syst_helpers_empty_spaced_five
\else
- \expandafter\syst_helpers_seventuple_empty_three_normal
+ \expandafter\syst_helpers_empty_normal_five
\fi}
\def\syst_helpers_seventuple_empty_four_nop
@@ -2680,9 +3285,9 @@
\sixthargumentfalse
\seventhargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_seventuple_empty_four_spaced
+ \expandafter\syst_helpers_empty_spaced_four
\else
- \expandafter\syst_helpers_seventuple_empty_four_normal
+ \expandafter\syst_helpers_empty_normal_four
\fi}
\def\syst_helpers_seventuple_empty_five_nop
@@ -2690,40 +3295,29 @@
\sixthargumentfalse
\seventhargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_seventuple_empty_five_spaced
+ \expandafter\syst_helpers_empty_spaced_three
\else
- \expandafter\syst_helpers_seventuple_empty_five_normal
+ \expandafter\syst_helpers_empty_normal_three
\fi}
\def\syst_helpers_seventuple_empty_six_nop
{\sixthargumentfalse
\seventhargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_seventuple_empty_six_spaced
+ \expandafter\syst_helpers_empty_spaced_two
\else
- \expandafter\syst_helpers_seventuple_empty_six_normal
+ \expandafter\syst_helpers_empty_normal_two
\fi}
\def\syst_helpers_seventuple_empty_seven_nop
{\seventhargumentfalse
\if_next_blank_space_token
- \expandafter\syst_helpers_seventuple_empty_seven_spaced
+ \expandafter\syst_helpers_empty_spaced_one
\else
- \expandafter\syst_helpers_seventuple_empty_seven_normal
+ \expandafter\syst_helpers_empty_normal_one
\fi}
-\def\syst_helpers_seventuple_empty_two_spaced #1#2{#1[{#2}][][][][][][] }
-\def\syst_helpers_seventuple_empty_two_normal #1#2{#1[{#2}][][][][][][]}
-\def\syst_helpers_seventuple_empty_three_spaced #1#2#3{#1[{#2}][{#3}][][][][][] }
-\def\syst_helpers_seventuple_empty_three_normal #1#2#3{#1[{#2}][{#3}][][][][][]}
-\def\syst_helpers_seventuple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][][][][] }
-\def\syst_helpers_seventuple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][][][][]}
-\def\syst_helpers_seventuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][] }
-\def\syst_helpers_seventuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][]}
-\def\syst_helpers_seventuple_empty_six_spaced #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][] }
-\def\syst_helpers_seventuple_empty_six_normal #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][]}
-\def\syst_helpers_seventuple_empty_seven_spaced#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][] }
-\def\syst_helpers_seventuple_empty_seven_normal#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]}
+%D Aliases:
\let\dosingleargument \dosingleempty
\let\dodoubleargument \dodoubleempty
@@ -2900,7 +3494,7 @@
\begingroup
\def\\ {\syst_helpers_get_grouped_argument\syst_helpers_get_grouped_argument_yes\syst_helpers_get_grouped_argument_nop}
- \global\let\syst_helpers_get_grouped_argument_e\\
+ \glet\syst_helpers_get_grouped_argument_e\\
\endgroup
\def\syst_helpers_get_grouped_argument_f
@@ -3031,13 +3625,13 @@
%D
%D Trivial:
-\unexpanded\def\letempty #1{\let#1\empty}
-\unexpanded\def\globalletempty#1{\global\let#1\empty}
+\unexpanded\def\letempty #1{\let #1\empty}
+\unexpanded\def\globalletempty#1{\glet#1\empty}
-\unexpanded\def\letvalueempty #1{\expandafter\let\csname#1\endcsname\empty}
-\unexpanded\def\letgvalueempty#1{\global\expandafter\let\csname#1\endcsname\empty}
-\unexpanded\def\letvaluerelax #1{\expandafter\let\csname#1\endcsname\relax}
-\unexpanded\def\letgvalurelax #1{\global\expandafter\let\csname#1\endcsname\relax}
+\unexpanded\def\letvalueempty #1{\expandafter\let \csname#1\endcsname\empty}
+\unexpanded\def\letgvalueempty#1{\expandafter\glet\csname#1\endcsname\empty}
+\unexpanded\def\letvaluerelax #1{\expandafter\let \csname#1\endcsname\relax}
+\unexpanded\def\letgvalurelax #1{\expandafter\glet\csname#1\endcsname\relax}
\unexpanded\def\relaxvalueifundefined#1%
{\ifcsname#1\endcsname \else
@@ -3183,17 +3777,25 @@
%D Apart from the prefixes, a few more \type{\expandafters}
%D are needed:
-\unexpanded\def\newif#1%
- {\privatescratchcounter\escapechar
- \escapechar\minusone
- \expandafter\expandafter\expandafter
- \redoglobal\expandafter\expandafter\expandafter
- \edef\@if#1{true}{\let\noexpand#1\noexpand\iftrue}%
- \expandafter\expandafter\expandafter
- \redoglobal\expandafter\expandafter\expandafter
- \edef\@if#1{false}{\let\noexpand#1\noexpand\iffalse}%
- \dodoglobal\@if#1{false}%
- \escapechar\privatescratchcounter}
+% \unexpanded\def\newif#1% uses the original plain \@if
+% {\privatescratchcounter\escapechar
+% \escapechar\minusone
+% \expandafter\expandafter\expandafter
+% \redoglobal\expandafter\expandafter\expandafter
+% \edef\@if#1{true}{\let\noexpand#1\noexpand\iftrue}%
+% \expandafter\expandafter\expandafter
+% \redoglobal\expandafter\expandafter\expandafter
+% \edef\@if#1{false}{\let\noexpand#1\noexpand\iffalse}%
+% \dodoglobal\@if#1{false}%
+% \escapechar\privatescratchcounter}
+
+\normalprotected\def\newif#1% see syst-ini.mkiv
+ {\let\new_if_saved\newif
+ \let\newif\new_if_check
+ \expandafter\redoglobal\expandafter\def\csname\expandafter\newif\csstring#1true\endcsname {\let#1\iftrue }%
+ \expandafter\redoglobal\expandafter\def\csname\expandafter\newif\csstring#1false\endcsname{\let#1\iffalse}%
+ \dodoglobal\csname\expandafter\newif\csstring#1false\endcsname
+ \let\newif\new_if_saved}
%D Also new:
@@ -3245,7 +3847,7 @@
% \bgroup \obeylines
%
-% \global\let\stoptexdefinition\relax
+% \glet\stoptexdefinition\relax
%
% \unexpanded\gdef\starttexdefinition%
% {\bgroup%
@@ -3302,7 +3904,7 @@
% \bgroup \obeylines
%
-% \global\let\stoptexdefinition\relax
+% \glet\stoptexdefinition\relax
%
% \unexpanded\gdef\starttexdefinition%
% {\bgroup%
@@ -3321,7 +3923,7 @@
\bgroup \obeylines
-\global\let\stoptexdefinition\relax
+\glet\stoptexdefinition\relax
\unexpanded\gdef\starttexdefinition%
{\bgroup%
@@ -3538,8 +4140,8 @@
\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
{\global\advance\outerrecurse \plusone
- \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname{#4}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#4}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\ifnum#3>\zerocount\relax
\ifnum#2<#1\relax
\let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
@@ -3567,7 +4169,7 @@
\fi\expandafter{\the\numexpr\recurselevel+#3\relax}{#2}{#3}}
\unexpanded\def\syst_helpers_recurse_content
- {\csname\??recurseaction\recursedepth\endcsname}
+ {\csname\??recurseaction\the\outerrecurse\endcsname}
\unexpanded\def\syst_helpers_stepwise_recurse_yes
{\syst_helpers_recurse_content
@@ -3591,11 +4193,11 @@
{\syst_helpers_stepwise_recurse_nop\relax}
\unexpanded\def\syst_helpers_stepwise_recurse_nop#1#2#3#4%
- {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\recursedepth\endcsname
+ {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse\minusone}
% \unexpanded\def\nonostepwiserecurse#1#2#3%
-% {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\recursedepth\endcsname
+% {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
% \global\advance\outerrecurse\minusone}
\unexpanded\def\dorecurse#1%
@@ -3636,16 +4238,16 @@
\unexpanded\def\syst_helpers_recurse_x#1#2%
{\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\recursedepth\endcsname{#2}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#2}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}}
\unexpanded\def\syst_helpers_recurse_y#1#2%
{\global\advance\outerrecurse \plusone
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\glet\csname\??recurseindex\the\outerrecurse\endcsname\recurselevel
\let\recurselevel\!!plusone
#2%
- \expandafter\let\expandafter\recurselevel\csname\??recurseindex\recursedepth\endcsname
+ \expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse \minusone}
\unexpanded\def\syst_helpers_recurse_indeed#1#2% from to
@@ -3670,7 +4272,7 @@
\syst_helpers_recurse_indeed}
\unexpanded\def\syst_helpers_recurse_indeed_nop#1#2#3%
- {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\recursedepth\endcsname
+ {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse \minusone }
%D \macros
@@ -3708,8 +4310,8 @@
\unexpanded\def\doloop#1%
{\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\recursedepth\endcsname{#1}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#1}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\let\endofloop\syst_helpers_loop
\syst_helpers_loop1} % no \plusone else \recurselevel wrong
@@ -3723,7 +4325,7 @@
\unexpanded\def\syst_helpers_loop_nop#1%
{\let\endofloop\syst_helpers_loop % new, permits nested \doloop's
- \expandafter\let\expandafter\recurselevel\csname\??recurseindex\recursedepth\endcsname
+ \expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse\minusone}
\unexpanded\def\exitloop % \exitloop quits at end
@@ -3771,59 +4373,61 @@
%D \stoptyping
\def\syst_helpers_recurse_content
- {\csname\??recurseaction\recursedepth\expandafter\expandafter\expandafter\endcsname
- \expandafter\expandafter\expandafter{\expandafter\recurselevel\expandafter}\expandafter{\recursedepth}}
+ {\csname\??recurseaction\the\outerrecurse\expandafter\expandafter\expandafter\endcsname
+ \expandafter\expandafter\expandafter{\expandafter\recurselevel\expandafter}\expandafter{\the\outerrecurse}}
\unexpanded\def\syst_helpers_recurse_x#1#2%
{\global\advance\outerrecurse \plusone
- \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#2}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#2}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}}
\unexpanded\def\syst_helpers_recurse_y#1#2%
{\global\advance\outerrecurse \plusone
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\let\recurselevel\!!plusone
- \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#2}%
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#2}%
\syst_helpers_recurse_content
- \expandafter\let\expandafter\recurselevel\csname\??recurseindex\recursedepth\endcsname
+ \expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse \minusone}
-\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
- {\global\advance\outerrecurse \plusone
- \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#4}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
- \ifnum#3>\zerocount\relax
- \ifnum#2<#1\relax
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
- \else
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_recurse
- \fi
- \else
- \ifnum#3<\zerocount\relax
- \ifnum#1<#2\relax
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
- \else
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_reverse
- \fi
- \else
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
- \fi
- \fi\normalexpanded{\syst_helpers_stepwise_next{\number#1}{\number#2}{\number#3}}}
-
\unexpanded\def\doloop#1%
{\global\advance\outerrecurse \plusone
- \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#1}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#1}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\let\endofloop\syst_helpers_loop
\syst_helpers_loop1} % no \plusone else \recurselevel wrong
-% faster
-
+% for instance:
+%
+% \unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+% {\global\advance\outerrecurse \plusone
+% \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
+% \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
+% \ifnum#3>\zerocount\relax
+% \ifnum#2<#1\relax
+% \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
+% \else
+% \let\syst_helpers_stepwise_next\syst_helpers_stepwise_recurse
+% \fi
+% \else
+% \ifnum#3<\zerocount\relax
+% \ifnum#1<#2\relax
+% \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
+% \else
+% \let\syst_helpers_stepwise_next\syst_helpers_stepwise_reverse
+% \fi
+% \else
+% \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
+% \fi
+% \fi\normalexpanded{\syst_helpers_stepwise_next{\number#1}{\number#2}{\number#3}}}
+%
+% faster:
+%
% \unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
% {\global\advance\outerrecurse \plusone
-% \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#4}%
-% \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+% \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
+% \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
% \csname @swr%
% \ifnum#3>\zerocount
% \ifnum#2<#1\else d\fi
@@ -3831,17 +4435,19 @@
% \ifnum#1<#2\else r\fi
% \fi\fi
% \expandafter\endcsname\normalexpanded{{\number#1}{\number#2}{\number#3}}}
-
+%
% \let\@swr \syst_helpers_stepwise_exit
% \let\@swrd\syst_helpers_stepwise_recurse
% \let\@swrr\syst_helpers_stepwise_reverse
+%
+% nicer:
\installsystemnamespace{recursestepwise}
\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
{\global\advance\outerrecurse \plusone
- \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#4}%
- \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\csname\??recursestepwise
% we need the x in order to avoid the \relax that tex adds
\ifnum#3>\zerocount
@@ -3860,8 +4466,8 @@
%
% \def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
% {\global\advance\outerrecurse \plusone
-% \global\expandafter\def\csname\??recurseaction\recursedepth\endcsname##1##2{#4}%
-% \global\expandafter\let\csname\??recurseindex\recursedepth\endcsname\recurselevel
+% \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
+% \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
% \normalexpanded
% {\ifnum#3>\zerocount
% \ifnum#2<#1
@@ -3936,10 +4542,10 @@
\unexpanded\def\doloopoverlist#1#2%
{\global\advance\outerrecurse\plusone
- \expandafter\gdef\csname\??recurseaction\recursedepth\endcsname##1{\edef\recursestring{##1}#2}%
- \expandafter\glet\csname\??recurseindex\recursedepth\endcsname\recursestring
- \normalexpanded{\processcommalist[#1]{\expandafter\noexpand\csname\??recurseaction\recursedepth\endcsname}}%
- \expandafter\let\expandafter\recursestring\csname\??recurseindex\recursedepth\endcsname
+ \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1{\edef\recursestring{##1}#2}%
+ \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recursestring
+ \normalexpanded{\processcommalist[#1]{\expandafter\noexpand\csname\??recurseaction\the\outerrecurse\endcsname}}%
+ \expandafter\let\expandafter\recursestring\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse\minusone}
%D \macros
@@ -4113,14 +4719,22 @@
\def\syst_helpers_check_if_assignment_else#1=#2#3\_e_o_p_{\if#2@}%
-\unexpanded\def\doifelseassignment#1% expandable
+\unexpanded\def\doifelseassignment#1%
{\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=@@\_e_o_p_
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
\fi}
-\let\doifassignmentelse\doifelseassignment
+\unexpanded\def\doifelseassignmentcs#1#2#3%
+ {\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=@@\_e_o_p_
+ \expandafter#3%
+ \else
+ \expandafter#2%
+ \fi}
+
+\let\doifassignmentelse \doifelseassignment
+\let\doifassignmentelsecs\doifelseassignmentcs
\newif\ifassignment
@@ -4415,16 +5029,14 @@
%D \def\doezomaarwat#1{....#1....}
%D \stoptyping
%D
-%D A disadvantage of this approach is that the tokens that
-%D form \type{#1} are fixed the the moment the argument is read
-%D in. Normally this is no problem, but for instance verbatim
-%D environments adapt the \CATCODES\ of characters and therefore
+%D A disadvantage of this approach is that the tokens that form \type{#1} are fixed
+%D the the moment the argument is read in. Normally this is no problem, but for
+%D instance verbatim environments adapt the \CATCODES\ of characters and therefore
%D are not always happy with already fixed tokens.
%D
-%D Another problem arises when the argument is grouped not by
-%D \type{{}} but by \type{\bgroup} and \type{\egroup}. Such an
-%D argument fails, because the \type{\bgroup} is een as the
-%D argument (which is quite normal).
+%D Another problem arises when the argument is grouped not by \type {{}} but by
+%D \type {\bgroup} and \type {\egroup}. Such an argument fails, because the \type
+%D {\bgroup} is een as the argument (which is quite normal).
%D
%D The next macro offers a solution for both unwanted
%D situations:
@@ -4454,9 +5066,8 @@
%D .......... \rightword{the right way}
%D \stoptyping
%D
-%D Here \TEX\ typesets \type{\bf the right way} unbreakable
-%D at the end of the line. The solution mentioned before does
-%D not work here. We also handle
+%D Here \TEX\ typesets \type {\bf the right way} unbreakable at the end of the line.
+%D The solution mentioned before does not work here. We also handle
%D
%D \starttyping
%D to be \bold{bold} or not, that's the question
@@ -4485,80 +5096,150 @@
% \afterassignment\m_syst_helpers_handle_group_before
% \let\next=}
-\unexpanded\def\syst_helpers_handle_group_normal#1#2%
+% \unexpanded\def\syst_helpers_handle_group_normal#1#2%
+% {\bgroup
+% \def\m_syst_helpers_handle_group_before{#1}%
+% \def\m_syst_helpers_handle_group_after {#2}%
+% \afterassignment\m_syst_helpers_handle_group_normal_before
+% \let\next=}
+%
+% \def\m_syst_helpers_handle_group_normal_before
+% {\bgroup
+% \m_syst_helpers_handle_group_before
+% \bgroup
+% \aftergroup\m_syst_helpers_handle_group_normal_after}
+%
+% \def\m_syst_helpers_handle_group_normal_after
+% {\m_syst_helpers_handle_group_after
+% \egroup
+% \egroup}
+%
+% \unexpanded\def\syst_helpers_handle_group_simple#1#2% no inner group (so no kerning interference)
+% {\bgroup
+% \def\m_syst_helpers_handle_group_before{#1}%
+% \def\m_syst_helpers_handle_group_after {#2}%
+% \afterassignment\m_syst_helpers_handle_group_simple_before
+% \let\next=}
+%
+% \def\m_syst_helpers_handle_group_simple_before
+% {\bgroup
+% \aftergroup\m_syst_helpers_handle_group_simple_after
+% \m_syst_helpers_handle_group_before}
+%
+% \def\m_syst_helpers_handle_group_simple_after
+% {\m_syst_helpers_handle_group_after
+% \egroup}%
+%
+% \unexpanded\def\syst_helpers_handle_group_pickup#1#2#3% no inner group (so no kerning interference)
+% {\bgroup
+% \def\m_syst_helpers_handle_group_before{#1}%
+% \def\m_syst_helpers_handle_group_after {#2\egroup#3}%
+% \afterassignment\m_syst_helpers_handle_group_pickup_before
+% \let\next=}
+%
+% \def\m_syst_helpers_handle_group_pickup_before
+% {\bgroup
+% \aftergroup\m_syst_helpers_handle_group_after
+% \m_syst_helpers_handle_group_before}
+%
+% \unexpanded\def\syst_helpers_handle_group_nop
+% {\ifnum\currentgrouptype=\semisimplegroupcode
+% \expandafter\syst_helpers_handle_group_nop_a
+% \else
+% \expandafter\syst_helpers_handle_group_nop_b
+% \fi}
+%
+% \def\syst_helpers_handle_group_nop_a#1#2%
+% {\def\m_syst_helpers_handle_group_after{#2\endgroup}%
+% \begingroup
+% \aftergroup\m_syst_helpers_handle_group_after
+% #1}
+%
+% \def\syst_helpers_handle_group_nop_b#1#2%
+% {\def\m_syst_helpers_handle_group_after{#2\egroup}%
+% \bgroup
+% \aftergroup\m_syst_helpers_handle_group_after
+% #1}
+
+\unexpanded\def\syst_helpers_handle_group_nop
+ {\ifnum\currentgrouptype=\semisimplegroupcode
+ \expandafter\syst_helpers_handle_group_nop_a
+ \else
+ \expandafter\syst_helpers_handle_group_nop_b
+ \fi}
+
+\def\syst_helpers_handle_group_nop_a
+ {\begingroup
+ \aftergroup\m_syst_helpers_handle_group_a
+ \aftergroup\endgroup
+ \m_syst_helpers_handle_group_b}
+
+\def\syst_helpers_handle_group_nop_b
+ {\bgroup
+ \aftergroup\m_syst_helpers_handle_group_a
+ \aftergroup\egroup
+ \m_syst_helpers_handle_group_b}
+
+\unexpanded\def\syst_helpers_handle_group_normal
{\bgroup
- \def\m_syst_helpers_handle_group_before{#1}%
- \def\m_syst_helpers_handle_group_after {#2}%
\afterassignment\m_syst_helpers_handle_group_normal_before
\let\next=}
\def\m_syst_helpers_handle_group_normal_before
{\bgroup
- \m_syst_helpers_handle_group_before
+ \m_syst_helpers_handle_group_b
\bgroup
- \aftergroup\m_syst_helpers_handle_group_normal_after}
-
-\def\m_syst_helpers_handle_group_normal_after
- {\m_syst_helpers_handle_group_after
- \egroup
- \egroup}
-
-% keep:
-%
-% \unexpanded\def\syst_helpers_handle_group_simple#1#2% no inner group (so no kerning interference)
-% {\bgroup
-% %def\m_syst_helpers_handle_group_before{\bgroup#1\aftergroup\m_syst_helpers_handle_group_after}% interferes
-% \def\m_syst_helpers_handle_group_before{\bgroup\aftergroup\m_syst_helpers_handle_group_after#1}%
-% \def\m_syst_helpers_handle_group_after {#2\egroup}%
-% \afterassignment\m_syst_helpers_handle_group_before
-% \let\next=}
+ \aftergroup\m_syst_helpers_handle_group_a
+ \aftergroup\egroup
+ \aftergroup\egroup}
-\unexpanded\def\syst_helpers_handle_group_simple#1#2% no inner group (so no kerning interference)
+\unexpanded\def\syst_helpers_handle_group_simple% no inner group (so no kerning interference)
{\bgroup
- \def\m_syst_helpers_handle_group_before{#1}%
- \def\m_syst_helpers_handle_group_after {#2}%
\afterassignment\m_syst_helpers_handle_group_simple_before
\let\next=}
\def\m_syst_helpers_handle_group_simple_before
{\bgroup
\aftergroup\m_syst_helpers_handle_group_simple_after
- \m_syst_helpers_handle_group_before}
+ \m_syst_helpers_handle_group_b}
\def\m_syst_helpers_handle_group_simple_after
- {\m_syst_helpers_handle_group_after
+ {\m_syst_helpers_handle_group_a
\egroup}%
-\unexpanded\def\syst_helpers_handle_group_pickup#1#2#3% no inner group (so no kerning interference)
+\unexpanded\def\syst_helpers_handle_group_pickup% no inner group (so no kerning interference)
{\bgroup
- \def\m_syst_helpers_handle_group_before{#1}%
- \def\m_syst_helpers_handle_group_after {#2\egroup#3}%
\afterassignment\m_syst_helpers_handle_group_pickup_before
\let\next=}
\def\m_syst_helpers_handle_group_pickup_before
{\bgroup
- \aftergroup\m_syst_helpers_handle_group_after
- \m_syst_helpers_handle_group_before}
+ \aftergroup\m_syst_helpers_handle_group_a
+ \aftergroup\egroup
+ \aftergroup\m_syst_helpers_handle_group_p
+ \m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_nop
+\unexpanded\def\syst_helpers_handle_group_nop_x
{\ifnum\currentgrouptype=\semisimplegroupcode
- \expandafter\syst_helpers_handle_group_nop_a
+ \begingroup
+ \aftergroup\endgroup
\else
- \expandafter\syst_helpers_handle_group_nop_b
- \fi}
+ \bgroup
+ \aftergroup\egroup
+ \fi
+ \m_syst_helpers_handle_group_b}
-\def\syst_helpers_handle_group_nop_a#1#2%
- {\def\m_syst_helpers_handle_group_after{#2\endgroup}%
- \begingroup
- \aftergroup\m_syst_helpers_handle_group_after
- #1}
+\unexpanded\def\syst_helpers_handle_group_normal_x
+ {\bgroup
+ \afterassignment\m_syst_helpers_handle_group_normal_before_x
+ \let\next=}
-\def\syst_helpers_handle_group_nop_b#1#2%
- {\def\m_syst_helpers_handle_group_after{#2\egroup}%
+\def\m_syst_helpers_handle_group_normal_before_x
+ {\bgroup
+ \m_syst_helpers_handle_group_b
\bgroup
- \aftergroup\m_syst_helpers_handle_group_after
- #1}
+ \aftergroup\egroup
+ \aftergroup\egroup}
%D I considered it a nuisance that
%D
@@ -4567,25 +5248,61 @@
%D {as grass}
%D \stoptyping
%D
-%D was not interpreted as one would expect. This is due to the
-%D fact that \type{\futurelet} obeys blank spaces, and a
-%D line||ending token is treated as a blank space. So the final
-%D implementation became:
+%D was not interpreted as one would expect. This is due to the fact that \type
+%D {\futurelet} obeys blank spaces, and a line||ending token is treated as a blank
+%D space. So the final implementation became:
+
+% \unexpanded\def\groupedcommand#1#2%
+% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
+%
+% \unexpanded\def\groupedcommandcs#1#2%
+% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
+%
+% \unexpanded\def\triggergroupedcommand#1%
+% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{}}{\syst_helpers_handle_group_nop{#1}{}}}
+%
+% \unexpanded\def\triggergroupedcommandcs#1%
+% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{}}{\syst_helpers_handle_group_nop{#1}{}}}
+%
+% \unexpanded\def\simplegroupedcommand#1#2%
+% {\doifelsenextbgroup{\syst_helpers_handle_group_simple{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
+%
+% \unexpanded\def\pickupgroupedcommand#1#2#3%
+% {\doifelsenextbgroup{\syst_helpers_handle_group_pickup{#1}{#2}{#3}}{\syst_helpers_handle_group_nop{#1}{#2}}}
\unexpanded\def\groupedcommand#1#2%
- {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
+ {\def\m_syst_helpers_handle_group_b{#1}%
+ \def\m_syst_helpers_handle_group_a{#2}%
+ \doifelsenextbgroupcs\syst_helpers_handle_group_normal\syst_helpers_handle_group_nop}
+
+\unexpanded\def\groupedcommandcs#1#2%
+ {\let\m_syst_helpers_handle_group_b#1%
+ \let\m_syst_helpers_handle_group_a#2%
+ \doifelsenextbgroupcs\syst_helpers_handle_group_normal\syst_helpers_handle_group_nop}
\unexpanded\def\simplegroupedcommand#1#2%
- {\doifelsenextbgroup{\syst_helpers_handle_group_simple{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
+ {\def\m_syst_helpers_handle_group_b{#1}%
+ \def\m_syst_helpers_handle_group_a{#2}%
+ \doifelsenextbgroupcs\syst_helpers_handle_group_simple\syst_helpers_handle_group_nop}
\unexpanded\def\pickupgroupedcommand#1#2#3%
- {\doifelsenextbgroup{\syst_helpers_handle_group_pickup{#1}{#2}{#3}}{\syst_helpers_handle_group_nop{#1}{#2}}}
+ {\def\m_syst_helpers_handle_group_b{#1}%
+ \def\m_syst_helpers_handle_group_a{#2}%
+ \def\m_syst_helpers_handle_group_p{#2}%
+ \doifelsenextbgroupcs\syst_helpers_handle_group_pickup\syst_helpers_handle_group_nop}
-%D Users should be aware of the fact that grouping can
-%D interfere with ones paragraph settings that are executed
-%D after the paragraph is closed. One should therefore
-%D explictly close the paragraph with \type{\par}, else the
-%D settings will be forgotten and not applied. So it's:
+\unexpanded\def\triggergroupedcommand#1%
+ {\def\m_syst_helpers_handle_group_b{#1}%
+ \doifelsenextbgroupcs\syst_helpers_handle_group_normal_x\syst_helpers_handle_group_nop_x}
+
+\unexpanded\def\triggergroupedcommandcs#1%
+ {\let\m_syst_helpers_handle_group_b#1%
+ \doifelsenextbgroupcs\syst_helpers_handle_group_normal_x\syst_helpers_handle_group_nop_x}
+
+%D Users should be aware of the fact that grouping can interfere with ones paragraph
+%D settings that are executed after the paragraph is closed. One should therefore
+%D explictly close the paragraph with \type {\par}, else the settings will be
+%D forgotten and not applied. So it's:
%D
%D \starttyping
%D \def\BoldRaggedCenter%
@@ -5392,7 +6109,7 @@
\fi}
\unexpanded\def\globalprocesscommalist[#1]#2%
- {\global\let\m_syst_helpers_comma_list_command_global#2%
+ {\glet\m_syst_helpers_comma_list_command_global#2%
\expandafter\syst_helpers_comma_list_command_global_step#1,],}
%D \macros
@@ -5454,9 +6171,9 @@
\unexpanded\def\swapcounts#1#2{\c_syst_helpers_swapped #1\relax#1#2\relax#2\c_syst_helpers_swapped}
\unexpanded\def\swapmacros#1#2{\let\m_syst_helpers_swapped#1\let #1#2\let #2\m_syst_helpers_swapped}
-\unexpanded\def\globalswapdimens#1#2{\d_syst_helpers_swapped #1\global #1#2\global #2\d_syst_helpers_swapped}
-\unexpanded\def\globalswapcounts#1#2{\c_syst_helpers_swapped #1\global #1#2\global #2\c_syst_helpers_swapped}
-\unexpanded\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\global\let#1#2\global\let#2\m_syst_helpers_swapped}
+\unexpanded\def\globalswapdimens#1#2{\d_syst_helpers_swapped #1\global#1#2\global#2\d_syst_helpers_swapped}
+\unexpanded\def\globalswapcounts#1#2{\c_syst_helpers_swapped #1\global#1#2\global#2\c_syst_helpers_swapped}
+\unexpanded\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\glet #1#2\glet #2\m_syst_helpers_swapped}
%D \macros
%D {pushmacro,popmacro}
@@ -5481,11 +6198,11 @@
% \expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
% \fi
% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
-% \global\expandafter\let\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
+% \expandafter\glet\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
%
% \unexpanded\def\globalpopmacro#1%
% {\xdef\m_syst_helpers_push_macro{\string#1}%
-% \global\expandafter\let\expandafter#1\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
+% \expandafter\glet\expandafter#1\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \minusone}
%
% \unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
@@ -5494,7 +6211,7 @@
% \expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
% \fi
% \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
-% \global\expandafter\let\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
+% \expandafter\glet\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
%
% \unexpanded\def\localpopmacro#1%
% {\xdef\m_syst_helpers_push_macro{\string#1}%
@@ -5505,6 +6222,8 @@
% \let\popmacro \localpopmacro
%
% slightly faster but more important: less tracing
+%
+% possible optimization \installmacrostack\foo: \syst_push_foo \syst_pop_foo
\let\m_syst_helpers_push_macro\empty
@@ -5525,7 +6244,7 @@
\else
\syst_helpers_push_macro_new_global
\fi
- \global\expandafter\let\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
+ \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
\unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
@@ -5534,13 +6253,13 @@
\else
\syst_helpers_push_macro_new_local
\fi
- \global\expandafter\let\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
+ \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
\unexpanded\def\globalpopmacro#1%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\lastnamedcs \minusone
- \global\expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
+ \expandafter\glet\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
\unexpanded\def\localpopmacro#1%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
@@ -6060,7 +6779,7 @@
\unexpanded\def\processassignlist#1[#2]#3%
{\def\syst_helpers_process_assign_list_assign[##1=##2=##3]%
- {\doifnot{##3}\relax{#3{##1}}}%
+ {\doif{##3}\relax{#3{##1}}}%
\def\syst_helpers_process_assign_list_step##1%
{\syst_helpers_process_assign_list_assign[##1==\relax]}%
\processcommalist[#2]\syst_helpers_process_assign_list_step}
@@ -6996,14 +7715,6 @@
{\unprotect
\syst_helpers_unprotected}
-% awaiting the definitive implementation
-
-% \ifdefined\resettimer \else
-% \let\resettimer \relax
-% \newcount\elapsedtime
-% \fi
-% \def\elapsedseconds{\expandafter\withoutpt\the\dimexpr\elapsedtime sp\relax}
-
\let\resettimer \clf_resettimer
\let\elapsedtime \clf_elapsedtime
\let\elapsedseconds \elapsedtime
@@ -7172,6 +7883,12 @@
\unexpanded\def\signalcharacter{\char\zerocount} % \zwj
+% \unexpanded\def\signalcharacter
+% {\scratchcounter\normallanguage
+% \normallanguage\zerocount
+% \char\zerocount
+% \normallanguage\scratchcounter}
+
%D A few secial variants of commands defined here. Some more will be moved here (e.g.
%D from table modules.
@@ -7486,3 +8203,23 @@
% \edef\tempstring{\the#1}%
% \tx\ttbf\string#1: \tttf\meaning\tempstring
% \endgroup}
+
+%D Not needed now, but more efficient that expanding
+%
+% \chardef\_E_O_T_0
+%
+% \unexpanded\def\doifelsetokens#1%
+% {\dodoifelsetokens#1\_E_O_T_\_e_o_t_}
+%
+% \def\dodoifelsetokens#1#2\_e_o_t_
+% {\ifx#1\_E_O_T_
+% \expandafter\secondoftwoarguments
+% \else
+% \expandafter\firstoftwoarguments
+% \fi}
+%
+% \def\emptytokscondition#1%
+% {\doemptytokscondition#1\_E_O_T_\_e_o_t_}
+%
+% \def\doemptytokscondition#1#2\_e_o_t_
+% {\ifx#1\_E_O_T_}