merged changes in regex5 branch

[SVN r26692]
This commit is contained in:
John Maddock
2005-01-13 17:06:21 +00:00
parent de0ab9092a
commit 71a0e020e2
275 changed files with 37305 additions and 27154 deletions

View File

@ -41,14 +41,12 @@
<PRE>
template &lt;class BidirectionalIterator,
class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
class traits = regex_traits&lt;charT&gt;,
class Allocator = allocator&lt;charT&gt; &gt;
class traits = regex_traits&lt;charT&gt; &gt;
class regex_token_iterator
{
public:
typedef <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt; regex_type;
typedef <A href="sub_match.html">sub_match</A>
&lt;BidirectionalIterator&gt; value_type;
typedef <A href="basic_regex.html">basic_regex</A>&lt;charT, traits&gt; regex_type;
typedef <A href="sub_match.html">sub_match</A>&lt;BidirectionalIterator&gt; value_type;
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef const value_type* pointer;
typedef const value_type&amp; reference;
@ -78,6 +76,48 @@ typedef regex_token_iterator&lt;std::string::const_iterator&gt; sregex_token_i
typedef regex_token_iterator&lt;const wchar_t*&gt; wcregex_token_iterator;
typedef regex_token_iterator&lt;&lt;std::wstring::const_iterator&gt; wsregex_token_iterator;
#endif
template &lt;class charT, class traits&gt;
regex_token_iterator&lt;const charT*, charT, traits&gt;
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const charT* p,
const basic_regex&lt;charT, traits&gt;&amp; e,
int submatch = 0,
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, class ST, class SA&gt;
regex_token_iterator&lt;typename std::basic_string&lt;charT, ST, SA&gt;::const_iterator, charT, traits&gt;
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const std::basic_string&lt;charT, ST, SA&gt;&amp; p,
const basic_regex&lt;charT, traits&gt;&amp; e,
int submatch = 0,
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, std::size_t N&gt;
regex_token_iterator&lt;const charT*, charT, traits&gt;
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const charT* p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const int (&amp;submatch)[N],
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, class ST, class SA, std::size_t N&gt;
regex_token_iterator&lt;typename std::basic_string&lt;charT, ST, SA&gt;::const_iterator, charT, traits&gt;
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const std::basic_string&lt;charT, ST, SA&gt;&amp; p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const int (&amp;submatch)[N],
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits&gt;
regex_token_iterator&lt;const charT*, charT, traits&gt;
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const charT* p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const std::vector&lt;int&gt;&amp; submatch,
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, class ST, class SA&gt;
regex_token_iterator&lt;typename std::basic_string&lt;charT, ST, SA&gt;::const_iterator, charT, traits&gt;
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const std::basic_string&lt;charT, ST, SA&gt;&amp; p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const std::vector&lt;int&gt;&amp; submatch,
regex_constants::match_flag_type m = regex_constants::match_default);
</PRE>
<H3><A name="description"></A>Description</H3>
<PRE><A name=c1></A>regex_token_iterator();</PRE>
@ -171,7 +211,54 @@ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const reg
<P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>,
then calls <CODE>++(*this)</CODE>.</P>
<P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A>
<H3>Examples</H3>
<PRE><A name=make_regex_token_iterator></A>template &lt;class charT, class traits&gt;
regex_token_iterator&lt;const charT*, charT, traits&gt;
make_regex_token_iterator(const charT* p,
const basic_regex&lt;charT, traits&gt;&amp; e,
int submatch = 0,
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, class ST, class SA&gt;
regex_token_iterator&lt;typename std::basic_string&lt;charT, ST, SA&gt;::const_iterator, charT, traits&gt;
make_regex_token_iterator(const std::basic_string&lt;charT, ST, SA&gt;&amp; p,
const basic_regex&lt;charT, traits&gt;&amp; e,
int submatch = 0,
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, std::size_t N&gt;
regex_token_iterator&lt;const charT*, charT, traits&gt;
make_regex_token_iterator(const charT* p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const int (&amp;submatch)[N],
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, class ST, class SA, std::size_t N&gt;
regex_token_iterator&lt;typename std::basic_string&lt;charT, ST, SA&gt;::const_iterator, charT, traits&gt;
make_regex_token_iterator(const std::basic_string&lt;charT, ST, SA&gt;&amp; p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const int (&amp;submatch)[N],
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits&gt;
regex_token_iterator&lt;const charT*, charT, traits&gt;
make_regex_token_iterator(const charT* p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const std::vector&lt;int&gt;&amp; submatch,
regex_constants::match_flag_type m = regex_constants::match_default);
template &lt;class charT, class traits, class ST, class SA&gt;
regex_token_iterator&lt;typename std::basic_string&lt;charT, ST, SA&gt;::const_iterator, charT, traits&gt;
make_regex_token_iterator(const std::basic_string&lt;charT, ST, SA&gt;&amp; p,
const basic_regex&lt;charT, traits&gt;&amp; e,
const std::vector&lt;int&gt;&amp; submatch,
regex_constants::match_flag_type m = regex_constants::match_default);
</PRE>
<P>Effects: returns a <A href="#synopsis">regex_token_iterator</A> that enumerates
one <A href="sub_match.html">sub_match</A> for each value in <EM>submatch</EM> for
each occurrence of regular expression <EM>e</EM> in string <EM>p</EM>, matched
using <A href="match_flag_type.html">match_flags</A> <EM>m</EM>.</P>
<P></P>
<H3>Examples</H3>
<P>The following <A href="../example/snippets/regex_token_iterator_eg_1.cpp">example</A>
takes a string and splits it into a series of tokens:</P>
<pre>
@ -280,14 +367,15 @@ boost::regex e(<FONT color=#0000ff>"&lt;\\s*A\\s+[^&gt;]*href\\s*=\\s*\"([^\"]*)
}
</pre>
<HR>
<p>Revised
<p>Revised&nbsp;
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003
26 June 2004&nbsp;
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
</body>
</html>