diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty index 04d811b352f..ca781f2c6e1 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty @@ -20,7 +20,7 @@ %% %% File: l3tl-analysis.dtx Copyright (C) 2011-2012,2015,2016 The LaTeX3 Project \RequirePackage{expl3} -\GetIdInfo$Id: l3tl-analysis.dtx 6805 2016-12-28 22:15:52Z joseph $ +\GetIdInfo$Id: l3tl-analysis.dtx 6948 2017-02-18 14:50:25Z bruno $ {L3 Experimental token lists analysis} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -42,7 +42,7 @@ \cs_new:Npn \__tl_analysis_cs_space_count:NN #1 #2 { \exp_after:wN #1 - \__int_value:w \__int_eval:w \c_zero + \__int_value:w \__int_eval:w 0 \exp_after:wN \__tl_analysis_cs_space_count:w \token_to_str:N #2 \fi: \__tl_analysis_cs_space_count_end:w ; ~ ! @@ -50,7 +50,7 @@ \cs_new:Npn \__tl_analysis_cs_space_count:w #1 ~ { \if_false: #1 #1 \fi: - + \c_one + + 1 \__tl_analysis_cs_space_count:w } \cs_new:Npn \__tl_analysis_cs_space_count_end:w ; #1 \fi: #2 ! @@ -67,7 +67,7 @@ } \cs_new_protected:Npn \__tl_analysis_setup:n #1 { - \int_set:Nn \tex_escapechar:D { - \c_one } + \int_set:Nn \tex_escapechar:D { -1 } \exp_after:wN \__tl_analysis_disable_loop:N \tl_to_str:n {#1} { ~ } { ? ~ \__prg_break: } \__prg_break_point: @@ -76,7 +76,7 @@ \char_set_catcode_active:N \^^@ \cs_new_protected:Npn \__tl_analysis_disable_loop:N #1 { - \tex_lccode:D \c_zero `#1 ~ + \tex_lccode:D 0 = `#1 ~ \tex_lowercase:D { \tex_let:D ^^@ } \tex_undefined:D \__tl_analysis_disable_loop:N } @@ -96,18 +96,19 @@ { \l__tl_analysis_type_int = \if_meaning:w \l__tl_analysis_token \c_space_token - \c_zero + 0 \else: \if_catcode:w \exp_not:N \l__tl_analysis_token \c_group_begin_token - \c_one + 1 \else: \if_catcode:w \exp_not:N \l__tl_analysis_token \c_group_end_token - - \c_one + - 1 \else: - \c_two + 2 \fi: \fi: \fi: + \exp_stop_f: \if_case:w \l__tl_analysis_type_int \exp_after:wN \__tl_analysis_a_space:w \or: \exp_after:wN \__tl_analysis_a_bgroup:w @@ -144,9 +145,9 @@ \group_end: \cs_new_protected:Npn \__tl_analysis_a_group:nw #1 { - \tex_lccode:D \c_zero = \__tl_analysis_extract_charcode: \scan_stop: + \tex_lccode:D 0 = \__tl_analysis_extract_charcode: \scan_stop: \tex_lowercase:D { \tex_toks:D \l__tl_analysis_index_int {#1} } - \if_int_compare:w \tex_lccode:D \c_zero = \tex_escapechar:D + \if_int_compare:w \tex_lccode:D 0 = \tex_escapechar:D \int_set:Nn \tex_escapechar:D { 139 - \tex_escapechar:D } \fi: \tex_afterassignment:D \__tl_analysis_a_group_test:w @@ -166,14 +167,14 @@ \cs_new_protected:Npn \__tl_analysis_a_store: { \tex_advance:D \l__tl_analysis_nesting_int \l__tl_analysis_type_int - \if_int_compare:w \tex_lccode:D \c_zero = \c_thirty_two - \tex_multiply:D \l__tl_analysis_type_int \c_two + \if_int_compare:w \tex_lccode:D 0 = `\ \exp_stop_f: + \tex_multiply:D \l__tl_analysis_type_int 2 \exp_stop_f: \fi: \tex_skip:D \l__tl_analysis_index_int = \l__tl_analysis_normal_int sp plus \l__tl_analysis_type_int sp \scan_stop: \int_incr:N \l__tl_analysis_index_int \int_zero:N \l__tl_analysis_normal_int - \if_int_compare:w \l__tl_analysis_nesting_int = - \c_one + \if_int_compare:w \l__tl_analysis_nesting_int = -1 \exp_stop_f: \cs_set_eq:NN \__tl_analysis_a_loop:w \scan_stop: \fi: } @@ -191,9 +192,9 @@ } \cs_new_protected:Npn \__tl_analysis_a_cs:ww #1; #2; { - \if_int_compare:w #1 > \c_zero + \if_int_compare:w #1 > 0 \exp_stop_f: \tex_skip:D \l__tl_analysis_index_int - = \__int_eval:w \l__tl_analysis_normal_int + \c_one sp \scan_stop: + = \__int_eval:w \l__tl_analysis_normal_int + 1 sp \scan_stop: \tex_advance:D \l__tl_analysis_index_int #1 \exp_stop_f: \l__tl_analysis_normal_int #2 \exp_stop_f: \else: @@ -215,7 +216,7 @@ } \cs_new:Npn \__tl_analysis_b_normals:ww #1; { - \if_int_compare:w #1 = \c_zero + \if_int_compare:w #1 = 0 \exp_stop_f: \__tl_analysis_b_special:w \fi: \__tl_analysis_b_normal:wwN #1; @@ -251,7 +252,7 @@ \exp_not:n { \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: } \exp_not:N \__int_value:w `#1 \s__tl \exp_not:N \exp_after:wN \exp_not:N \__tl_analysis_b_normals:ww - \exp_not:N \__int_value:w \exp_not:N \__int_eval:w - \c_one + + \exp_not:N \__int_value:w \exp_not:N \__int_eval:w - 1 + } \cs_new:Npn \__tl_analysis_b_cs:Nww #1 { @@ -262,7 +263,7 @@ { \exp_after:wN \__tl_analysis_b_normals:ww \__int_value:w \__int_eval:w - \if_int_compare:w #1 = \c_zero + \if_int_compare:w #1 = 0 \exp_stop_f: #3 \else: \tex_skip:D \__int_eval:w #4 + #1 \__int_eval_end: @@ -292,7 +293,7 @@ \else: \exp_after:wN \__tl_analysis_b_special_space:w \__int_value:w \fi: - \__int_eval:w \c_one + #1 \exp_after:wN ; + \__int_eval:w 1 + #1 \exp_after:wN ; \token_to_str:N } \group_end: @@ -360,10 +361,10 @@ { \use_none:n #2 \exp_not:n { \\ > \ \ } - \if_int_compare:w "#2 = \c_zero + \if_int_compare:w "#2 = 0 \exp_stop_f: \exp_after:wN \__tl_analysis_show_cs:n \else: - \if_int_compare:w "#2 = \c_thirteen + \if_int_compare:w "#2 = 13 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN \__tl_analysis_show_active:n \else: @@ -391,7 +392,7 @@ \token_if_toks_register:NTF #1 \__prg_break: { } \use_none:nnn \__prg_break_point: - \use:n { = \tex_the:D #1 } + \use:n { \exp_after:wN = \tex_the:D #1 } } } \cs_new:Npn \__tl_analysis_show_cs:n #1 @@ -409,11 +410,11 @@ { \int_compare:nNnTF { \str_count:n { #1 ~ ( #4 #2 #3 ) } } - > { \l_iow_line_count_int - \c_three } + > { \l_iow_line_count_int - 3 } { - \str_range:nnn { #1 ~ ( #4 #2 #3 ) } \c_one + \str_range:nnn { #1 ~ ( #4 #2 #3 ) } { 1 } { - \l_iow_line_count_int - \c_three + \l_iow_line_count_int - 3 - \str_count:N \c__tl_analysis_show_etc_str } \c__tl_analysis_show_etc_str |