summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty47
1 files changed, 23 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
index 5273399d7be..89f631f7e0b 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
@@ -13,7 +13,7 @@
%%
%% Do not distribute a modified version of this file.
%%
-%% File: l3regex.dtx Copyright (C) 2011-2012 The LaTeX3 Project
+%% File: l3regex.dtx Copyright (C) 2011-2013 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,11 +46,11 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3regex.dtx 4341 2012-11-27 08:39:42Z bruno $
+\GetIdInfo$Id: l3regex.dtx 4455 2013-01-22 20:38:19Z bruno $
{L3 Experimental regular expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str}
+\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str, l3str-convert}
\cs_generate_variant:Nn \tl_to_str:n { V }
\cs_new:Npn \__regex_tmp:w { }
\tl_new:N \l__regex_internal_a_tl
@@ -343,7 +343,7 @@
{
\__msg_kernel_error:nnx { regex } { x-overflow } {#1}
\tl_set:Nx \l__regex_internal_b_tl
- { \if_false: } \fi: \__regex_escape_loop:N
+ { \if_false: } \fi:
}
{
\char_set_lccode:nn { \c_zero } {#1}
@@ -352,7 +352,6 @@
\tl_set:Nx \l__regex_internal_b_tl
{ \if_false: } \fi:
\__regex_escape_raw:N ^^@
- \__regex_escape_loop:N
}
}
}
@@ -371,7 +370,7 @@
}
\cs_new:Npn \__regex_escape_x_test_two:N #1
{
- \if_charcode:w \c_lbrace_str #1
+ \if_charcode:w \c_left_brace_str #1
\exp_after:wN \__regex_escape_x_loop:N
\else:
\__str_hexadecimal_use:NTF #1
@@ -397,7 +396,7 @@
{ \__regex_escape_x_loop:N }
{
;
- \exp_after:wN \token_if_eq_charcode:NNTF \c_rbrace_str #1
+ \exp_after:wN \token_if_eq_charcode:NNTF \c_right_brace_str #1
{ \__regex_escape_loop:N }
{
\if_false: { \fi: }
@@ -696,17 +695,17 @@
{ \__regex_compile_quantifier_lazyness:nnNN { 0 } { -1 } }
\cs_new_protected_nopar:cpn { __regex_compile_quantifier_+:w }
{ \__regex_compile_quantifier_lazyness:nnNN { 1 } { -1 } }
-\cs_new_protected:cpn { __regex_compile_quantifier_ \c_lbrace_str :w }
+\cs_new_protected:cpn { __regex_compile_quantifier_ \c_left_brace_str :w }
{
\__regex_get_digits:NTFw \l__regex_internal_a_int
{ \__regex_compile_quantifier_braced_auxi:w }
- { \__regex_compile_quantifier_abort:xNN { \c_lbrace_str } }
+ { \__regex_compile_quantifier_abort:xNN { \c_left_brace_str } }
}
\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxi:w #1#2
{
\str_case_x:nnn { #1 #2 }
{
- { \__regex_compile_special:N \c_rbrace_str }
+ { \__regex_compile_special:N \c_right_brace_str }
{
\exp_args:No \__regex_compile_quantifier_lazyness:nnNN
{ \int_use:N \l__regex_internal_a_int } { 0 }
@@ -720,28 +719,28 @@
}
{
\__regex_compile_quantifier_abort:xNN
- { \c_lbrace_str \int_use:N \l__regex_internal_a_int }
+ { \c_left_brace_str \int_use:N \l__regex_internal_a_int }
#1 #2
}
}
\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxii:w #1#2
{
\str_if_eq_x:nnTF
- { #1 #2 } { \__regex_compile_special:N \c_rbrace_str }
+ { #1 #2 } { \__regex_compile_special:N \c_right_brace_str }
{
\exp_args:No \__regex_compile_quantifier_lazyness:nnNN
{ \int_use:N \l__regex_internal_a_int } { -1 }
}
{
\__regex_compile_quantifier_abort:xNN
- { \c_lbrace_str \int_use:N \l__regex_internal_a_int , }
+ { \c_left_brace_str \int_use:N \l__regex_internal_a_int , }
#1 #2
}
}
\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxiii:w #1#2
{
\str_if_eq_x:nnTF
- { #1 #2 } { \__regex_compile_special:N \c_rbrace_str }
+ { #1 #2 } { \__regex_compile_special:N \c_right_brace_str }
{
\if_int_compare:w \l__regex_internal_a_int > \l__regex_internal_b_int
\__msg_kernel_error:nnxx { regex } { backwards-quantifier }
@@ -758,7 +757,7 @@
{
\__regex_compile_quantifier_abort:xNN
{
- \c_lbrace_str
+ \c_left_brace_str
\int_use:N \l__regex_internal_a_int ,
\int_use:N \l__regex_internal_b_int
}
@@ -1195,14 +1194,14 @@
{ \c__regex_all_catcodes_int - \l__regex_catcodes_int }
\fi:
}
-\cs_new_protected_nopar:cpn { __regex_compile_c_ \c_lbrace_str :w }
+\cs_new_protected_nopar:cpn { __regex_compile_c_ \c_left_brace_str :w }
{
\__regex_compile:w
\__regex_disable_submatches:
\l__regex_mode_int
= - \if_case:w \l__regex_mode_int \c_two \else: \c_six \fi:
}
-\cs_new_protected:cpn { __regex_compile_ \c_rbrace_str : }
+\cs_new_protected:cpn { __regex_compile_ \c_right_brace_str : }
{
\__regex_if_in_cs:TF
{
@@ -1210,14 +1209,14 @@
\__regex_compile_one:x
{ \__regex_item_cs:n { \exp_not:o \l__regex_internal_regex } }
}
- { \exp_after:wN \__regex_compile_raw:N \c_rbrace_str }
+ { \exp_after:wN \__regex_compile_raw:N \c_right_brace_str }
}
\cs_new_protected:cpn { __regex_compile_/u: } #1#2
{
\__regex_if_in_class_or_catcode:TF
{ \__regex_compile_raw_error:N u #1 #2 }
{
- \str_if_eq_x:nnTF {#1#2} { \__regex_compile_special:N \c_lbrace_str }
+ \str_if_eq_x:nnTF {#1#2} { \__regex_compile_special:N \c_left_brace_str }
{
\tl_set:Nx \l__regex_internal_a_tl { \if_false: } \fi:
\__regex_compile_u_loop:NN
@@ -1235,7 +1234,7 @@
{
\token_if_eq_meaning:NNTF #1 \__regex_compile_special:N
{
- \exp_after:wN \token_if_eq_charcode:NNTF \c_rbrace_str #2
+ \exp_after:wN \token_if_eq_charcode:NNTF \c_right_brace_str #2
{ \if_false: { \fi: } \__regex_compile_u_end: }
{ #2 \__regex_compile_u_loop:NN }
}
@@ -2065,7 +2064,7 @@
\tl_clear:N \l__regex_balance_tl
\__regex_escape_use:nnnn
{
- \if_charcode:w \c_rbrace_str ##1
+ \if_charcode:w \c_right_brace_str ##1
\__regex_replacement_rbrace:N \else: \__tl_build_one:n \fi: ##1
}
{ \__regex_replacement_escaped:N ##1 }
@@ -2120,7 +2119,7 @@
}
\cs_new_protected:Npn \__regex_replacement_g:w #1#2
{
- \str_if_eq_x:nnTF { #1#2 } { \__tl_build_one:n \c_lbrace_str }
+ \str_if_eq_x:nnTF { #1#2 } { \__tl_build_one:n \c_left_brace_str }
{
\int_zero:N \l__regex_internal_a_int
\__regex_replacement_g_digits:NN
@@ -2162,7 +2161,7 @@
}
{ \__regex_replacement_error:NNN c #1#2 }
}
-\cs_new_protected_nopar:cpn { __regex_replacement_c_ \c_lbrace_str :w }
+\cs_new_protected_nopar:cpn { __regex_replacement_c_ \c_left_brace_str :w }
{
\if_case:w \l__regex_replacement_csnames_int
\__tl_build_one:n
@@ -2174,7 +2173,7 @@
}
\cs_new_protected:Npn \__regex_replacement_u:w #1#2
{
- \str_if_eq_x:nnTF { #1#2 } { \__tl_build_one:n \c_lbrace_str }
+ \str_if_eq_x:nnTF { #1#2 } { \__tl_build_one:n \c_left_brace_str }
{
\if_case:w \l__regex_replacement_csnames_int
\__tl_build_one:n { \exp_not:n { \exp_after:wN \exp_not:V \cs:w } }