summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/l3str
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-12 22:54:42 +0000
committerKarl Berry <karl@freefriends.org>2013-07-12 22:54:42 +0000
commit60ede63177ff54dd8d1934012fbecce179a633ee (patch)
tree9dbd9e4608c9a0caa9864fedf49f0a2aea36fedf /Master/texmf-dist/source/latex/l3experimental/l3str
parentc2d4fa6f59f3c566ccd85e3b250f0a27485bbaea (diff)
l3 (12jul13)
git-svn-id: svn://tug.org/texlive/trunk@31181 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3str')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx26
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx50
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-build.dtx2
5 files changed, 65 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
index 7260ca7667f..1ab8905e6aa 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3regex.dtx 4455 2013-01-22 20:38:19Z bruno $
+\GetIdInfo$Id: l3regex.dtx 4482 2013-04-24 21:05:12Z joseph $
{L3 Experimental regular expressions}
%</driver|package>
%<*driver>
@@ -752,7 +752,7 @@
% integer \meta{position}, with $\texttt{min_pos} - 1 \leq
% \meta{position} \leq \texttt{max_pos}$. The lowest and highest
% positions correspond to imaginary begin and end markers (with
-% inacessible category code and character code).
+% inaccessible category code and character code).
% \item \emph{Query}: the token list to which we apply the regular
% expression.
% \item \emph{State}: each state of the \textsc{nfa} is labelled by an
@@ -767,7 +767,7 @@
% unique id for all the steps of the matching algorithm.
% \end{itemize}
%
-% To acheive a good performance, we abuse \TeX{}'s registers in two
+% To achieve a good performance, we abuse \TeX{}'s registers in two
% ways. We access registers directly by number rather than tying them
% to control sequence using \cs{int_new:N} and other allocation
% functions. And we store integers in \tn{dimen} registers in scaled
@@ -913,7 +913,7 @@
%
% \begin{macro}[int]{\@@_item_reverse:n}
% This function makes showing regular expressions easier, and lets us
-% define |\D| in terms of |\d| for instance. There is a subtelty: the
+% define |\D| in terms of |\d| for instance. There is a subtlety: the
% end of the query is marked by $-2$, and will thus match |\D| and
% other negated properties; this case is caught by another part of
% the code.
@@ -1596,7 +1596,7 @@
% \begin{variable}{\l_@@_catcodes_bool}
% We wish to allow constructions such as |\c[^BE](..\cL[a-z]..)|,
% where the outer catcode test applies to the whole group, but is
-% superseeded by the inner catcode test. For this to work, we need to
+% superseded by the inner catcode test. For this to work, we need to
% keep track of lists of allowed category codes:
% \cs{l_@@_catcodes_int} and \cs{l_@@_default_catcodes_int} are
% bitmaps, sums of $4^c$, for all allowed catcodes $c$. The latter is
@@ -2018,7 +2018,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{Quantifers}
+% \subsubsection{Quantifiers}
%
% \begin{macro}[int]{\@@_compile_quantifier:w}
% This looks ahead and finds any quantifier (special character equal
@@ -2436,7 +2436,7 @@
% \begin{macro}[aux]{\@@_compile_[:}
% In a class, left brackets might introduce a \textsc{posix} character
% class, or mean nothing. Immediately following |\c|\meta{category},
-% we must insert the apropriate catcode test, then parse the class; we
+% we must insert the appropriate catcode test, then parse the class; we
% pre-expand the catcode as an optimization. Otherwise (modes $0$,
% $-2$ and $-6$) just parse the class. The mode is updated later.
% \begin{macrocode}
@@ -2614,7 +2614,7 @@
% using \pkg{l3tl-build} within a \TeX{} group, which automatically
% makes sure that options (case-sensitivity and default catcode) are
% reset at the end of the group. The argument |#1| is
-% \cs{@@_group:nnnN} or a variant thereof. A small subtelty to
+% \cs{@@_group:nnnN} or a variant thereof. A small subtlety to
% support |\cL(abc)| as a shorthand for |(\cLa\cLb\cLc)|: exit any
% pending catcode test, save the category code at the start of the
% group as the default catcode for that group, and make sure that the
@@ -3093,7 +3093,7 @@
%
% \begin{macro}[aux]{\@@_show_one:n}
% Every part of the final message go through this function, which adds
-% one line to the output, with the apropriate prefix.
+% one line to the output, with the appropriate prefix.
% \begin{macrocode}
\cs_new_protected:Npn \@@_show_one:n #1
{
@@ -4082,7 +4082,7 @@
% \tn{toks} register for the target state of the transition, to be
% retrieved when matching at the next position. When a thread
% succeeds, this property list is copied to
-% \cs{l_@@_success_submatches_prop}: only the last sucessful thread
+% \cs{l_@@_success_submatches_prop}: only the last successful thread
% will remain there.
% \begin{macrocode}
\prop_new:N \l_@@_current_submatches_prop
@@ -4184,7 +4184,7 @@
% First store the query into \tn{toks} and \tn{muskip} registers (see
% \cs{@@_query_set:nnn}). Then initialize the variables that should
% be set once for each user function (even for multiple
-% matches). Namely, the overall matching is not yet sucessful; none of
+% matches). Namely, the overall matching is not yet successful; none of
% the states should be marked as visited (\tn{dimen} registers), and
% we start at step $0$; we pretend that there was a previous match
% ending at the start of the query, which was not empty (to avoid
@@ -4226,7 +4226,7 @@
% \cs{@@_match_once:}. First initialize some variables: set the
% conditional which detects identical empty matches; this match
% attempt starts at the previous \texttt{success_pos}, is not yet
-% sucessful, and has no submatches yet; clear the array of active
+% successful, and has no submatches yet; clear the array of active
% threads, and put the starting state $0$ in it. We are then almost
% ready to read our first token in the query, but we actually start
% one position earlier than the start, and \texttt{get} that token, so
@@ -5927,7 +5927,7 @@
% This is not technically a message, but seems related enough to go
% there. The arguments are: |#1| is the minimum number of repetitions;
% |#2| is the number of allowed extra repetitions ($-1$ for infinite
-% number), and |#3| tells us aboud lazyness.
+% number), and |#3| tells us about lazyness.
% \begin{macrocode}
\cs_new:Npn \@@_msg_repeated:nnN #1#2#3
{
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
index 1810468ff7d..19bad05b982 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
@@ -125,7 +125,8 @@
% \texttt{iso885915}, \texttt{latin9} & \textsc{iso 8859-15} \\
% \texttt{iso885916}, \texttt{latin10} & \textsc{iso 8859-16} \\
% \midrule
-% Empty & Native (Unicode) string. \\
+% \texttt{clist} & comma-list of integers \\
+% \meta{empty} & native (Unicode) string \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -1187,6 +1188,47 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{\texttt{clist}}
+%
+% \begin{macro}[int]{\@@_convert_decode_clist:}
+% \begin{macro}[aux, rEXP]{\@@_decode_clist_char:n}
+% Convert each integer to the internal form. We first turn
+% \cs{g_@@_result_tl} into a clist variable, as this avoids problems
+% with leading or trailing commas.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_convert_decode_clist:
+ {
+ \clist_set:No \g_@@_result_tl \g_@@_result_tl
+ \tl_gset:Nx \g_@@_result_tl
+ {
+ \exp_args:No \clist_map_function:nN
+ \g_@@_result_tl \@@_decode_clist_char:n
+ }
+ }
+\cs_new:Npn \@@_decode_clist_char:n #1
+ { #1 \s__tl \int_eval:n {#1} \s__tl }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[int]{\@@_convert_encode_clist:}
+% \begin{macro}[aux, rEXP]{\@@_encode_clist_char:n}
+% Convert the internal list of character codes to a comma-list of
+% character codes. The first line produces a comma-list with a
+% leading comma, removed in the next step (this also works in the
+% empty case, since \cs{tl_tail:N} does not trigger an error in this
+% case).
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_convert_encode_clist:
+ {
+ \@@_convert_gmap_internal:N \@@_encode_clist_char:n
+ \tl_gset:Nx \g_@@_result_tl { \tl_tail:N \g_@@_result_tl }
+ }
+\cs_new:Npn \@@_encode_clist_char:n #1 { , #1 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsubsection{8-bit encodings}
%
% This section will be entirely rewritten: it is not yet clear in what
@@ -1211,7 +1253,7 @@
% \end{syntax}
% This declares the encoding \meta{name} to map bytes to Unicode
% characters according to the \meta{mapping}, and map those bytes
-% which are not mentionned in the \meta{mapping} either to the
+% which are not mentioned in the \meta{mapping} either to the
% replacement character (if they appear in \meta{missing}), or to
% themselves.
%
@@ -2067,7 +2109,7 @@
% |#3| for the previous range. Otherwise, we call the
% \texttt{_continuation} auxiliary again, after shifting the
% \enquote{current code point} by |#4| (maximum from the range we just
-% checkedd).
+% checked).
%
% Two additional tests are needed: if we reach the end of the list of
% range maxima and we are still not done, then we are faced with an
@@ -2629,7 +2671,7 @@
% of a byte-order mark. If there is a byte-order mark, use that
% endianness, and remove the $4$ bytes, otherwise default to
% big-endian, and leave the $4$ bytes in place. The
-% \cs{@@_decode_utf_xxxii:Nw} auxiliary recieves $1$ or $2$ as its
+% \cs{@@_decode_utf_xxxii:Nw} auxiliary receives $1$ or $2$ as its
% first argument indicating endianness, and the string to convert as
% its second argument (expanded or not). It sets \cs{@@_tmp:w} to
% expand to the character code of either of its two arguments
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
index 7d42697daab..3237dc3aaa4 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
@@ -597,7 +597,7 @@
% \subsection{Formatting integers}
%
% \begin{macro}[EXP]{\int_format:nn}
-% Evalute the first argument and feed it to \cs{@@_int:nn}.
+% Evaluate the first argument and feed it to \cs{@@_int:nn}.
% \begin{macrocode}
\cs_new:Npn \int_format:nn #1
{ \exp_args:Nf \@@_int:nn { \int_eval:n {#1} } }
@@ -705,7 +705,7 @@
% \subsection{Formatting floating points}
%
% \begin{macro}[EXP]{\fp_format:nn}
-% Evalute the first argument to an internal floating point number, and
+% Evaluate the first argument to an internal floating point number, and
% feed it to \cs{@@_fp:nn}.
% \begin{macrocode}
\cs_new:Npn \fp_format:nn #1
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
index 0a4d72afd2f..836bb0481f2 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str.dtx 4452 2013-01-20 10:18:32Z joseph $
+\GetIdInfo$Id: l3str.dtx 4482 2013-04-24 21:05:12Z joseph $
{L3 Experimental strings}
%</driver|package>
%<*driver>
@@ -421,7 +421,7 @@
% characters with category \enquote{other}, as produced by
% \cs{__str_to_other:n}. It leaves in the input stream the number of
% character tokens in the \meta{other string}, faster than the
-% analoguous \cs{str_count:n} function.
+% analogous \cs{str_count:n} function.
% \end{function}
%
% \begin{function}[EXP]{\__str_range_unsafe:nnn}
@@ -577,7 +577,7 @@
% To speed up this function, we grab and discard $9$ space-delimited
% arguments in each iteration of the loop. The loop stops when the
% last argument is one of the trailing |X|\meta{number}, and that
-% \meta{number} is added to the sum of $9$ that preceeds, to adjust
+% \meta{number} is added to the sum of $9$ that precedes, to adjust
% the result.
% \begin{macrocode}
\cs_new_nopar:Npn \str_count_spaces:N
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-build.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-build.dtx
index ad4d20f7aba..5c4787cc5aa 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-build.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-build.dtx
@@ -114,7 +114,7 @@
% \ldots{}
% \cs{__tl_build_end:}
% \end{syntax}
-% Defines the \meta{tl~var} to contain the contens of \meta{tokens1}
+% Defines the \meta{tl~var} to contain the contents of \meta{tokens1}
% followed by \meta{tokens2}, \emph{etc.} This is built in such a way
% to be more efficient than repeatedly using \cs{tl_put_right:Nn}. The
% code in \enquote{\texttt{\ldots{}}} does not need to be