diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 1813 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.ltx | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3debug.def | 25 |
5 files changed, 1083 insertions, 775 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 7c496cc6033..4e1b9a8bdc0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -9,9 +9,9 @@ %% l3names.dtx (with options: `package') %% l3basics.dtx (with options: `package') %% l3expan.dtx (with options: `package') +%% l3quark.dtx (with options: `package') %% l3tl.dtx (with options: `package') %% l3str.dtx (with options: `package') -%% l3quark.dtx (with options: `package') %% l3seq.dtx (with options: `package') %% l3int.dtx (with options: `package') %% l3flag.dtx (with options: `package') @@ -68,7 +68,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2020-05-05}% +\def\ExplFileDate{2020-05-11}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -2116,6 +2116,7 @@ \tex_let:D \if_charcode:w \tex_if:D \tex_let:D \if_catcode:w \tex_ifcat:D \tex_let:D \if_meaning:w \tex_ifx:D +\tex_let:D \if_bool:N \tex_ifodd:D \tex_let:D \if_mode_math: \tex_ifmmode:D \tex_let:D \if_mode_horizontal: \tex_ifhmode:D \tex_let:D \if_mode_vertical: \tex_ifvmode:D @@ -2260,6 +2261,8 @@ { \exp_after:wN \use_i:nn \exp:w } \cs_set:Npn \prg_return_false: { \exp_after:wN \use_ii:nn \exp:w} +\cs_set:Npn \__prg_use_none_delimit_by_q_recursion_stop:w + #1 \q__prg_recursion_stop { } \cs_set_protected:Npn \prg_set_conditional:Npnn { \__prg_generate_conditional_parm:NNNpnn \cs_set:Npn e } \cs_set_protected:Npn \prg_new_conditional:Npnn @@ -2318,24 +2321,24 @@ \exp_not:N \__prg_generate_conditional:NNnnnnNw \exp_not:n { #4 #5 {#1} {#2} {#6} } \__prg_generate_conditional_test:w - #8 \q_mark + #8 \s__prg_mark \__prg_generate_conditional_fast:nw - \prg_return_true: \else: \prg_return_false: \fi: \q_mark + \prg_return_true: \else: \prg_return_false: \fi: \s__prg_mark \use_none:n \exp_not:n { {#8} \use_i_ii:nnn } \tl_to_str:n {#7} - \exp_not:n { , \q_recursion_tail , \q_recursion_stop } + \exp_not:n { , \q__prg_recursion_tail , \q__prg_recursion_stop } } } \cs_set:Npn \__prg_generate_conditional_test:w - #1 \prg_return_true: \else: \prg_return_false: \fi: \q_mark #2 + #1 \prg_return_true: \else: \prg_return_false: \fi: \s__prg_mark #2 { #2 {#1} } \cs_set:Npn \__prg_generate_conditional_fast:nw #1#2 \exp_not:n #3 { \exp_not:n { {#1} \use_i:nn } } \cs_set_protected:Npn \__prg_generate_conditional:NNnnnnNw #1#2#3#4#5#6#7#8 , { - \if_meaning:w \q_recursion_tail #8 - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \if_meaning:w \q__prg_recursion_tail #8 + \exp_after:wN \__prg_use_none_delimit_by_q_recursion_stop:w \fi: \use:c { __prg_generate_ #8 _form:wNNnnnnN } \tl_if_empty:nF {#8} @@ -2345,12 +2348,12 @@ {#8} { \token_to_str:c { #3 : #4 } } } \use_none:nnnnnnnn - \q_stop + \s__prg_stop #1 #2 {#3} {#4} {#5} {#6} #7 \__prg_generate_conditional:NNnnnnNw #1 #2 {#3} {#4} {#5} {#6} #7 } \cs_set_protected:Npn \__prg_generate_p_form:wNNnnnnN - #1 \q_stop #2#3#4#5#6#7#8 + #1 \s__prg_stop #2#3#4#5#6#7#8 { \if_meaning:w e #3 \exp_after:wN \use_i:nn @@ -2369,7 +2372,7 @@ } } \cs_set_protected:Npn \__prg_generate_T_form:wNNnnnnN - #1 \q_stop #2#3#4#5#6#7#8 + #1 \s__prg_stop #2#3#4#5#6#7#8 { #8 { \exp_args:Nc #2 { #4 : #5 T } #6 } @@ -2377,7 +2380,7 @@ { #7 \exp_after:wN \use_ii:nn \fi: \use_none:n } } \cs_set_protected:Npn \__prg_generate_F_form:wNNnnnnN - #1 \q_stop #2#3#4#5#6#7#8 + #1 \s__prg_stop #2#3#4#5#6#7#8 { #8 { \exp_args:Nc #2 { #4 : #5 F } #6 } @@ -2385,7 +2388,7 @@ { #7 \exp_after:wN \use_none:nn \fi: \use:n } } \cs_set_protected:Npn \__prg_generate_TF_form:wNNnnnnN - #1 \q_stop #2#3#4#5#6#7#8 + #1 \s__prg_stop #2#3#4#5#6#7#8 { #8 { \exp_args:Nc #2 { #4 : #5 TF } #6 } @@ -2406,7 +2409,7 @@ \cs_split_function:N #3 \exp_not:N #1 \tl_to_str:n {#4} - \exp_not:n { , \q_recursion_tail , \q_recursion_stop } + \exp_not:n { , \q__prg_recursion_tail , \q__prg_recursion_stop } } } \cs_set_protected:Npn \__prg_set_eq_conditional:nnNnnNNw #1#2#3#4#5#6 @@ -2414,19 +2417,19 @@ \if_meaning:w \c_false_bool #3 \__kernel_msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \exp_after:wN \__prg_use_none_delimit_by_q_recursion_stop:w \fi: \if_meaning:w \c_false_bool #6 \__kernel_msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#4} } - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \exp_after:wN \__prg_use_none_delimit_by_q_recursion_stop:w \fi: \__prg_set_eq_conditional_loop:nnnnNw {#1} {#2} {#4} {#5} } \cs_set_protected:Npn \__prg_set_eq_conditional_loop:nnnnNw #1#2#3#4#5#6 , { - \if_meaning:w \q_recursion_tail #6 - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \if_meaning:w \q__prg_recursion_tail #6 + \exp_after:wN \__prg_use_none_delimit_by_q_recursion_stop:w \fi: \use:c { __prg_set_eq_conditional_ #6 _form:wNnnnn } \tl_if_empty:nF {#6} @@ -2436,17 +2439,17 @@ {#6} { \token_to_str:c { #1 : #2 } } } \use_none:nnnnnn - \q_stop + \s__prg_stop #5 {#1} {#2} {#3} {#4} \__prg_set_eq_conditional_loop:nnnnNw {#1} {#2} {#3} {#4} #5 } -\cs_set:Npn \__prg_set_eq_conditional_p_form:wNnnnn #1 \q_stop #2#3#4#5#6 +\cs_set:Npn \__prg_set_eq_conditional_p_form:wNnnnn #1 \s__prg_stop #2#3#4#5#6 { #2 { #3 _p : #4 } { #5 _p : #6 } } -\cs_set:Npn \__prg_set_eq_conditional_TF_form:wNnnnn #1 \q_stop #2#3#4#5#6 +\cs_set:Npn \__prg_set_eq_conditional_TF_form:wNnnnn #1 \s__prg_stop #2#3#4#5#6 { #2 { #3 : #4 TF } { #5 : #6 TF } } -\cs_set:Npn \__prg_set_eq_conditional_T_form:wNnnnn #1 \q_stop #2#3#4#5#6 +\cs_set:Npn \__prg_set_eq_conditional_T_form:wNnnnn #1 \s__prg_stop #2#3#4#5#6 { #2 { #3 : #4 T } { #5 : #6 T } } -\cs_set:Npn \__prg_set_eq_conditional_F_form:wNnnnn #1 \q_stop #2#3#4#5#6 +\cs_set:Npn \__prg_set_eq_conditional_F_form:wNnnnn #1 \s__prg_stop #2#3#4#5#6 { #2 { #3 : #4 F } { #5 : #6 F } } \tex_chardef:D \c_true_bool = 1 ~ \tex_chardef:D \c_false_bool = 0 ~ @@ -2465,13 +2468,13 @@ { \exp_after:wN \exp_after:wN \exp_after:wN \__cs_split_function_auxi:w - \cs_to_str:N ##1 \q_mark \c_true_bool - #1 \q_mark \c_false_bool \q_stop + \cs_to_str:N ##1 \s__cs_mark \c_true_bool + #1 \s__cs_mark \c_false_bool \s__cs_stop } \cs_set:Npn \__cs_split_function_auxi:w - ##1 #1 ##2 \q_mark ##3##4 \q_stop - { \__cs_split_function_auxii:w ##1 \q_mark \q_stop {##2} ##3 } - \cs_set:Npn \__cs_split_function_auxii:w ##1 \q_mark ##2 \q_stop + ##1 #1 ##2 \s__cs_mark ##3##4 \s__cs_stop + { \__cs_split_function_auxii:w ##1 \s__cs_mark \s__cs_stop {##2} ##3 } + \cs_set:Npn \__cs_split_function_auxii:w ##1 \s__cs_mark ##2 \s__cs_stop { {##1} } } \exp_after:wN \__cs_tmp:w \token_to_str:N : @@ -2864,7 +2867,7 @@ \use:x { \exp_not:n { \cs_new:Npn \__kernel_prefix_arg_replacement:wN #1 } - \tl_to_str:n { macro : } \exp_not:n { #2 -> #3 \q_stop #4 } + \tl_to_str:n { macro : } \exp_not:n { #2 -> #3 \s__kernel_stop #4 } } { #4 {#1} {#2} {#3} } \cs_new:Npn \cs_prefix_spec:N #1 @@ -2872,7 +2875,7 @@ \token_if_macro:NTF #1 { \exp_after:wN \__kernel_prefix_arg_replacement:wN - \token_to_meaning:N #1 \q_stop \use_i:nnn + \token_to_meaning:N #1 \s__kernel_stop \use_i:nnn } { \scan_stop: } } @@ -2881,7 +2884,7 @@ \token_if_macro:NTF #1 { \exp_after:wN \__kernel_prefix_arg_replacement:wN - \token_to_meaning:N #1 \q_stop \use_ii:nnn + \token_to_meaning:N #1 \s__kernel_stop \use_ii:nnn } { \scan_stop: } } @@ -2890,7 +2893,7 @@ \token_if_macro:NTF #1 { \exp_after:wN \__kernel_prefix_arg_replacement:wN - \token_to_meaning:N #1 \q_stop \use_iii:nnn + \token_to_meaning:N #1 \s__kernel_stop \use_iii:nnn } { \scan_stop: } } @@ -3519,6 +3522,13 @@ \cs_new_eq:NN \__exp_e_the_pdfpagesattr: ? \cs_new_eq:NN \__exp_e_the_pdfpkmode: ? } +\cs_new_eq:NN \s__cs_mark \scan_stop: +\cs_new_eq:NN \s__cs_stop \scan_stop: +\cs_new:Npn \q__cs_recursion_stop { \q__cs_recursion_stop } +\cs_new:Npn \__cs_use_none_delimit_by_s_stop:w #1 \s__cs_stop { } +\cs_new:Npn \__cs_use_i_delimit_by_s_stop:nw #1 #2 \s__cs_stop {#1} +\cs_new:Npn \__cs_use_none_delimit_by_q_recursion_stop:w + #1 \q__cs_recursion_stop { } \cs_new_protected:Npn \cs_generate_variant:Nn #1#2 { \__cs_generate_variant:N #1 @@ -3529,7 +3539,7 @@ \exp_not:N #1 \tl_to_str:n {#2} , \exp_not:N \scan_stop: , - \exp_not:N \q_recursion_stop + \exp_not:N \q__cs_recursion_stop } } \cs_new_protected:Npn \cs_generate_variant:cn @@ -3542,34 +3552,34 @@ \exp_not:N \else: \exp_not:N \exp_after:wN \exp_not:N \__cs_generate_variant:ww \exp_not:N \token_to_meaning:N #1 \tl_to_str:n { ma } - \exp_not:N \q_mark - \exp_not:N \q_mark \cs_new_protected:Npx + \s__cs_mark + \s__cs_mark \cs_new_protected:Npx \tl_to_str:n { pr } - \exp_not:N \q_mark \cs_new:Npx - \exp_not:N \q_stop + \s__cs_mark \cs_new:Npx + \s__cs_stop \exp_not:N \fi: } \exp_last_unbraced:NNNNo \cs_new_protected:Npn \__cs_generate_variant:ww - #1 { \tl_to_str:n { ma } } #2 \q_mark + #1 { \tl_to_str:n { ma } } #2 \s__cs_mark { \__cs_generate_variant:wwNw #1 } \exp_last_unbraced:NNNNo \cs_new_protected:Npn \__cs_generate_variant:wwNw - #1 { \tl_to_str:n { pr } } #2 \q_mark #3 #4 \q_stop + #1 { \tl_to_str:n { pr } } #2 \s__cs_mark #3 #4 \s__cs_stop { \cs_set_eq:NN \__cs_tmp:w #3 } \cs_new_protected:Npn \__cs_generate_variant:nnNN #1#2#3#4 { \if_meaning:w \c_false_bool #3 \__kernel_msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \exp_after:wN \__cs_use_none_delimit_by_q_recursion_stop:w \fi: \__cs_generate_variant:Nnnw #4 {#1}{#2} } \cs_new_protected:Npn \__cs_generate_variant:Nnnw #1#2#3#4 , { \if_meaning:w \scan_stop: #4 - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \exp_after:wN \__cs_use_none_delimit_by_q_recursion_stop:w \fi: \use:x { @@ -3577,16 +3587,16 @@ \__cs_generate_variant_loop:nNwN { } #4 \__cs_generate_variant_loop_end:nwwwNNnn - \q_mark + \s__cs_mark #3 ~ { ~ { } \fi: \__cs_generate_variant_loop_long:wNNnn } ~ { } - \q_stop + \s__cs_stop \exp_not:N #1 {#2} {#4} } \__cs_generate_variant:Nnnw #1 {#2} {#3} } -\cs_new:Npn \__cs_generate_variant_loop:nNwN #1#2#3 \q_mark #4 +\cs_new:Npn \__cs_generate_variant_loop:nNwN #1#2#3 \s__cs_mark #4 { \if:w #2 #4 \exp_after:wN \__cs_generate_variant_loop_same:w @@ -3605,7 +3615,7 @@ #1 \prg_do_nothing: #2 - \__cs_generate_variant_loop:nNwN { } #3 \q_mark + \__cs_generate_variant_loop:nNwN { } #3 \s__cs_mark } \cs_new:Npn \__cs_generate_variant_loop_base:N #1 { @@ -3633,46 +3643,45 @@ #1 \prg_do_nothing: #2#3#4 { #3 { #1 \__cs_generate_variant_same:N #2 } } \cs_new:Npn \__cs_generate_variant_loop_end:nwwwNNnn - #1#2 \q_mark #3 ~ #4 \q_stop #5#6#7#8 + #1#2 \s__cs_mark #3 ~ #4 \s__cs_stop #5#6#7#8 { \scan_stop: \scan_stop: \fi: - \exp_not:N \q_mark - \exp_not:N \q_stop + \s__cs_mark \s__cs_stop \exp_not:N #6 \exp_not:c { #7 : #8 #1 #3 } } -\cs_new:Npn \__cs_generate_variant_loop_long:wNNnn #1 \q_stop #2#3#4#5 +\cs_new:Npn \__cs_generate_variant_loop_long:wNNnn #1 \s__cs_stop #2#3#4#5 { \exp_not:n { - \q_mark + \s__cs_mark \__kernel_msg_error:nnxx { kernel } { variant-too-long } {#5} { \token_to_str:N #3 } \use_none:nnn - \q_stop + \s__cs_stop #3 #3 } } \cs_new:Npn \__cs_generate_variant_loop_invalid:NNwNNnn - #1#2 \fi: \fi: \fi: #3 \q_stop #4#5#6#7 + #1#2 \fi: \fi: \fi: #3 \s__cs_stop #4#5#6#7 { \fi: \fi: \fi: \exp_not:n { - \q_mark + \s__cs_mark \__kernel_msg_error:nnxxxx { kernel } { invalid-variant } {#7} { \token_to_str:N #5 } {#1} {#2} \use_none:nnn - \q_stop + \s__cs_stop #5 #5 } } \cs_new:Npn \__cs_generate_variant_loop_special:NNwNNnn - #1#2#3 \q_stop #4#5#6#7 + #1#2#3 \s__cs_stop #4#5#6#7 { - #3 \q_stop #4 #5 {#6} {#7} + #3 \s__cs_stop #4 #5 {#6} {#7} \exp_not:n { \__kernel_msg_error:nnxxxx @@ -3692,7 +3701,7 @@ \fi: } \cs_new_protected:Npn \__cs_generate_variant:wwNN - #1 \q_mark #2 \q_stop #3#4 + #1 \s__cs_mark #2 \s__cs_stop #3#4 { #2 \cs_if_free:NT #4 @@ -3706,20 +3715,20 @@ \cs_new_protected:Npx \__cs_generate_internal_variant:n #1 { \exp_not:N \__cs_generate_internal_variant:wwnNwn - #1 \exp_not:N \q_mark + #1 \s__cs_mark { \cs_set_eq:NN \exp_not:N \__cs_tmp:w \cs_new_protected:Npx } \cs_new_protected:cpn \use:x - \token_to_str:N x \exp_not:N \q_mark + \token_to_str:N x \s__cs_mark { } \cs_new:cpn \exp_not:N \tex_expanded:D - \exp_not:N \q_stop + \s__cs_stop {#1} } \exp_last_unbraced:NNNNo \cs_new_protected:Npn \__cs_generate_internal_variant:wwnNwn #1 - { \token_to_str:N x } #2 \q_mark #3#4#5#6 \q_stop #7 + { \token_to_str:N x } #2 \s__cs_mark #3#4#5#6 \s__cs_stop #7 { #3 \cs_if_free:cT { exp_args:N #7 } @@ -3738,7 +3747,7 @@ \exp_after:wN \__cs_generate_internal_test_aux:w \exp_after:wN #1 \fi: ##3 - \q_mark + \s__cs_mark { \use:x { @@ -3747,12 +3756,12 @@ } } #1 - \q_mark + \s__cs_mark { \exp_not:n { \__cs_generate_internal_one_go:NNn ##1 ##2 {##3} } } - \q_stop + \s__cs_stop } \cs_new_protected:Npn \__cs_generate_internal_test_aux:w - ##1 #1 ##2 \q_mark ##3 ##4 \q_stop {##3} + ##1 #1 ##2 \s__cs_mark ##3 ##4 \s__cs_stop {##3} \cs_if_exist:NTF \tex_expanded:D { \cs_new_eq:NN \__cs_generate_internal_test:Nw @@ -3837,20 +3846,20 @@ \if_meaning:w \c_false_bool #3 \__kernel_msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } - \use_i_delimit_by_q_stop:nw + \__cs_use_i_delimit_by_s_stop:nw \fi: \exp_after:wN \__cs_generate_variant:w - \tl_to_str:n {#5} , \scan_stop: , \q_recursion_stop - \use_none_delimit_by_q_stop:w \q_mark {#1} {#2} {#4} \q_stop + \tl_to_str:n {#5} , \scan_stop: , \q__cs_recursion_stop + \__cs_use_none_delimit_by_s_stop:w \s__cs_mark {#1} {#2} {#4} \s__cs_stop } \cs_new_protected:Npn \__cs_generate_variant:w - #1 , #2 \q_mark #3#4#5 + #1 , #2 \s__cs_mark #3#4#5 { \if_meaning:w \scan_stop: #1 \scan_stop: - \if_meaning:w \q_nil #1 \q_nil + \if_meaning:w \q__cs_nil #1 \q__cs_nil \use_i:nnn \fi: - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \exp_after:wN \__cs_use_none_delimit_by_q_recursion_stop:w \else: \cs_if_exist_use:cTF { __cs_generate_variant_#1_form:nnn } { {#3} {#4} {#5} } @@ -3860,7 +3869,7 @@ {#1} { \token_to_str:c { #3 : #4 } } } \fi: - \__cs_generate_variant:w #2 \q_mark {#3} {#4} {#5} + \__cs_generate_variant:w #2 \s__cs_mark {#3} {#4} {#5} } \cs_new_protected:Npn \__cs_generate_variant_p_form:nnn #1#2 { \cs_generate_variant:cn { #1 _p : #2 } } @@ -3937,6 +3946,302 @@ \__cs_tmp:w { ccx } \__cs_tmp:w { cnx } \__cs_tmp:w { oox } +%% File: l3quark.dtx +\cs_new_protected:Npn \quark_new:N #1 + { + \__kernel_chk_if_free_cs:N #1 + \cs_gset_nopar:Npn #1 {#1} + } +\quark_new:N \q_nil +\quark_new:N \q_mark +\quark_new:N \q_no_value +\quark_new:N \q_stop +\quark_new:N \q_recursion_tail +\quark_new:N \q_recursion_stop +\cs_new_eq:NN \s__quark \scan_stop: +\quark_new:N \q__quark_nil +\cs_new:Npn \quark_if_recursion_tail_stop:N #1 + { + \if_meaning:w \q_recursion_tail #1 + \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \fi: + } +\cs_new:Npn \quark_if_recursion_tail_stop_do:Nn #1 + { + \if_meaning:w \q_recursion_tail #1 + \exp_after:wN \use_i_delimit_by_q_recursion_stop:nw + \else: + \exp_after:wN \use_none:n + \fi: + } +\cs_new:Npn \quark_if_recursion_tail_stop:n #1 + { + \tl_if_empty:oTF + { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } + { \use_none_delimit_by_q_recursion_stop:w } + { } + } +\cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1 + { + \tl_if_empty:oTF + { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } + { \use_i_delimit_by_q_recursion_stop:nw } + { \use_none:n } + } +\cs_new:Npn \__quark_if_recursion_tail:w + #1 \q_recursion_tail #2 ? #3 ?! { #1 #2 } +\cs_generate_variant:Nn \quark_if_recursion_tail_stop:n { o } +\cs_generate_variant:Nn \quark_if_recursion_tail_stop_do:nn { o } +\cs_new:Npn \quark_if_recursion_tail_break:NN #1#2 + { + \if_meaning:w \q_recursion_tail #1 + \exp_after:wN #2 + \fi: + } +\cs_new:Npn \quark_if_recursion_tail_break:nN #1#2 + { + \tl_if_empty:oT + { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } + {#2} + } +\prg_new_conditional:Npnn \quark_if_nil:N #1 { p, T , F , TF } + { + \if_meaning:w \q_nil #1 + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\prg_new_conditional:Npnn \quark_if_no_value:N #1 { p, T , F , TF } + { + \if_meaning:w \q_no_value #1 + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\prg_generate_conditional_variant:Nnn \quark_if_no_value:N + { c } { p , T , F , TF } +\prg_new_conditional:Npnn \quark_if_nil:n #1 { p, T , F , TF } + { + \__quark_if_empty_if:o + { \__quark_if_nil:w {} #1 {} ? ! \q_nil ? ? ! } + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_new:Npn \__quark_if_nil:w #1 \q_nil #2 ? #3 ? ! { #1 #2 } +\prg_new_conditional:Npnn \quark_if_no_value:n #1 { p, T , F , TF } + { + \__quark_if_empty_if:o + { \__quark_if_no_value:w {} #1 {} ? ! \q_no_value ? ? ! } + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_new:Npn \__quark_if_no_value:w #1 \q_no_value #2 ? #3 ? ! { #1 #2 } +\prg_generate_conditional_variant:Nnn \quark_if_nil:n + { V , o } { p , TF , T , F } +\cs_new:Npn \__quark_if_empty_if:o #1 + { + \exp_after:wN \if_meaning:w \exp_after:wN \q_nil + \__kernel_tl_to_str:w \exp_after:wN {#1} \q_nil + } +\cs_new_protected:Npn \__kernel_quark_new_test:N #1 + { \__quark_new_test_aux:Nx #1 { \__quark_module_name:N #1 } } +\cs_new_protected:Npn \__quark_new_test_aux:Nn #1 #2 + { + \if_meaning:w \q_nil #2 \q_nil + \__kernel_msg_error:nnx { kernel } { invalid-quark-function } + { \token_to_str:N #1 } + \else: + \__quark_new_test:Nccn #1 + { q__#2_recursion_tail } { q__#2_recursion_stop } { __#2 } + \fi: + } +\cs_generate_variant:Nn \__quark_new_test_aux:Nn { Nx } +\cs_new_protected:Npn \__quark_new_test:NNNn #1 + { + \exp_last_unbraced:Nf \__quark_new_test_aux:nnNNnnnn + { \cs_split_function:N #1 } + #1 { test } + } +\cs_generate_variant:Nn \__quark_new_test:NNNn { Ncc } +\cs_new_protected:Npn \__kernel_quark_new_conditional:Nn #1 + { + \__quark_new_conditional:Nxxn #1 + { \__quark_quark_conditional_name:N #1 } + { \__quark_module_name:N #1 } + } +\cs_new_protected:Npn \__quark_new_conditional:Nnnn #1#2#3#4 + { + \if_meaning:w \q_nil #2 \q_nil + \__kernel_msg_error:nnx { kernel } { invalid-quark-function } + { \token_to_str:N #1 } + \else: + \if_meaning:w \q_nil #3 \q_nil + \__kernel_msg_error:nnx { kernel } { invalid-quark-function } + { \token_to_str:N #1 } + \else: + \exp_last_unbraced:Nf \__quark_new_test_aux:nnNNnnnn + { \cs_split_function:N #1 } + #1 { conditional } + {#2} {#3} {#4} + \fi: + \fi: + } +\cs_generate_variant:Nn \__quark_new_conditional:Nnnn { Nxx } +\cs_new_protected:Npn \__quark_new_test_aux:nnNNnnnn #1 #2 #3 #4 #5 + { + \cs_if_exist_use:cTF { __quark_new_#5_#2:Nnnn } { #4 } + { + \__kernel_msg_error:nnxx { kernel } { invalid-quark-function } + { \token_to_str:N #4 } {#2} + \use_none:nnn + } + } +\cs_new_protected:Npn \__quark_new_test_n:Nnnn #1 #2 #3 #4 + { + \__quark_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { none } { } { } { } + \__quark_new_test_define_tl:nNnNNn #1 { } + } +\cs_new_protected:Npn \__quark_new_test_nn:Nnnn #1 #2 #3 #4 + { + \__quark_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2} + \__quark_new_test_define_tl:nNnNNn #1 { \use_none:n } + } +\cs_new_protected:Npn \__quark_new_test_nN:Nnnn #1 #2 #3 #4 + { + \__quark_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2} + \__quark_new_test_define_break_tl:nNNNNn #1 { } + } +\cs_new_protected:Npn \__quark_new_test_N:Nnnn #1 #2 #3 #4 + { + \__quark_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { none } { } { } { } + \__quark_new_test_define_ifx:nNnNNn #1 { } + } +\cs_new_protected:Npn \__quark_new_test_Nn:Nnnn #1 #2 #3 #4 + { + \__quark_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2} + \__quark_new_test_define_ifx:nNnNNn #1 + { \else: \exp_after:wN \use_none:n } + } +\cs_new_protected:Npn \__quark_new_test_NN:Nnnn #1 #2 #3 #4 + { + \__quark_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2} + \__quark_new_test_define_break_ifx:nNNNNn #1 { } + } +\cs_new_protected:Npn \__quark_new_test_aux_do:nNNnnnnNNn #1 #2 #3 #4 #5 + { + \exp_args:Ncc \__quark_test_define_aux:NNNNnnNNn + { #1 _quark_recursion_tail:w } + { #1 _use_ #4 _delimit_by_q_recursion_stop: #5 w } + #2 #3 + } +\cs_new_protected:Npn \__quark_test_define_aux:NNNNnnNNn #1 #2 #3 #4 #5 #6 #7 + { + \cs_gset:Npn #1 ##1 #3 ##2 ? ##3 ?! { ##1 ##2 } + \cs_gset:Npn #2 ##1 #6 #4 {#5} + #7 {##1} #1 #2 #3 + } +\cs_new_protected:Npn \__quark_new_test_define_tl:nNnNNn #1 #2 #3 #4 #5 #6 + { + \cs_new:Npn #5 #1 + { + \tl_if_empty:oTF + { #2 {} ##1 {} ?! #4 ??! } + {#3} {#6} + } + } +\cs_new_protected:Npn \__quark_new_test_define_ifx:nNnNNn #1 #2 #3 #4 #5 #6 + { + \cs_new:Npn #5 #1 + { + \if_meaning:w #4 ##1 + \exp_after:wN #3 + #6 + \fi: + } + } +\cs_new_protected:Npn \__quark_new_test_define_break_tl:nNNNNn #1 #2 #3 + { \__quark_new_test_define_tl:nNnNNn {##1##2} #2 {##2} } +\cs_new_protected:Npn \__quark_new_test_define_break_ifx:nNNNNn #1 #2 #3 + { \__quark_new_test_define_ifx:nNnNNn {##1##2} #2 {##2} } +\cs_new_protected:Npn \__quark_new_conditional_n:Nnnn + { \__quark_new_conditional_aux_do:NNnnn \use_i:nn } +\cs_new_protected:Npn \__quark_new_conditional_N:Nnnn + { \__quark_new_conditional_aux_do:NNnnn \use_ii:nn } +\cs_new_protected:Npn \__quark_new_conditional_aux_do:NNnnn #1 #2 #3 #4 + { + \exp_args:Ncc \__quark_new_conditional_define:NNNNn + { __ #4 _if_quark_ #3 :w } { q__ #4 _ #3 } #2 #1 + } +\cs_new_protected:Npn \__quark_new_conditional_define:NNNNn #1 #2 #3 #4 #5 + { + #4 { \cs_gset:Npn #1 ##1 #2 ##2 ? ##3 ?! { ##1 ##2 } } { } + \exp_args:Nno \use:n { \prg_new_conditional:Npnn #3 ##1 {#5} } + { + #4 { \__quark_if_empty_if:o { #1 {} ##1 {} ?! #2 ??! } } + { \if_meaning:w #2 ##1 } + \prg_return_true: \else: \prg_return_false: \fi: + } + } +\cs_set:Npn \__quark_tmp:w #1#2 + { + \cs_new:Npn \__quark_module_name:N ##1 + { + \exp_last_unbraced:Nf \__quark_module_name:w + { \cs_to_str:N ##1 } #1 \s__quark + } + \cs_new:Npn \__quark_module_name:w ##1 #1 ##2 \s__quark + { \__quark_module_name_loop:w ##1 #2 \use_none:n { } #2 \s__quark } + \cs_new:Npn \__quark_module_name_loop:w ##1 #2 + { + \use_i_ii:nnn \if_meaning:w \prg_do_nothing: + ##1 \prg_do_nothing: \prg_do_nothing: + \exp_after:wN \__quark_module_name_loop:w + \else: + \__quark_module_name_end:w ##1 + \fi: + } + \cs_new:Npn \__quark_module_name_end:w + ##1 \fi: ##2 \s__quark { \fi: ##1 } + } +\exp_after:wN \__quark_tmp:w \tl_to_str:n { : _ } +\cs_set:Npn \__quark_tmp:w #1 #2 \s__quark + { + \cs_new:Npn \__quark_quark_conditional_name:N ##1 + { + \exp_last_unbraced:Nf \__quark_quark_conditional_name:w + { \cs_to_str:N ##1 } #1 #2 #1 \s__quark + } + \cs_new:Npn \__quark_quark_conditional_name:w + ##1 #2 ##2 #1 ##3 \s__quark {##2} + } +\exp_after:wN \__quark_tmp:w \tl_to_str:n { : _quark_if_ } \s__quark +\cs_gset:Npn \g__scan_marks_tl { } +\cs_new_protected:Npn \scan_new:N #1 + { + \tl_if_in:NnTF \g__scan_marks_tl { #1 } + { + \__kernel_msg_error:nnx { kernel } { scanmark-already-defined } + { \token_to_str:N #1 } + } + { + \tl_gput_right:Nn \g__scan_marks_tl {#1} + \cs_new_eq:NN #1 \scan_stop: + } + } +\cs_new_eq:NN \s_stop \scan_stop: +\cs_gset_nopar:Npx \g__scan_marks_tl + { + \exp_not:o \g__scan_marks_tl + \s_stop + \s__quark + } +\cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { } %% File: l3tl.dtx \cs_new_protected:Npn \tl_new:N #1 { @@ -4057,6 +4362,13 @@ \cs_generate_variant:Nn \tl_gput_right:NV { c } \cs_generate_variant:Nn \tl_gput_right:No { c } \cs_generate_variant:Nn \tl_gput_right:Nx { c } +\quark_new:N \q__tl_nil +\quark_new:N \q__tl_mark +\quark_new:N \q__tl_stop +\quark_new:N \q__tl_recursion_tail +\quark_new:N \q__tl_recursion_stop +\__kernel_quark_new_test:N \__tl_if_recursion_tail_break:nN +\__kernel_quark_new_conditional:Nn \__tl_quark_if_nil:n { TF } \tl_const:Nx \c__tl_rescan_marker_tl { : \token_to_str:N : } \cs_new_protected:Npn \tl_rescan:nn #1#2 { @@ -4138,9 +4450,9 @@ { #1 \use_none:n #2 #1 { \exp:w \__tl_set_rescan_single_aux:w } - \q_stop + \s__tl_stop } - \cs_set:Npn \__tl_rescan:NNw ##1##2##3 #2 #1 ##4 ##5 \q_stop + \cs_set:Npn \__tl_rescan:NNw ##1##2##3 #2 #1 ##4 ##5 \s__tl_stop { \group_end: ##1 ##2 { ##4 ##3 } @@ -4155,13 +4467,13 @@ \c__tl_rescan_marker_tl #2 { \use_i:nn \exp_end: #1 } \cs_new_protected:Npn \tl_replace_once:Nnn - { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_wrap:w \tl_set:Nx } + { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_wrap:w \tl_set:Nx } \cs_new_protected:Npn \tl_greplace_once:Nnn - { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_wrap:w \tl_gset:Nx } + { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_wrap:w \tl_gset:Nx } \cs_new_protected:Npn \tl_replace_all:Nnn - { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_next:w \tl_set:Nx } + { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_next:w \tl_set:Nx } \cs_new_protected:Npn \tl_greplace_all:Nnn - { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_next:w \tl_gset:Nx } + { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_next:w \tl_gset:Nx } \cs_generate_variant:Nn \tl_replace_once:Nnn { c } \cs_generate_variant:Nn \tl_greplace_once:Nnn { c } \cs_generate_variant:Nn \tl_replace_all:Nnn { c } @@ -4179,9 +4491,9 @@ \tl_if_in:nnTF {#6} {#1} { \exp_args:Nc \__tl_replace:NnNNNnn {#2} {#2?} } { - \quark_if_nil:nTF {#6} - { \__tl_replace_auxi:NnnNNNnn #5 {#1} { #1 \q_stop } } - { \__tl_replace_auxi:NnnNNNnn #5 {#1} { #1 \q_nil } } + \__tl_quark_if_nil:nTF {#6} + { \__tl_replace_auxi:NnnNNNnn #5 {#1} { #1 \q__tl_stop } } + { \__tl_replace_auxi:NnnNNNnn #5 {#1} { #1 \q__tl_nil } } } } { \__tl_replace_auxii:nNNNnn {#1} } @@ -4257,8 +4569,8 @@ { c } { p , T , F , TF } \prg_new_conditional:Npnn \tl_if_empty:n #1 { p , TF , T , F } { - \exp_after:wN \if_meaning:w \exp_after:wN \q_nil - \tl_to_str:n {#1} \q_nil + \exp_after:wN \if_meaning:w \exp_after:wN \q__tl_nil + \tl_to_str:n {#1} \q__tl_nil \prg_return_true: \else: \prg_return_false: @@ -4268,8 +4580,8 @@ { V } { p , TF , T , F } \cs_new:Npn \__tl_if_empty_if:o #1 { - \exp_after:wN \if_meaning:w \exp_after:wN \q_nil - \__kernel_tl_to_str:w \exp_after:wN {#1} \q_nil + \exp_after:wN \if_meaning:w \exp_after:wN \q__tl_nil + \__kernel_tl_to_str:w \exp_after:wN {#1} \q__tl_nil } \prg_new_conditional:Npnn \tl_if_empty:o #1 { p , TF , T , F } { @@ -4342,13 +4654,13 @@ { \if_catcode:w ^ \exp_after:wN \__tl_if_single:nnw \__kernel_tl_to_str:w - \exp_after:wN { \use_none:nn #1 ?? } ^ ? \q_stop + \exp_after:wN { \use_none:nn #1 ?? } ^ ? \s__tl_stop \prg_return_true: \else: \prg_return_false: \fi: } -\cs_new:Npn \__tl_if_single:nnw #1#2#3 \q_stop {#2} +\cs_new:Npn \__tl_if_single:nnw #1#2#3 \s__tl_stop {#2} \prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF } { \tl_if_head_is_N_type:nTF {#1} @@ -4384,7 +4696,7 @@ \__tl_case:NnTF #1 {#2} } \cs_new:Npn \__tl_case:NnTF #1#2#3#4 - { \__tl_case:Nw #1 #2 #1 { } \q_mark {#3} \q_mark {#4} \q_stop } + { \__tl_case:Nw #1 #2 #1 { } \s__tl_mark {#3} \s__tl_mark {#4} \s__tl_stop } \cs_new:Npn \__tl_case:Nw #1#2#3 { \tl_if_eq:NNTF #1 #2 @@ -4394,19 +4706,19 @@ \cs_generate_variant:Nn \tl_case:Nn { c } \prg_generate_conditional_variant:Nnn \tl_case:Nn { c } { T , F , TF } -\cs_new:Npn \__tl_case_end:nw #1#2#3 \q_mark #4#5 \q_stop +\cs_new:Npn \__tl_case_end:nw #1#2#3 \s__tl_mark #4#5 \s__tl_stop { \exp_end: #1 #4 } \cs_new:Npn \tl_map_function:nN #1#2 { \__tl_map_function:Nn #2 #1 - \q_recursion_tail + \q__tl_recursion_tail \prg_break_point:Nn \tl_map_break: { } } \cs_new:Npn \tl_map_function:NN { \exp_args:No \tl_map_function:nN } \cs_new:Npn \__tl_map_function:Nn #1#2 { - \quark_if_recursion_tail_break:nN {#2} \tl_map_break: + \__tl_if_recursion_tail_break:nN {#2} \tl_map_break: #1 {#2} \__tl_map_function:Nn #1 } \cs_generate_variant:Nn \tl_map_function:NN { c } @@ -4417,7 +4729,7 @@ { __tl_map_ \int_use:N \g__kernel_prg_map_int :w } ##1 {#2} \exp_args:Nc \__tl_map_function:Nn { __tl_map_ \int_use:N \g__kernel_prg_map_int :w } - #1 \q_recursion_tail + #1 \q__tl_recursion_tail \prg_break_point:Nn \tl_map_break: { \int_gdecr:N \g__kernel_prg_map_int } } @@ -4427,7 +4739,7 @@ \cs_new:Npn \tl_map_tokens:nn #1#2 { \__tl_map_tokens:nn {#2} #1 - \q_recursion_tail + \q__tl_recursion_tail \prg_break_point:Nn \tl_map_break: { } } \cs_new:Npn \tl_map_tokens:Nn @@ -4435,21 +4747,21 @@ \cs_generate_variant:Nn \tl_map_tokens:Nn { c } \cs_new:Npn \__tl_map_tokens:nn #1#2 { - \quark_if_recursion_tail_break:nN {#2} \tl_map_break: + \__tl_if_recursion_tail_break:nN {#2} \tl_map_break: \use:n {#1} {#2} \__tl_map_tokens:nn {#1} } \cs_new_protected:Npn \tl_map_variable:nNn #1#2#3 { \__tl_map_variable:Nnn #2 {#3} #1 - \q_recursion_tail + \q__tl_recursion_tail \prg_break_point:Nn \tl_map_break: { } } \cs_new_protected:Npn \tl_map_variable:NNn { \exp_args:No \tl_map_variable:nNn } \cs_new_protected:Npn \__tl_map_variable:Nnn #1#2#3 { - \quark_if_recursion_tail_break:nN {#3} \tl_map_break: + \__tl_if_recursion_tail_break:nN {#3} \tl_map_break: \tl_set:Nn #1 {#3} \use:n {#2} \__tl_map_variable:Nnn #1 {#2} @@ -4503,24 +4815,24 @@ \cs_new:Npn \tl_reverse_items:n #1 { \__tl_reverse_items:nwNwn #1 ? - \q_mark \__tl_reverse_items:nwNwn - \q_mark \__tl_reverse_items:wn - \q_stop { } + \s__tl_mark \__tl_reverse_items:nwNwn + \s__tl_mark \__tl_reverse_items:wn + \s__tl_stop { } } -\cs_new:Npn \__tl_reverse_items:nwNwn #1 #2 \q_mark #3 #4 \q_stop #5 +\cs_new:Npn \__tl_reverse_items:nwNwn #1 #2 \s__tl_mark #3 #4 \s__tl_stop #5 { #3 #2 - \q_mark \__tl_reverse_items:nwNwn - \q_mark \__tl_reverse_items:wn - \q_stop { {#1} #5 } + \s__tl_mark \__tl_reverse_items:nwNwn + \s__tl_mark \__tl_reverse_items:wn + \s__tl_stop { {#1} #5 } } -\cs_new:Npn \__tl_reverse_items:wn #1 \q_stop #2 +\cs_new:Npn \__tl_reverse_items:wn #1 \s__tl_stop #2 { \exp_not:o { \use_none:nn #2 } } \cs_new:Npn \tl_trim_spaces:n #1 - { \__tl_trim_spaces:nn { \q_mark #1 } \exp_not:o } + { \__tl_trim_spaces:nn { \s__tl_mark #1 } \exp_not:o } \cs_generate_variant:Nn \tl_trim_spaces:n { o } \cs_new:Npn \tl_trim_spaces_apply:nN #1#2 - { \__tl_trim_spaces:nn { \q_mark #1 } { \exp_args:No #2 } } + { \__tl_trim_spaces:nn { \s__tl_mark #1 } { \exp_args:No #2 } } \cs_generate_variant:Nn \tl_trim_spaces_apply:nN { o } \cs_new_protected:Npn \tl_trim_spaces:N #1 { \tl_set:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } } @@ -4534,40 +4846,40 @@ { \__tl_trim_spaces_auxi:w ##1 - \q_nil - \q_mark #1 { } - \q_mark \__tl_trim_spaces_auxii:w + \s__tl_nil + \s__tl_mark #1 { } + \s__tl_mark \__tl_trim_spaces_auxii:w \__tl_trim_spaces_auxiii:w - #1 \q_nil + #1 \s__tl_nil \__tl_trim_spaces_auxiv:w - \q_stop + \s__tl_stop } - \cs_new:Npn \__tl_trim_spaces_auxi:w ##1 \q_mark #1 ##2 \q_mark ##3 + \cs_new:Npn \__tl_trim_spaces_auxi:w ##1 \s__tl_mark #1 ##2 \s__tl_mark ##3 { ##3 \__tl_trim_spaces_auxi:w - \q_mark + \s__tl_mark ##2 - \q_mark #1 {##1} + \s__tl_mark #1 {##1} } \cs_new:Npn \__tl_trim_spaces_auxii:w - \__tl_trim_spaces_auxi:w \q_mark \q_mark ##1 + \__tl_trim_spaces_auxi:w \s__tl_mark \s__tl_mark ##1 { \__tl_trim_spaces_auxiii:w ##1 } - \cs_new:Npn \__tl_trim_spaces_auxiii:w ##1 #1 \q_nil ##2 + \cs_new:Npn \__tl_trim_spaces_auxiii:w ##1 #1 \s__tl_nil ##2 { ##2 - ##1 \q_nil + ##1 \s__tl_nil \__tl_trim_spaces_auxiii:w } - \cs_new:Npn \__tl_trim_spaces_auxiv:w ##1 \q_nil ##2 \q_stop ##3 + \cs_new:Npn \__tl_trim_spaces_auxiv:w ##1 \s__tl_nil ##2 \s__tl_stop ##3 { ##3 { \use_none:n ##1 } } } \__tl_tmp:w { ~ } -\cs_new_nopar:Npn \q__tl_act_mark { \q__tl_act_mark } -\cs_new_nopar:Npn \q__tl_act_stop { \q__tl_act_stop } +\quark_new:N \q__tl_act_mark +\quark_new:N \q__tl_act_stop \cs_new:Npn \__tl_act:NNNnn #1#2#3#4#5 { \group_align_safe_begin: @@ -4643,17 +4955,17 @@ \cs_new:Npn \tl_head:n #1 { \__kernel_exp_not:w - \if_false: { \fi: \__tl_head_auxi:nw #1 { } \q_stop } + \if_false: { \fi: \__tl_head_auxi:nw #1 { } \s__tl_stop } } -\cs_new:Npn \__tl_head_auxi:nw #1#2 \q_stop +\cs_new:Npn \__tl_head_auxi:nw #1#2 \s__tl_stop { \exp_after:wN \__tl_head_auxii:n \exp_after:wN { \if_false: } \fi: {#1} } \cs_new:Npn \__tl_head_auxii:n #1 { - \exp_after:wN \if_meaning:w \exp_after:wN \q_nil - \__kernel_tl_to_str:w \exp_after:wN { \use_none:n #1 } \q_nil + \exp_after:wN \if_meaning:w \exp_after:wN \q__tl_nil + \__kernel_tl_to_str:w \exp_after:wN { \use_none:n #1 } \q__tl_nil \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn @@ -4663,6 +4975,7 @@ } \cs_generate_variant:Nn \tl_head:n { V , v , f } \cs_new:Npn \tl_head:w #1#2 \q_stop {#1} +\cs_new:Npn \__tl_tl_head:w #1#2 \s__tl_stop {#1} \cs_new:Npn \tl_head:N { \exp_args:No \tl_head:n } \cs_new:Npn \tl_tail:n #1 { @@ -4680,7 +4993,7 @@ \tl_if_head_is_N_type:nTF { #1 ? } { \exp_after:wN \exp_not:N - \tl_head:w #1 { ? \use_none:nn } \q_stop + \__tl_tl_head:w #1 { ? \use_none:nn } \s__tl_stop } { \str_head:n {#1} } \prg_return_true: @@ -4697,7 +5010,7 @@ \tl_if_head_is_N_type:nTF { #1 ? } { \exp_after:wN \exp_not:N - \tl_head:w #1 { ? \use_none:nn } \q_stop + \__tl_tl_head:w #1 { ? \use_none:nn } \s__tl_stop } { \tl_if_head_is_group:nTF {#1} @@ -4721,7 +5034,7 @@ \cs_new:Npn \__tl_if_head_eq_meaning_normal:nN #1 #2 { \exp_after:wN \if_meaning:w - \tl_head:w #1 { ?? \use_none:nnn } \q_stop #2 + \__tl_tl_head:w #1 { ?? \use_none:nnn } \s__tl_stop #2 \prg_return_true: \else: \prg_return_false: @@ -4791,7 +5104,7 @@ \exp_args:Nf \__tl_item:nn { \exp_args:Nf \__tl_item_aux:nn { \int_eval:n {#2} } {#1} } #1 - \q_recursion_tail + \q__tl_recursion_tail \prg_break_point: } \cs_new:Npn \__tl_item_aux:nn #1#2 @@ -4802,7 +5115,7 @@ } \cs_new:Npn \__tl_item:nn #1#2 { - \quark_if_recursion_tail_break:nN {#2} \prg_break: + \__tl_if_recursion_tail_break:nN {#2} \prg_break: \int_compare:nNnTF {#1} = 1 { \prg_break:n { \exp_not:n {#2} } } { \exp_args:Nf \__tl_item:nn { \int_eval:n { #1 - 1 } } } @@ -4927,7 +5240,7 @@ { \iow_wrap:nnnN { >~ \tl_to_str:n {#1} . } { } { } \__tl_show:n } \cs_new_protected:Npn \__tl_show:n #1 { - \tl_set:Nf \l__tl_internal_a_tl { \__tl_show:w #1 \q_stop } + \tl_set:Nf \l__tl_internal_a_tl { \__tl_show:w #1 \s__tl_stop } \__kernel_iow_with:Nnn \tex_newlinechar:D { 10 } { \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 } @@ -4937,14 +5250,25 @@ } } } -\cs_new:Npn \__tl_show:w #1 > #2 . \q_stop {#2} +\cs_new:Npn \__tl_show:w #1 > #2 . \s__tl_stop {#2} \cs_new_protected:Npn \tl_log:n #1 { \iow_wrap:nnnN { > ~ \tl_to_str:n {#1} . } { } { } \iow_log:n } +\scan_new:N \s__tl_nil +\scan_new:N \s__tl_mark +\scan_new:N \s__tl_stop \tl_new:N \g_tmpa_tl \tl_new:N \g_tmpb_tl \tl_new:N \l_tmpa_tl \tl_new:N \l_tmpb_tl %% File: l3str.dtx +\scan_new:N \s__str_mark +\scan_new:N \s__str_stop +\cs_new:Npn \__str_use_none_delimit_by_s_stop:w #1 \s__str_stop { } +\cs_new:Npn \__str_use_i_delimit_by_s_stop:nw #1 #2 \s__str_stop {#1} +\quark_new:N \q__str_recursion_tail +\quark_new:N \q__str_recursion_stop +\__kernel_quark_new_test:N \__str_if_recursion_tail_break:NN +\__kernel_quark_new_test:N \__str_if_recursion_tail_stop_do:Nn \group_begin: \cs_set_protected:Npn \__str_tmp:n #1 { @@ -5030,9 +5354,9 @@ { \__str_replace_next:w #4 - \use_none_delimit_by_q_stop:w + \__str_use_none_delimit_by_s_stop:w #5 - \q_stop + \s__str_stop } } \cs_new_eq:NN \__str_replace_next:w ? @@ -5135,7 +5459,7 @@ \__str_case:nnTF {#1} {#2} } \cs_new:Npn \__str_case:nnTF #1#2#3#4 - { \__str_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } + { \__str_case:nw {#1} #2 {#1} { } \s__str_mark {#3} \s__str_mark {#4} \s__str_stop } \cs_generate_variant:Nn \str_case:nn { V , o , nV , nv } \prg_generate_conditional_variant:Nnn \str_case:nn { V , o , nV , nv } { T , F , TF } @@ -5166,21 +5490,21 @@ \__str_case_e:nnTF {#1} {#2} } \cs_new:Npn \__str_case_e:nnTF #1#2#3#4 - { \__str_case_e:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } + { \__str_case_e:nw {#1} #2 {#1} { } \s__str_mark {#3} \s__str_mark {#4} \s__str_stop } \cs_new:Npn \__str_case_e:nw #1#2#3 { \str_if_eq:eeTF {#1} {#2} { \__str_case_end:nw {#3} } { \__str_case_e:nw {#1} } } -\cs_new:Npn \__str_case_end:nw #1#2#3 \q_mark #4#5 \q_stop +\cs_new:Npn \__str_case_end:nw #1#2#3 \s__str_mark #4#5 \s__str_stop { \exp_end: #1 #4 } \cs_new:Npn \str_map_function:nN #1#2 { \exp_after:wN \__str_map_function:w \exp_after:wN \__str_map_function:Nn \exp_after:wN #2 \__kernel_tl_to_str:w {#1} - \q_recursion_tail ? ~ + \q__str_recursion_tail ? ~ \prg_break_point:Nn \str_map_break: { } } \cs_new:Npn \str_map_function:NN @@ -5189,7 +5513,7 @@ { #1 { ~ { ~ } \__str_map_function:w } } \cs_new:Npn \__str_map_function:Nn #1#2 { - \if_meaning:w \q_recursion_tail #2 + \if_meaning:w \q__str_recursion_tail #2 \exp_after:wN \str_map_break: \fi: #1 #2 \__str_map_function:Nn #1 @@ -5206,7 +5530,7 @@ \exp_not:c { __str_map_ \int_use:N \g__kernel_prg_map_int :w } \__kernel_str_to_other_fast:n {#1} } - \q_recursion_tail + \q__str_recursion_tail \prg_break_point:Nn \str_map_break: { \int_gdecr:N \g__kernel_prg_map_int } } @@ -5215,7 +5539,7 @@ \cs_generate_variant:Nn \str_map_inline:Nn { c } \cs_new:Npn \__str_map_inline:NN #1#2 { - \quark_if_recursion_tail_break:NN #2 \str_map_break: + \__str_if_recursion_tail_break:NN #2 \str_map_break: \exp_args:No #1 { \token_to_str:N #2 } \__str_map_inline:NN #1 } @@ -5226,14 +5550,14 @@ \exp_not:n { \__str_map_variable:NnN #2 {#3} } \__kernel_str_to_other_fast:n {#1} } - \q_recursion_tail + \q__str_recursion_tail \prg_break_point:Nn \str_map_break: { } } \cs_new_protected:Npn \str_map_variable:NNn { \exp_args:No \str_map_variable:nNn } \cs_new_protected:Npn \__str_map_variable:NnN #1#2#3 { - \quark_if_recursion_tail_break:NN #3 \str_map_break: + \__str_if_recursion_tail_break:NN #3 \str_map_break: \str_set:Nn #1 {#3} \use:n {#2} \__str_map_variable:NnN #1 {#2} @@ -5246,7 +5570,7 @@ \cs_new:Npn \__kernel_str_to_other:n #1 { \exp_after:wN \__str_to_other_loop:w - \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop + \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \s__str_mark \s__str_stop } \group_begin: \tex_lccode:D `\* = `\ % @@ -5255,21 +5579,21 @@ { \group_end: \cs_new:Npn \__str_to_other_loop:w - #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \q_stop + #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \s__str_stop { \if_meaning:w A #8 \__str_to_other_end:w \fi: \__str_to_other_loop:w - #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \q_stop + #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \s__str_stop } - \cs_new:Npn \__str_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop + \cs_new:Npn \__str_to_other_end:w \fi: #1 \s__str_mark #2 * A #3 \s__str_stop { \fi: #2 } } \cs_new:Npn \__kernel_str_to_other_fast:n #1 { \exp_after:wN \__str_to_other_fast_loop:w \tl_to_str:n {#1} ~ - A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_stop + A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \s__str_stop } \group_begin: \tex_lccode:D `\* = `\ % @@ -5286,7 +5610,7 @@ #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * #9 \__str_to_other_fast_loop:w * } - \cs_new:Npn \__str_to_other_fast_end:w #1 * A #2 \q_stop {#1} + \cs_new:Npn \__str_to_other_fast_end:w #1 * A #2 \s__str_stop {#1} } \cs_new:Npn \str_item:Nn { \exp_args:No \str_item:nn } \cs_generate_variant:Nn \str_item:Nn { c } @@ -5305,25 +5629,25 @@ \exp_after:wN \__str_item:w \int_value:w \int_eval:n {#2} \exp_after:wN ; \int_value:w \__str_count:n {#1} ; - #1 \q_stop + #1 \s__str_stop } \cs_new:Npn \__str_item:w #1; #2; { \int_compare:nNnTF {#1} < 0 { \int_compare:nNnTF {#1} < {-#2} - { \use_none_delimit_by_q_stop:w } + { \__str_use_none_delimit_by_s_stop:w } { - \exp_after:wN \use_i_delimit_by_q_stop:nw + \exp_after:wN \__str_use_i_delimit_by_s_stop:nw \exp:w \exp_after:wN \__str_skip_exp_end:w \int_value:w \int_eval:n { #1 + #2 } ; } } { \int_compare:nNnTF {#1} > {#2} - { \use_none_delimit_by_q_stop:w } + { \__str_use_none_delimit_by_s_stop:w } { - \exp_after:wN \use_i_delimit_by_q_stop:nw + \exp_after:wN \__str_use_i_delimit_by_s_stop:nw \exp:w \__str_skip_exp_end:w #1 ; { } } } @@ -5367,7 +5691,7 @@ \int_value:w \__str_count:n {#1} \exp_after:wN ; \int_value:w \int_eval:n { (#2) - 1 } \exp_after:wN ; \int_value:w \int_eval:n {#3} ; - #1 \q_stop + #1 \s__str_stop } \cs_new:Npn \__str_range:w #1; #2; #3; { @@ -5424,7 +5748,7 @@ #1 \else: 0 \fi: \exp_stop_f: \or: \or: \or: \or: \or: \or: \fi: } -\cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop +\cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \s__str_stop { #1#2#3#4#5#6#7#8 } \cs_new:Npn \str_count_spaces:N { \exp_args:No \str_count_spaces:n } @@ -5436,13 +5760,13 @@ \exp_after:wN \__str_count_spaces_loop:w \tl_to_str:n {#1} ~ X 7 ~ X 6 ~ X 5 ~ X 4 ~ X 3 ~ X 2 ~ X 1 ~ X 0 ~ X -1 ~ - \q_stop + \s__str_stop } } \cs_new:Npn \__str_count_spaces_loop:w #1~#2~#3~#4~#5~#6~#7~#8~#9~ { \if_meaning:w X #9 - \use_i_delimit_by_q_stop:nw + \__str_use_i_delimit_by_s_stop:nw \fi: 9 + \__str_count_spaces_loop:w } @@ -5474,13 +5798,13 @@ { X 8 } { X 7 } { X 6 } { X 5 } { X 4 } { X 3 } { X 2 } { X 1 } { X 0 } - \q_stop + \s__str_stop } } \cs_new:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_meaning:w X #9 - \exp_after:wN \use_none_delimit_by_q_stop:w + \exp_after:wN \__str_use_none_delimit_by_s_stop:w \fi: 9 + \__str_count_loop:NNNNNNNNN } @@ -5490,14 +5814,14 @@ { \exp_after:wN \__str_head:w \tl_to_str:n {#1} - { { } } ~ \q_stop + { { } } ~ \s__str_stop } \cs_new:Npn \__str_head:w #1 ~ % - { \use_i_delimit_by_q_stop:nw #1 { ~ } } + { \__str_use_i_delimit_by_s_stop:nw #1 { ~ } } \cs_new:Npn \str_head_ignore_spaces:n #1 { - \exp_after:wN \use_i_delimit_by_q_stop:nw - \tl_to_str:n {#1} { } \q_stop + \exp_after:wN \__str_use_i_delimit_by_s_stop:nw + \tl_to_str:n {#1} { } \s__str_stop } \cs_new:Npn \str_tail:N { \exp_args:No \str_tail:n } \cs_generate_variant:Nn \str_tail:N { c } @@ -5505,15 +5829,15 @@ { \exp_after:wN \__str_tail_auxi:w \reverse_if:N \if_charcode:w - \scan_stop: \tl_to_str:n {#1} X X \q_stop + \scan_stop: \tl_to_str:n {#1} X X \s__str_stop } -\cs_new:Npn \__str_tail_auxi:w #1 X #2 \q_stop { \fi: #1 } +\cs_new:Npn \__str_tail_auxi:w #1 X #2 \s__str_stop { \fi: #1 } \cs_new:Npn \str_tail_ignore_spaces:n #1 { \exp_after:wN \__str_tail_auxii:w - \tl_to_str:n {#1} \q_mark \q_mark \q_stop + \tl_to_str:n {#1} \s__str_mark \s__str_mark \s__str_stop } -\cs_new:Npn \__str_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 } +\cs_new:Npn \__str_tail_auxii:w #1 #2 \s__str_mark #3 \s__str_stop { #2 } \cs_new:Npn \str_foldcase:n #1 { \__str_change_case:nn {#1} { fold } } \cs_new:Npn \str_lowercase:n #1 { \__str_change_case:nn {#1} { lower } } \cs_new:Npn \str_uppercase:n #1 { \__str_change_case:nn {#1} { upper } } @@ -5527,7 +5851,7 @@ } \cs_new:Npn \__str_change_case_aux:nn #1#2 { - \__str_change_case_loop:nw {#2} #1 \q_recursion_tail \q_recursion_stop + \__str_change_case_loop:nw {#2} #1 \q__str_recursion_tail \q__str_recursion_stop \__str_change_case_result:n { } } \cs_new:Npn \__str_change_case_output:nw #1#2 \__str_change_case_result:n #3 @@ -5535,12 +5859,12 @@ \cs_generate_variant:Nn \__str_change_case_output:nw { f } \cs_new:Npn \__str_change_case_end:wn #1 \__str_change_case_result:n #2 { \tl_to_str:n {#2} } -\cs_new:Npn \__str_change_case_loop:nw #1#2 \q_recursion_stop +\cs_new:Npn \__str_change_case_loop:nw #1#2 \q__str_recursion_stop { \tl_if_head_is_space:nTF {#2} { \__str_change_case_space:n } { \__str_change_case_char:nN } - {#1} #2 \q_recursion_stop + {#1} #2 \q__str_recursion_stop } \exp_last_unbraced:NNNNo \cs_new:Npn \__str_change_case_space:n #1 \c_space_tl @@ -5550,7 +5874,7 @@ } \cs_new:Npn \__str_change_case_char:nN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__str_if_recursion_tail_stop_do:Nn #2 { \__str_change_case_end:wn } \__str_change_case_output:fw { \use:c { char_str_ #1 case:N } #2 } @@ -5578,124 +5902,10 @@ \cs_new_eq:NN \str_log:n \tl_log:n \cs_new_eq:NN \str_log:N \tl_log:N \cs_generate_variant:Nn \str_log:N { c } -%% File: l3quark.dtx -\cs_new_protected:Npn \quark_new:N #1 - { - \__kernel_chk_if_free_cs:N #1 - \cs_gset_nopar:Npn #1 {#1} - } -\quark_new:N \q_nil -\quark_new:N \q_mark -\quark_new:N \q_no_value -\quark_new:N \q_stop -\quark_new:N \q_recursion_tail -\quark_new:N \q_recursion_stop -\cs_new:Npn \quark_if_recursion_tail_stop:N #1 - { - \if_meaning:w \q_recursion_tail #1 - \exp_after:wN \use_none_delimit_by_q_recursion_stop:w - \fi: - } -\cs_new:Npn \quark_if_recursion_tail_stop_do:Nn #1 - { - \if_meaning:w \q_recursion_tail #1 - \exp_after:wN \use_i_delimit_by_q_recursion_stop:nw - \else: - \exp_after:wN \use_none:n - \fi: - } -\cs_new:Npn \quark_if_recursion_tail_stop:n #1 - { - \tl_if_empty:oTF - { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } - { \use_none_delimit_by_q_recursion_stop:w } - { } - } -\cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1 - { - \tl_if_empty:oTF - { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } - { \use_i_delimit_by_q_recursion_stop:nw } - { \use_none:n } - } -\cs_new:Npn \__quark_if_recursion_tail:w - #1 \q_recursion_tail #2 ? #3 ?! { #1 #2 } -\cs_generate_variant:Nn \quark_if_recursion_tail_stop:n { o } -\cs_generate_variant:Nn \quark_if_recursion_tail_stop_do:nn { o } -\cs_new:Npn \quark_if_recursion_tail_break:NN #1#2 - { - \if_meaning:w \q_recursion_tail #1 - \exp_after:wN #2 - \fi: - } -\cs_new:Npn \quark_if_recursion_tail_break:nN #1#2 - { - \tl_if_empty:oT - { \__quark_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! } - {#2} - } -\prg_new_conditional:Npnn \quark_if_nil:N #1 { p, T , F , TF } - { - \if_meaning:w \q_nil #1 - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\prg_new_conditional:Npnn \quark_if_no_value:N #1 { p, T , F , TF } - { - \if_meaning:w \q_no_value #1 - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\prg_generate_conditional_variant:Nnn \quark_if_no_value:N - { c } { p , T , F , TF } -\prg_new_conditional:Npnn \quark_if_nil:n #1 { p, T , F , TF } - { - \__quark_if_empty_if:o - { \__quark_if_nil:w {} #1 {} ? ! \q_nil ? ? ! } - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_new:Npn \__quark_if_nil:w #1 \q_nil #2 ? #3 ? ! { #1 #2 } -\prg_new_conditional:Npnn \quark_if_no_value:n #1 { p, T , F , TF } - { - \__quark_if_empty_if:o - { \__quark_if_no_value:w {} #1 {} ? ! \q_no_value ? ? ! } - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_new:Npn \__quark_if_no_value:w #1 \q_no_value #2 ? #3 ? ! { #1 #2 } -\prg_generate_conditional_variant:Nnn \quark_if_nil:n - { V , o } { p , TF , T , F } -\cs_new:Npn \__quark_if_empty_if:o #1 - { - \exp_after:wN \if_meaning:w \exp_after:wN \q_nil - \__kernel_tl_to_str:w \exp_after:wN {#1} \q_nil - } -\tl_new:N \g__scan_marks_tl -\cs_new_protected:Npn \scan_new:N #1 - { - \tl_if_in:NnTF \g__scan_marks_tl { #1 } - { - \__kernel_msg_error:nnx { kernel } { scanmark-already-defined } - { \token_to_str:N #1 } - } - { - \tl_gput_right:Nn \g__scan_marks_tl {#1} - \cs_new_eq:NN #1 \scan_stop: - } - } -\scan_new:N \s_stop -\cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { } %% File: l3seq.dtx \scan_new:N \s__seq +\scan_new:N \s__seq_mark +\scan_new:N \s__seq_stop \cs_new:Npn \__seq_item:n { \__kernel_msg_expandable_error:nn { kernel } { misused-sequence } @@ -6002,10 +6212,10 @@ \tl_set:Nx #2 { \exp_after:wN \__seq_get_left:wnw - #1 \__seq_item:n { \q_no_value } \q_stop + #1 \__seq_item:n { \q_no_value } \s__seq_stop } } -\cs_new:Npn \__seq_get_left:wnw #1 \__seq_item:n #2#3 \q_stop +\cs_new:Npn \__seq_get_left:wnw #1 \__seq_item:n #2#3 \s__seq_stop { \exp_not:n {#2} } \cs_generate_variant:Nn \seq_get_left:NN { c } \cs_new_protected:Npn \seq_pop_left:NN @@ -6013,9 +6223,9 @@ \cs_new_protected:Npn \seq_gpop_left:NN { \__seq_pop:NNNN \__seq_pop_left:NNN \tl_gset:Nn } \cs_new_protected:Npn \__seq_pop_left:NNN #1#2#3 - { \exp_after:wN \__seq_pop_left:wnwNNN #2 \q_stop #1#2#3 } + { \exp_after:wN \__seq_pop_left:wnwNNN #2 \s__seq_stop #1#2#3 } \cs_new_protected:Npn \__seq_pop_left:wnwNNN - #1 \__seq_item:n #2#3 \q_stop #4#5#6 + #1 \__seq_item:n #2#3 \s__seq_stop #4#5#6 { #4 #5 { #1 #3 } \tl_set:Nn #6 {#2} @@ -6096,8 +6306,8 @@ \prg_generate_conditional_variant:Nnn \seq_gpop_right:NN { c } { T , F , TF } \cs_new:Npn \seq_item:Nn #1 - { \exp_after:wN \__seq_item:wNn #1 \q_stop #1 } -\cs_new:Npn \__seq_item:wNn \s__seq #1 \q_stop #2#3 + { \exp_after:wN \__seq_item:wNn #1 \s__seq_stop #1 } +\cs_new:Npn \__seq_item:wNn \s__seq #1 \s__seq_stop #2#3 { \exp_args:Nf \__seq_item:nwn { \exp_args:Nf \__seq_item:nN { \int_eval:n {#3} } #2 } @@ -6236,9 +6446,9 @@ } { \exp_after:wN \__seq_use_setup:w #1 \__seq_item:n - \q_mark { \__seq_use:nwwwwnwn {#3} } - \q_mark { \__seq_use:nwwn {#4} } - \q_stop { } + \s__seq_mark { \__seq_use:nwwwwnwn {#3} } + \s__seq_mark { \__seq_use:nwwn {#4} } + \s__seq_stop { } } } { @@ -6251,12 +6461,12 @@ \cs_new:Npn \__seq_use_setup:w \s__seq { \__seq_use:nwwwwnwn { } } \cs_new:Npn \__seq_use:nwwwwnwn #1 \__seq_item:n #2 \__seq_item:n #3 \__seq_item:n #4#5 - \q_mark #6#7 \q_stop #8 + \s__seq_mark #6#7 \s__seq_stop #8 { #6 \__seq_item:n {#3} \__seq_item:n {#4} #5 - \q_mark {#6} #7 \q_stop { #8 #1 #2 } + \s__seq_mark {#6} #7 \s__seq_stop { #8 #1 #2 } } -\cs_new:Npn \__seq_use:nwwn #1 \__seq_item:n #2 #3 \q_stop #4 +\cs_new:Npn \__seq_use:nwwn #1 \__seq_item:n #2 #3 \s__seq_stop #4 { \exp_not:n { #4 #1 #2 } } \cs_new:Npn \seq_use:Nn #1#2 { \seq_use:Nnnn #1 {#2} {#2} {#2} } @@ -6317,6 +6527,13 @@ \cs_new_eq:NN \__int_eval_end: \tex_relax:D \cs_new_eq:NN \if_int_odd:w \tex_ifodd:D \cs_new_eq:NN \if_case:w \tex_ifcase:D +\scan_new:N \s__int_mark +\scan_new:N \s__int_stop +\cs_new:Npn \__int_use_none_delimit_by_s_stop:w #1 \s__int_stop { } +\quark_new:N \q__int_recursion_tail +\quark_new:N \q__int_recursion_stop +\__kernel_quark_new_test:N \__int_if_recursion_tail_stop_do:Nn +\__kernel_quark_new_test:N \__int_if_recursion_tail_stop:N \cs_new:Npn \int_eval:n #1 { \int_value:w \__int_eval:w #1 \__int_eval_end: } \cs_new:Npn \int_eval:w { \int_value:w \__int_eval:w } @@ -6501,7 +6718,7 @@ \__int_compare_error: } \cs_new:Npn \__int_compare_error:Nw - #1#2 \q_stop + #1#2 \s__int_stop { { } \c_zero_int \fi: @@ -6517,15 +6734,15 @@ \cs_new:Npn \__int_compare:w #1 \__int_compare_error: { \exp_after:wN \if_false: \int_value:w - \__int_compare:Nw #1 e { = nd_ } \q_stop + \__int_compare:Nw #1 e { = nd_ } \s__int_stop } -\cs_new:Npn \__int_compare:Nw #1#2 \q_stop +\cs_new:Npn \__int_compare:Nw #1#2 \s__int_stop { \exp_after:wN \__int_compare:NNw - \__int_to_roman:w - 0 #2 \q_mark - #1#2 \q_stop + \__int_to_roman:w - 0 #2 \s__int_mark + #1#2 \s__int_stop } -\cs_new:Npn \__int_compare:NNw #1#2#3 \q_mark +\cs_new:Npn \__int_compare:NNw #1#2#3 \s__int_mark { \__kernel_exp_not:w \use:c @@ -6536,7 +6753,7 @@ } \__int_compare_error:Nw #1 } -\cs_new:cpn { __int_compare_end_=:NNw } #1#2#3 e #4 \q_stop +\cs_new:cpn { __int_compare_end_=:NNw } #1#2#3 e #4 \s__int_stop { {#3} \exp_stop_f: \prg_return_false: \else: \prg_return_true: \fi: @@ -6544,7 +6761,7 @@ \cs_new:Npn \__int_compare:nnN #1#2#3 { {#2} \exp_stop_f: - \prg_return_false: \exp_after:wN \use_none_delimit_by_q_stop:w + \prg_return_false: \exp_after:wN \__int_use_none_delimit_by_s_stop:w \fi: #1 #2 #3 \exp_after:wN \__int_compare:Nw \int_value:w \__int_eval:w } @@ -6591,14 +6808,14 @@ \exp_args:Nf \__int_case:nnTF { \int_eval:n {#1} } {#2} { } { } } \cs_new:Npn \__int_case:nnTF #1#2#3#4 - { \__int_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } + { \__int_case:nw {#1} #2 {#1} { } \s__int_mark {#3} \s__int_mark {#4} \s__int_stop } \cs_new:Npn \__int_case:nw #1#2#3 { \int_compare:nNnTF {#1} = {#2} { \__int_case_end:nw {#3} } { \__int_case:nw {#1} } } -\cs_new:Npn \__int_case_end:nw #1#2#3 \q_mark #4#5 \q_stop +\cs_new:Npn \__int_case_end:nw #1#2#3 \s__int_mark #4#5 \s__int_stop { \exp_end: #1 #4 } \prg_new_conditional:Npnn \int_if_odd:n #1 { p , T , F , TF} { @@ -7002,19 +7219,19 @@ \exp_after:wN #1 \fi: } -\cs_new:Npn \__int_pass_signs_end:wn #1 \q_stop #2 { #2 #1 } +\cs_new:Npn \__int_pass_signs_end:wn #1 \s__int_stop #2 { #2 #1 } \cs_new:Npn \int_from_alph:n #1 { \int_eval:n { \exp_after:wN \__int_pass_signs:wn \tl_to_str:n {#1} - \q_stop { \__int_from_alph:nN { 0 } } - \q_recursion_tail \q_recursion_stop + \s__int_stop { \__int_from_alph:nN { 0 } } + \q__int_recursion_tail \q__int_recursion_stop } } \cs_new:Npn \__int_from_alph:nN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 {#1} + \__int_if_recursion_tail_stop_do:Nn #2 {#1} \exp_args:Nf \__int_from_alph:nN { \int_eval:n { #1 * 26 + \__int_from_alph:N #2 } } } @@ -7025,13 +7242,13 @@ \int_eval:n { \exp_after:wN \__int_pass_signs:wn \tl_to_str:n {#1} - \q_stop { \__int_from_base:nnN { 0 } {#2} } - \q_recursion_tail \q_recursion_stop + \s__int_stop { \__int_from_base:nnN { 0 } {#2} } + \q__int_recursion_tail \q__int_recursion_stop } } \cs_new:Npn \__int_from_base:nnN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #3 {#1} + \__int_if_recursion_tail_stop_do:Nn #3 {#1} \exp_args:Nf \__int_from_base:nnN { \int_eval:n { #1 * #2 + \__int_from_base:N #3 } } {#2} @@ -7069,16 +7286,16 @@ ( 0 \exp_after:wN \__int_from_roman:NN \tl_to_str:n {#1} - \q_recursion_tail \q_recursion_tail \q_recursion_stop + \q__int_recursion_tail \q__int_recursion_tail \q__int_recursion_stop ) } } \cs_new:Npn \__int_from_roman:NN #1#2 { - \quark_if_recursion_tail_stop:N #1 + \__int_if_recursion_tail_stop:N #1 \int_if_exist:cF { c__int_from_roman_ #1 _int } { \__int_from_roman_error:w } - \quark_if_recursion_tail_stop_do:Nn #2 + \__int_if_recursion_tail_stop_do:Nn #2 { + \use:c { c__int_from_roman_ #1 _int } } \int_if_exist:cF { c__int_from_roman_ #2 _int } { \__int_from_roman_error:w } @@ -7096,7 +7313,7 @@ \__int_from_roman:NN #2 } } -\cs_new:Npn \__int_from_roman_error:w #1 \q_recursion_stop #2 +\cs_new:Npn \__int_from_roman_error:w #1 \q__int_recursion_stop #2 { #2 * 0 - 1 } \cs_new_eq:NN \int_show:N \__kernel_register_show:N \cs_generate_variant:Nn \int_show:N { c } @@ -7184,7 +7401,6 @@ \int_value:w \flag_height:n {#1} ; } %% File: l3prg.dtx -\cs_new_eq:NN \if_bool:N \tex_ifodd:D \cs_new_eq:NN \if_predicate:w \tex_ifodd:D \cs_new_protected:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_new:N { c } @@ -7222,6 +7438,11 @@ } \cs_generate_variant:Nn \bool_set:Nn { c } \cs_generate_variant:Nn \bool_gset:Nn { c } +\quark_new:N \q__bool_recursion_tail +\quark_new:N \q__bool_recursion_stop +\cs_new:Npn \__bool_use_i_delimit_by_q_recursion_stop:nw + #1 #2 \q__bool_recursion_stop {#1} +\__kernel_quark_new_test:N \__bool_if_recursion_tail_stop_do:nn \prg_new_conditional:Npnn \bool_if:N #1 { p , T , F , TF } { \if_bool:N #1 @@ -7313,7 +7534,7 @@ \cs_new:cpn { __bool_|_1: } | { \__bool_get_next:NN \use_iii:nnnn } \cs_new:cpn { __bool_|_2: } | { \__bool_get_next:NN \use_iii:nnnn } \cs_new:Npn \bool_lazy_all_p:n #1 - { \__bool_lazy_all:n #1 \q_recursion_tail \q_recursion_stop } + { \__bool_lazy_all:n #1 \q__bool_recursion_tail \q__bool_recursion_stop } \prg_new_conditional:Npnn \bool_lazy_all:n #1 { T , F , TF } { \if_predicate:w \bool_lazy_all_p:n {#1} @@ -7324,9 +7545,9 @@ } \cs_new:Npn \__bool_lazy_all:n #1 { - \quark_if_recursion_tail_stop_do:nn {#1} { \c_true_bool } + \__bool_if_recursion_tail_stop_do:nn {#1} { \c_true_bool } \bool_if:nF {#1} - { \use_i_delimit_by_q_recursion_stop:nw { \c_false_bool } } + { \__bool_use_i_delimit_by_q_recursion_stop:nw { \c_false_bool } } \__bool_lazy_all:n } \prg_new_conditional:Npnn \bool_lazy_and:nn #1#2 { p , T , F , TF } @@ -7339,7 +7560,7 @@ \fi: } \cs_new:Npn \bool_lazy_any_p:n #1 - { \__bool_lazy_any:n #1 \q_recursion_tail \q_recursion_stop } + { \__bool_lazy_any:n #1 \q__bool_recursion_tail \q__bool_recursion_stop } \prg_new_conditional:Npnn \bool_lazy_any:n #1 { T , F , TF } { \if_predicate:w \bool_lazy_any_p:n {#1} @@ -7350,9 +7571,9 @@ } \cs_new:Npn \__bool_lazy_any:n #1 { - \quark_if_recursion_tail_stop_do:nn {#1} { \c_false_bool } + \__bool_if_recursion_tail_stop_do:nn {#1} { \c_false_bool } \bool_if:nT {#1} - { \use_i_delimit_by_q_recursion_stop:nw { \c_true_bool } } + { \__bool_use_i_delimit_by_q_recursion_stop:nw { \c_true_bool } } \__bool_lazy_any:n } \prg_new_conditional:Npnn \bool_lazy_or:nn #1#2 { p , T , F , TF } @@ -7810,6 +8031,14 @@ %% File: l3clist.dtx \cs_new_eq:NN \c_empty_clist \c_empty_tl \tl_new:N \l__clist_internal_clist +\scan_new:N \s__clist_mark +\scan_new:N \s__clist_stop +\cs_new:Npn \__clist_use_none_delimit_by_s_stop:w #1 \s__clist_stop { } +\cs_new:Npn \__clist_use_i_delimit_by_s_stop:nw #1 #2 \s__clist_stop {#1} +\quark_new:N \q__clist_recursion_tail +\quark_new:N \q__clist_recursion_stop +\__kernel_quark_new_test:N \__clist_if_recursion_tail_break:nN +\__kernel_quark_new_test:N \__clist_if_recursion_tail_stop:n \cs_new_protected:Npn \__clist_tmp:w { } \cs_new:Npn \__clist_trim_next:w #1 , { @@ -7821,11 +8050,11 @@ { \exp_after:wN \__clist_sanitize:Nn \exp_after:wN \c_empty_tl \exp:w \__clist_trim_next:w \prg_do_nothing: - #1 , \q_recursion_tail , \q_recursion_stop + #1 , \q__clist_recursion_tail , \q__clist_recursion_stop } \cs_new:Npn \__clist_sanitize:Nn #1#2 { - \quark_if_recursion_tail_stop:n {#2} + \__clist_if_recursion_tail_stop:n {#2} #1 \__clist_wrap_item:w #2 , \exp_after:wN \__clist_sanitize:Nn \exp_after:wN , \exp:w \__clist_trim_next:w \prg_do_nothing: @@ -7835,7 +8064,8 @@ \tl_if_empty:oTF { \__clist_if_wrap:w - \q_mark ? #1 ~ \q_mark ? ~ #1 \q_mark , ~ \q_mark #1 , + \s__clist_mark ? #1 ~ \s__clist_mark ? ~ #1 + \s__clist_mark , ~ \s__clist_mark #1 , } { \tl_if_head_is_group:nTF { #1 { } } @@ -7852,7 +8082,7 @@ } { \prg_return_true: } } -\cs_new:Npn \__clist_if_wrap:w #1 \q_mark ? ~ #2 ~ \q_mark #3 , { } +\cs_new:Npn \__clist_if_wrap:w #1 \s__clist_mark ? ~ #2 ~ \s__clist_mark #3 , { } \cs_new:Npn \__clist_wrap_item:w #1 , { \__clist_if_wrap:nTF {#1} { \exp_not:n { {#1} } } { \exp_not:n {#1} } } \cs_new_eq:NN \clist_new:N \tl_new:N @@ -7959,10 +8189,10 @@ \if_meaning:w #1 \c_empty_clist \tl_set:Nn #2 { \q_no_value } \else: - \exp_after:wN \__clist_get:wN #1 , \q_stop #2 + \exp_after:wN \__clist_get:wN #1 , \s__clist_stop #2 \fi: } -\cs_new_protected:Npn \__clist_get:wN #1 , #2 \q_stop #3 +\cs_new_protected:Npn \__clist_get:wN #1 , #2 \s__clist_stop #3 { \tl_set:Nn #3 {#1} } \cs_generate_variant:Nn \clist_get:NN { c } \cs_new_protected:Npn \clist_pop:NN @@ -7974,21 +8204,21 @@ \if_meaning:w #2 \c_empty_clist \tl_set:Nn #3 { \q_no_value } \else: - \exp_after:wN \__clist_pop:wwNNN #2 , \q_mark \q_stop #1#2#3 + \exp_after:wN \__clist_pop:wwNNN #2 , \s__clist_mark \s__clist_stop #1#2#3 \fi: } -\cs_new_protected:Npn \__clist_pop:wwNNN #1 , #2 \q_stop #3#4#5 +\cs_new_protected:Npn \__clist_pop:wwNNN #1 , #2 \s__clist_stop #3#4#5 { \tl_set:Nn #5 {#1} #3 #4 { \__clist_pop:wN \prg_do_nothing: #2 \exp_not:o - , \q_mark \use_none:n - \q_stop + , \s__clist_mark \use_none:n + \s__clist_stop } } -\cs_new:Npn \__clist_pop:wN #1 , \q_mark #2 #3 \q_stop { #2 {#1} } +\cs_new:Npn \__clist_pop:wN #1 , \s__clist_mark #2 #3 \s__clist_stop { #2 {#1} } \cs_generate_variant:Nn \clist_pop:NN { c } \cs_generate_variant:Nn \clist_gpop:NN { c } \prg_new_protected_conditional:Npnn \clist_get:NN #1#2 { T , F , TF } @@ -7996,7 +8226,7 @@ \if_meaning:w #1 \c_empty_clist \prg_return_false: \else: - \exp_after:wN \__clist_get:wN #1 , \q_stop #2 + \exp_after:wN \__clist_get:wN #1 , \s__clist_stop #2 \prg_return_true: \fi: } @@ -8010,7 +8240,7 @@ \if_meaning:w #2 \c_empty_clist \prg_return_false: \else: - \exp_after:wN \__clist_pop:wwNNN #2 , \q_mark \q_stop #1#2#3 + \exp_after:wN \__clist_pop:wwNNN #2 , \s__clist_mark \s__clist_stop #1#2#3 \prg_return_true: \fi: } @@ -8066,13 +8296,13 @@ \cs_set:Npn \__clist_tmp:w ##1 , #4 , { ##1 - , \q_mark , \use_none_delimit_by_q_stop:w , + , \s__clist_mark , \__clist_use_none_delimit_by_s_stop:w , \__clist_remove_all: } #2 #3 { \exp_after:wN \__clist_remove_all: - #3 , \q_mark , #4 , \q_stop + #3 , \s__clist_mark , #4 , \s__clist_stop } \clist_if_empty:NF #3 { @@ -8086,7 +8316,7 @@ } \cs_new:Npn \__clist_remove_all: { \exp_after:wN \__clist_remove_all:w \__clist_tmp:w , } -\cs_new:Npn \__clist_remove_all:w #1 , \q_mark , #2 , { \exp_not:n {#1} } +\cs_new:Npn \__clist_remove_all:w #1 , \s__clist_mark , #2 , { \exp_not:n {#1} } \cs_generate_variant:Nn \clist_remove_all:Nn { c } \cs_generate_variant:Nn \clist_gremove_all:Nn { c } \cs_new_protected:Npn \clist_reverse:N #1 @@ -8098,14 +8328,14 @@ \cs_new:Npn \clist_reverse:n #1 { \__clist_reverse:wwNww ? #1 , - \q_mark \__clist_reverse:wwNww ! , - \q_mark \__clist_reverse_end:ww - \q_stop ? \q_mark + \s__clist_mark \__clist_reverse:wwNww ! , + \s__clist_mark \__clist_reverse_end:ww + \s__clist_stop ? \s__clist_mark } \cs_new:Npn \__clist_reverse:wwNww - #1 , #2 \q_mark #3 #4 \q_stop ? #5 \q_mark - { #3 ? #2 \q_mark #3 #4 \q_stop #1 , #5 \q_mark } -\cs_new:Npn \__clist_reverse_end:ww #1 ! #2 , \q_mark + #1 , #2 \s__clist_mark #3 #4 \s__clist_stop ? #5 \s__clist_mark + { #3 ? #2 \s__clist_mark #3 #4 \s__clist_stop #1 , #5 \s__clist_mark } +\cs_new:Npn \__clist_reverse_end:ww #1 ! #2 , \s__clist_mark { \exp_not:o { \use_none:n #2 } } \prg_new_eq_conditional:NNn \clist_if_empty:N \tl_if_empty:N { p , T , F , TF } @@ -8114,9 +8344,9 @@ \prg_new_conditional:Npnn \clist_if_empty:n #1 { p , T , F , TF } { \__clist_if_empty_n:w ? #1 - , \q_mark \prg_return_false: - , \q_mark \prg_return_true: - \q_stop + , \s__clist_mark \prg_return_false: + , \s__clist_mark \prg_return_true: + \s__clist_stop } \cs_new:Npn \__clist_if_empty_n:w #1 , { @@ -8124,7 +8354,7 @@ { \__clist_if_empty_n:w ? } { \__clist_if_empty_n:wNw } } -\cs_new:Npn \__clist_if_empty_n:wNw #1 \q_mark #2#3 \q_stop {#2} +\cs_new:Npn \__clist_if_empty_n:wNw #1 \s__clist_mark #2#3 \s__clist_stop {#2} \prg_new_protected_conditional:Npnn \clist_if_in:Nn #1#2 { T , F , TF } { \exp_args:No \__clist_if_in_return:nnN #1 {#2} #1 @@ -8167,13 +8397,13 @@ \clist_if_empty:NF #1 { \exp_last_unbraced:NNo \__clist_map_function:Nw #2 #1 - , \q_recursion_tail , + , \q__clist_recursion_tail , \prg_break_point:Nn \clist_map_break: { } } } \cs_new:Npn \__clist_map_function:Nw #1#2 , { - \quark_if_recursion_tail_break:nN {#2} \clist_map_break: + \__clist_if_recursion_tail_break:nN {#2} \clist_map_break: #1 {#2} \__clist_map_function:Nw #1 } @@ -8181,12 +8411,12 @@ \cs_new:Npn \clist_map_function:nN #1#2 { \exp_after:wN \__clist_map_function_n:Nn \exp_after:wN #2 - \exp:w \__clist_trim_next:w \prg_do_nothing: #1 , \q_recursion_tail , + \exp:w \__clist_trim_next:w \prg_do_nothing: #1 , \q__clist_recursion_tail , \prg_break_point:Nn \clist_map_break: { } } \cs_new:Npn \__clist_map_function_n:Nn #1 #2 { - \quark_if_recursion_tail_break:nN {#2} \clist_map_break: + \__clist_if_recursion_tail_break:nN {#2} \clist_map_break: \__clist_map_unbrace:Nw #1 #2, \exp_after:wN \__clist_map_function_n:Nn \exp_after:wN #1 \exp:w \__clist_trim_next:w \prg_do_nothing: @@ -8201,7 +8431,7 @@ { __clist_map_ \int_use:N \g__kernel_prg_map_int :w } ##1 {#2} \exp_last_unbraced:Nco \__clist_map_function:Nw { __clist_map_ \int_use:N \g__kernel_prg_map_int :w } - #1 , \q_recursion_tail , + #1 , \q__clist_recursion_tail , \prg_break_point:Nn \clist_map_break: { \int_gdecr:N \g__kernel_prg_map_int } } @@ -8219,7 +8449,7 @@ \exp_args:Nno \use:nn { \__clist_map_variable:Nnw #2 {#3} } #1 - , \q_recursion_tail , \q_recursion_stop + , \q__clist_recursion_tail , \q__clist_recursion_stop \prg_break_point:Nn \clist_map_break: { } } } @@ -8230,7 +8460,7 @@ } \cs_new_protected:Npn \__clist_map_variable:Nnw #1#2#3, { - \quark_if_recursion_tail_stop:n {#3} + \__clist_if_recursion_tail_stop:n {#3} \tl_set:Nn #1 {#3} \use:n {#2} \__clist_map_variable:Nnw #1 {#2} @@ -8255,13 +8485,13 @@ { 0 \exp_not:N \__clist_count:w \c_space_tl - #1 \exp_not:n { , \q_recursion_tail , \q_recursion_stop } + #1 \exp_not:n { , \q__clist_recursion_tail , \q__clist_recursion_stop } } } \cs_new:Npn \__clist_count:n #1 { + 1 } \cs_new:Npx \__clist_count:w #1 , { - \exp_not:n { \exp_args:Nf \quark_if_recursion_tail_stop:n } {#1} + \exp_not:n { \exp_args:Nf \__clist_if_recursion_tail_stop:n } {#1} \exp_not:N \tl_if_blank:nF {#1} { + 1 } \exp_not:N \__clist_count:w \c_space_tl } @@ -8278,9 +8508,9 @@ { \exp_after:wN \__clist_use:nwwwwnwn \exp_after:wN { \exp_after:wN } #1 , - \q_mark , { \__clist_use:nwwwwnwn {#3} } - \q_mark , { \__clist_use:nwwn {#4} } - \q_stop { } + \s__clist_mark , { \__clist_use:nwwwwnwn {#3} } + \s__clist_mark , { \__clist_use:nwwn {#4} } + \s__clist_stop { } } } { @@ -8291,9 +8521,9 @@ \cs_generate_variant:Nn \clist_use:Nnnn { c } \cs_new:Npn \__clist_use:wwn #1 , #2 , #3 { \exp_not:n { #1 #3 #2 } } \cs_new:Npn \__clist_use:nwwwwnwn - #1#2 , #3 , #4 , #5 \q_mark , #6#7 \q_stop #8 - { #6 {#3} , {#4} , #5 \q_mark , {#6} #7 \q_stop { #8 #1 #2 } } -\cs_new:Npn \__clist_use:nwwn #1#2 , #3 \q_stop #4 + #1#2 , #3 , #4 , #5 \s__clist_mark , #6#7 \s__clist_stop #8 + { #6 {#3} , {#4} , #5 \s__clist_mark , {#6} #7 \s__clist_stop { #8 #1 #2 } } +\cs_new:Npn \__clist_use:nwwn #1#2 , #3 \s__clist_stop #4 { \exp_not:n { #4 #1 #2 } } \cs_new:Npn \clist_use:Nn #1#2 { \clist_use:Nnnn #1 {#2} {#2} {#2} } @@ -8311,21 +8541,21 @@ \int_compare:nNnTF {#2} < 0 { \int_compare:nNnTF {#2} < { - #1 } - { \use_none_delimit_by_q_stop:w } + { \__clist_use_none_delimit_by_s_stop:w } { \exp_args:Nf #4 { \int_eval:n { #2 + 1 + #1 } } } } { \int_compare:nNnTF {#2} > {#1} - { \use_none_delimit_by_q_stop:w } + { \__clist_use_none_delimit_by_s_stop:w } { #4 {#2} } } - { } , #3 , \q_stop + { } , #3 , \s__clist_stop } \cs_generate_variant:Nn \__clist_item:nnnN { ffo, ff } \cs_new:Npn \__clist_item_N_loop:nw #1 #2, { \int_compare:nNnTF {#1} = 0 - { \use_i_delimit_by_q_stop:nw { \exp_not:n {#2} } } + { \__clist_use_i_delimit_by_s_stop:nw { \exp_not:n {#2} } } { \exp_args:Nf \__clist_item_N_loop:nw { \int_eval:n { #1 - 1 } } } } \cs_generate_variant:Nn \clist_item:Nn { c } @@ -8353,7 +8583,7 @@ } } } -\cs_new:Npn \__clist_item_n_end:n #1 #2 \q_stop +\cs_new:Npn \__clist_item_n_end:n #1 #2 \s__clist_stop { \tl_trim_spaces_apply:nN {#1} \__clist_item_n_strip:n } \cs_new:Npn \__clist_item_n_strip:n #1 { \__clist_item_n_strip:w #1 , } \cs_new:Npn \__clist_item_n_strip:w #1 , { \exp_not:n {#1} } @@ -8396,6 +8626,9 @@ \clist_new:N \g_tmpa_clist \clist_new:N \g_tmpb_clist %% File: l3token.dtx +\scan_new:N \s__char_stop +\quark_new:N \q__char_no_value +\__kernel_quark_new_conditional:Nn \__char_quark_if_no_value:N { TF } \cs_new_protected:Npn \char_set_catcode:nn #1#2 { \tex_catcode:D \int_eval:n {#1} = \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \char_value_catcode:n #1 @@ -8735,12 +8968,12 @@ \exp_after:wN \exp_after:wN \exp_after:wN \__char_to_nfd:Nw \exp_after:wN \exp_after:wN \exp_after:wN #1 \cs:w c__char_nfd_ \token_to_str:N #1 _ tl \cs_end: - \q_stop + \s__char_stop } { \exp_not:n {#1} } } \cs_set_eq:NN \__char_to_nfd:n \char_to_nfd:N -\cs_new:Npn \__char_to_nfd:Nw #1#2#3 \q_stop +\cs_new:Npn \__char_to_nfd:Nw #1#2#3 \s__char_stop { \exp_args:Ne \__char_to_nfd:n { \char_generate:nn { `#2 } { \__char_change_case_catcode:N #1 } } @@ -8781,13 +9014,13 @@ { \char_generate:nn {#1} { \__char_change_case_catcode:N #2 } } } \cs_new:Npn \__char_change_case_multi:nN #1#2 - { \__char_change_case_multi:NNNNw #2 #1 \q_no_value \q_no_value \q_stop } + { \__char_change_case_multi:NNNNw #2 #1 \q__char_no_value \q__char_no_value \s__char_stop } \cs_generate_variant:Nn \__char_change_case_multi:nN { v } -\cs_new:Npn \__char_change_case_multi:NNNNw #1#2#3#4#5 \q_stop +\cs_new:Npn \__char_change_case_multi:NNNNw #1#2#3#4#5 \s__char_stop { - \quark_if_no_value:NTF #4 + \__char_quark_if_no_value:NTF #4 { - \quark_if_no_value:NTF #3 + \__char_quark_if_no_value:NTF #3 { \__char_change_case:NN #1 #2 } { \__char_change_case:NNN #1 #2#3 } } @@ -8872,6 +9105,7 @@ { \tl_to_str:n {#2} } } \tl_const:Nx \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } +\scan_new:N \s__token_stop \group_begin: \__kernel_chk_if_free_cs:N \c_group_begin_token \tex_global:D \tex_let:D \c_group_begin_token { @@ -8975,10 +9209,10 @@ { \exp_not:N \exp_after:wN \exp_not:N \__token_if_macro_p:w \exp_not:N \token_to_meaning:N ##1 \tl_to_str:n { ma : } - \exp_not:N \q_stop + \s__token_stop } \cs_new:Npn \exp_not:N \__token_if_macro_p:w - ##1 \tl_to_str:n { ma } ##2 \c_colon_str ##3 \exp_not:N \q_stop + ##1 \tl_to_str:n { ma } ##2 \c_colon_str ##3 \s__token_stop } { \str_if_eq:nnTF { #2 } { cro } @@ -9008,7 +9242,7 @@ \use:x { \cs_new:Npn \exp_not:c { __token_delimit_by_ #1 :w } - ####1 \tl_to_str:n {#1} ####2 \exp_not:N \q_stop + ####1 \tl_to_str:n {#1} ####2 \s__token_stop { ####1 \tl_to_str:n {#1} } } } @@ -9042,7 +9276,7 @@ \exp_not:N \exp_after:wN \exp_not:c { __token_delimit_by_ #2 :w } \exp_not:N \token_to_meaning:N ####1 - ? \tl_to_str:n {#2} \exp_not:N \q_stop + ? \tl_to_str:n {#2} \s__token_stop } { \exp_not:n {#3} } { \exp_not:N \prg_return_true: } @@ -9079,17 +9313,17 @@ { \exp_not:N \exp_after:wN \exp_not:N \__token_if_primitive:NNw \exp_not:N \token_to_meaning:N ##1 - \tl_to_str:n { : : : } \exp_not:N \q_stop ##1 + \tl_to_str:n { : : : } \s__token_stop ##1 } } \cs_new:Npn \exp_not:N \__token_if_primitive:NNw - ##1##2 ##3 \c_colon_str ##4 \exp_not:N \q_stop + ##1##2 ##3 \c_colon_str ##4 \s__token_stop { \exp_not:N \tl_if_empty:oTF { \exp_not:N \__token_if_primitive_space:w ##3 ~ } { \exp_not:N \__token_if_primitive_loop:N ##3 - \c_colon_str \exp_not:N \q_stop + \c_colon_str \s__token_stop } { \exp_not:N \__token_if_primitive_nullfont:N } } @@ -9112,7 +9346,7 @@ \exp_after:wN \__token_if_primitive_loop:N \fi: } -\cs_new:Npn \__token_if_primitive:Nw #1 #2 \q_stop +\cs_new:Npn \__token_if_primitive:Nw #1 #2 \s__token_stop { \if:w : #1 \exp_after:wN \__token_if_primitive_undefined:N @@ -9137,6 +9371,9 @@ \cs_new:Npn \__peek_true_aux:w { } \cs_new:Npn \__peek_false:w { } \cs_new:Npn \__peek_tmp:w { } +\scan_new:N \s__peek_mark +\scan_new:N \s__peek_stop +\cs_new:Npn \__peek_use_none_delimit_by_s_stop:w #1 \s__peek_stop { } \cs_new_protected:Npn \peek_after:Nw { \tex_futurelet:D \l_peek_token } \cs_new_protected:Npn \peek_gafter:Nw @@ -9271,7 +9508,7 @@ } } \group_begin: - \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop + \cs_set_protected:Npn \__peek_tmp:w #1 \s__peek_stop { \cs_new_protected:Npn \__peek_execute_branches_N_type: { @@ -9282,18 +9519,18 @@ 1 \exp_stop_f: \exp_after:wN \__peek_N_type:w \token_to_meaning:N \l_peek_token - \q_mark \__peek_N_type_aux:nnw - #1 \q_mark \use_none_delimit_by_q_stop:w - \q_stop + \s__peek_mark \__peek_N_type_aux:nnw + #1 \s__peek_mark \__peek_use_none_delimit_by_s_stop:w + \s__peek_stop \exp_after:wN \__peek_true:w \else: \exp_after:wN \__peek_false:w \fi: } - \cs_new_protected:Npn \__peek_N_type:w ##1 #1 ##2 \q_mark ##3 + \cs_new_protected:Npn \__peek_N_type:w ##1 #1 ##2 \s__peek_mark ##3 { ##3 {##1} {##2} } } - \exp_after:wN \__peek_tmp:w \tl_to_str:n { outer } \q_stop + \exp_after:wN \__peek_tmp:w \tl_to_str:n { outer } \s__peek_stop \group_end: \cs_new_protected:Npn \__peek_N_type_aux:nnw #1 #2 #3 \fi: { @@ -9317,6 +9554,12 @@ { \__kernel_msg_expandable_error:nn { kernel } { misused-prop } } \tl_new:N \l__prop_internal_tl \tl_const:Nn \c_empty_prop { \s__prop } +\scan_new:N \s__prop_mark +\scan_new:N \s__prop_stop +\quark_new:N \q__prop_recursion_tail +\quark_new:N \q__prop_recursion_stop +\__kernel_quark_new_test:N \__prop_if_recursion_tail_stop:n +\cs_generate_variant:Nn \__prop_if_recursion_tail_stop:n { o } \cs_new_protected:Npn \prop_new:N #1 { \__kernel_chk_if_free_cs:N #1 @@ -9375,27 +9618,27 @@ \cs_new_protected:Npn \__prop_from_keyval:n #1 { \__prop_from_keyval_loop:w \prg_do_nothing: #1 , - \q_recursion_tail , \q_recursion_stop + \q__prop_recursion_tail , \q__prop_recursion_stop } \cs_new_protected:Npn \__prop_from_keyval_loop:w #1 , { - \quark_if_recursion_tail_stop:o {#1} + \__prop_if_recursion_tail_stop:o {#1} \__prop_from_keyval_split:Nw \__prop_from_keyval_key:n - #1 = = \q_stop {#1} + #1 = = \s__prop_stop {#1} \__prop_from_keyval_loop:w \prg_do_nothing: } \cs_new_protected:Npn \__prop_from_keyval_split:Nw #1#2 = { \tl_trim_spaces_apply:oN {#2} #1 } \cs_new_protected:Npn \__prop_from_keyval_key:n #1 - { \__prop_from_keyval_key:w #1 \q_nil } -\cs_new_protected:Npn \__prop_from_keyval_key:w #1 \q_nil #2 \q_stop + { \__prop_from_keyval_key:w #1 \s__prop_mark } +\cs_new_protected:Npn \__prop_from_keyval_key:w #1 \s__prop_mark #2 \s__prop_stop { \__prop_from_keyval_split:Nw \__prop_from_keyval_value:n - \prg_do_nothing: #2 \q_stop {#1} + \prg_do_nothing: #2 \s__prop_stop {#1} } \cs_new_protected:Npn \__prop_from_keyval_value:n #1 - { \__prop_from_keyval_value:w #1 \q_nil } -\cs_new_protected:Npn \__prop_from_keyval_value:w #1 \q_nil #2 \q_stop #3#4 + { \__prop_from_keyval_value:w #1 \s__prop_mark } +\cs_new_protected:Npn \__prop_from_keyval_value:w #1 \s__prop_mark #2 \s__prop_stop #3#4 { \tl_if_empty:nF { #3 #1 #2 } { @@ -9412,10 +9655,10 @@ \cs_new_protected:Npn \__prop_split_aux:NnTF #1#2#3#4 { \cs_set:Npn \__prop_split_aux:w ##1 - \__prop_pair:wn #2 \s__prop ##2 ##3 \q_mark ##4 ##5 \q_stop + \__prop_pair:wn #2 \s__prop ##2 ##3 \s__prop_mark ##4 ##5 \s__prop_stop { ##4 {#3} {#4} } - \exp_after:wN \__prop_split_aux:w #1 \q_mark \use_i:nn - \__prop_pair:wn #2 \s__prop { } \q_mark \use_ii:nn \q_stop + \exp_after:wN \__prop_split_aux:w #1 \s__prop_mark \use_i:nn + \__prop_pair:wn #2 \s__prop { } \s__prop_mark \use_ii:nn \s__prop_stop } \cs_new:Npn \__prop_split_aux:w { } \cs_new_protected:Npn \prop_remove:Nn #1#2 @@ -9562,7 +9805,7 @@ { \exp_last_unbraced:Noo \__prop_if_in:nwwn { \tl_to_str:n {#2} } #1 \__prop_pair:wn \tl_to_str:n {#2} \s__prop { } - \q_recursion_tail + \q__prop_recursion_tail \prg_break_point: } \cs_new:Npn \__prop_if_in:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 @@ -9573,7 +9816,7 @@ } \cs_new:Npn \__prop_if_in:N #1 { - \if_meaning:w \q_recursion_tail #1 + \if_meaning:w \q__prop_recursion_tail #1 \prg_return_false: \else: \prg_return_true: @@ -9660,6 +9903,9 @@ \tl_new:N \l__msg_internal_tl \str_new:N \l__msg_name_str \str_new:N \l__msg_text_str +\scan_new:N \s__msg_mark +\scan_new:N \s__msg_stop +\cs_new:Npn \__msg_use_none_delimit_by_s_stop:w #1 \s__msg_stop { } \tl_const:Nn \c__msg_text_prefix_tl { msg~text~>~ } \tl_const:Nn \c__msg_more_text_prefix_tl { msg~extra~text~>~ } \prg_new_conditional:Npnn \msg_if_exist:nn #1#2 { p , T , F , TF } @@ -10004,15 +10250,15 @@ { \tl_if_in:nnTF { ^^J #1 } { ^^J > ~ } { - \tl_if_in:nnTF { #1 \q_mark } { . \q_mark } + \tl_if_in:nnTF { #1 \s__msg_mark } { . \s__msg_mark } { \__msg_show_dot:w } { \__msg_show:w } - ^^J #1 \q_stop + ^^J #1 \s__msg_stop } { \__msg_show:nn { ? #1 } { } } } - \cs_new:Npn \__msg_show_dot:w #1 ^^J > ~ #2 . \q_stop + \cs_new:Npn \__msg_show_dot:w #1 ^^J > ~ #2 . \s__msg_stop { \__msg_show:nn {#1} {#2} } - \cs_new:Npn \__msg_show:w #1 ^^J > ~ #2 \q_stop + \cs_new:Npn \__msg_show:w #1 ^^J > ~ #2 \s__msg_stop { \__msg_show:nn {#1} {#2} } \cs_new_protected:Npn \__msg_show:nn #1#2 { @@ -10069,16 +10315,16 @@ { \seq_clear:N \l__msg_hierarchy_seq \__msg_use_hierarchy:nwwN { } - #1 \q_mark \__msg_use_hierarchy:nwwN - / \q_mark \use_none_delimit_by_q_stop:w - \q_stop + #1 \s__msg_mark \__msg_use_hierarchy:nwwN + / \s__msg_mark \__msg_use_none_delimit_by_s_stop:w + \s__msg_stop \__msg_use_redirect_module:n { } } } -\cs_new_protected:Npn \__msg_use_hierarchy:nwwN #1#2 / #3 \q_mark #4 +\cs_new_protected:Npn \__msg_use_hierarchy:nwwN #1#2 / #3 \s__msg_mark #4 { \seq_put_left:Nn \l__msg_hierarchy_seq {#1} - #4 { #1 / #2 } #3 \q_mark #4 + #4 { #1 / #2 } #3 \s__msg_mark #4 } \cs_new_protected:Npn \__msg_use_redirect_module:n #1 { @@ -10378,6 +10624,18 @@ \__kernel_msg_new:nnnn { kernel } { quote-in-shell } { Quotes~in~shell~command~'#1'. } { Shell~commands~cannot~contain~quotes~("). } +\__kernel_msg_new:nnnn { kernel } { invalid-quark-function } + { Quark~test~function~'#1'~is~invalid. } + { + \c__msg_coding_error_text_tl + LaTeX~has~been~asked~to~create~quark~test~function~'#1'~ + \tl_if_empty:nTF {#2} + { but~that~name~ } + { with~signature~'#2',~but~that~signature~ } + is~not~valid. + } +\__kernel_msg_new:nnn { kernel } { invalid-quark } + { Invalid~quark~variable~'#1'. } \__kernel_msg_new:nnnn { kernel } { scanmark-already-defined } { Scan~mark~#1~already~defined. } { @@ -10797,6 +11055,10 @@ { \prop_gput:Nnn \g__iow_streams_prop {#1} { Reserved~by~format } } +\scan_new:N \s__iow_mark +\scan_new:N \s__iow_stop +\cs_new:Npn \__iow_use_i_delimit_by_s_stop:nw #1 #2 \s__iow_stop {#1} +\quark_new:N \q__iow_nil \cs_new_protected:Npn \iow_new:N #1 { \cs_new_eq:NN #1 \c_term_iow } \cs_generate_variant:Nn \iow_new:N { c } \iow_new:N \g_tmpa_iow @@ -10992,15 +11254,15 @@ \tl_set:Nx \l__iow_wrap_tl { \exp_after:wN \__iow_wrap_fix_newline:w \l__iow_wrap_tl - ^^J \q_nil ^^J \q_stop + ^^J \q__iow_nil ^^J \s__iow_stop } \exp_after:wN \__iow_wrap_start:w \l__iow_wrap_tl } \cs_new:Npn \__iow_wrap_fix_newline:w #1 ^^J #2 ^^J { #1 - \if_meaning:w \q_nil #2 - \use_i_delimit_by_q_stop:nw + \if_meaning:w \q__iow_nil #2 + \__iow_use_i_delimit_by_s_stop:nw \fi: \c__iow_wrap_newline_marker_tl \__iow_wrap_fix_newline:w #2 ^^J @@ -11033,7 +11295,7 @@ } { \__iow_wrap_line:nw { } ##1 ; } ##2 #1 - \__iow_wrap_end_chunk:w 7 6 5 4 3 2 1 0 \q_stop + \__iow_wrap_end_chunk:w 7 6 5 4 3 2 1 0 \s__iow_stop } } \cs_new_protected:Npn \__iow_wrap_next:nw ##1##2 #1 @@ -11091,7 +11353,7 @@ \__iow_wrap_next_line:w } \cs_new:Npn \__iow_wrap_end_chunk:w - #1 \int_eval:w #2 - #3 ; #4#5 \q_stop + #1 \int_eval:w #2 - #3 ; #4#5 \s__iow_stop { \if_false: { \fi: } \exp_args:Nf \__iow_wrap_next:nw { \int_eval:n { #2 - #4 } } @@ -11106,14 +11368,14 @@ \l__iow_line_part_tl #1 { ? \__iow_wrap_break_end:w } - \q_mark + \s__iow_mark } \cs_new:Npn \__iow_wrap_break_first:w ##1 #1 ##2 { \use_none:nn ##2 \__iow_wrap_break_none:w \__iow_wrap_break_loop:w ##1 #1 ##2 } - \cs_new:Npn \__iow_wrap_break_none:w ##1##2 #1 ##3 \q_mark ##4 #1 + \cs_new:Npn \__iow_wrap_break_none:w ##1##2 #1 ##3 \s__iow_mark ##4 #1 { \tl_if_empty:NTF \l__iow_line_tl { ##2 ##4 \__iow_wrap_line_end:nw { } } @@ -11125,11 +11387,11 @@ ##1 #1 \__iow_wrap_break_loop:w ##2 #1 ##3 } - \cs_new:Npn \__iow_wrap_break_end:w ##1 #1 ##2 ##3 #1 ##4 \q_mark + \cs_new:Npn \__iow_wrap_break_end:w ##1 #1 ##2 ##3 #1 ##4 \s__iow_mark { ##1 \__iow_wrap_line_end:nw { } ##3 } } \exp_args:NV \__iow_tmp:w \c_catcode_other_space_tl -\cs_new_protected:Npn \__iow_wrap_next_line:w #1#2 \q_stop +\cs_new_protected:Npn \__iow_wrap_next_line:w #1#2 \s__iow_stop { \tl_clear:N \l__iow_line_tl \token_if_eq_meaning:NNTF #1 \__iow_wrap_end_chunk:w @@ -11142,7 +11404,7 @@ \__iow_wrap_line:nw { \l__iow_indent_tl } \l__iow_line_target_int - \l__iow_indent_int ; - #1 #2 \q_stop + #1 #2 \s__iow_stop } } \cs_new_protected:Npn \__iow_wrap_allow_break:n #1 @@ -11199,10 +11461,10 @@ \cs_set_protected:Npn \__iow_tmp:w #1 { \cs_new:Npn \__iow_wrap_trim:N ##1 - { \exp_after:wN \__iow_wrap_trim:w ##1 \q_mark #1 \q_mark \q_stop } - \cs_new:Npn \__iow_wrap_trim:w ##1 #1 \q_mark - { \__iow_wrap_trim_aux:w ##1 \q_mark } - \cs_new:Npn \__iow_wrap_trim_aux:w ##1 \q_mark ##2 \q_stop {##1} + { \exp_after:wN \__iow_wrap_trim:w ##1 \s__iow_mark #1 \s__iow_mark \s__iow_stop } + \cs_new:Npn \__iow_wrap_trim:w ##1 #1 \s__iow_mark + { \__iow_wrap_trim_aux:w ##1 \s__iow_mark } + \cs_new:Npn \__iow_wrap_trim_aux:w ##1 \s__iow_mark ##2 \s__iow_stop {##1} } \exp_args:NV \__iow_tmp:w \c_catcode_other_space_tl \tl_new:N \l__file_internal_tl @@ -11215,12 +11477,12 @@ { \tl_if_blank:nTF {#1} { - \cs_set:Npn \__file_tmp:w ##1 " ##2 " ##3 \q_stop + \cs_set:Npn \__file_tmp:w ##1 " ##2 " ##3 \s__file_stop { { } {##2} { } } \seq_gput_right:Nx \g__file_stack_seq { \exp_after:wN \__file_tmp:w \tex_jobname:D - " \tex_jobname:D " \q_stop + " \tex_jobname:D " \s__file_stop } } { @@ -11242,6 +11504,13 @@ \str_new:N \l__file_name_str \seq_new:N \l_file_search_path_seq \seq_new:N \l__file_tmp_seq +\scan_new:N \s__file_stop +\quark_new:N \q__file_nil +\__kernel_quark_new_conditional:Nn \__file_quark_if_nil:n { TF } +\quark_new:N \q__file_recursion_tail +\quark_new:N \q__file_recursion_stop +\__kernel_quark_new_test:N \__file_if_recursion_tail_stop:N +\__kernel_quark_new_test:N \__file_if_recursion_tail_stop_do:nn \cs_new:Npn \__kernel_file_name_sanitize:n #1 { \exp_args:Ne \__kernel_file_name_trim_spaces:n @@ -11249,11 +11518,11 @@ \exp_args:Ne \__kernel_file_name_strip_quotes:n { \__kernel_file_name_expand_loop:w #1 - \q_recursion_tail \q_recursion_stop + \q__file_recursion_tail \q__file_recursion_stop } } } -\cs_new:Npn \__kernel_file_name_expand_loop:w #1 \q_recursion_stop +\cs_new:Npn \__kernel_file_name_expand_loop:w #1 \q__file_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \__kernel_file_name_expand_N_type:Nw } @@ -11262,11 +11531,11 @@ { \__kernel_file_name_expand_group:nw } { \__kernel_file_name_expand_space:w } } - #1 \q_recursion_stop + #1 \q__file_recursion_stop } \cs_new:Npn \__kernel_file_name_expand_N_type:Nw #1 { - \quark_if_recursion_tail_stop:N #1 + \__file_if_recursion_tail_stop:N #1 \bool_lazy_and:nnTF { \token_if_expandable_p:N #1 } { @@ -11302,11 +11571,11 @@ \cs_new:Npn \__kernel_file_name_strip_quotes:n #1 { \__kernel_file_name_strip_quotes:nnnw {#1} { 0 } { } - #1 " \q_recursion_tail " \q_recursion_stop + #1 " \q__file_recursion_tail " \q__file_recursion_stop } \cs_new:Npn \__kernel_file_name_strip_quotes:nnnw #1#2#3#4 " { - \quark_if_recursion_tail_stop_do:nn {#4} + \__file_if_recursion_tail_stop_do:nn {#4} { \__kernel_file_name_strip_quotes:nnn {#1} {#2} {#3} } \__kernel_file_name_strip_quotes:nnnw {#1} { #2 + 1 } { #3#4 } } @@ -11320,24 +11589,24 @@ #3 } \cs_new:Npn \__kernel_file_name_trim_spaces:n #1 - { \__kernel_file_name_trim_spaces:nw {#1} #1 . \q_nil . \q_stop } -\cs_new:Npn \__kernel_file_name_trim_spaces:nw #1#2 . #3 . #4 \q_stop + { \__kernel_file_name_trim_spaces:nw {#1} #1 . \q__file_nil . \s__file_stop } +\cs_new:Npn \__kernel_file_name_trim_spaces:nw #1#2 . #3 . #4 \s__file_stop { - \quark_if_nil:nTF {#3} + \__file_quark_if_nil:nTF {#3} { \exp_args:Ne \__kernel_file_name_trim_spaces_aux:n - { \tl_trim_spaces:n { #1 \s_stop } } + { \tl_trim_spaces:n { #1 \s__file_stop } } } { \tl_trim_spaces:n {#1} } } \cs_new:Npn \__kernel_file_name_trim_spaces_aux:n #1 { \__kernel_file_name_trim_spaces_aux:w #1 } -\cs_new:Npn \__kernel_file_name_trim_spaces_aux:w #1 \s_stop {#1} +\cs_new:Npn \__kernel_file_name_trim_spaces_aux:w #1 \s__file_stop {#1} \cs_new:Npn \__kernel_file_name_quote:n #1 - { \__kernel_file_name_quote:nw {#1} #1 ~ \q_nil \q_stop } -\cs_new:Npn \__kernel_file_name_quote:nw #1 #2 ~ #3 \q_stop + { \__kernel_file_name_quote:nw {#1} #1 ~ \q__file_nil \s__file_stop } +\cs_new:Npn \__kernel_file_name_quote:nw #1 #2 ~ #3 \s__file_stop { - \quark_if_nil:nTF {#3} + \__file_quark_if_nil:nTF {#3} { #1 } { "#1" } } @@ -11430,19 +11699,19 @@ \cs_new:Npn \__file_name_cleanup:w #1 \__file_name_end: { } \cs_new:Npn \__file_name_end: { } \cs_new:Npn \__file_ext_check:n #1 - { \__file_ext_check:nw { / } #1 / \q_nil / \q_stop } -\cs_new:Npn \__file_ext_check:nw #1 #2 / #3 / #4 \q_stop + { \__file_ext_check:nw { / } #1 / \q__file_nil / \s__file_stop } +\cs_new:Npn \__file_ext_check:nw #1 #2 / #3 / #4 \s__file_stop { - \quark_if_nil:nTF {#3} + \__file_quark_if_nil:nTF {#3} { \exp_args:No \__file_ext_check:nnw - { \use_none:n #1 } {#2} #2 . \q_nil . \q_stop + { \use_none:n #1 } {#2} #2 . \q__file_nil . \s__file_stop } - { \__file_ext_check:nw { #1 #2 / } #3 / #4 \q_stop } + { \__file_ext_check:nw { #1 #2 / } #3 / #4 \s__file_stop } } -\cs_new:Npx \__file_ext_check:nnw #1#2#3 . #4 . #5 \q_stop +\cs_new:Npx \__file_ext_check:nnw #1#2#3 . #4 . #5 \s__file_stop { - \exp_not:N \quark_if_nil:nTF {#4} + \exp_not:N \__file_quark_if_nil:nTF {#4} { \exp_not:N \__file_ext_check:nn { #1 #2 } { #1 #2 \tl_to_str:n { .tex } } @@ -11864,11 +12133,11 @@ \cs_new_protected:Npn \file_parse_full_name:nNNN #1#2#3#4 { \exp_after:wN \__file_parse_full_name_auxi:w - \tl_to_str:n { #1 " #1 " } \q_stop #2#3#4 + \tl_to_str:n { #1 " #1 " } \s__file_stop #2#3#4 } \cs_generate_variant:Nn \file_parse_full_name:nNNN { V } \cs_new_protected:Npn \__file_parse_full_name_auxi:w - #1 " #2 " #3 \q_stop #4#5#6 + #1 " #2 " #3 \s__file_stop #4#5#6 { \__file_parse_full_name_split:nNNNTF {#2} / #4 #5 { \str_if_empty:NT #4 { \str_set:Nn #4 { / } } } @@ -11882,7 +12151,7 @@ } \cs_new_protected:Npn \__file_parse_full_name_split:nNNNTF #1#2#3#4 { - \cs_set_protected:Npn \__file_tmp:w ##1 ##2 #2 ##3 \q_stop + \cs_set_protected:Npn \__file_tmp:w ##1 ##2 #2 ##3 \s__file_stop { \tl_if_empty:nTF {##3} { @@ -11897,9 +12166,9 @@ \use_i:nn } } - { \__file_tmp:w { ##1 #2 ##2 } ##3 \q_stop } + { \__file_tmp:w { ##1 #2 ##2 } ##3 \s__file_stop } } - \__file_tmp:w { } #1 #2 \q_stop + \__file_tmp:w { } #1 #2 \s__file_stop } \cs_new_protected:Npn \file_show_list: { \__file_list:N \msg_show:nnxxxx } \cs_new_protected:Npn \file_log_list: { \__file_list:N \msg_log:nnxxxx } @@ -11953,19 +12222,19 @@ \tl_set:Nn \ExplFileExtension { [unknown~extension] } \tl_set:Nn \ExplFileVersion {-1} } - { \__file_id_info_auxii:w #1 ~ \q_stop } + { \__file_id_info_auxii:w #1 ~ \s__file_stop } } \cs_new_protected:Npn \__file_id_info_auxii:w - #1 ~ #2.#3 ~ #4 ~ #5 ~ #6 \q_stop + #1 ~ #2.#3 ~ #4 ~ #5 ~ #6 \s__file_stop { \tl_set:Nn \ExplFileName {#2} \tl_set:Nn \ExplFileExtension {#3} \tl_set:Nn \ExplFileVersion {#4} \str_if_eq:nnTF {#4} {-1} { \tl_set:Nn \ExplFileDate { 0000/00/00 } } - { \__file_id_info_auxiii:w #5 - 0 - 0 - \q_stop } + { \__file_id_info_auxiii:w #5 - 0 - 0 - \s__file_stop } } -\cs_new_protected:Npn \__file_id_info_auxiii:w #1 - #2 - #3 - #4 \q_stop +\cs_new_protected:Npn \__file_id_info_auxiii:w #1 - #2 - #3 - #4 \s__file_stop { \tl_set:Nn \ExplFileDate { #1/#2/#3 } } \__kernel_msg_new:nnnn { kernel } { file-not-found } { File~'#1'~not~found. } @@ -12032,6 +12301,9 @@ \cs_new_eq:NN \if_dim:w \tex_ifdim:D \cs_new_eq:NN \__dim_eval:w \tex_dimexpr:D \cs_new_eq:NN \__dim_eval_end: \tex_relax:D +\scan_new:N \s__dim_mark +\scan_new:N \s__dim_stop +\cs_new:Npn \__dim_use_none_delimit_by_s_stop:w #1 \s__dim_stop { } \cs_new_protected:Npn \dim_new:N #1 { \__kernel_chk_if_free_cs:N #1 @@ -12137,7 +12409,7 @@ \cs_new:Npn \__dim_compare:w #1 \__dim_compare_error: { \exp_after:wN \if_false: \exp:w \exp_end_continue_f:w - \__dim_compare:wNN #1 ? { = \__dim_compare_end:w \else: } \q_stop + \__dim_compare:wNN #1 ? { = \__dim_compare_end:w \else: } \s__dim_stop } \exp_args:Nno \use:nn { \cs_new:Npn \__dim_compare:wNN #1 } { \tl_to_str:n {pt} #2#3 } @@ -12147,7 +12419,7 @@ \fi: #1 pt \exp_stop_f: \prg_return_false: - \exp_after:wN \use_none_delimit_by_q_stop:w + \exp_after:wN \__dim_use_none_delimit_by_s_stop:w \fi: \reverse_if:N \if_dim:w #1 pt #2 \exp_after:wN \__dim_compare:wNN @@ -12161,7 +12433,7 @@ #1 \reverse_if:N #2 < #3 = { #1 #2 > #3 } \cs_new:cpn { __dim_compare_ > :w } #1 \reverse_if:N #2 > #3 = { #1 #2 < #3 } -\cs_new:Npn \__dim_compare_end:w #1 \prg_return_false: #2 \q_stop +\cs_new:Npn \__dim_compare_end:w #1 \prg_return_false: #2 \s__dim_stop { #1 \prg_return_false: \else: \prg_return_true: \fi: } \cs_new_protected:Npn \__dim_compare_error: { @@ -12190,14 +12462,14 @@ \exp_args:Nf \__dim_case:nnTF { \dim_eval:n {#1} } {#2} { } { } } \cs_new:Npn \__dim_case:nnTF #1#2#3#4 - { \__dim_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } + { \__dim_case:nw {#1} #2 {#1} { } \s__dim_mark {#3} \s__dim_mark {#4} \s__dim_stop } \cs_new:Npn \__dim_case:nw #1#2#3 { \dim_compare:nNnTF {#1} = {#2} { \__dim_case_end:nw {#3} } { \__dim_case:nw {#1} } } -\cs_new:Npn \__dim_case_end:nw #1#2#3 \q_mark #4#5 \q_stop +\cs_new:Npn \__dim_case_end:nw #1#2#3 \s__dim_mark #4#5 \s__dim_stop { \exp_end: #1 #4 } \cs_new:Npn \dim_while_do:nn #1#2 { @@ -12373,6 +12645,7 @@ \dim_new:N \l_tmpb_dim \dim_new:N \g_tmpa_dim \dim_new:N \g_tmpb_dim +\scan_new:N \s__skip_stop \cs_new_protected:Npn \skip_new:N #1 { \__kernel_chk_if_free_cs:N #1 @@ -12433,9 +12706,9 @@ { \exp_after:wN \__skip_if_finite:wwNw \skip_use:N \tex_glueexpr:D ##1 ; \prg_return_false: - #1 ; \prg_return_true: \q_stop + #1 ; \prg_return_true: \s__skip_stop } - \cs_new:Npn \__skip_if_finite:wwNw ##1 #1 ##2 ; ##3 ##4 \q_stop {##3} + \cs_new:Npn \__skip_if_finite:wwNw ##1 #1 ##2 ; ##3 ##4 \s__skip_stop {##3} } \exp_args:No \__skip_tmp:w { \tl_to_str:n { fil } } \cs_new:Npn \skip_eval:n #1 @@ -12541,9 +12814,7 @@ \cs_set_protected:Npn \__keyval_tmp:NN #1#2 { \cs_new:Npn \keyval_parse:NNn ##1 ##2 ##3 - { - \__keyval_loop_active:NNw ##1 ##2 \s__keyval_mark ##3 #1 \s__keyval_tail #1 - } + { \__keyval_loop_active:NNw ##1 ##2 \s__keyval_mark ##3 #1 \s__keyval_tail #1 } \cs_new:Npn \__keyval_loop_active:NNw ##1 ##2 ##3 #1 { \__keyval_if_recursion_tail:w ##3 @@ -12576,20 +12847,16 @@ \__keyval_loop_other:NNw ##1 ##2 \s__keyval_mark } \cs_new:Npn \__keyval_split_active:w ##1 #2 + { \__keyval_trim:nN { ##1 } \__keyval_split_active:nw \s__keyval_mark } + \cs_new:Npn \__keyval_split_active:nw ##1 ##2 #2 ##3 \s__keyval_stop { - \__keyval_trim:nN { ##1 } \__keyval_split_active:nw \s__keyval_mark + \__keyval_if_empty:w \s__keyval_mark ##3 \s__keyval_stop + \__keyval_has_false:w \s__keyval_mark \s__keyval_stop \use_i:nn + { \__keyval_misplaced_equal_error: \use_none:n } + { \__keyval_trim:nN { ##2 } \__keyval_key_val:nnN { ##1 } } } - \cs_new:Npn \__keyval_split_active:nw ##1 ##2 #2 ##3 \s__keyval_stop - { - \__keyval_if_empty:w \s__keyval_mark ##3 \s__keyval_stop - \__keyval_has_false:w \s__keyval_mark \s__keyval_stop \use_i:nn - { \__keyval_misplaced_equal_error: \use_none:n } - { \__keyval_trim:nN { ##2 } \__keyval_key_val:nnN { ##1 } } - } \cs_new:Npn \__keyval_if_has_equal_active:w ##1 #2 - { - \__keyval_if_empty:w \s__keyval_mark - } + { \__keyval_if_empty:w \s__keyval_mark } } \char_set_catcode_active:n { `\, } \char_set_catcode_active:n { `\= } @@ -12599,29 +12866,25 @@ \s__keyval_mark \s__keyval_tail \__keyval_loop_other:NNw #1 , \s__keyval_tail , \__keyval_loop_active:NNw #2 \s__keyval_mark - {} + { } \cs_new:Npn \__keyval_end_loop_other:w \s__keyval_mark \s__keyval_tail \__keyval_if_has_equal_other:w #1 = \s__keyval_stop \__keyval_has_false:w \s__keyval_mark \s__keyval_stop \use_i:nn #2 \__keyval_loop_other:NNw #3 \s__keyval_mark - {} + { } \cs_new:Npn \__keyval_split_other:w #1 = + { \__keyval_trim:nN { #1 } \__keyval_split_other:nw \s__keyval_mark } +\cs_new:Npn \__keyval_split_other:nw #1 #2 = #3 \s__keyval_stop { - \__keyval_trim:nN { #1 } \__keyval_split_other:nw \s__keyval_mark + \__keyval_if_empty:w \s__keyval_mark #3 \s__keyval_stop + \__keyval_has_false:w \s__keyval_mark \s__keyval_stop \use_i:nn + { \__keyval_misplaced_equal_error: \use_none:n } + { \__keyval_trim:nN { #2 } \__keyval_key_val:nnN { #1 } } } - \cs_new:Npn \__keyval_split_other:nw #1 #2 = #3 \s__keyval_stop - { - \__keyval_if_empty:w \s__keyval_mark #3 \s__keyval_stop - \__keyval_has_false:w \s__keyval_mark \s__keyval_stop \use_i:nn - { \__keyval_misplaced_equal_error: \use_none:n } - { \__keyval_trim:nN { #2 } \__keyval_key_val:nnN { #1 } } - } \cs_new:Npn \__keyval_key:nN #1 #2 - { - \exp_not:n { #2 { #1 } } - } + { \exp_not:n { #2 { #1 } } } \cs_new:Npn \__keyval_key_val:nnN #1 #2 #3 { \__keyval_if_empty:w \s__keyval_mark #2 \s__keyval_stop @@ -12634,17 +12897,11 @@ \cs_new:Npn \__keyval_has_false:w \s__keyval_mark \s__keyval_stop \use_i:nn #1 #2 { #2 } \cs_new:Npn \__keyval_blank_true:w \s__keyval_mark \s__keyval_stop \use:n #1 {} \cs_new:Npn \__keyval_empty_key:w \s__keyval_mark \s__keyval_stop \exp_not:n #1 - { - \__keyval_misplaced_equal_error: - } + { \__keyval_misplaced_equal_error: } \cs_new:Npn \__keyval_if_has_equal_other:w #1 = - { - \__keyval_if_empty:w \s__keyval_mark - } + { \__keyval_if_empty:w \s__keyval_mark } \cs_new:Npn \__keyval_misplaced_equal_error: - { - \__kernel_msg_expandable_error:nn { kernel } { misplaced-equals-sign } - } + { \__kernel_msg_expandable_error:nn { kernel } { misplaced-equals-sign } } \__kernel_msg_new:nnn { kernel } { misplaced-equals-sign } { Misplaced~equals~sign~in~key-value~input~\msg_line_context: } \group_begin: @@ -12705,7 +12962,7 @@ \tl_new:N \l_keys_path_tl \str_new:N \l__keys_inherit_str \tl_new:N \l__keys_relative_tl -\tl_set:Nn \l__keys_relative_tl { \q_no_value } +\tl_set:Nn \l__keys_relative_tl { \q__keys_no_value } \str_new:N \l__keys_property_str \bool_new:N \l__keys_selective_bool \bool_new:N \l__keys_filtered_bool @@ -12715,6 +12972,14 @@ \bool_new:N \l__keys_tmp_bool \tl_new:N \l__keys_tmpa_tl \tl_new:N \l__keys_tmpb_tl +\scan_new:N \s__keys_stop +\quark_new:N \q__keys_nil +\quark_new:N \q__keys_no_value +\__kernel_quark_new_conditional:Nn \__keys_quark_if_nil:n { TF } +\__kernel_quark_new_conditional:Nn \__keys_quark_if_no_value:N { TF } +\quark_new:N \q__keys_recursion_tail +\quark_new:N \q__keys_recursion_stop +\__kernel_quark_new_test:N \__keys_if_recursion_tail_stop:n \cs_new_protected:Npn \keys_define:nn { \__keys_define:onn \l__keys_module_str } \cs_new_protected:Npn \__keys_define:nnn #1#2#3 @@ -12743,7 +13008,7 @@ \str_if_empty:NF \l__keys_property_str { \__kernel_msg_error:nnxx { kernel } { key-property-unknown } - { \l__keys_property_str } { \l_keys_path_str } + { \l__keys_property_str } { \l_keys_path_str } } } } @@ -12751,9 +13016,9 @@ { \str_set:Nx \l__keys_property_str { \__keys_trim_spaces:n {#1} } \exp_after:wN \__keys_property_find:w \l__keys_property_str . . - \q_stop {#1} + \s__keys_stop {#1} } -\cs_new_protected:Npn \__keys_property_find:w #1 . #2 . #3 \q_stop #4 +\cs_new_protected:Npn \__keys_property_find:w #1 . #2 . #3 \s__keys_stop #4 { \tl_if_blank:nTF {#3} { @@ -12767,18 +13032,18 @@ { \str_if_empty:NF \l__keys_module_str { \l__keys_module_str / } - \tl_trim_spaces:n {#1} + \tl_trim_spaces:n {#1} } \str_set:Nn \l__keys_property_str { . #2 } } { \str_set:Nx \l_keys_path_str { \l__keys_module_str / #1 . #2 } - \__keys_property_search:w #3 \q_stop + \__keys_property_search:w #3 \s__keys_stop } \tl_set_eq:NN \l_keys_path_tl \l_keys_path_str } } -\cs_new_protected:Npn \__keys_property_search:w #1 . #2 \q_stop +\cs_new_protected:Npn \__keys_property_search:w #1 . #2 \s__keys_stop { \str_if_eq:nnTF {#2} { . } { @@ -12787,7 +13052,7 @@ } { \str_set:Nx \l_keys_path_str { \l_keys_path_str . #1 } - \__keys_property_search:w #2 \q_stop + \__keys_property_search:w #2 \s__keys_stop } } \cs_new_protected:Npn \__keys_define_code:n #1 @@ -12795,18 +13060,18 @@ \bool_if:NTF \l__keys_no_value_bool { \exp_after:wN \__keys_define_code:w - \l__keys_property_str \q_stop + \l__keys_property_str \s__keys_stop { \use:c { \c__keys_props_root_str \l__keys_property_str } } { \__kernel_msg_error:nnxx { kernel } { key-property-requires-value } { \l__keys_property_str } { \l_keys_path_str } - } + } } { \use:c { \c__keys_props_root_str \l__keys_property_str } {#1} } } \exp_last_unbraced:NNNNo - \cs_new:Npn \__keys_define_code:w #1 \c_colon_str #2 \q_stop + \cs_new:Npn \__keys_define_code:w #1 \c_colon_str #2 \s__keys_stop { \tl_if_empty:nTF {#2} } \cs_new_protected:Npn \__keys_bool_set:Nn #1#2 { @@ -12961,7 +13226,7 @@ \exp_after:wN \__keys_find_key_module:NNw \exp_after:wN \l__keys_tmpa_tl \exp_after:wN \l__keys_tmpb_tl - \l_keys_path_str / \q_stop + \l_keys_path_str / \s__keys_stop \__keys_cmd_set:nx { \l_keys_path_str } { \exp_not:c { prop_ #2 put:Nnn } @@ -13209,7 +13474,7 @@ \bool_set_false:N \exp_not:N \l__keys_filtered_bool \bool_set_false:N \exp_not:N \l__keys_selective_bool \tl_set:Nn \exp_not:N \l__keys_relative_tl - { \exp_not:N \q_no_value } + { \exp_not:N \q__keys_no_value } \__keys_set:nn \exp_not:n { {#1} {#2} } \bool_if:NT \l__keys_only_known_bool { \bool_set_true:N \exp_not:N \l__keys_only_known_bool } @@ -13233,7 +13498,7 @@ \cs_new_protected:Npn \keys_set_known:nnN #1#2#3 { \exp_args:No \__keys_set_known:nnnnN - \l__keys_unused_clist { \q_no_value } {#1} {#2} #3 + \l__keys_unused_clist { \q__keys_no_value } {#1} {#2} #3 } \cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } \cs_new_protected:Npn \keys_set_known:nnnN #1#2#3#4 @@ -13250,7 +13515,7 @@ \tl_set:Nn \l__keys_unused_clist {#1} } \cs_new_protected:Npn \keys_set_known:nn #1#2 - { \__keys_set_known:nnn { \q_no_value } {#1} {#2} } + { \__keys_set_known:nnn { \q__keys_no_value } {#1} {#2} } \cs_generate_variant:Nn \keys_set_known:nn { nV , nv , no } \cs_new_protected:Npn \__keys_set_known:nnn #1#2#3 { @@ -13275,7 +13540,7 @@ { \exp_args:No \__keys_set_filter:nnnnnN \l__keys_unused_clist - { \q_no_value } {#1} {#2} {#3} #4 + { \q__keys_no_value } {#1} {#2} {#3} #4 } \cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno } \cs_new_protected:Npn \keys_set_filter:nnnnN #1#2#3#4#5 @@ -13292,7 +13557,7 @@ \tl_set:Nn \l__keys_unused_clist {#1} } \cs_new_protected:Npn \keys_set_filter:nnn #1#2#3 - {\__keys_set_filter:nnnn { \q_no_value } {#1} {#2} {#3} } + {\__keys_set_filter:nnnn { \q__keys_no_value } {#1} {#2} {#3} } \cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno } \cs_new_protected:Npn \__keys_set_filter:nnnn #1#2#3#4 { @@ -13321,7 +13586,7 @@ \bool_set_false:N \exp_not:N \l__keys_filtered_bool \bool_set_true:N \exp_not:N \l__keys_selective_bool \tl_set:Nn \exp_not:N \l__keys_relative_tl - { \exp_not:N \q_no_value } + { \exp_not:N \q__keys_no_value } \__keys_set_selective:nnn \exp_not:n { {#1} {#2} {#3} } \bool_if:NT \l__keys_only_known_bool { \bool_set_true:N \exp_not:N \l__keys_only_known_bool } @@ -13365,7 +13630,7 @@ \exp_after:wN \__keys_find_key_module:NNw \exp_after:wN \l__keys_module_str \exp_after:wN \l_keys_key_str - \l_keys_path_str / \q_stop + \l_keys_path_str / \s__keys_stop \tl_set_eq:NN \l_keys_key_tl \l_keys_key_str \__keys_value_or_default:n {#3} \bool_if:NTF \l__keys_selective_bool @@ -13374,7 +13639,7 @@ \str_set:Nn \l__keys_module_str {#1} } \cs_generate_variant:Nn \__keys_set_keyval:nnn { o } -\cs_new_protected:Npn \__keys_find_key_module:NNw #1#2#3 / #4 \q_stop +\cs_new_protected:Npn \__keys_find_key_module:NNw #1#2#3 / #4 \s__keys_stop { \tl_if_blank:nTF {#4} { \str_set:Nn #2 {#3} } @@ -13384,7 +13649,7 @@ \str_if_empty:NF #1 { / } #3 } - \__keys_find_key_module:NNw #1#2 #4 \q_stop + \__keys_find_key_module:NNw #1#2 #4 \s__keys_stop } } \cs_new_protected:Npn \__keys_set_selective: @@ -13522,7 +13787,7 @@ } \cs_new_protected:Npn \__keys_store_unused: { - \quark_if_no_value:NTF \l__keys_relative_tl + \__keys_quark_if_no_value:NTF \l__keys_relative_tl { \clist_put_right:Nx \l__keys_unused_clist { @@ -13553,7 +13818,7 @@ \cs_set_protected:Npn \__keys_store_unused:w ####1 \l__keys_relative_tl / ####2 \l__keys_relative_tl / - ####3 \exp_not:N \q_stop + ####3 \s__keys_stop } { \tl_if_blank:nF {##1} @@ -13573,7 +13838,7 @@ { \__keys_store_unused:w \l_keys_path_str \l__keys_relative_tl / \l__keys_relative_tl / - \exp_not:N \q_stop + \s__keys_stop } } \cs_new_protected:Npn \__keys_store_unused:w { } @@ -13595,9 +13860,9 @@ \cs_new:Npn \__keys_multichoice_find:n #1 { \clist_map_function:nN {#1} \__keys_choice_find:n } \cs_new:Npn \__keys_parent:n #1 - { \__keys_parent:w #1 / / \q_stop { } } + { \__keys_parent:w #1 / / \s__keys_stop { } } \cs_generate_variant:Nn \__keys_parent:n { o } -\cs_new:Npn \__keys_parent:w #1 / #2 / #3 \q_stop #4 +\cs_new:Npn \__keys_parent:w #1 / #2 / #3 \s__keys_stop #4 { \tl_if_blank:nTF {#2} { @@ -13605,28 +13870,28 @@ { \use_none:n #4 } } { - \__keys_parent:w #2 / #3 \q_stop { #4 / #1 } + \__keys_parent:w #2 / #3 \s__keys_stop { #4 / #1 } } } \cs_new:Npn \__keys_trim_spaces:n #1 { \exp_after:wN \__keys_trim_spaces_auxi:w \tl_to_str:n {#1} - / \q_nil \q_stop + / \q__keys_nil \s__keys_stop } -\cs_new:Npn \__keys_trim_spaces_auxi:w #1 / #2 \q_stop +\cs_new:Npn \__keys_trim_spaces_auxi:w #1 / #2 \s__keys_stop { - \quark_if_nil:nTF {#2} + \__keys_quark_if_nil:nTF {#2} { \tl_trim_spaces:n {#1} } { \__keys_trim_spaces_auxii:w #1 / #2 } } -\cs_new:Npn \__keys_trim_spaces_auxii:w #1 / #2 / \q_nil +\cs_new:Npn \__keys_trim_spaces_auxii:w #1 / #2 / \q__keys_nil { \tl_trim_spaces:n {#1} - \__keys_trim_spaces_auxiii:w #2 / \q_recursion_tail / \q_recursion_stop + \__keys_trim_spaces_auxiii:w #2 / \q__keys_recursion_tail / \q__keys_recursion_stop } \cs_set:Npn \__keys_trim_spaces_auxiii:w #1 / { - \quark_if_recursion_tail_stop:n {#1} + \__keys_if_recursion_tail_stop:n {#1} / \tl_trim_spaces:n { #1 } \__keys_trim_spaces_auxiii:w } @@ -13970,8 +14235,11 @@ \scan_new:N \s__fp \cs_new_protected:Npn \__fp_chk:w #1 ; { \__fp_misused:n { \s__fp \__fp_chk:w #1 ; } } +\scan_new:N \s__fp_expr_mark +\scan_new:N \s__fp_expr_stop \scan_new:N \s__fp_mark \scan_new:N \s__fp_stop +\cs_new:Npn \__fp_use_i_delimit_by_s_stop:nw #1 #2 \s__fp_stop {#1} \scan_new:N \s__fp_invalid \scan_new:N \s__fp_underflow \scan_new:N \s__fp_overflow @@ -14015,7 +14283,7 @@ \__fp_if_type_fp:NTwFw #1 \__fp_use_ii_until_s:nnw \s__fp { \__fp_use_i_until_s:nw 4 } - \q_stop + \s__fp_stop } \cs_new:Npn \__fp_sanitize:Nw #1 #2; { @@ -14091,7 +14359,7 @@ } \cs_new:Npn \__fp_tuple_count_loop:Nw #1#2; { \use_none:n #1 + 1 \__fp_tuple_count_loop:Nw } -\cs_new:Npn \__fp_if_type_fp:NTwFw #1 \s__fp #2 #3 \q_stop {#2} +\cs_new:Npn \__fp_if_type_fp:NTwFw #1 \s__fp #2 #3 \s__fp_stop {#2} \cs_new:Npn \__fp_array_if_all_fp:nTF #1 { \__fp_array_if_all_fp_loop:w #1 { \s__fp \prg_break: } ; @@ -14102,24 +14370,24 @@ \__fp_if_type_fp:NTwFw #1 \__fp_array_if_all_fp_loop:w \s__fp { \prg_break:n \use_iii:nnn } - \q_stop + \s__fp_stop } \cs_new:Npn \__fp_type_from_scan:N #1 { \__fp_if_type_fp:NTwFw #1 { } \s__fp { \__fp_type_from_scan_other:N #1 } - \q_stop + \s__fp_stop } \cs_new:Npx \__fp_type_from_scan_other:N #1 { \exp_not:N \exp_after:wN \exp_not:N \__fp_type_from_scan:w - \exp_not:N \token_to_str:N #1 \exp_not:N \q_mark - \tl_to_str:n { s__fp _? } \exp_not:N \q_mark \exp_not:N \q_stop + \exp_not:N \token_to_str:N #1 \s__fp_mark + \tl_to_str:n { s__fp _? } \s__fp_mark \s__fp_stop } \exp_last_unbraced:NNNNo \cs_new:Npn \__fp_type_from_scan:w #1 - { \tl_to_str:n { s__fp } } #2 \q_mark #3 \q_stop {#2} + { \tl_to_str:n { s__fp } } #2 \s__fp_mark #3 \s__fp_stop {#2} \cs_new:Npn \__fp_change_func_type:NNN #1#2#3 { \__fp_if_type_fp:NTwFw @@ -14133,7 +14401,7 @@ \cs_end: #2 #3 } - \q_stop + \s__fp_stop } \exp_last_unbraced:NNNNo \cs_new:Npn \__fp_change_func_type_aux:w #1 { \tl_to_str:n { __fp } } { } @@ -14152,10 +14420,10 @@ \__fp_if_type_fp:NTwFw #2 \__fp_exp_after_f:nw \s__fp { \__fp_exp_after_any_f:Nnw #2 } - \q_stop + \s__fp_stop {#1} #2 } -\cs_new_eq:NN \__fp_exp_after_stop_f:nw \use_none:nn +\cs_new_eq:NN \__fp_exp_after_expr_stop_f:nw \use_none:nn \cs_new:Npn \__fp_exp_after_tuple_o:w { \__fp_exp_after_tuple_f:nw { \exp_after:wN \exp_stop_f: } } \cs_new:Npn \__fp_exp_after_tuple_f:nw @@ -14165,7 +14433,7 @@ \exp_after:wN \__fp_tuple_chk:w \exp_after:wN { \exp:w \exp_end_continue_f:w - \__fp_exp_after_array_f:w #2 \s__fp_stop + \__fp_exp_after_array_f:w #2 \s__fp_expr_stop \exp_after:wN } \exp_after:wN ; \exp:w \exp_end_continue_f:w #1 @@ -14882,7 +15150,7 @@ \exp_after:wN #1 \exp:w \__fp_parse_expand:w } } -\cs_new:Npn \__fp_exp_after_mark_f:nw #1 +\cs_new:Npn \__fp_exp_after_expr_mark_f:nw #1 { \int_case:nnF { \exp_after:wN \use_i:nnn \use_none:nnn #1 } { @@ -14952,11 +15220,11 @@ ; \exp_not:N \__fp_parse_one_register_dim:ww \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_mu:www . \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_int:www - \exp_not:N \q_stop + \s__fp_stop } \exp_args:Nno \use:nn { \cs_new:Npn \__fp_parse_one_register_auxii:wwwNw #1 . #2 } - { \tl_to_str:n { pt } #3 ; #4#5 \q_stop } + { \tl_to_str:n { pt } #3 ; #4#5 \s__fp_stop } { #4 #1.#2; } \exp_args:Nno \use:nn { \cs_new:Npn \__fp_parse_one_register_mu:www #1 } @@ -15463,12 +15731,12 @@ } \cs_new:Npn \__fp_parse_apply_unary:NNNwN #1#2#3#4@#5 { - \__fp_parse_apply_unary_chk:NwNw #4 @ ; . \q_stop + \__fp_parse_apply_unary_chk:NwNw #4 @ ; . \s__fp_stop \__fp_parse_apply_unary_type:NNN #3 #2 #4 @ \exp:w \exp_end_continue_f:w #5 #1 } -\cs_new:Npn \__fp_parse_apply_unary_chk:NwNw #1#2 ; #3#4 \q_stop +\cs_new:Npn \__fp_parse_apply_unary_chk:NwNw #1#2 ; #3#4 \s__fp_stop { \if_meaning:w @ #3 \else: \token_if_eq_meaning:NNTF . #3 @@ -15533,7 +15801,7 @@ \exp_not:N \token_if_eq_meaning:NNTF #3 \exp_not:c { __fp_parse_infix_):N } { - \exp_not:N \__fp_exp_after_array_f:w #2 \s__fp_stop + \exp_not:N \__fp_exp_after_array_f:w #2 \s__fp_expr_stop \exp_not:N \exp_after:wN \exp_not:N \__fp_parse_infix_after_paren:NN \exp_not:N \exp_after:wN #1 @@ -15631,12 +15899,12 @@ \exp:w \__fp_parse_operand:Nw \c__fp_prec_end_int \__fp_parse_expand:w #1 - \s__fp_mark \__fp_parse_infix_end:N - \s__fp_stop + \s__fp_expr_mark \__fp_parse_infix_end:N + \s__fp_expr_stop \exp_end: } \cs_new:Npn \__fp_parse_after:ww - #1@ \__fp_parse_infix_end:N \s__fp_stop #2 { #2 #1 } + #1@ \__fp_parse_infix_end:N \s__fp_expr_stop #2 { #2 #1 } \cs_new:Npn \__fp_parse_o:n #1 { \exp:w @@ -15644,8 +15912,8 @@ \exp:w \__fp_parse_operand:Nw \c__fp_prec_end_int \__fp_parse_expand:w #1 - \s__fp_mark \__fp_parse_infix_end:N - \s__fp_stop + \s__fp_expr_mark \__fp_parse_infix_end:N + \s__fp_expr_stop { \exp_end_continue_f:w \__fp_exp_after_any_f:nw { \exp_after:wN \exp_stop_f: } @@ -15726,7 +15994,7 @@ { \if_catcode:w \scan_stop: \exp_not:N #2 \if_int_compare:w - \__fp_str_if_eq:nn { \s__fp_mark } { \exp_not:N #2 } + \__fp_str_if_eq:nn { \s__fp_expr_mark } { \exp_not:N #2 } = 0 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN \__fp_parse_infix_mark:NNN @@ -15770,7 +16038,7 @@ { \if_catcode:w \scan_stop: \exp_not:N #2 \if_int_compare:w - \__fp_str_if_eq:nn { \s__fp_mark } { \exp_not:N #2 } + \__fp_str_if_eq:nn { \s__fp_expr_mark } { \exp_not:N #2 } = 0 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN \__fp_parse_infix_mark:NNN @@ -16068,7 +16336,7 @@ \cs_new:Npn \__fp_parse_function_one_two:nnw #1#2#3 { \__fp_if_type_fp:NTwFw - #3 { } \s__fp \__fp_parse_function_one_two_error_o:w \q_stop + #3 { } \s__fp \__fp_parse_function_one_two_error_o:w \s__fp_stop \__fp_parse_function_one_two_aux:nnw {#1} {#2} #3 } \cs_new:Npn \__fp_parse_function_one_two_error_o:w #1#2#3#4 @ @@ -16090,7 +16358,7 @@ \fi: \__fp_parse_function_one_two_error_o:w } - \q_stop + \s__fp_stop \__fp_parse_function_one_two_auxii:nnw {#1} {#2} #3; #4 } \cs_new:Npn \__fp_parse_function_one_two_auxii:nnw #1#2#3; #4; #5 @@ -16255,8 +16523,8 @@ { \if_charcode:w 0 \__fp_if_type_fp:NTwFw - #1 { \use_i_delimit_by_q_stop:nw #3 \q_stop } - \s__fp 1 \q_stop + #1 { \__fp_use_i_delimit_by_s_stop:nw #3 \s__fp_stop } + \s__fp 1 \s__fp_stop \prg_return_false: \else: \prg_return_true: @@ -16281,8 +16549,8 @@ \cs_new:Npn \__fp_compare_back_any:ww #1#2; #3 { \__fp_if_type_fp:NTwFw - #1 { \__fp_if_type_fp:NTwFw #3 \use_i:nn \s__fp \use_ii:nn \q_stop } - \s__fp \use_ii:nn \q_stop + #1 { \__fp_if_type_fp:NTwFw #3 \use_i:nn \s__fp \use_ii:nn \s__fp_stop } + \s__fp \use_ii:nn \s__fp_stop \__fp_compare_back:ww { \cs:w @@ -16438,9 +16706,9 @@ \cs_generate_variant:Nn \fp_step_function:nnnN { nnnc } \cs_new:Npn \__fp_step:wwwN #1#2; #3#4; #5#6; #7 { - \__fp_if_type_fp:NTwFw #1 { } \s__fp \prg_break: \q_stop - \__fp_if_type_fp:NTwFw #3 { } \s__fp \prg_break: \q_stop - \__fp_if_type_fp:NTwFw #5 { } \s__fp \prg_break: \q_stop + \__fp_if_type_fp:NTwFw #1 { } \s__fp \prg_break: \s__fp_stop + \__fp_if_type_fp:NTwFw #3 { } \s__fp \prg_break: \s__fp_stop + \__fp_if_type_fp:NTwFw #5 { } \s__fp \prg_break: \s__fp_stop \use_i:nnnn { \__fp_step_fp:wwwN #1#2; #3#4; #5#6; #7 } \prg_break_point: \use:n @@ -16607,15 +16875,15 @@ \if_meaning:w \__fp_parse_infix_::N #5 \if_charcode:w 0 \__fp_if_type_fp:NTwFw - #2 { \use_i:nn \use_i_delimit_by_q_stop:nw #3 \q_stop } - \s__fp 1 \q_stop + #2 { \use_i:nn \__fp_use_i_delimit_by_s_stop:nw #3 \s__fp_stop } + \s__fp 1 \s__fp_stop \exp_after:wN \exp_after:wN \exp_after:wN \__fp_ternary_auxii:NwwN \else: \exp_after:wN \exp_after:wN \exp_after:wN \__fp_ternary_auxi:NwwN \fi: \exp_after:wN #1 \exp:w \exp_end_continue_f:w - \__fp_exp_after_array_f:w #4 \s__fp_stop + \__fp_exp_after_array_f:w #4 \s__fp_expr_stop \exp_after:wN @ \exp:w \__fp_parse_operand:Nw \c__fp_prec_colon_int @@ -16626,7 +16894,7 @@ \exp_after:wN \__fp_parse_continue:NwN \exp_after:wN #1 \exp:w \exp_end_continue_f:w - \__fp_exp_after_array_f:w #4 \s__fp_stop + \__fp_exp_after_array_f:w #4 \s__fp_expr_stop \exp_after:wN #5 \exp_after:wN #1 \fi: @@ -16636,7 +16904,7 @@ \exp_after:wN \__fp_parse_continue:NwN \exp_after:wN #1 \exp:w \exp_end_continue_f:w - \__fp_exp_after_array_f:w #2 \s__fp_stop + \__fp_exp_after_array_f:w #2 \s__fp_expr_stop #4 #1 } \cs_new:Npn \__fp_ternary_auxii:NwwN #1#2@#3@#4 @@ -16644,7 +16912,7 @@ \exp_after:wN \__fp_parse_continue:NwN \exp_after:wN #1 \exp:w \exp_end_continue_f:w - \__fp_exp_after_array_f:w #3 \s__fp_stop + \__fp_exp_after_array_f:w #3 \s__fp_expr_stop #4 #1 } %% File: l3fp-basics.dtx @@ -18222,7 +18490,7 @@ ; #2#3#4 0000 0000 ; } \cs_new:Npn \__fp_exp_Taylor_ii:ww #1; #2; - { \__fp_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s_stop } + { \__fp_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s__fp_stop } \cs_new:Npn \__fp_exp_Taylor_loop:www #1; #2; #3; { \if_int_compare:w #1 = 1 \exp_stop_f: @@ -18237,7 +18505,7 @@ #2 ; } } -\cs_new:Npn \__fp_exp_Taylor_break:Nww #1 #2; #3 \s_stop +\cs_new:Npn \__fp_exp_Taylor_break:Nww #1 #2; #3 \s__fp_stop { \__fp_fixed_add_one:wN #2 ; } \intarray_const_from_clist:Nn \c__fp_exp_intarray { @@ -19553,11 +19821,11 @@ \cs_new:Npn \__fp_trim_zeros:w #1 ; { \__fp_trim_zeros_loop:w #1 - ; \__fp_trim_zeros_loop:w 0; \__fp_trim_zeros_dot:w .; \s_stop + ; \__fp_trim_zeros_loop:w 0; \__fp_trim_zeros_dot:w .; \s__fp_stop } \cs_new:Npn \__fp_trim_zeros_loop:w #1 0; #2 { #2 #1 ; #2 } \cs_new:Npn \__fp_trim_zeros_dot:w #1 .; { \__fp_trim_zeros_end:w #1 ; } -\cs_new:Npn \__fp_trim_zeros_end:w #1 ; #2 \s_stop { #1 } +\cs_new:Npn \__fp_trim_zeros_end:w #1 ; #2 \s__fp_stop { #1 } \cs_new:Npn \fp_to_scientific:N #1 { \exp_after:wN \__fp_to_scientific_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_scientific:N { c } @@ -20314,6 +20582,8 @@ \int_new:N \l__sort_A_int \int_new:N \l__sort_B_int \int_new:N \l__sort_C_int +\scan_new:N \s__sort_mark +\scan_new:N \s__sort_stop \cs_new_protected:Npn \__sort_shrink_range: { \int_set:Nn \l__sort_A_int @@ -20507,30 +20777,30 @@ \prg_do_nothing: \__sort_return_mark:w \__sort_return_mark:w - \q_mark + \s__sort_mark \__sort_return_none_error: } \cs_new_protected:Npn \sort_return_same: - #1 \__sort_return_mark:w #2 \q_mark + #1 \__sort_return_mark:w #2 \s__sort_mark { #1 #2 \__sort_return_two_error: \__sort_return_mark:w - \q_mark + \s__sort_mark \__sort_return_same:w } \cs_new_protected:Npn \sort_return_swapped: - #1 \__sort_return_mark:w #2 \q_mark + #1 \__sort_return_mark:w #2 \s__sort_mark { #1 #2 \__sort_return_two_error: \__sort_return_mark:w - \q_mark + \s__sort_mark \__sort_return_swapped:w } -\cs_new_protected:Npn \__sort_return_mark:w #1 \q_mark { } +\cs_new_protected:Npn \__sort_return_mark:w #1 \s__sort_mark { } \cs_new_protected:Npn \__sort_return_none_error: { \__kernel_msg_error:nnxx { kernel } { return-none } @@ -20583,7 +20853,7 @@ \__sort_quick_prepare:Nnnn #2 { } { } #1 { \prg_break_point: \__sort_quick_prepare_end:NNNnw } - \q_stop + \s__sort_stop } } } @@ -20592,13 +20862,13 @@ \prg_break: #4 \prg_break_point: \__sort_quick_prepare:Nnnn #1 { #2 #3 } { #1 {#4} } } -\cs_new:Npn \__sort_quick_prepare_end:NNNnw #1#2#3#4#5 \q_stop +\cs_new:Npn \__sort_quick_prepare_end:NNNnw #1#2#3#4#5 \s__sort_stop { \__sort_quick_split:NnNn #4 \__sort_quick_end:nnTFNn { } - \q_mark { \__sort_quick_cleanup:w \exp_stop_f: } - \s_stop \q_stop + \s__sort_mark { \__sort_quick_cleanup:w \exp_stop_f: } + \s__sort_mark \s__sort_stop } -\cs_new:Npn \__sort_quick_cleanup:w #1 \s_stop \q_stop {#1} +\cs_new:Npn \__sort_quick_cleanup:w #1 \s__sort_mark \s__sort_stop {#1} \cs_new:Npn \__sort_quick_split:NnNn #1#2#3#4 { #3 {#2} {#4} \__sort_quick_only_ii:NnnnnNn @@ -20635,30 +20905,30 @@ { #6 {#7} } {#3} { #4 #2 } {#5} } \cs_new:Npn \__sort_quick_end:nnTFNn #1#2#3#4#5#6 {#5} -\cs_new:Npn \__sort_quick_single_end:nnnwnw #1#2#3#4 \q_mark #5#6 \q_stop - { #5 {#3} #6 \q_stop } -\cs_new:Npn \__sort_quick_only_i_end:nnnwnw #1#2#3#4 \q_mark #5#6 \q_stop +\cs_new:Npn \__sort_quick_single_end:nnnwnw #1#2#3#4 \s__sort_mark #5#6 \s__sort_stop + { #5 {#3} #6 \s__sort_stop } +\cs_new:Npn \__sort_quick_only_i_end:nnnwnw #1#2#3#4 \s__sort_mark #5#6 \s__sort_stop { \__sort_quick_split:NnNn #1 - \__sort_quick_end:nnTFNn { } \q_mark {#5} + \__sort_quick_end:nnTFNn { } \s__sort_mark {#5} {#3} - #6 \q_stop + #6 \s__sort_stop } -\cs_new:Npn \__sort_quick_only_ii_end:nnnwnw #1#2#3#4 \q_mark #5#6 \q_stop +\cs_new:Npn \__sort_quick_only_ii_end:nnnwnw #1#2#3#4 \s__sort_mark #5#6 \s__sort_stop { \__sort_quick_split:NnNn #2 - \__sort_quick_end:nnTFNn { } \q_mark { #5 {#3} } - #6 \q_stop + \__sort_quick_end:nnTFNn { } \s__sort_mark { #5 {#3} } + #6 \s__sort_stop } -\cs_new:Npn \__sort_quick_split_end:nnnwnw #1#2#3#4 \q_mark #5#6 \q_stop +\cs_new:Npn \__sort_quick_split_end:nnnwnw #1#2#3#4 \s__sort_mark #5#6 \s__sort_stop { - \__sort_quick_split:NnNn #2 \__sort_quick_end:nnTFNn { } \q_mark + \__sort_quick_split:NnNn #2 \__sort_quick_end:nnTFNn { } \s__sort_mark { \__sort_quick_split:NnNn #1 - \__sort_quick_end:nnTFNn { } \q_mark {#5} + \__sort_quick_end:nnTFNn { } \s__sort_mark {#5} {#3} } - #6 \q_stop + #6 \s__sort_stop } \cs_new_protected:Npn \__sort_error: { @@ -20723,6 +20993,8 @@ \tl_new:N \g__str_result_tl \int_const:Nn \c__str_replacement_char_int { "FFFD } \int_const:Nn \c__str_max_byte_int { 255 } +\scan_new:N \s__str +\quark_new:N \q__str_nil \prop_new:N \g__str_alias_prop \prop_gput:Nnn \g__str_alias_prop { latin1 } { iso88591 } \prop_gput:Nnn \g__str_alias_prop { latin2 } { iso88592 } @@ -20857,13 +21129,13 @@ { \exp_after:wN \__str_convert_gmap_internal_loop:Nww \exp_after:wN #1 - \g__str_result_tl \s__tl \q_stop \prg_break: \s__tl + \g__str_result_tl \s__str \s__str_stop \prg_break: \s__str \prg_break_point: } } -\cs_new:Npn \__str_convert_gmap_internal_loop:Nww #1 #2 \s__tl #3 \s__tl +\cs_new:Npn \__str_convert_gmap_internal_loop:Nww #1 #2 \s__str #3 \s__str { - \use_none_delimit_by_q_stop:w #3 \q_stop + \__str_use_none_delimit_by_s_stop:w #3 \s__str_stop #1 {#3} \__str_convert_gmap_internal_loop:Nww #1 } @@ -20905,12 +21177,12 @@ #1 \tl_gset:Nx \g__str_result_tl { \__kernel_str_to_other_fast:n {#4} } \exp_after:wN \__str_convert:wwwnn - \tl_to_str:n {#5} /// \q_stop + \tl_to_str:n {#5} /// \s__str_stop { decode } { unescape } \prg_do_nothing: \__str_convert_decode_: \exp_after:wN \__str_convert:wwwnn - \tl_to_str:n {#6} /// \q_stop + \tl_to_str:n {#6} /// \s__str_stop { encode } { escape } \use_ii_i:nn \__str_convert_encode_: @@ -20918,7 +21190,7 @@ #2 #3 \g__str_result_tl } \cs_new_protected:Npn \__str_convert:wwwnn - #1 / #2 // #3 \q_stop #4#5 + #1 / #2 // #3 \s__str_stop #4#5 { \__str_convert:nnn {enc} {#4} {#1} \__str_convert:nnn {esc} {#5} {#2} @@ -21061,7 +21333,7 @@ \cs_new_protected:Npn \__str_convert_decode_: { \__str_convert_gmap:N \__str_decode_native_char:N } \cs_new:Npn \__str_decode_native_char:N #1 - { #1 \s__tl \int_value:w `#1 \s__tl } + { #1 \s__str \int_value:w `#1 \s__str } \bool_lazy_any:nTF { \sys_if_engine_luatex_p: @@ -21108,7 +21380,7 @@ } } \cs_new:Npn \__str_decode_clist_char:n #1 - { #1 \s__tl \int_eval:n {#1} \s__tl } + { #1 \s__str \int_eval:n {#1} \s__str } \cs_new_protected:Npn \__str_convert_encode_clist: { \__str_convert_gmap_internal:N \__str_encode_clist_char:n @@ -21131,11 +21403,11 @@ \int_zero:N \l__str_internal_int \exp_last_unbraced:Nx \__str_decode_eight_bit_load:nn { \tl_use:c { c__str_encoding_#1_tl } } - { \q_stop \prg_break: } { } + { \s__str_stop \prg_break: } { } \prg_break_point: \exp_last_unbraced:Nx \__str_decode_eight_bit_load_missing:n { \tl_use:c { c__str_encoding_#1_missing_tl } } - { \q_stop \prg_break: } + { \s__str_stop \prg_break: } \prg_break_point: \flag_clear:n { str_error } \__str_convert_gmap:N \__str_decode_eight_bit_char:N @@ -21144,7 +21416,7 @@ } \cs_new_protected:Npn \__str_decode_eight_bit_load:nn #1#2 { - \use_none_delimit_by_q_stop:w #1 \q_stop + \__str_use_none_delimit_by_s_stop:w #1 \s__str_stop \tex_dimen:D "#1 = \l__str_internal_int sp \scan_stop: \tex_skip:D \l__str_internal_int = "#1 sp \scan_stop: \tex_toks:D \l__str_internal_int \exp_after:wN { \int_value:w "#2 } @@ -21153,7 +21425,7 @@ } \cs_new_protected:Npn \__str_decode_eight_bit_load_missing:n #1 { - \use_none_delimit_by_q_stop:w #1 \q_stop + \__str_use_none_delimit_by_s_stop:w #1 \s__str_stop \tex_dimen:D "#1 = \l__str_internal_int sp \scan_stop: \tex_skip:D \l__str_internal_int = "#1 sp \scan_stop: \tex_toks:D \l__str_internal_int \exp_after:wN @@ -21163,13 +21435,13 @@ } \cs_new:Npn \__str_decode_eight_bit_char:N #1 { - #1 \s__tl + #1 \s__str \if_int_compare:w \tex_dimen:D `#1 < \l__str_internal_int \if_int_compare:w \tex_skip:D \tex_dimen:D `#1 = `#1 \exp_stop_f: \tex_the:D \tex_toks:D \tex_dimen:D \fi: \fi: - \int_value:w `#1 \s__tl + \int_value:w `#1 \s__str } \cs_new_protected:Npn \__str_convert_encode_eight_bit:n #1 { @@ -21177,7 +21449,7 @@ \int_zero:N \l__str_internal_int \exp_last_unbraced:Nx \__str_encode_eight_bit_load:nn { \tl_use:c { c__str_encoding_#1_tl } } - { \q_stop \prg_break: } { } + { \s__str_stop \prg_break: } { } \prg_break_point: \flag_clear:n { str_error } \__str_convert_gmap_internal:N \__str_encode_eight_bit_char:n @@ -21186,7 +21458,7 @@ } \cs_new_protected:Npn \__str_encode_eight_bit_load:nn #1#2 { - \use_none_delimit_by_q_stop:w #1 \q_stop + \__str_use_none_delimit_by_s_stop:w #1 \s__str_stop \tex_dimen:D "#2 = \l__str_internal_int sp \scan_stop: \tex_skip:D \l__str_internal_int = "#2 sp \scan_stop: \exp_args:NNf \tex_toks:D \l__str_internal_int @@ -21535,17 +21807,17 @@ { 32 } { 192 } { 16 } { 224 } { 8 } { 240 } - \q_stop + \s__str_stop } -\cs_new:Npn \__str_encode_utf_viii_loop:wwnnw #1; #2; #3#4 #5 \q_stop +\cs_new:Npn \__str_encode_utf_viii_loop:wwnnw #1; #2; #3#4 #5 \s__str_stop { \if_int_compare:w #1 < #3 \exp_stop_f: \__str_output_byte:n { #1 + #4 } - \exp_after:wN \use_none_delimit_by_q_stop:w + \exp_after:wN \__str_use_none_delimit_by_s_stop:w \fi: \exp_after:wN \__str_encode_utf_viii_loop:wwnnw \int_value:w \int_div_truncate:nn {#1} {64} ; #1 ; - #5 \q_stop + #5 \s__str_stop \__str_output_byte:n { #2 - 64 * ( #1 - 2 ) } } \flag_clear_new:n { str_missing } @@ -21618,7 +21890,7 @@ { #1 \if_int_compare:w `#1 < "C0 \exp_stop_f: - \s__tl + \s__str \if_int_compare:w `#1 < "80 \exp_stop_f: \int_value:w `#1 \else: @@ -21630,12 +21902,12 @@ \exp_after:wN \__str_decode_utf_viii_continuation:wwN \int_value:w \int_eval:n { `#1 - "C0 } \exp_after:wN \fi: - \s__tl - \use_none_delimit_by_q_stop:w {"80} {"800} {"10000} {"110000} \q_stop + \s__str + \__str_use_none_delimit_by_s_stop:w {"80} {"800} {"10000} {"110000} \s__str_stop \__str_decode_utf_viii_start:N } \cs_new:Npn \__str_decode_utf_viii_continuation:wwN - #1 \s__tl #2 \__str_decode_utf_viii_start:N #3 + #1 \s__str #2 \__str_decode_utf_viii_start:N #3 { \use_none:n #3 \if_int_compare:w `#3 < @@ -21645,20 +21917,20 @@ \exp_after:wN \__str_decode_utf_viii_aux:wNnnwN \int_value:w \int_eval:n { #1 * "40 + `#3 - "80 } \exp_after:wN \else: - \s__tl + \s__str \flag_raise:n { str_missing } \flag_raise:n { str_error } \int_use:N \c__str_replacement_char_int \fi: - \s__tl + \s__str #2 \__str_decode_utf_viii_start:N #3 } \cs_new:Npn \__str_decode_utf_viii_aux:wNnnwN - #1 \s__tl #2#3#4 #5 \__str_decode_utf_viii_start:N #6 + #1 \s__str #2#3#4 #5 \__str_decode_utf_viii_start:N #6 { \if_int_compare:w #1 < #4 \exp_stop_f: - \s__tl + \s__str \if_int_compare:w #1 < #3 \exp_stop_f: \flag_raise:n { str_overlong } \flag_raise:n { str_error } @@ -21667,13 +21939,13 @@ #1 \fi: \else: - \if_meaning:w \q_stop #5 + \if_meaning:w \s__str_stop #5 \__str_decode_utf_viii_overflow:w #1 \fi: \exp_after:wN \__str_decode_utf_viii_continuation:wwN \int_value:w \int_eval:n { #1 - #4 } \exp_after:wN \fi: - \s__tl + \s__str #2 {#4} #5 \__str_decode_utf_viii_start:N } @@ -21686,10 +21958,10 @@ } \cs_new:Npn \__str_decode_utf_viii_end: { - \s__tl + \s__str \flag_raise:n { str_missing } \flag_raise:n { str_error } - \int_use:N \c__str_replacement_char_int \s__tl + \int_use:N \c__str_replacement_char_int \s__str \prg_break: } \group_begin: @@ -21781,13 +22053,13 @@ } } \cs_new_protected:cpn { __str_convert_decode_utf16be: } - { \__str_decode_utf_xvi:Nw 1 \g__str_result_tl \s_stop } + { \__str_decode_utf_xvi:Nw 1 \g__str_result_tl \s__str_stop } \cs_new_protected:cpn { __str_convert_decode_utf16le: } - { \__str_decode_utf_xvi:Nw 2 \g__str_result_tl \s_stop } + { \__str_decode_utf_xvi:Nw 2 \g__str_result_tl \s__str_stop } \cs_new_protected:cpn { __str_convert_decode_utf16: } { \exp_after:wN \__str_decode_utf_xvi_bom:NN - \g__str_result_tl \s_stop \s_stop \s_stop + \g__str_result_tl \s__str_stop \s__str_stop \s__str_stop } \cs_new_protected:Npn \__str_decode_utf_xvi_bom:NN #1#2 { @@ -21799,7 +22071,7 @@ { \__str_decode_utf_xvi:Nw 1 #1#2 } } } - \cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s_stop + \cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s__str_stop { \flag_clear:n { str_error } \flag_clear:n { str_missing } @@ -21809,14 +22081,14 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_decode_utf_xvi_pair:NN - #2 \q_nil \q_nil + #2 \q__str_nil \q__str_nil \prg_break_point: } \__str_if_flag_error:nnx { str_error } { utf16-decode } { } } \cs_new:Npn \__str_decode_utf_xvi_pair:NN #1#2 { - \if_meaning:w \q_nil #2 + \if_meaning:w \q__str_nil #2 \__str_decode_utf_xvi_pair_end:Nw #1 \fi: \if_case:w @@ -21824,14 +22096,14 @@ \or: \exp_after:wN \__str_decode_utf_xvi_quad:NNwNN \or: \exp_after:wN \__str_decode_utf_xvi_extra:NNw \fi: - #1#2 \s__tl - \int_eval:n { "100 * \__str_tmp:w #1#2 + \__str_tmp:w #2#1 } \s__tl + #1#2 \s__str + \int_eval:n { "100 * \__str_tmp:w #1#2 + \__str_tmp:w #2#1 } \s__str \__str_decode_utf_xvi_pair:NN } \cs_new:Npn \__str_decode_utf_xvi_quad:NNwNN #1#2 #3 \__str_decode_utf_xvi_pair:NN #4#5 { - \if_meaning:w \q_nil #5 + \if_meaning:w \q__str_nil #5 \__str_decode_utf_xvi_error:nNN { missing } #1#2 \__str_decode_utf_xvi_pair_end:Nw #4 \fi: @@ -21842,13 +22114,13 @@ \__str_tmp:w #4#5 < "E0 \fi: \exp_stop_f: - #1 #2 #4 #5 \s__tl + #1 #2 #4 #5 \s__str \int_eval:n { ( "100 * \__str_tmp:w #1#2 + \__str_tmp:w #2#1 - "D7F7 ) * "400 + "100 * \__str_tmp:w #4#5 + \__str_tmp:w #5#4 } - \s__tl + \s__str \exp_after:wN \use_i:nnn \else: \__str_decode_utf_xvi_error:nNN { missing } #1#2 @@ -21858,20 +22130,20 @@ \cs_new:Npn \__str_decode_utf_xvi_pair_end:Nw #1 \fi: { \fi: - \if_meaning:w \q_nil #1 + \if_meaning:w \q__str_nil #1 \else: \__str_decode_utf_xvi_error:nNN { end } #1 \prg_do_nothing: \fi: \prg_break: } - \cs_new:Npn \__str_decode_utf_xvi_extra:NNw #1#2 \s__tl #3 \s__tl + \cs_new:Npn \__str_decode_utf_xvi_extra:NNw #1#2 \s__str #3 \s__str { \__str_decode_utf_xvi_error:nNN { extra } #1#2 } \cs_new:Npn \__str_decode_utf_xvi_error:nNN #1#2#3 { \flag_raise:n { str_error } \flag_raise:n { str_#1 } - #2 #3 \s__tl - \int_use:N \c__str_replacement_char_int \s__tl + #2 #3 \s__str + \int_use:N \c__str_replacement_char_int \s__str } \group_end: \group_begin: @@ -21939,13 +22211,13 @@ } } \cs_new_protected:cpn { __str_convert_decode_utf32be: } - { \__str_decode_utf_xxxii:Nw 1 \g__str_result_tl \s_stop } + { \__str_decode_utf_xxxii:Nw 1 \g__str_result_tl \s__str_stop } \cs_new_protected:cpn { __str_convert_decode_utf32le: } - { \__str_decode_utf_xxxii:Nw 2 \g__str_result_tl \s_stop } + { \__str_decode_utf_xxxii:Nw 2 \g__str_result_tl \s__str_stop } \cs_new_protected:cpn { __str_convert_decode_utf32: } { \exp_after:wN \__str_decode_utf_xxxii_bom:NNNN \g__str_result_tl - \s_stop \s_stop \s_stop \s_stop \s_stop + \s__str_stop \s__str_stop \s__str_stop \s__str_stop \s__str_stop } \cs_new_protected:Npn \__str_decode_utf_xxxii_bom:NNNN #1#2#3#4 { @@ -21957,7 +22229,7 @@ { \__str_decode_utf_xxxii:Nw 1 #1#2#3#4 } } } - \cs_new_protected:Npn \__str_decode_utf_xxxii:Nw #1#2 \s_stop + \cs_new_protected:Npn \__str_decode_utf_xxxii:Nw #1#2 \s__str_stop { \flag_clear:n { str_overflow } \flag_clear:n { str_end } @@ -21966,17 +22238,17 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_decode_utf_xxxii_loop:NNNN - #2 \s_stop \s_stop \s_stop \s_stop + #2 \s__str_stop \s__str_stop \s__str_stop \s__str_stop \prg_break_point: } \__str_if_flag_error:nnx { str_error } { utf32-decode } { } } \cs_new:Npn \__str_decode_utf_xxxii_loop:NNNN #1#2#3#4 { - \if_meaning:w \s_stop #4 + \if_meaning:w \s__str_stop #4 \exp_after:wN \__str_decode_utf_xxxii_end:w \fi: - #1#2#3#4 \s__tl + #1#2#3#4 \s__str \if_int_compare:w \__str_tmp:w #1#4 > 0 \exp_stop_f: \flag_raise:n { str_overflow } \flag_raise:n { str_error } @@ -21991,17 +22263,17 @@ { \__str_tmp:w #2#3*"10000 + \__str_tmp:w #3#2*"100 + \__str_tmp:w #4#1 } \fi: \fi: - \s__tl + \s__str \__str_decode_utf_xxxii_loop:NNNN } - \cs_new:Npn \__str_decode_utf_xxxii_end:w #1 \s_stop + \cs_new:Npn \__str_decode_utf_xxxii_end:w #1 \s__str_stop { \tl_if_empty:nF {#1} { \flag_raise:n { str_end } \flag_raise:n { str_error } - #1 \s__tl - \int_use:N \c__str_replacement_char_int \s__tl + #1 \s__str + \int_use:N \c__str_replacement_char_int \s__str } \prg_break: } @@ -22499,6 +22771,13 @@ \int_const:Nn \c__regex_ascii_max_control_int { 31 } \int_const:Nn \c__regex_ascii_max_int { 127 } \int_const:Nn \c__regex_ascii_lower_int { `a - `A } +\quark_new:N \q__regex_recursion_stop +\cs_new:Npn \__regex_use_none_delimit_by_q_recursion_stop:w + #1 \q__regex_recursion_stop { } +\cs_new:Npn \__regex_use_i_delimit_by_q_recursion_stop:nw + #1 #2 \q__regex_recursion_stop {#1} +\quark_new:N \q__regex_nil +\__kernel_quark_new_conditional:Nn \__regex_quark_if_nil:N { F } \cs_new_protected:Npn \__regex_break_true:w #1 \__regex_break_point:TF #2 #3 {#2} \cs_new_protected:Npn \__regex_break_point:TF #1 #2 { #2 } @@ -23742,7 +24021,7 @@ \tl_set:Nx \l__regex_internal_a_tl { \exp_after:wN \__regex_compile_cs_aux:Nn \l__regex_internal_regex - \q_nil \q_nil \q_recursion_stop + \q__regex_nil \q__regex_nil \q__regex_recursion_stop } \exp_args:Nx \__regex_compile_one:n { @@ -23760,12 +24039,13 @@ { \scan_stop: \__regex_compile_cs_aux:NNnnnN #2 - \q_nil \q_nil \q_nil \q_nil \q_nil \q_nil \q_recursion_stop + \q__regex_nil \q__regex_nil \q__regex_nil + \q__regex_nil \q__regex_nil \q__regex_nil \q__regex_recursion_stop \__regex_compile_cs_aux:Nn } { - \quark_if_nil:NF #1 { \flag_raise_if_clear:n { __regex_cs } } - \use_none_delimit_by_q_recursion_stop:w + \__regex_quark_if_nil:NF #1 { \flag_raise_if_clear:n { __regex_cs } } + \__regex_use_none_delimit_by_q_recursion_stop:w } } \cs_new:Npn \__regex_compile_cs_aux:NNnnnN #1#2#3#4#5#6 @@ -23784,12 +24064,12 @@ \__regex_compile_cs_aux:NNnnnN } { - \quark_if_nil:NF #1 + \__regex_quark_if_nil:NF #1 { \flag_raise_if_clear:n { __regex_cs } - \use_i_delimit_by_q_recursion_stop:nw + \__regex_use_i_delimit_by_q_recursion_stop:nw } - \use_none_delimit_by_q_recursion_stop:w + \__regex_use_none_delimit_by_q_recursion_stop:w } } \cs_new_protected:cpn { __regex_compile_/u: } #1#2 @@ -26319,18 +26599,19 @@ \__color_backend_pickup:N \l__color_current_tl \__color_select:V \l__color_current_tl } +\scan_new:N \s__color_stop \cs_new_protected:Npn \__color_select:n #1 - { \__color_select:w #1 \q_stop } + { \__color_select:w #1 \s__color_stop } \cs_generate_variant:Nn \__color_select:n { V } -\cs_new_protected:Npn \__color_select:w #1 ~ #2 \q_stop - { \use:c { __color_select_ #1 :w } #2 \q_stop } -\cs_new_protected:Npn \__color_select_cmyk:w #1 ~ #2 ~ #3 ~ #4 \q_stop +\cs_new_protected:Npn \__color_select:w #1 ~ #2 \s__color_stop + { \use:c { __color_select_ #1 :w } #2 \s__color_stop } +\cs_new_protected:Npn \__color_select_cmyk:w #1 ~ #2 ~ #3 ~ #4 \s__color_stop { \__color_backend_cmyk:nnnn {#1} {#2} {#3} {#4} } -\cs_new_protected:Npn \__color_select_gray:w #1 \q_stop +\cs_new_protected:Npn \__color_select_gray:w #1 \s__color_stop { \__color_backend_gray:n {#1} } -\cs_new_protected:Npn \__color_select_rgb:w #1 ~ #2 ~ #3 \q_stop +\cs_new_protected:Npn \__color_select_rgb:w #1 ~ #2 ~ #3 \s__color_stop { \__color_backend_rgb:nnn {#1} {#2} {#3} } -\cs_new_protected:Npn \__color_select_spot:w #1 ~ #2 \q_stop +\cs_new_protected:Npn \__color_select_spot:w #1 ~ #2 \s__color_stop { \__color_backend_spot:nn {#1} {#2} } \tl_new:N \l__color_current_tl \tl_set:Nn \l__color_current_tl { gray~0 } @@ -27765,6 +28046,14 @@ \group_end: } %% File: l3text.dtx +\scan_new:N \s__text_stop +\quark_new:N \q__text_nil +\__kernel_quark_new_conditional:Nn \__text_quark_if_nil:n { TF } +\quark_new:N \q__text_recursion_tail +\quark_new:N \q__text_recursion_stop +\cs_new:Npn \__text_use_i_delimit_by_q_recursion_stop:nw + #1 #2 \q__text_recursion_stop {#1} +\__kernel_quark_new_test:N \__text_if_recursion_tail_stop_do:Nn \group_begin: \char_set_catcode_active:n { 0 } \cs_new:Npn \__text_token_to_explicit:N #1 @@ -27832,9 +28121,9 @@ \if_catcode:w + #1 12 \else: 4 \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \exp_after:wN ; - \token_to_meaning:N #1 \q_stop + \token_to_meaning:N #1 \s__text_stop } -\cs_new:Npn \__text_token_to_explicit_auxi:w #1 ; #2 \q_stop +\cs_new:Npn \__text_token_to_explicit_auxi:w #1 ; #2 \s__text_stop { \char_generate:nn { @@ -27890,7 +28179,7 @@ { { \token_if_protected_macro_p:N #1 } { \token_if_protected_long_macro_p:N #1 } - { \token_if_eq_meaning_p:NN \q_recursion_tail #1 } + { \token_if_eq_meaning_p:NN \q__text_recursion_tail #1 } } { \prg_return_false: } { \prg_return_true: } @@ -27943,7 +28232,7 @@ { \group_align_safe_begin: \__text_expand_loop:w #1 - \q_recursion_tail \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_stop \__text_expand_result:n { } } \cs_new:Npn \__text_expand_store:n #1 @@ -27957,7 +28246,7 @@ \exp_end: #2 } -\cs_new:Npn \__text_expand_loop:w #1 \q_recursion_stop +\cs_new:Npn \__text_expand_loop:w #1 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \__text_expand_N_type:N } @@ -27966,7 +28255,7 @@ { \__text_expand_group:n } { \__text_expand_space:w } } - #1 \q_recursion_stop + #1 \q__text_recursion_stop } \cs_new:Npn \__text_expand_group:n #1 { @@ -27987,7 +28276,7 @@ } \cs_new:Npx \__text_expand_N_type:N #1 { - \exp_not:N \quark_if_recursion_tail_stop_do:Nn #1 + \exp_not:N \__text_if_recursion_tail_stop_do:Nn #1 { \exp_not:N \__text_expand_end:w } \exp_not:N \bool_lazy_any:nTF { @@ -28044,16 +28333,16 @@ { \exp_after:wN \__text_expand_math_search:NNN \exp_after:wN #1 \l_text_math_delims_tl - \q_recursion_tail \q_recursion_tail - \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_tail + \q__text_recursion_stop } \cs_new:Npn \__text_expand_math_search:NNN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__text_if_recursion_tail_stop_do:Nn #2 { \__text_expand_explicit:N #1 } \token_if_eq_meaning:NNTF #1 #2 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_expand_store:n {#1} \__text_expand_math_loop:Nw #3 @@ -28061,7 +28350,7 @@ } { \__text_expand_math_search:NNN #1 } } -\cs_new:Npn \__text_expand_math_loop:Nw #1#2 \q_recursion_stop +\cs_new:Npn \__text_expand_math_loop:Nw #1#2 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#2} { \__text_expand_math_N_type:NN } @@ -28070,11 +28359,11 @@ { \__text_expand_math_group:Nn } { \__text_expand_math_space:Nw } } - #1#2 \q_recursion_stop + #1#2 \q__text_recursion_stop } \cs_new:Npn \__text_expand_math_N_type:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__text_if_recursion_tail_stop_do:Nn #2 { \__text_expand_end:w } \__text_expand_store:n {#2} \token_if_eq_meaning:NNTF #2 #1 @@ -28114,15 +28403,15 @@ \cs_new:Npn \__text_expand_exclude:nN #1#2 { \__text_expand_exclude:NN #2 #1 - \q_recursion_tail \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_stop } \cs_new:Npn \__text_expand_exclude:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__text_if_recursion_tail_stop_do:Nn #2 { \__text_expand_letterlike:N #1 } \cs_if_eq:NNTF #2 #1 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_expand_exclude:Nn #1 } } { \__text_expand_exclude:NN #1 } @@ -28136,15 +28425,15 @@ { \exp_after:wN \__text_expand_letterlike:NN \exp_after:wN #1 \l_text_letterlike_tl - \q_recursion_tail \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_stop } \cs_new:Npn \__text_expand_letterlike:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__text_if_recursion_tail_stop_do:Nn #2 { \__text_expand_cs:N #1 } \cs_if_eq:NNTF #2 #1 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_expand_store:n {#1} \__text_expand_loop:w @@ -28168,10 +28457,10 @@ { \cs_to_str:N #1 } #1 } \cs_new:Npn \__text_expand_protect:nN #1#2 - { \__text_expand_protect:Nw #2 #1 \q_nil #1 ~ \q_nil \q_nil \q_stop } -\cs_new:Npn \__text_expand_protect:Nw #1 #2 ~ \q_nil #3 \q_nil #4 \q_stop + { \__text_expand_protect:Nw #2 #1 \q__text_nil #1 ~ \q__text_nil \q__text_nil \s__text_stop } +\cs_new:Npn \__text_expand_protect:Nw #1 #2 ~ \q__text_nil #3 \q__text_nil #4 \s__text_stop { - \quark_if_nil:nTF {#4} + \__text_quark_if_nil:nTF {#4} { \cs_if_exist:cTF {#2} { \exp_args:Ne \__text_expand_store:n { \exp_not:c {#2} } } @@ -28269,7 +28558,7 @@ { \group_align_safe_begin: \__text_change_case_loop:nnw {#2} {#3} #1 - \q_recursion_tail \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_stop \__text_change_case_result:n { } } \cs_new:Npn \__text_change_case_store:n #1 @@ -28283,7 +28572,7 @@ \exp_end: #2 } -\cs_new:Npn \__text_change_case_loop:nnw #1#2#3 \q_recursion_stop +\cs_new:Npn \__text_change_case_loop:nnw #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_change_case_N_type:nnN } @@ -28292,9 +28581,9 @@ { \use:c { __text_change_case_group_ #1 :nnn } } { \__text_change_case_space:nnw } } - {#1} {#2} #3 \q_recursion_stop + {#1} {#2} #3 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_break:w #1 \q_recursion_tail \q_recursion_stop +\cs_new:Npn \__text_change_case_break:w #1 \q__text_recursion_tail \q__text_recursion_stop { \__text_change_case_store:n {#1} \__text_change_case_end:w @@ -28347,7 +28636,7 @@ } \cs_new:Npn \__text_change_case_N_type:nnN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #3 + \__text_if_recursion_tail_stop_do:Nn #3 { \__text_change_case_end:w } \__text_change_case_N_type_aux:nnN {#1} {#2} #3 } @@ -28359,16 +28648,16 @@ \cs_new:Npn \__text_change_case_N_type:nnnN #1#2#3#4 { \__text_change_case_math_search:nnNNN {#2} {#3} #4 #1 - \q_recursion_tail \q_recursion_tail - \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_tail + \q__text_recursion_stop } \cs_new:Npn \__text_change_case_math_search:nnNNN #1#2#3#4#5 { - \quark_if_recursion_tail_stop_do:Nn #4 + \__text_if_recursion_tail_stop_do:Nn #4 { \__text_change_case_cs_check:nnN {#1} {#2} #3 } \token_if_eq_meaning:NNTF #3 #4 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_change_case_store:n {#3} \__text_change_case_math_loop:nnNw {#1} {#2} #5 @@ -28376,7 +28665,7 @@ } { \__text_change_case_math_search:nnNNN {#1} {#2} #3 } } -\cs_new:Npn \__text_change_case_math_loop:nnNw #1#2#3#4 \q_recursion_stop +\cs_new:Npn \__text_change_case_math_loop:nnNw #1#2#3#4 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#4} { \__text_change_case_math_N_type:nnNN } @@ -28385,11 +28674,11 @@ { \__text_change_case_math_group:nnNn } { \__text_change_case_math_space:nnNw } } - {#1} {#2} #3 #4 \q_recursion_stop + {#1} {#2} #3 #4 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_math_N_type:nnNN #1#2#3#4 { - \quark_if_recursion_tail_stop_do:Nn #4 + \__text_if_recursion_tail_stop_do:Nn #4 { \__text_change_case_end:w } \__text_change_case_store:n {#4} \token_if_eq_meaning:NNTF #4 #3 @@ -28429,15 +28718,15 @@ \cs_new:Npn \__text_change_case_exclude:nnnN #1#2#3#4 { \__text_change_case_exclude:nnNN {#2} {#3} #4 #1 - \q_recursion_tail \q_recursion_stop + \q__text_recursion_tail \q__text_recursion_stop } \cs_new:Npn \__text_change_case_exclude:nnNN #1#2#3#4 { - \quark_if_recursion_tail_stop_do:Nn #4 + \__text_if_recursion_tail_stop_do:Nn #4 { \use:c { __text_change_case_letterlike_ #1 :nnN } {#1} {#2} #3 } \cs_if_eq:NNTF #3 #4 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_change_case_exclude:nnNn {#1} {#2} #3 } } { \__text_change_case_exclude:nnNN {#1} {#2} #3 } @@ -28503,7 +28792,7 @@ { \__text_change_case_lower_sigma:nnNw {#2} {#3} #4 } { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } } - \cs_new:Npn \__text_change_case_lower_sigma:nnNw #1#2#3#4 \q_recursion_stop + \cs_new:Npn \__text_change_case_lower_sigma:nnNw #1#2#3#4 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#4} { \__text_change_case_lower_sigma:NnnN #3 } @@ -28512,7 +28801,7 @@ { \char_generate:nn { "03C2 } { \__text_char_catcode:N #3 } } \__text_change_case_loop:nnw } - {#1} {#2} #4 \q_recursion_stop + {#1} {#2} #4 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_lower_sigma:NnnN #1#2#3#4 { @@ -28674,12 +28963,12 @@ \__text_change_case_upper_el_loop:nnw {#2} {#3} } \cs_new:Npn \__text_change_case_upper_el_loop:nnw - #1#2#3 \q_recursion_stop + #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_change_case_upper_el:nnN } { \__text_change_case_loop:nnw } - {#1} {#2} #3 \q_recursion_stop + {#1} {#2} #3 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_upper_el:nnN #1#2#3 { @@ -28806,12 +29095,12 @@ \__text_change_case_lower_lt:nnw {#2} {#3} } } - \cs_new:Npn \__text_change_case_lower_lt:nnw #1#2#3 \q_recursion_stop + \cs_new:Npn \__text_change_case_lower_lt:nnw #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_change_case_lower_lt:nnN } { \__text_change_case_loop:nnw } - {#1} {#2} #3 \q_recursion_stop + {#1} {#2} #3 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_lower_lt:nnN #1#2#3 { @@ -28859,12 +29148,12 @@ \__text_change_case_upper_lt:nnw {#2} {#3} } } - \cs_new:Npn \__text_change_case_upper_lt:nnw #1#2#3 \q_recursion_stop + \cs_new:Npn \__text_change_case_upper_lt:nnw #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_change_case_upper_lt:nnN } { \use:c { __text_change_case_char_next_ #1 :nn } } - {#1} {#2} #3 \q_recursion_stop + {#1} {#2} #3 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_upper_lt:nnN #1#2#3 { @@ -28887,12 +29176,12 @@ } { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_title_nl:nnw #1#2#3 \q_recursion_stop +\cs_new:Npn \__text_change_case_title_nl:nnw #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_change_case_title_nl:nnN } { \use:c { __text_change_case_char_next_ #1 :nn } } - {#1} {#2} #3 \q_recursion_stop + {#1} {#2} #3 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_title_nl:nnN #1#2#3 { @@ -28928,7 +29217,7 @@ { \__text_change_case_lower_sigma:nnnN {#1} {#2} {#3} #4 } } } - \cs_new:Npn \__text_change_case_lower_tr:nnNw #1#2#3#4 \q_recursion_stop + \cs_new:Npn \__text_change_case_lower_tr:nnNw #1#2#3#4 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#4} { \__text_change_case_lower_tr:NnnN #3 } @@ -28937,7 +29226,7 @@ { \char_generate:nn { "0131 } { \__text_char_catcode:N #3 } } \__text_change_case_loop:nnw } - {#1} {#2} #4 \q_recursion_stop + {#1} {#2} #4 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_lower_tr:NnnN #1#2#3#4 { @@ -29358,6 +29647,7 @@ } } %% File: l3text-purify.dtx +\__kernel_quark_new_test:N \__text_if_recursion_tail_stop:N \cs_new:Npn \text_purify:n #1 { \group_align_safe_begin: @@ -29366,8 +29656,8 @@ \group_align_safe_end: } \cs_new:Npn \__text_purify:n #1 - { \__text_purify_loop:w #1 \q_recursion_tail \q_recursion_stop } -\cs_new:Npn \__text_purify_loop:w #1 \q_recursion_stop + { \__text_purify_loop:w #1 \q__text_recursion_tail \q__text_recursion_stop } +\cs_new:Npn \__text_purify_loop:w #1 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \__text_purify_N_type:N } @@ -29376,7 +29666,7 @@ { \__text_purify_group:n } { \__text_purify_space:w } } - #1 \q_recursion_stop + #1 \q__text_recursion_stop } \cs_new:Npn \__text_purify_group:n #1 { \__text_purify_loop:w #1 } \exp_last_unbraced:NNo \cs_new:Npn \__text_purify_space:w \c_space_tl @@ -29386,30 +29676,30 @@ } \cs_new:Npn \__text_purify_N_type:N #1 { - \quark_if_recursion_tail_stop:N #1 + \__text_if_recursion_tail_stop:N #1 \__text_purify_N_type_aux:N #1 } \cs_new:Npn \__text_purify_N_type_aux:N #1 { \exp_after:wN \__text_purify_math_search:NNN \exp_after:wN #1 \l_text_math_delims_tl - \q_recursion_tail ? - \q_recursion_stop + \q__text_recursion_tail ? + \q__text_recursion_stop } \cs_new:Npn \__text_purify_math_search:NNN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__text_if_recursion_tail_stop_do:Nn #2 { \__text_purify_math_cmd:N #1 } \token_if_eq_meaning:NNTF #1 #2 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_purify_math_start:NNw #2 #3 } } { \__text_purify_math_search:NNN #1 } } -\cs_new:Npn \__text_purify_math_start:NNw #1#2#3 \q_recursion_stop +\cs_new:Npn \__text_purify_math_start:NNw #1#2#3 \q__text_recursion_stop { - \__text_purify_math_loop:NNw #1#2#3 \q_recursion_stop + \__text_purify_math_loop:NNw #1#2#3 \q__text_recursion_stop \__text_purify_math_result:n { } } \cs_new:Npn \__text_purify_math_store:n #1 @@ -29423,7 +29713,7 @@ } \cs_new:Npn \__text_purify_math_stop:Nw #1 \__text_purify_math_result:n #2 { \exp_not:n {#1#2} } -\cs_new:Npn \__text_purify_math_loop:NNw #1#2#3 \q_recursion_stop +\cs_new:Npn \__text_purify_math_loop:NNw #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_purify_math_N_type:NNN } @@ -29432,11 +29722,11 @@ { \__text_purify_math_group:NNn } { \__text_purify_math_space:NNw } } - #1#2#3 \q_recursion_stop + #1#2#3 \q__text_recursion_stop } \cs_new:Npn \__text_purify_math_N_type:NNN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #3 + \__text_if_recursion_tail_stop_do:Nn #3 { \__text_purify_math_stop:Nw #1 } \token_if_eq_meaning:NNTF #3 #2 { \__text_purify_math_end:w } @@ -29460,15 +29750,15 @@ \cs_new:Npn \__text_purify_math_cmd:N #1 { \exp_after:wN \__text_purify_math_cmd:NN \exp_after:wN #1 - \l_text_math_arg_tl \q_recursion_tail \q_recursion_stop + \l_text_math_arg_tl \q__text_recursion_tail \q__text_recursion_stop } \cs_new:Npn \__text_purify_math_cmd:NN #1#2 { - \quark_if_recursion_tail_stop_do:Nn #2 + \__text_if_recursion_tail_stop_do:Nn #2 { \__text_purify_replace:N #1 } \cs_if_eq:NNTF #2 #1 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_use_i_delimit_by_q_recursion_stop:nw { \__text_purify_math_cmd:n } } { \__text_purify_math_cmd:NN #1 } @@ -29510,7 +29800,7 @@ } \cs_new:Npn \__text_purify_protect:N #1 { - \quark_if_recursion_tail_stop:N #1 + \__text_if_recursion_tail_stop:N #1 \__text_purify_loop:w } \cs_new_protected:Npn \text_declare_purify_equivalent:Nn #1#2 @@ -30082,8 +30372,8 @@ \cs_new:Npn \__msg_expandable_error_module:nn #1#2 { \exp_after:wN \exp_after:wN - \exp_after:wN \use_none_delimit_by_q_stop:w - \use:n { \::error ! ~ #2 : ~ #1 } \q_stop + \exp_after:wN \__msg_use_none_delimit_by_s_stop:w + \use:n { \::error ! ~ #2 : ~ #1 } \s__msg_stop } \cs_new_protected:Npn \msg_show_eval:Nn #1#2 { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_show:n } @@ -30114,6 +30404,8 @@ \cs_new_protected:Npn \bool_gset_inverse:N #1 { \bool_if:NTF #1 { \bool_gset_false:N } { \bool_gset_true:N } #1 } \cs_generate_variant:Nn \bool_gset_inverse:N { c } +\scan_new:N \s__bool_mark +\scan_new:N \s__bool_stop \cs_new:Npn \bool_case_true:nTF { \exp:w \__bool_case:NnTF \c_true_bool } \cs_new:Npn \bool_case_true:nT #1#2 @@ -30133,7 +30425,7 @@ \cs_new:Npn \__bool_case:NnTF #1#2#3#4 { \bool_if:NTF #1 \__bool_case_true:w \__bool_case_false:w - #2 #1 { } \q_mark {#3} \q_mark {#4} \q_stop + #2 #1 { } \s__bool_mark {#3} \s__bool_mark {#4} \s__bool_stop } \cs_new:Npn \__bool_case_true:w #1#2 { @@ -30147,45 +30439,46 @@ { \__bool_case_false:w } { \__bool_case_end:nw {#2} } } -\cs_new:Npn \__bool_case_end:nw #1#2#3 \q_mark #4#5 \q_stop +\cs_new:Npn \__bool_case_end:nw #1#2#3 \s__bool_mark #4#5 \s__bool_stop { \exp_end: #1 #4 } +\cs_new:Npn \__prop_use_i_delimit_by_s_stop:nw #1 #2 \s__prop_stop {#1} \cs_new:Npn \prop_rand_key_value:N #1 { \prop_if_empty:NF #1 { \exp_after:wN \__prop_rand_item:w \int_value:w \int_rand:nn { 1 } { \prop_count:N #1 } - #1 \q_stop + #1 \s__prop_stop } } \cs_generate_variant:Nn \prop_rand_key_value:N { c } \cs_new:Npn \__prop_rand_item:w #1 \s__prop \__prop_pair:wn #2 \s__prop #3 { \int_compare:nNnF {#1} > 1 - { \use_i_delimit_by_q_stop:nw { \exp_not:n { {#2} {#3} } } } + { \__prop_use_i_delimit_by_s_stop:nw { \exp_not:n { {#2} {#3} } } } \exp_after:wN \__prop_rand_item:w \int_value:w \int_eval:n { #1 - 1 } \s__prop } \cs_new:Npn \seq_mapthread_function:NNN #1#2#3 - { \exp_after:wN \__seq_mapthread_function:wNN #2 \q_stop #1 #3 } -\cs_new:Npn \__seq_mapthread_function:wNN \s__seq #1 \q_stop #2#3 + { \exp_after:wN \__seq_mapthread_function:wNN #2 \s__seq_stop #1 #3 } +\cs_new:Npn \__seq_mapthread_function:wNN \s__seq #1 \s__seq_stop #2#3 { - \exp_after:wN \__seq_mapthread_function:wNw #2 \q_stop #3 + \exp_after:wN \__seq_mapthread_function:wNw #2 \s__seq_stop #3 #1 { ? \prg_break: } { } \prg_break_point: } -\cs_new:Npn \__seq_mapthread_function:wNw \s__seq #1 \q_stop #2 +\cs_new:Npn \__seq_mapthread_function:wNw \s__seq #1 \s__seq_stop #2 { \__seq_mapthread_function:Nnnwnn #2 #1 { ? \prg_break: } { } - \q_stop + \s__seq_stop } -\cs_new:Npn \__seq_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6 +\cs_new:Npn \__seq_mapthread_function:Nnnwnn #1#2#3#4 \s__seq_stop #5#6 { \use_none:n #2 \use_none:n #5 #1 {#3} {#6} - \__seq_mapthread_function:Nnnwnn #1 #4 \q_stop + \__seq_mapthread_function:Nnnwnn #1 #4 \s__seq_stop } \cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc , c , cc } \cs_new_protected:Npn \seq_set_filter:NNn @@ -30526,10 +30819,12 @@ } %% File: l3deprecation.dtx \bool_new:N \l__deprecation_grace_period_bool +\scan_new:N \s__deprecation_mark +\scan_new:N \s__deprecation_stop \cs_new:Npn \__deprecation_date_compare:nNnTF #1#2#3 - { \__deprecation_date_compare_aux:w #1 -0-0- \q_mark #2 #3 -0-0- \q_stop } + { \__deprecation_date_compare_aux:w #1 -0-0- \s__deprecation_mark #2 #3 -0-0- \s__deprecation_stop } \cs_new:Npn \__deprecation_date_compare_aux:w - #1 - #2 - #3 - #4 \q_mark #5 #6 - #7 - #8 - #9 \q_stop + #1 - #2 - #3 - #4 \s__deprecation_mark #5 #6 - #7 - #8 - #9 \s__deprecation_stop { \int_compare:nNnTF {#1} = {#6} { @@ -30549,7 +30844,7 @@ \exp_args:Nf \__deprecation_date_compare:nNnTF { \exp_after:wN \__deprecation_minus_six_months:w - \ExplLoaderFileDate -0-0- \q_stop + \ExplLoaderFileDate -0-0- \s__deprecation_stop } < {#1} { \bool_set_true:N \l__deprecation_grace_period_bool @@ -30558,7 +30853,7 @@ { \use_ii:nn } } } -\cs_new:Npn \__deprecation_minus_six_months:w #1 - #2 - #3 - #4 \q_stop +\cs_new:Npn \__deprecation_minus_six_months:w #1 - #2 - #3 - #4 \s__deprecation_stop { \int_compare:nNnTF {#2} > 6 { #1 - \int_eval:n { #2 - 6 } - #3 } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index e90fd568615..ca20bd595a7 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2020-05-05}% +\def\ExplFileDate{2020-05-11}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \def\tempa{LaTeX2e}% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx index 3308eb7f937..0cf5f0fd3a1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2020-05-05}% +\def\ExplFileDate{2020-05-11}% \let\ExplLoaderFileDate\ExplFileDate \everyjob\expandafter{\the\everyjob \message{L3 programming layer <\ExplFileDate>}% @@ -104,6 +104,9 @@ } } { \sys_everyjob: } +\reverse_if:N \if_cs_exist:N \s__expl_stop + \scan_new:N \s__expl_stop +\fi: \tl_put_left:Nn \@pushfilename { \exp_args:Nx \__kernel_file_input_push:n @@ -130,9 +133,9 @@ \__kernel_file_input_pop: \tl_if_empty:NTF \l__expl_status_stack_tl { \ExplSyntaxOff } - { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \q_stop } + { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \s__expl_stop } } -\cs_gset_protected:Npn \__expl_status_pop:w #1#2 \q_stop +\cs_gset_protected:Npn \__expl_status_pop:w #1#2 \s__expl_stop { \tl_set:Nn \l__expl_status_stack_tl {#2} \int_if_odd:nTF {#1} diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 0817fbd604a..b962ab36e6e 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2020-05-05}% +\def\ExplFileDate{2020-05-11}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% @@ -121,6 +121,9 @@ } } { \sys_everyjob: } +\reverse_if:N \if_cs_exist:N \s__expl_stop + \scan_new:N \s__expl_stop +\fi: \tl_put_left:Nn \@pushfilename { \exp_args:Nx \__kernel_file_input_push:n @@ -147,9 +150,9 @@ \__kernel_file_input_pop: \tl_if_empty:NTF \l__expl_status_stack_tl { \ExplSyntaxOff } - { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \q_stop } + { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \s__expl_stop } } -\cs_gset_protected:Npn \__expl_status_pop:w #1#2 \q_stop +\cs_gset_protected:Npn \__expl_status_pop:w #1#2 \s__expl_stop { \tl_set:Nn \l__expl_status_stack_tl {#2} \int_if_odd:nTF {#1} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def index cfe9bcf7de7..8f0b6e73e4d 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def @@ -20,6 +20,13 @@ %% %% File: l3debug.dtx \ProvidesExplFile{l3debug.def}{2019-04-06}{}{L3 Debugging support} +\scan_new:N \s__debug_stop +\cs_new:Npn \__debug_use_i_delimit_by_s_stop:nw #1 #2 \s__debug_stop {#1} +\quark_new:N \q__debug_recursion_tail +\quark_new:N \q__debug_recursion_stop +\cs_new:Npn \__debug_use_none_delimit_by_q_recursion_stop:w + #1 \q__debug_recursion_stop { } +\__kernel_quark_new_test:N \__debug_if_recursion_tail_stop:N \cs_set_protected:Npn \debug_on:n #1 { \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} } @@ -139,9 +146,9 @@ { \exp_args:NNf \__debug_chk_var_scope_aux:Nn #1 { \cs_to_str:N #2 } } \cs_new_protected:Npn \__debug_chk_var_scope_aux:Nn #1#2 { - \if:w _ \use_i:nn \use_i_delimit_by_q_stop:nw #2 ? ? \q_stop + \if:w _ \use_i:nn \__debug_use_i_delimit_by_s_stop:nw #2 ? ? \s__debug_stop \exp_after:wN \__debug_chk_var_scope_aux:NNn - \use_i_delimit_by_q_stop:nw #2 ? \q_stop + \__debug_use_i_delimit_by_s_stop:nw #2 ? \s__debug_stop #1 {#2} \else: \exp_args:Nc \__debug_chk_var_scope_aux:NNn @@ -216,16 +223,16 @@ \cs_new:Npn \__debug_build_parm_text:n #1 { \__debug_arg_list_from_signature:nNN { 1 } \c_false_bool #1 - \q_recursion_tail \q_recursion_stop + \q__debug_recursion_tail \q__debug_recursion_stop } \cs_new:Npn \__debug_build_arg_list:n #1 { \__debug_arg_list_from_signature:nNN { 1 } \c_true_bool #1 - \q_recursion_tail \q_recursion_stop + \q__debug_recursion_tail \q__debug_recursion_stop } \cs_new:Npn \__debug_arg_list_from_signature:nNN #1 #2 #3 { - \quark_if_recursion_tail_stop:N #3 + \__debug_if_recursion_tail_stop:N #3 \__debug_arg_check_invalid:N #3 \bool_if:NT #2 { \__debug_arg_if_braced:NT #3 { \use_none:n } } \use:n { \c_hash_str \int_eval:n {#1} } @@ -246,7 +253,7 @@ \exp_end: } \cs_new:Npn \__debug_parm_terminate:w - { \exp_after:wN \use_none_delimit_by_q_recursion_stop:w \exp:w } + { \exp_after:wN \__debug_use_none_delimit_by_q_recursion_stop:w \exp:w } \prg_new_conditional:Npnn \__debug_arg_if_braced:N #1 { T } { \exp_args:Nf \__debug_arg_if_braced:n { \__debug_get_base_form:N #1 } } \cs_new:Npn \__debug_arg_if_braced:n #1 @@ -332,7 +339,7 @@ ####2 \tl_to_str:n { -> } ####3 \c_backslash_str \tl_to_str:n { __debug_ } \cs_to_str:N #1 - ####4 \exp_not:N \q_mark + ####4 \s__debug_stop { \exp_not:N \exp_args:Nx \exp_not:N \tex_scantokens:D { @@ -346,7 +353,7 @@ } } } - \exp_after:wN \__debug_tmp:w \cs_meaning:N #1 \q_mark + \exp_after:wN \__debug_tmp:w \cs_meaning:N #1 \s__debug_stop } \cs_set_protected:Npn \__kernel_patch_weird:nnn { @@ -943,7 +950,7 @@ \__kernel_chk_expr:nNnN {##1} \tex_glueexpr:D { } \skip_if_finite:n ; \prg_return_false: - #1 ; \prg_return_true: \q_stop + #1 ; \prg_return_true: \s__skip_stop } } \exp_args:No \__skip_tmp:w { \tl_to_str:n { fil } } |