diff --git a/source/text.tex b/source/text.tex index 10e3a416be..7a39fabf4f 100644 --- a/source/text.tex +++ b/source/text.tex @@ -12331,19 +12331,19 @@ regex_iterator operator++(int) = default; private: - BidirectionalIterator begin; // \expos - BidirectionalIterator end; // \expos - const regex_type* pregex; // \expos - regex_constants::match_flag_type flags; // \expos - match_results match; // \expos + BidirectionalIterator @\exposid{begin_}@; // \expos + BidirectionalIterator @\exposid{end_}@; // \expos + const regex_type* @\exposid{pregex_}@; // \expos + regex_constants::match_flag_type @\exposid{flags_}@; // \expos + match_results @\exposid{match_}@; // \expos }; } \end{codeblock} \pnum An object of type \tcode{regex_iterator} that is not an end-of-sequence iterator -holds a \textit{zero-length match} if \tcode{match[0].matched == true} and -\tcode{match[0].first == match[0].second}. +holds a \textit{zero-length match} if \tcode{\exposid{match_}[0].matched == true} and +\tcode{\exposid{match_}[0].first == \exposid{match_}[0].second}. \begin{note} For example, this can occur when the part of the regular expression that @@ -12374,10 +12374,10 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{begin} and \tcode{end} to +Initializes \exposid{begin_} and \exposid{end_} to \tcode{a} and \tcode{b}, respectively, sets -\tcode{pregex} to \tcode{addressof(re)}, sets \tcode{flags} to -\tcode{m}, then calls \tcode{regex_search(begin, end, match, *pregex, flags)}. If this +\exposid{pregex_} to \tcode{addressof(re)}, sets \exposid{flags_} to +\tcode{m}, then calls \tcode{regex_search(\exposid{begin_}, \exposid{end_}, \exposid{match_}, *\exposid{pregex_}, \exposid{flags_})}. If this call returns \tcode{false} the constructor sets \tcode{*this} to the end-of-sequence iterator. \end{itemdescr} @@ -12395,11 +12395,11 @@ \tcode{true} if \tcode{*this} and \tcode{right} are both end-of-sequence iterators or if the following conditions all hold: \begin{itemize} -\item \tcode{begin == right.begin}, -\item \tcode{end == right.end}, -\item \tcode{pregex == right.pregex}, -\item \tcode{flags == right.flags}, and -\item \tcode{match[0] == right.match[0]}; +\item \tcode{\exposid{begin_} == right.\exposid{begin_}}, +\item \tcode{\exposid{end_} == right.\exposid{end_}}, +\item \tcode{\exposid{pregex_} == right.\exposid{pregex_}}, +\item \tcode{\exposid{flags_} == right.\exposid{flags_}}, and +\item \tcode{\exposid{match_}[0] == right.\exposid{match_}[0]}; \end{itemize} otherwise \tcode{false}. \end{itemdescr} @@ -12414,7 +12414,7 @@ \begin{itemdescr} \pnum \returns -\tcode{match}. +\exposid{match_}. \end{itemdescr} \indexlibrarymember{operator->}{regex_iterator}% @@ -12425,7 +12425,7 @@ \begin{itemdescr} \pnum \returns -\tcode{addressof(match)}. +\tcode{addressof(\exposid{match_})}. \end{itemdescr} \rSec4[re.regiter.incr]{Increment} @@ -12440,10 +12440,10 @@ \pnum \effects Constructs a local variable \tcode{start} of type \tcode{BidirectionalIterator} and -initializes it with the value of \tcode{match[0].second}. +initializes it with the value of \tcode{\exposid{match_}[0].second}. \pnum -If the iterator holds a zero-length match and \tcode{start == end} the operator +If the iterator holds a zero-length match and \tcode{start == \exposid{end_}} the operator sets \tcode{*this} to the end-of-sequence iterator and returns \tcode{*this}. \pnum @@ -12451,8 +12451,9 @@ \indexlibraryglobal{match_continuous}% Otherwise, if the iterator holds a zero-length match, the operator calls: \begin{codeblock} -regex_search(start, end, match, *pregex, - flags | regex_constants::match_not_null | regex_constants::match_continuous) +regex_search(start, \exposid{end_}, \exposid{match_}, *\exposid{pregex_}, + \exposid{flags_} | regex_constants::match_not_null | + regex_constants::match_continuous) \end{codeblock} If the call returns \tcode{true} the operator returns \tcode{*this}. Otherwise the operator increments \tcode{start} and continues as if @@ -12461,22 +12462,22 @@ \pnum \indexlibraryglobal{match_prev_avail}% If the most recent match was not a zero-length match, the operator sets -\tcode{flags} to \tcode{flags | regex_constants::match_prev_avail} and -calls \tcode{regex_search(start, end, match, *pregex, flags)}. If the call returns +\exposid{flags_} to \tcode{\exposid{flags_} | regex_constants::match_prev_avail} and +calls \tcode{regex_search(start, \exposid{end_}, \exposid{match_}, *\exposid{pregex_}, \exposid{flags_})}. If the call returns \tcode{false} the iterator sets \tcode{*this} to the end-of-sequence iterator. The iterator then returns \tcode{*this}. \pnum In all cases in which the call to \tcode{regex_search} returns \tcode{true}, -\tcode{match.prefix().first} shall be equal to the previous value of -\tcode{match[0].second}, and for each index \tcode{i} in the half-open range -\range{0}{match.size()} for which \tcode{match[i].matched} is \tcode{true}, -\tcode{match.position(i)} -shall return \tcode{distance(begin, match[i].\brk{}first)}. +\tcode{\exposid{match_}.prefix().first} shall be equal to the previous value of +\tcode{\exposid{match_}[0].second}, and for each index \tcode{i} in the half-open range +\range{0}{\exposid{match_}.size()} for which \tcode{\exposid{match_}[i].matched} is \tcode{true}, +\tcode{\exposid{match_}.position(i)} +shall return \tcode{distance(\exposid{begin_}, \exposid{match_}[i].\brk{}first)}. \pnum \begin{note} -This means that \tcode{match.position(i)} gives the +This means that \tcode{\exposid{match_}.position(i)} gives the offset from the beginning of the target sequence, which is often not the same as the offset from the sequence passed in the call to \tcode{regex_search}. @@ -12518,16 +12519,16 @@ \pnum \indexlibraryglobal{match_results}% After it is constructed, the iterator finds and stores a value -\tcode{regex_iterator position} -and sets the internal count \tcode{N} to zero. It also maintains a sequence -\tcode{subs} which contains a list of the sub-expressions which will be +\tcode{regex_iterator \exposid{position_}} +and sets the internal count \exposid{n_} to zero. It also maintains a sequence +\exposid{subs_} which contains a list of the sub-expressions which will be enumerated. Every time \tcode{operator++} is used -the count \tcode{N} is incremented; if \tcode{N} exceeds or equals \tcode{subs.size()}, -then the iterator increments member \tcode{position} -and sets count \tcode{N} to zero. +the count \exposid{n_} is incremented; if \exposid{n_} exceeds or equals \tcode{\exposid{subs_}.size()}, +then the iterator increments member \exposid{position_} +and sets count \exposid{n_} to zero. \pnum -If the end of sequence is reached (\tcode{position} is equal to the end of +If the end of sequence is reached (\exposid{position_} is equal to the end of sequence iterator), the iterator becomes equal to the end-of-sequence iterator value, unless the sub-expression being enumerated has index $-1$, in which case the iterator enumerates one last sub-expression that contains @@ -12622,13 +12623,13 @@ regex_token_iterator operator++(int) = default; private: - using position_iterator = + using @\exposid{position-iterator}@ = regex_iterator; // \expos - position_iterator position; // \expos - const value_type* result; // \expos - value_type suffix; // \expos - size_t N; // \expos - vector subs; // \expos + @\exposid{position-iterator}@ @\exposid{position_}@; // \expos + const value_type* @\exposid{result_}@; // \expos + value_type @\exposid{suffix_}@; // \expos + size_t @\exposid{n_}@; // \expos + vector @\exposid{subs_}@; // \expos }; } \end{codeblock} @@ -12637,23 +12638,23 @@ A \textit{suffix iterator} is a \tcode{regex_token_iterator} object that points to a final sequence of characters at the end of the target sequence. In a suffix iterator the -member \tcode{result} holds a pointer to the data -member \tcode{suffix}, the value of the member \tcode{suffix.matched} -is \tcode{true}, \tcode{suffix.first} points to the beginning of the -final sequence, and \tcode{suffix.second} points to the end of the +member \exposid{result_} holds a pointer to the data +member \exposid{suffix_}, the value of the member \tcode{\exposid{suffix_}.matched} +is \tcode{true}, \tcode{\exposid{suffix_}.first} points to the beginning of the +final sequence, and \tcode{\exposid{suffix_}.second} points to the end of the final sequence. \pnum \begin{note} For a suffix iterator, data -member \tcode{suffix.first} is the same as the end of the last match -found, and \tcode{suffix\brk.second} is the same as the end of the target +member \tcode{\exposid{suffix_}.first} is the same as the end of the last match +found, and \tcode{\exposid{suffix_}\brk.second} is the same as the end of the target sequence. \end{note} \pnum -The \textit{current match} is \tcode{(*position).prefix()} if \tcode{subs[N] == -1}, or -\tcode{(*position)[subs[N]]} for any other value of \tcode{subs[N]}. +The \textit{current match} is \tcode{(*\exposid{position_}).prefix()} if \tcode{\exposid{subs_}[\exposid{n_}] == -1}, or +\tcode{(*\exposid{position_})[\exposid{subs_}[\exposid{n_}]]} for any other value of \tcode{\exposid{subs_}[\exposid{n_}]}. \rSec4[re.tokiter.cnstr]{Constructors} @@ -12699,19 +12700,19 @@ \pnum \effects -The first constructor initializes the member \tcode{subs} to hold the single +The first constructor initializes the member \exposid{subs_} to hold the single value \tcode{submatch}. The second, third, and fourth constructors -initialize the member \tcode{subs} to hold a copy of the sequence of integer values +initialize the member \exposid{subs_} to hold a copy of the sequence of integer values pointed to by the iterator range \range{begin(submatches)}{end(submatches)}. \pnum -Each constructor then sets \tcode{N} to 0, and \tcode{position} to -\tcode{position_iterator(a, b, re, m)}. If \tcode{position} is not an -end-of-sequence iterator the constructor sets \tcode{result} to the +Each constructor then sets \exposid{n_} to 0, and \exposid{position_} to +\tcode{\exposid{position-iterator}(a, b,\brk{} re, m)}. If \exposid{position_} is not an +end-of-sequence iterator the constructor sets \exposid{result_} to the address of the current match. Otherwise if any of the values stored -in \tcode{subs} is equal to $-1$ the constructor sets \tcode{*this} to a suffix +in \exposid{subs_} is equal to $-1$ the constructor sets \tcode{*this} to a suffix iterator that points to the range \range{a}{b}, otherwise the constructor sets \tcode{*this} to an end-of-sequence iterator. \end{itemdescr} @@ -12727,10 +12728,10 @@ \pnum \returns \tcode{true} if \tcode{*this} and \tcode{right} are both end-of-sequence iterators, -or if \tcode{*this} and \tcode{right} are both suffix iterators and \tcode{suffix == right.suffix}; +or if \tcode{*this} and \tcode{right} are both suffix iterators and \tcode{\exposid{suffix_} == right.\exposid{suffix_}}; otherwise returns \tcode{false} if \tcode{*this} or \tcode{right} is an end-of-sequence -iterator or a suffix iterator. Otherwise returns \tcode{true} if \tcode{position == right.position}, -\tcode{N == right.N}, and \tcode{subs == right.subs}. Otherwise returns \tcode{false}. +iterator or a suffix iterator. Otherwise returns \tcode{true} if \tcode{\exposid{position_} == right.\exposid{position_}}, +\tcode{\exposid{n_} == right.\exposid{n_}}, and \tcode{\exposid{subs_} == right.\exposid{subs_}}. Otherwise returns \tcode{false}. \end{itemdescr} \rSec4[re.tokiter.deref]{Indirection} @@ -12743,7 +12744,7 @@ \begin{itemdescr} \pnum \returns -\tcode{*result}. +\tcode{*\exposid{result_}}. \end{itemdescr} \indexlibrarymember{operator->}{regex_token_iterator}% @@ -12754,7 +12755,7 @@ \begin{itemdescr} \pnum \returns -\tcode{result}. +\exposid{result_}. \end{itemdescr} @@ -12769,25 +12770,25 @@ \pnum \effects Constructs a local variable \tcode{prev} of -type \tcode{position_iterator}, initialized with the value -of \tcode{position}. +type \exposid{position-iterator}, initialized with the value +of \exposid{position_}. \pnum If \tcode{*this} is a suffix iterator, sets \tcode{*this} to an end-of-sequence iterator. \pnum -Otherwise, if \tcode{N + 1 < subs.size()}, increments \tcode{N} and -sets \tcode{result} to the address of the current match. +Otherwise, if \tcode{\exposid{n_} + 1 < \exposid{subs_}.size()}, increments \exposid{n_} and +sets \exposid{result_} to the address of the current match. \pnum -Otherwise, sets \tcode{N} to 0 and -increments \tcode{position}. If \tcode{position} is not an -end-of-sequence iterator the operator sets \tcode{result} to the +Otherwise, sets \exposid{n_} to 0 and +increments \exposid{position_}. If \exposid{position_} is not an +end-of-sequence iterator the operator sets \exposid{result_} to the address of the current match. \pnum -Otherwise, if any of the values stored in \tcode{subs} is equal to $-1$ and +Otherwise, if any of the values stored in \exposid{subs_} is equal to $-1$ and \tcode{prev->suffix().length()} is not 0 the operator sets \tcode{*this} to a suffix iterator that points to the range \range{prev->suffix().first}{prev->suffix().second}.