[latex3-commits] [git/LaTeX3-latex3-latex3] master: Reduce constraints on some integers since toks have fewer uses in l3regex (a737ed9be)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Dec 3 17:27:34 CET 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/a737ed9be0377d848b6dacca0485872d7d9a5c3f
>---------------------------------------------------------------
commit a737ed9be0377d848b6dacca0485872d7d9a5c3f
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Mon Jul 13 00:43:05 2020 +0200
Reduce constraints on some integers since toks have fewer uses in l3regex
>---------------------------------------------------------------
a737ed9be0377d848b6dacca0485872d7d9a5c3f
l3kernel/l3regex.dtx | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx
index f81206439..cd233ca6c 100644
--- a/l3kernel/l3regex.dtx
+++ b/l3kernel/l3regex.dtx
@@ -4661,7 +4661,7 @@
\cs_new_protected:Npn \@@_match:n #1
{
\int_zero:N \l_@@_balance_int
- \int_set:Nn \l_@@_curr_pos_int { 2 * \l_@@_max_state_int }
+ \int_set:Nn \l_@@_curr_pos_int { 1 + \l_@@_max_state_int }
\@@_query_set:nnn { } { -1 } { -2 }
\int_set_eq:NN \l_@@_min_pos_int \l_@@_curr_pos_int
\tl_analysis_map_inline:nn {#1}
@@ -4674,12 +4674,8 @@
\cs_new_protected:Npn \@@_match_cs:n #1
{
\int_zero:N \l_@@_balance_int
- \int_set:Nn \l_@@_curr_pos_int % ^^A TODO: change
- {
- \int_max:nn { 2 * \l_@@_max_state_int - \l_@@_min_state_int }
- { \l_@@_max_pos_int }
- + 1
- }
+ \int_set:Nn \l_@@_curr_pos_int
+ { 1 + \int_max:nn \l_@@_max_state_int \l_@@_max_pos_int }
\@@_query_set:nnn { } { -1 } { -2 }
\int_set_eq:NN \l_@@_min_pos_int \l_@@_curr_pos_int
\str_map_inline:nn {#1}
More information about the latex3-commits
mailing list.