diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty | 226 |
1 files changed, 113 insertions, 113 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty index ea479829d46..a5605769613 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty @@ -45,8 +45,8 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\RequirePackage{expl3}[2016/05/14] -\@ifpackagelater{expl3}{2016/05/14} +\RequirePackage{expl3}[2016/10/19] +\@ifpackagelater{expl3}{2016/10/19} {} {% \PackageError{l3regex}{Support package l3kernel too old} @@ -58,7 +58,7 @@ }% \endinput } -\GetIdInfo$Id: l3regex.dtx 6492 2016-05-14 20:27:55Z joseph $ +\GetIdInfo$Id: l3regex.dtx 6730 2016-10-19 11:19:38Z joseph $ {L3 Experimental regular expressions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -130,7 +130,7 @@ \fi: \fi: } -\cs_new_protected_nopar:Npn \__regex_compute_case_changed_char: +\cs_new_protected:Npn \__regex_compute_case_changed_char: { \int_set_eq:NN \l__regex_case_changed_char_int \l__regex_current_char_int \if_int_compare:w \l__regex_current_char_int < \c_ninety_one @@ -214,14 +214,14 @@ \group_end: } } -\cs_new_protected_nopar:Npn \__regex_prop_d: +\cs_new_protected:Npn \__regex_prop_d: { \__regex_item_caseful_range:nn \c_forty_eight { 57 } } % 0--9 -\cs_new_protected_nopar:Npn \__regex_prop_h: +\cs_new_protected:Npn \__regex_prop_h: { \__regex_item_caseful_equal:n \c_thirty_two % space \__regex_item_caseful_equal:n \c_nine % tab } -\cs_new_protected_nopar:Npn \__regex_prop_s: +\cs_new_protected:Npn \__regex_prop_s: { \__regex_item_caseful_equal:n \c_thirty_two % space \__regex_item_caseful_equal:n \c_nine % tab @@ -229,52 +229,52 @@ \__regex_item_caseful_equal:n \c_twelve % ff \__regex_item_caseful_equal:n \c_thirteen % cr } -\cs_new_protected_nopar:Npn \__regex_prop_v: +\cs_new_protected:Npn \__regex_prop_v: { \__regex_item_caseful_range:nn \c_ten \c_thirteen } % lf, vtab, ff, cr -\cs_new_protected_nopar:Npn \__regex_prop_w: +\cs_new_protected:Npn \__regex_prop_w: { \__regex_item_caseful_range:nn \c_ninety_seven { 122 } % a--z \__regex_item_caseful_range:nn \c_sixty_five { 90 } % A--Z \__regex_item_caseful_range:nn \c_forty_eight { 57 } % 0--9 \__regex_item_caseful_equal:n { 95 } % _ } -\cs_new_protected_nopar:Npn \__regex_prop_N: +\cs_new_protected:Npn \__regex_prop_N: { \__regex_item_reverse:n { \__regex_item_caseful_equal:n \c_ten } } -\cs_new_protected_nopar:Npn \__regex_posix_alnum: +\cs_new_protected:Npn \__regex_posix_alnum: { \__regex_posix_alpha: \__regex_posix_digit: } -\cs_new_protected_nopar:Npn \__regex_posix_alpha: +\cs_new_protected:Npn \__regex_posix_alpha: { \__regex_posix_lower: \__regex_posix_upper: } -\cs_new_protected_nopar:Npn \__regex_posix_ascii: +\cs_new_protected:Npn \__regex_posix_ascii: { \__regex_item_caseful_range:nn \c_zero \c_one_hundred_twenty_seven } \cs_new_eq:NN \__regex_posix_blank: \__regex_prop_h: -\cs_new_protected_nopar:Npn \__regex_posix_cntrl: +\cs_new_protected:Npn \__regex_posix_cntrl: { \__regex_item_caseful_range:nn \c_zero { 31 } \__regex_item_caseful_equal:n \c_one_hundred_twenty_seven } \cs_new_eq:NN \__regex_posix_digit: \__regex_prop_d: -\cs_new_protected_nopar:Npn \__regex_posix_graph: +\cs_new_protected:Npn \__regex_posix_graph: { \__regex_item_caseful_range:nn { 33 } { 126 } } -\cs_new_protected_nopar:Npn \__regex_posix_lower: +\cs_new_protected:Npn \__regex_posix_lower: { \__regex_item_caseful_range:nn \c_ninety_seven { 122 } } -\cs_new_protected_nopar:Npn \__regex_posix_print: +\cs_new_protected:Npn \__regex_posix_print: { \__regex_item_caseful_range:nn \c_thirty_two { 126 } } -\cs_new_protected_nopar:Npn \__regex_posix_punct: +\cs_new_protected:Npn \__regex_posix_punct: { \__regex_item_caseful_range:nn { 33 } { 47 } \__regex_item_caseful_range:nn { 58 } { 64 } \__regex_item_caseful_range:nn { 91 } { 96 } \__regex_item_caseful_range:nn { 123 } { 126 } } -\cs_new_protected_nopar:Npn \__regex_posix_space: +\cs_new_protected:Npn \__regex_posix_space: { \__regex_item_caseful_equal:n \c_thirty_two \__regex_item_caseful_range:nn \c_nine \c_thirteen } -\cs_new_protected_nopar:Npn \__regex_posix_upper: +\cs_new_protected:Npn \__regex_posix_upper: { \__regex_item_caseful_range:nn \c_sixty_five { 90 } } \cs_new_eq:NN \__regex_posix_word: \__regex_prop_w: -\cs_new_protected_nopar:Npn \__regex_posix_xdigit: +\cs_new_protected:Npn \__regex_posix_xdigit: { \__regex_posix_digit: \__regex_item_caseful_range:nn \c_sixty_five { 70 } @@ -284,9 +284,9 @@ { \trace_push:nnn { regex } { 1 } { __regex_escape_use:nnnn } \__tl_build:Nw \l__regex_internal_a_tl - \cs_set_nopar:Npn \__regex_escape_unescaped:N ##1 { #1 } - \cs_set_nopar:Npn \__regex_escape_escaped:N ##1 { #2 } - \cs_set_nopar:Npn \__regex_escape_raw:N ##1 { #3 } + \cs_set:Npn \__regex_escape_unescaped:N ##1 { #1 } + \cs_set:Npn \__regex_escape_escaped:N ##1 { #2 } + \cs_set:Npn \__regex_escape_raw:N ##1 { #3 } \int_set:Nn \tex_escapechar:D { 92 } \__str_gset_other:Nn \g__regex_internal_tl { #4 } \tl_set:Nx \l__regex_internal_b_tl @@ -305,7 +305,7 @@ { \__regex_escape_unescaped:N #1 } \__regex_escape_loop:N } -\cs_new_nopar:cpn { __regex_escape_ \c_backslash_str :w } +\cs_new:cpn { __regex_escape_ \c_backslash_str :w } \__regex_escape_loop:N #1 { \cs_if_exist_use:cF { __regex_escape_/\token_to_str:N #1:w } @@ -316,24 +316,24 @@ \cs_new_eq:NN \__regex_escape_escaped:N ? \cs_new_eq:NN \__regex_escape_raw:N ? \cs_new_eq:NN \__regex_escape_break:w \__prg_break: -\cs_new_nopar:cpn { __regex_escape_/break:w } +\cs_new:cpn { __regex_escape_/break:w } { \if_false: { \fi: } \__msg_kernel_error:nn { regex } { trailing-backslash } \exp_after:wN \use_none:n \exp_after:wN { \if_false: } \fi: } -\cs_new_nopar:cpn { __regex_escape_~:w } { } -\cs_new_nopar:cpx { __regex_escape_/a:w } +\cs_new:cpn { __regex_escape_~:w } { } +\cs_new:cpx { __regex_escape_/a:w } { \exp_not:N \__regex_escape_raw:N \iow_char:N \^^G } -\cs_new_nopar:cpx { __regex_escape_/t:w } +\cs_new:cpx { __regex_escape_/t:w } { \exp_not:N \__regex_escape_raw:N \iow_char:N \^^I } -\cs_new_nopar:cpx { __regex_escape_/n:w } +\cs_new:cpx { __regex_escape_/n:w } { \exp_not:N \__regex_escape_raw:N \iow_char:N \^^J } -\cs_new_nopar:cpx { __regex_escape_/f:w } +\cs_new:cpx { __regex_escape_/f:w } { \exp_not:N \__regex_escape_raw:N \iow_char:N \^^L } -\cs_new_nopar:cpx { __regex_escape_/r:w } +\cs_new:cpx { __regex_escape_/r:w } { \exp_not:N \__regex_escape_raw:N \iow_char:N \^^M } -\cs_new_nopar:cpx { __regex_escape_/e:w } +\cs_new:cpx { __regex_escape_/e:w } { \exp_not:N \__regex_escape_raw:N \iow_char:N \^^[ } \cs_new:cpn { __regex_escape_/x:w } \__regex_escape_loop:N { @@ -517,7 +517,7 @@ \prg_return_false: \fi: } -\cs_new_nopar:Npn \__regex_if_in_class:TF +\cs_new:Npn \__regex_if_in_class:TF { \if_int_odd:w \l__regex_mode_int \exp_after:wN \use_i:nn @@ -525,7 +525,7 @@ \exp_after:wN \use_ii:nn \fi: } -\cs_new_nopar:Npn \__regex_if_in_cs:TF +\cs_new:Npn \__regex_if_in_cs:TF { \if_int_odd:w \l__regex_mode_int \exp_after:wN \use_ii:nn @@ -537,7 +537,7 @@ \fi: \fi: } -\cs_new_nopar:Npn \__regex_if_in_class_or_catcode:TF +\cs_new:Npn \__regex_if_in_class_or_catcode:TF { \if_int_odd:w \l__regex_mode_int \exp_after:wN \use_i:nn @@ -549,7 +549,7 @@ \fi: \fi: } -\cs_new_nopar:Npn \__regex_if_within_catcode:TF +\cs_new:Npn \__regex_if_within_catcode:TF { \if_int_compare:w \l__regex_mode_int > \c_zero \exp_after:wN \use_i:nn @@ -580,17 +580,17 @@ \fi: \fi: } -\cs_new_protected_nopar:Npn \__regex_compile:w +\cs_new_protected:Npn \__regex_compile:w { \__tl_build_x:Nw \l__regex_internal_regex \int_zero:N \l__regex_group_level_int \int_set_eq:NN \l__regex_default_catcodes_int \c__regex_all_catcodes_int \int_set_eq:NN \l__regex_catcodes_int \l__regex_default_catcodes_int - \cs_set_nopar:Npn \__regex_item_equal:n { \__regex_item_caseful_equal:n } - \cs_set_nopar:Npn \__regex_item_range:nn { \__regex_item_caseful_range:nn } + \cs_set:Npn \__regex_item_equal:n { \__regex_item_caseful_equal:n } + \cs_set:Npn \__regex_item_range:nn { \__regex_item_caseful_range:nn } \__tl_build_one:n { \__regex_branch:n { \if_false: } \fi: } } -\cs_new_protected_nopar:Npn \__regex_compile_end: +\cs_new_protected:Npn \__regex_compile_end: { \__regex_if_in_class:TF { @@ -714,11 +714,11 @@ #3 #4 } } -\cs_new_protected_nopar:cpn { __regex_compile_quantifier_?:w } +\cs_new_protected:cpn { __regex_compile_quantifier_?:w } { \__regex_compile_quantifier_lazyness:nnNN { 0 } { 1 } } -\cs_new_protected_nopar:cpn { __regex_compile_quantifier_*:w } +\cs_new_protected:cpn { __regex_compile_quantifier_*:w } { \__regex_compile_quantifier_lazyness:nnNN { 0 } { -1 } } -\cs_new_protected_nopar:cpn { __regex_compile_quantifier_+:w } +\cs_new_protected:cpn { __regex_compile_quantifier_+:w } { \__regex_compile_quantifier_lazyness:nnNN { 1 } { -1 } } \cs_new_protected:cpn { __regex_compile_quantifier_ \c_left_brace_str :w } { @@ -857,13 +857,13 @@ #2#3 } } -\cs_new_protected_nopar:cpx { __regex_compile_.: } +\cs_new_protected:cpx { __regex_compile_.: } { \exp_not:N \__regex_if_in_class:TF { \__regex_compile_raw:N . } { \__regex_compile_one:x \exp_not:c { __regex_prop_.: } } } -\cs_new_protected_nopar:cpn { __regex_prop_.: } +\cs_new_protected:cpn { __regex_prop_.: } { \if_int_compare:w \l__regex_current_char_int > - \c_two \exp_after:wN \__regex_break_true:w @@ -871,9 +871,9 @@ } \cs_set_protected:Npn \__regex_tmp:w #1#2 { - \cs_new_protected_nopar:cpx { __regex_compile_/#1: } + \cs_new_protected:cpx { __regex_compile_/#1: } { \__regex_compile_one:x \exp_not:c { __regex_prop_#1: } } - \cs_new_protected_nopar:cpx { __regex_compile_/#2: } + \cs_new_protected:cpx { __regex_compile_/#2: } { \__regex_compile_one:x { \__regex_item_reverse:n \exp_not:c { __regex_prop_#1: } } @@ -884,7 +884,7 @@ \__regex_tmp:w s S \__regex_tmp:w v V \__regex_tmp:w w W -\cs_new_protected_nopar:cpn { __regex_compile_/N: } +\cs_new_protected:cpn { __regex_compile_/N: } { \__regex_compile_one:x \__regex_prop_N: } \cs_new_protected:Npn \__regex_compile_anchor:NF #1#2 { @@ -896,7 +896,7 @@ } \cs_set_protected:Npn \__regex_tmp:w #1#2 { - \cs_new_protected_nopar:cpn { __regex_compile_/#1: } + \cs_new_protected:cpn { __regex_compile_/#1: } { \__regex_compile_anchor:NF #2 { \__regex_compile_raw_error:N #1 } } } \__regex_tmp:w A \l__regex_min_pos_int @@ -905,12 +905,12 @@ \__regex_tmp:w z \l__regex_max_pos_int \cs_set_protected:Npn \__regex_tmp:w #1#2 { - \cs_new_protected_nopar:cpn { __regex_compile_#1: } + \cs_new_protected:cpn { __regex_compile_#1: } { \__regex_compile_anchor:NF #2 { \__regex_compile_raw:N #1 } } } \exp_args:Nx \__regex_tmp:w { \iow_char:N \^ } \l__regex_min_pos_int \exp_args:Nx \__regex_tmp:w { \iow_char:N \$ } \l__regex_max_pos_int -\cs_new_protected_nopar:cpn { __regex_compile_/b: } +\cs_new_protected:cpn { __regex_compile_/b: } { \__regex_if_in_class_or_catcode:TF { \__regex_compile_raw_error:N b } @@ -919,7 +919,7 @@ { \__regex_assertion:Nn \c_true_bool { \__regex_b_test: } } } } -\cs_new_protected_nopar:cpn { __regex_compile_/B: } +\cs_new_protected:cpn { __regex_compile_/B: } { \__regex_if_in_class_or_catcode:TF { \__regex_compile_raw_error:N B } @@ -943,7 +943,7 @@ } { \__regex_compile_raw:N ] } } -\cs_new_protected_nopar:cpn { __regex_compile_[: } +\cs_new_protected:cpn { __regex_compile_[: } { \__regex_if_in_class:TF { \__regex_compile_class_posix_test:w } @@ -956,7 +956,7 @@ { \__regex_compile_class_normal:w } } } -\cs_new_protected_nopar:Npn \__regex_compile_class_normal:w +\cs_new_protected:Npn \__regex_compile_class_normal:w { \__regex_compile_class:TFNN { \__regex_class:NnnnN \c_true_bool } @@ -1077,7 +1077,7 @@ \exp_after:wN \__regex_compile_raw:N \exp_after:wN ) \fi: } -\cs_new_protected_nopar:cpn { __regex_compile_(: } +\cs_new_protected:cpn { __regex_compile_(: } { \__regex_if_in_class:TF { \__regex_compile_raw:N ( } { \__regex_compile_lparen:w } @@ -1100,7 +1100,7 @@ #1 #2 #3 #4 } } -\cs_new_protected_nopar:cpn { __regex_compile_|: } +\cs_new_protected:cpn { __regex_compile_|: } { \__regex_if_in_class:TF { \__regex_compile_raw:N | } { @@ -1108,21 +1108,21 @@ { \if_false: { \fi: } \__regex_branch:n { \if_false: } \fi: } } } -\cs_new_protected_nopar:cpn { __regex_compile_): } +\cs_new_protected:cpn { __regex_compile_): } { \__regex_if_in_class:TF { \__regex_compile_raw:N ) } { \__regex_compile_group_end: } } -\cs_new_protected_nopar:cpn { __regex_compile_special_group_::w } +\cs_new_protected:cpn { __regex_compile_special_group_::w } { \__regex_compile_group_begin:N \__regex_group_no_capture:nnnN } -\cs_new_protected_nopar:cpn { __regex_compile_special_group_|:w } +\cs_new_protected:cpn { __regex_compile_special_group_|:w } { \__regex_compile_group_begin:N \__regex_group_resetting:nnnN } \cs_new_protected:Npn \__regex_compile_special_group_i:w #1#2 { \str_if_eq:nnTF { #1 #2 } { \__regex_compile_special:N ) } { - \cs_set_nopar:Npn \__regex_item_equal:n { \__regex_item_caseless_equal:n } - \cs_set_nopar:Npn \__regex_item_range:nn { \__regex_item_caseless_range:nn } + \cs_set:Npn \__regex_item_equal:n { \__regex_item_caseless_equal:n } + \cs_set:Npn \__regex_item_range:nn { \__regex_item_caseless_range:nn } } { \__msg_kernel_warning:nnx { regex } { unknown-option } { (?i #2 } @@ -1132,13 +1132,13 @@ #1 #2 } } -\cs_new_protected_nopar:cpn { __regex_compile_special_group_-:w } #1#2#3#4 +\cs_new_protected:cpn { __regex_compile_special_group_-:w } #1#2#3#4 { \str_if_eq:nnTF { #1 #2 #3 #4 } { \__regex_compile_raw:N i \__regex_compile_special:N ) } { - \cs_set_nopar:Npn \__regex_item_equal:n { \__regex_item_caseful_equal:n } - \cs_set_nopar:Npn \__regex_item_range:nn { \__regex_item_caseful_range:nn } + \cs_set:Npn \__regex_item_equal:n { \__regex_item_caseful_equal:n } + \cs_set:Npn \__regex_item_range:nn { \__regex_item_caseful_range:nn } } { \__msg_kernel_warning:nnx { regex } { unknown-option } { (?-#2#4 } @@ -1211,14 +1211,14 @@ \tex_advance:D \l__regex_catcodes_int #1 \fi: } -\cs_new_protected_nopar:Npn \__regex_compile_c_lbrack_end: +\cs_new_protected:Npn \__regex_compile_c_lbrack_end: { \if_meaning:w \c_false_bool \l__regex_catcodes_bool \int_set:Nn \l__regex_catcodes_int { \c__regex_all_catcodes_int - \l__regex_catcodes_int } \fi: } -\cs_new_protected_nopar:cpn { __regex_compile_c_ \c_left_brace_str :w } +\cs_new_protected:cpn { __regex_compile_c_ \c_left_brace_str :w } { \__regex_compile:w \__regex_disable_submatches: @@ -1313,7 +1313,7 @@ } } } -\cs_new_protected_nopar:cpn { __regex_compile_/K: } +\cs_new_protected:cpn { __regex_compile_/K: } { \int_compare:nNnTF \l__regex_mode_int = \c_zero { \__tl_build_one:n { \__regex_command_K: } } @@ -1322,25 +1322,25 @@ \cs_new_protected:Npn \__regex_show:Nx #1#2 { \__tl_build:Nw \l__regex_internal_a_tl - \cs_set_protected_nopar:Npn \__regex_branch:n + \cs_set_protected:Npn \__regex_branch:n { \seq_pop_right:NN \l__regex_show_prefix_seq \l__regex_internal_a_tl \__regex_show_one:n { +-branch } \seq_put_right:No \l__regex_show_prefix_seq \l__regex_internal_a_tl \use:n } - \cs_set_protected_nopar:Npn \__regex_group:nnnN + \cs_set_protected:Npn \__regex_group:nnnN { \__regex_show_group_aux:nnnnN { } } - \cs_set_protected_nopar:Npn \__regex_group_no_capture:nnnN + \cs_set_protected:Npn \__regex_group_no_capture:nnnN { \__regex_show_group_aux:nnnnN { ~(no~capture) } } - \cs_set_protected_nopar:Npn \__regex_group_resetting:nnnN + \cs_set_protected:Npn \__regex_group_resetting:nnnN { \__regex_show_group_aux:nnnnN { ~(resetting) } } \cs_set_eq:NN \__regex_class:NnnnN \__regex_show_class:NnnnN - \cs_set_protected_nopar:Npn \__regex_command_K: + \cs_set_protected:Npn \__regex_command_K: { \__regex_show_one:n { reset~match~start~(\iow_char:N\\K) } } \cs_set_protected:Npn \__regex_assertion:Nn ##1##2 { \__regex_show_one:n { \bool_if:NF ##1 { negative~ } assertion:~##2 } } - \cs_set_nopar:Npn \__regex_b_test: { word~boundary } + \cs_set:Npn \__regex_b_test: { word~boundary } \cs_set_eq:NN \__regex_anchor:N \__regex_show_anchor_to_str:N \cs_set_protected:Npn \__regex_item_caseful_equal:n ##1 { \__regex_show_one:n { char~code~\int_eval:n{##1} } } @@ -1511,14 +1511,14 @@ \__regex_trace_states:n { 2 } \trace_pop:nnn { regex } { 1 } { __regex_build_for_cs } } -\cs_new_protected_nopar:Npn \__regex_push_lr_states: +\cs_new_protected:Npn \__regex_push_lr_states: { \seq_push:No \l__regex_left_state_seq { \int_use:N \l__regex_left_state_int } \seq_push:No \l__regex_right_state_seq { \int_use:N \l__regex_right_state_int } } -\cs_new_protected_nopar:Npn \__regex_pop_lr_states: +\cs_new_protected:Npn \__regex_pop_lr_states: { \seq_pop:NN \l__regex_left_state_seq \l__regex_internal_a_tl \int_set:Nn \l__regex_left_state_int \l__regex_internal_a_tl @@ -1527,13 +1527,13 @@ } \cs_new_protected:Npn \__regex_toks_put_left:Nx #1#2 { - \cs_set_nopar:Npx \__regex_tmp:w { #2 } + \cs_set:Npx \__regex_tmp:w { #2 } \tex_toks:D #1 \exp_after:wN \exp_after:wN \exp_after:wN { \exp_after:wN \__regex_tmp:w \tex_the:D \tex_toks:D #1 } } \cs_new_protected:Npn \__regex_toks_put_right:Nx #1#2 { - \cs_set_nopar:Npx \__regex_tmp:w {#2} + \cs_set:Npx \__regex_tmp:w {#2} \tex_toks:D #1 \exp_after:wN { \tex_the:D \tex_toks:D \exp_after:wN #1 \__regex_tmp:w } } @@ -1543,7 +1543,7 @@ { \__regex_toks_put_left:Nx #2 { #1 { \int_eval:n { #3 - #2 } } } } \cs_new_protected:Npn \__regex_build_transition_right:nNn #1#2#3 { \__regex_toks_put_right:Nx #2 { #1 { \int_eval:n { #3 - #2 } } } } -\cs_new_protected_nopar:Npn \__regex_build_new_state: +\cs_new_protected:Npn \__regex_build_new_state: { \trace:nnx { regex } { 2 } { @@ -1574,7 +1574,7 @@ } \cs_new_protected:Npn \__regex_class:NnnnN #1#2#3#4#5 { - \cs_set_nopar:Npx \__regex_tests_action_cost:n ##1 + \cs_set:Npx \__regex_tests_action_cost:n ##1 { \exp_not:n { \exp_not:n {#2} } \bool_if:NTF #1 @@ -1651,7 +1651,7 @@ #1 } } -\cs_new_protected_nopar:Npn \__regex_group_no_capture:nnnN +\cs_new_protected:Npn \__regex_group_no_capture:nnnN { \__regex_group_aux:nnnnN { -1 } } \cs_new_protected:Npn \__regex_group_resetting:nnnN #1 { @@ -1820,7 +1820,7 @@ \exp_after:wN \__regex_break_true:w \fi: } -\cs_new_protected_nopar:Npn \__regex_b_test: +\cs_new_protected:Npn \__regex_b_test: { \group_begin: \int_set_eq:NN \l__regex_current_char_int \l__regex_last_char_int @@ -1829,7 +1829,7 @@ { \group_end: \__regex_item_reverse:n \__regex_prop_w: } { \group_end: \__regex_prop_w: } } -\cs_new_protected_nopar:Npn \__regex_command_K: +\cs_new_protected:Npn \__regex_command_K: { \__regex_build_new_state: \__regex_toks_put_right:Nx \l__regex_left_state_int @@ -1889,10 +1889,10 @@ \__regex_match_once: \trace_pop:nnx { regex } { 1 } { __regex_match } } -\cs_new_protected_nopar:Npn \__regex_match_once: +\cs_new_protected:Npn \__regex_match_once: { \if_meaning:w \c_true_bool \l__regex_empty_success_bool - \cs_set_nopar:Npn \__regex_if_two_empty_matches:F + \cs_set:Npn \__regex_if_two_empty_matches:F { \int_compare:nNnF \l__regex_start_pos_int = \l__regex_current_pos_int } \else: \cs_set_eq:NN \__regex_if_two_empty_matches:F \use:n @@ -1908,7 +1908,7 @@ \__regex_match_loop: \l__regex_every_match_tl } -\cs_new_protected_nopar:Npn \__regex_single_match: +\cs_new_protected:Npn \__regex_single_match: { \tl_set:Nn \l__regex_every_match_tl { \bool_gset_eq:NN \g__regex_success_bool \l__regex_match_success_bool } @@ -1924,7 +1924,7 @@ \fi: } } -\cs_new_protected_nopar:Npn \__regex_match_loop: +\cs_new_protected:Npn \__regex_match_loop: { \tex_advance:D \l__regex_step_int \c_two \int_incr:N \l__regex_current_pos_int @@ -1970,14 +1970,14 @@ \or: \int_decr:N \l__regex_balance_int \fi: } -\cs_new_protected_nopar:Npn \__regex_query_get: +\cs_new_protected:Npn \__regex_query_get: { \l__regex_current_char_int = \etex_mutoglue:D \tex_muskip:D \l__regex_current_pos_int \l__regex_current_catcode_int = \etex_gluestretch:D \etex_mutoglue:D \tex_muskip:D \l__regex_current_pos_int } -\cs_new_protected_nopar:Npn \__regex_use_state: +\cs_new_protected:Npn \__regex_use_state: { \trace:nnx { regex } { 2 } { state~\int_use:N \l__regex_current_state_int } \tex_dimen:D \l__regex_current_state_int @@ -1996,16 +1996,16 @@ \fi: \scan_stop: } -\cs_new_protected_nopar:Npn \__regex_action_start_wildcard: +\cs_new_protected:Npn \__regex_action_start_wildcard: { \bool_set_true:N \l__regex_fresh_thread_bool \__regex_action_free:n {1} \bool_set_false:N \l__regex_fresh_thread_bool \__regex_action_cost:n {0} } -\cs_new_protected_nopar:Npn \__regex_action_free:n +\cs_new_protected:Npn \__regex_action_free:n { \__regex_action_free_aux:nn { > \l__regex_step_int \else: } } -\cs_new_protected_nopar:Npn \__regex_action_free_group:n +\cs_new_protected:Npn \__regex_action_free_group:n { \__regex_action_free_aux:nn { < \l__regex_step_int } } \cs_new_protected:Npn \__regex_action_free_aux:nn #1#2 { @@ -2035,14 +2035,14 @@ \tex_skip:D \l__regex_max_active_int = #1 sp \scan_stop: \int_incr:N \l__regex_max_active_int } -\cs_new_protected_nopar:Npn \__regex_store_submatches: +\cs_new_protected:Npn \__regex_store_submatches: { \tex_toks:D \l__regex_max_active_int \exp_after:wN { \l__regex_current_submatches_prop } } -\cs_new_protected_nopar:Npn \__regex_disable_submatches: +\cs_new_protected:Npn \__regex_disable_submatches: { - \cs_set_protected_nopar:Npn \__regex_store_submatches: { } + \cs_set_protected:Npn \__regex_store_submatches: { } \cs_set_protected:Npn \__regex_action_submatch:n ##1 { } } \cs_new_protected:Npn \__regex_action_submatch:n #1 @@ -2050,7 +2050,7 @@ \prop_put:Nno \l__regex_current_submatches_prop {#1} { \int_use:N \l__regex_current_pos_int } } -\cs_new_protected_nopar:Npn \__regex_action_success: +\cs_new_protected:Npn \__regex_action_success: { \__regex_if_two_empty_matches:F { @@ -2210,7 +2210,7 @@ } { \__regex_replacement_error:NNN c #1#2 } } -\cs_new_protected_nopar:cpn { __regex_replacement_c_ \c_left_brace_str :w } +\cs_new_protected:cpn { __regex_replacement_c_ \c_left_brace_str :w } { \if_case:w \l__regex_replacement_csnames_int \__tl_build_one:n @@ -2253,10 +2253,10 @@ \fi: } \char_set_catcode_active:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_A:w + \cs_new_protected:Npn \__regex_replacement_c_A:w { \__regex_replacement_char:nNN { \exp_not:n { \exp_not:N ^^@ } } } \char_set_catcode_group_begin:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_B:w + \cs_new_protected:Npn \__regex_replacement_c_B:w { \if_int_compare:w \l__regex_replacement_csnames_int = \c_zero \int_incr:N \l__regex_balance_int @@ -2267,10 +2267,10 @@ \cs_new_protected:Npn \__regex_replacement_c_C:w #1#2 { \__tl_build_one:n { \exp_not:N \exp_not:N \exp_not:c {#2} } } \char_set_catcode_math_subscript:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_D:w + \cs_new_protected:Npn \__regex_replacement_c_D:w { \__regex_replacement_char:nNN { ^^@ } } \char_set_catcode_group_end:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_E:w + \cs_new_protected:Npn \__regex_replacement_c_E:w { \if_int_compare:w \l__regex_replacement_csnames_int = \c_zero \int_decr:N \l__regex_balance_int @@ -2279,16 +2279,16 @@ { \exp_not:n { \if_false: { \fi: ^^@ } } } \char_set_catcode_letter:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_L:w + \cs_new_protected:Npn \__regex_replacement_c_L:w { \__regex_replacement_char:nNN { ^^@ } } \char_set_catcode_math_toggle:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_M:w + \cs_new_protected:Npn \__regex_replacement_c_M:w { \__regex_replacement_char:nNN { ^^@ } } \char_set_catcode_other:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_O:w + \cs_new_protected:Npn \__regex_replacement_c_O:w { \__regex_replacement_char:nNN { ^^@ } } \char_set_catcode_parameter:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_P:w + \cs_new_protected:Npn \__regex_replacement_c_P:w { \__regex_replacement_char:nNN { \exp_not:n { \exp_not:n { ^^@^^@^^@^^@ } } } @@ -2306,10 +2306,10 @@ \fi: } \char_set_catcode_alignment:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_T:w + \cs_new_protected:Npn \__regex_replacement_c_T:w { \__regex_replacement_char:nNN { ^^@ } } \char_set_catcode_math_superscript:N \^^@ - \cs_new_protected_nopar:Npn \__regex_replacement_c_U:w + \cs_new_protected:Npn \__regex_replacement_c_U:w { \__regex_replacement_char:nNN { ^^@ } } \group_end: \cs_new_protected:Npn \__regex_replacement_error:NNN #1#2#3 @@ -2319,17 +2319,17 @@ } \cs_new_protected:Npn \regex_new:N #1 { \cs_new_eq:NN #1 \c__regex_no_match_regex } -\cs_new_protected_nopar:Npn \regex_set:Nn #1#2 +\cs_new_protected:Npn \regex_set:Nn #1#2 { \__regex_compile:n {#2} \tl_set_eq:NN #1 \l__regex_internal_regex } -\cs_new_protected_nopar:Npn \regex_gset:Nn #1#2 +\cs_new_protected:Npn \regex_gset:Nn #1#2 { \__regex_compile:n {#2} \tl_gset_eq:NN #1 \l__regex_internal_regex } -\cs_new_protected_nopar:Npn \regex_const:Nn #1#2 +\cs_new_protected:Npn \regex_const:Nn #1#2 { \__regex_compile:n {#2} \tl_const:Nx #1 { \exp_not:o \l__regex_internal_regex } @@ -2379,7 +2379,7 @@ \flag_new:n { __regex_end } \int_new:N \l__regex_submatch_int \int_new:N \l__regex_zeroth_submatch_int -\cs_new_protected_nopar:Npn \__regex_return: +\cs_new_protected:Npn \__regex_return: { \if_meaning:w \c_true_bool \g__regex_success_bool \prg_return_true: @@ -2498,7 +2498,7 @@ \prg_replicate:nn {#1} { \exp_not:n { \if_false: { \fi: } } } \fi: } -\cs_new_protected_nopar:Npn \__regex_extract: +\cs_new_protected:Npn \__regex_extract: { \if_meaning:w \c_true_bool \g__regex_success_bool \int_set_eq:NN \l__regex_zeroth_submatch_int \l__regex_submatch_int @@ -2585,7 +2585,7 @@ } \__regex_group_end_replace:N #3 } -\cs_new_protected_nopar:Npn \__regex_group_end_replace:N #1 +\cs_new_protected:Npn \__regex_group_end_replace:N #1 { \if_int_compare:w \l__regex_balance_int = \c_zero \else: |