Improved error messages generated for thrown exceptions.

Suppressed "gcc -Wall -Wextra -pedantic" and "msvc /W4" warnings.
Updated and rebuilt docs.


[SVN r57451]
This commit is contained in:
John Maddock
2009-11-07 15:32:45 +00:00
parent 898b49fa89
commit 6e1f3dcceb
60 changed files with 662 additions and 436 deletions

View File

@ -11,6 +11,7 @@
[h4 Boost 1.42] [h4 Boost 1.42]
* Added support for Functors rather than strings as format expressions. * Added support for Functors rather than strings as format expressions.
* Improved error reporting when throwing exceptions to include better more relevant information.
* Fixed tickets * Fixed tickets
[@https://svn.boost.org/trac/boost/ticket/2802 #2802], [@https://svn.boost.org/trac/boost/ticket/2802 #2802],
[@https://svn.boost.org/trac/boost/ticket/2802 #3425], [@https://svn.boost.org/trac/boost/ticket/2802 #3425],

View File

@ -28,7 +28,7 @@
Example Programs</a> Example Programs</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.examples.test_programs"></a><h5> <a name="boost_regex.background_information.examples.test_programs"></a><h5>
<a name="id904604"></a> <a name="id934516"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test <a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test
Programs</a> Programs</a>
</h5> </h5>
@ -107,7 +107,7 @@
Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>. Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
</p> </p>
<a name="boost_regex.background_information.examples.example_programs"></a><h5> <a name="boost_regex.background_information.examples.example_programs"></a><h5>
<a name="id904907"></a> <a name="id934820"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example <a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example
programs</a> programs</a>
</h5> </h5>
@ -133,7 +133,7 @@
Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>. Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
</p> </p>
<a name="boost_regex.background_information.examples.code_snippets"></a><h5> <a name="boost_regex.background_information.examples.code_snippets"></a><h5>
<a name="id904966"></a> <a name="id934878"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code <a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
snippets</a> snippets</a>
</h5> </h5>

View File

@ -26,7 +26,7 @@
<a name="boost_regex.background_information.history"></a><a class="link" href="history.html" title="History"> History</a> <a name="boost_regex.background_information.history"></a><a class="link" href="history.html" title="History"> History</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.history.boost_1_42"></a><h5> <a name="boost_regex.background_information.history.boost_1_42"></a><h5>
<a name="id906454"></a> <a name="id936366"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_42">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_42">Boost
1.42</a> 1.42</a>
</h5> </h5>
@ -34,6 +34,10 @@
<li> <li>
Added support for Functors rather than strings as format expressions. Added support for Functors rather than strings as format expressions.
</li> </li>
<li>
Improved error reporting when throwing exceptions to include better more
relevant information.
</li>
<li> <li>
Fixed tickets <a href="https://svn.boost.org/trac/boost/ticket/2802" target="_top">#2802</a>, Fixed tickets <a href="https://svn.boost.org/trac/boost/ticket/2802" target="_top">#2802</a>,
<a href="https://svn.boost.org/trac/boost/ticket/2802" target="_top">#3425</a>, <a href="https://svn.boost.org/trac/boost/ticket/2802" target="_top">#3425</a>,
@ -41,7 +45,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_40"></a><h5> <a name="boost_regex.background_information.history.boost_1_40"></a><h5>
<a name="id906493"></a> <a name="id936408"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_40">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_40">Boost
1.40</a> 1.40</a>
</h5> </h5>
@ -50,7 +54,7 @@
branch resets and recursive regular expressions. branch resets and recursive regular expressions.
</li></ul></div> </li></ul></div>
<a name="boost_regex.background_information.history.boost_1_38"></a><h5> <a name="boost_regex.background_information.history.boost_1_38"></a><h5>
<a name="id906513"></a> <a name="id936429"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
1.38</a> 1.38</a>
</h5> </h5>
@ -77,7 +81,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_34"></a><h5> <a name="boost_regex.background_information.history.boost_1_34"></a><h5>
<a name="id906591"></a> <a name="id936507"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
1.34</a> 1.34</a>
</h5> </h5>
@ -100,7 +104,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5> <a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
<a name="id906622"></a> <a name="id936538"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
1.33.1</a> 1.33.1</a>
</h5> </h5>
@ -170,7 +174,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h5> <a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
<a name="id907917"></a> <a name="id936872"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
1.33.0</a> 1.33.0</a>
</h5> </h5>
@ -225,7 +229,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5> <a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
<a name="id907976"></a> <a name="id936931"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
1.32.1</a> 1.32.1</a>
</h5> </h5>
@ -233,7 +237,7 @@
Fixed bug in partial matches of bounded repeats of '.'. Fixed bug in partial matches of bounded repeats of '.'.
</li></ul></div> </li></ul></div>
<a name="boost_regex.background_information.history.boost_1_31_0"></a><h5> <a name="boost_regex.background_information.history.boost_1_31_0"></a><h5>
<a name="id907996"></a> <a name="id936951"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
1.31.0</a> 1.31.0</a>
</h5> </h5>

View File

@ -58,7 +58,7 @@
There are three separate localization mechanisms supported by Boost.Regex: There are three separate localization mechanisms supported by Boost.Regex:
</p> </p>
<a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5> <a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5>
<a name="id901446"></a> <a name="id930256"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32 <a class="link" href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32
localization model.</a> localization model.</a>
</h5> </h5>
@ -90,7 +90,7 @@
are treated as "unknown" graphic characters. are treated as "unknown" graphic characters.
</p> </p>
<a name="boost_regex.background_information.locale.c_localization_model_"></a><h5> <a name="boost_regex.background_information.locale.c_localization_model_"></a><h5>
<a name="id901601"></a> <a name="id930411"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.c_localization_model_">C <a class="link" href="locale.html#boost_regex.background_information.locale.c_localization_model_">C
localization model.</a> localization model.</a>
</h5> </h5>
@ -114,7 +114,7 @@
libraries including version 1 of this library. libraries including version 1 of this library.
</p> </p>
<a name="boost_regex.background_information.locale.c___localization_model_"></a><h5> <a name="boost_regex.background_information.locale.c___localization_model_"></a><h5>
<a name="id901669"></a> <a name="id930480"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++ <a class="link" href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++
localization model.</a> localization model.</a>
</h5> </h5>
@ -151,7 +151,7 @@
in your code. The best way to ensure this is to add the #define to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>. in your code. The best way to ensure this is to add the #define to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
</p> </p>
<a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5> <a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
<a name="id902082"></a> <a name="id931989"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing <a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
a message catalogue</a> a message catalogue</a>
</h5> </h5>

View File

@ -28,7 +28,7 @@
Conformance</a> Conformance</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.standards.c__"></a><h5> <a name="boost_regex.background_information.standards.c__"></a><h5>
<a name="id905595"></a> <a name="id935507"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.c__">C++</a> <a class="link" href="standards.html#boost_regex.background_information.standards.c__">C++</a>
</h5> </h5>
<p> <p>
@ -36,7 +36,7 @@
Report on C++ Library Extensions</a>. Report on C++ Library Extensions</a>.
</p> </p>
<a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5> <a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5>
<a name="id905617"></a> <a name="id935529"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript <a class="link" href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
/ JavaScript</a> / JavaScript</a>
</h5> </h5>
@ -49,7 +49,7 @@
rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences. rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
</p> </p>
<a name="boost_regex.background_information.standards.perl"></a><h5> <a name="boost_regex.background_information.standards.perl"></a><h5>
<a name="id905637"></a> <a name="id935549"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a> <a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
</h5> </h5>
<p> <p>
@ -62,7 +62,7 @@
(??{code}) Not implementable in a compiled strongly typed language. (??{code}) Not implementable in a compiled strongly typed language.
</p> </p>
<a name="boost_regex.background_information.standards.posix"></a><h5> <a name="boost_regex.background_information.standards.posix"></a><h5>
<a name="id905661"></a> <a name="id935573"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a> <a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
</h5> </h5>
<p> <p>
@ -82,7 +82,7 @@
a custom traits class. a custom traits class.
</p> </p>
<a name="boost_regex.background_information.standards.unicode"></a><h5> <a name="boost_regex.background_information.standards.unicode"></a><h5>
<a name="id905685"></a> <a name="id935597"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a> <a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
</h5> </h5>
<p> <p>

View File

@ -35,7 +35,7 @@
accessed. accessed.
</p> </p>
<a name="boost_regex.captures.marked_sub_expressions"></a><h5> <a name="boost_regex.captures.marked_sub_expressions"></a><h5>
<a name="id746503"></a> <a name="id777564"></a>
<a class="link" href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a> <a class="link" href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a>
</h5> </h5>
<p> <p>
@ -218,7 +218,7 @@
output stream. output stream.
</p> </p>
<a name="boost_regex.captures.unmatched_sub_expressions"></a><h5> <a name="boost_regex.captures.unmatched_sub_expressions"></a><h5>
<a name="id746959"></a> <a name="id778020"></a>
<a class="link" href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a> <a class="link" href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a>
</h5> </h5>
<p> <p>
@ -231,7 +231,7 @@
you can determine which sub-expressions matched by accessing the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></code> data member. you can determine which sub-expressions matched by accessing the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></code> data member.
</p> </p>
<a name="boost_regex.captures.repeated_captures"></a><h5> <a name="boost_regex.captures.repeated_captures"></a><h5>
<a name="id746998"></a> <a name="id778060"></a>
<a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a> <a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
</h5> </h5>
<p> <p>

View File

@ -32,7 +32,7 @@
'$', '\', '(', ')', '?', and ':'. '$', '\', '(', ')', '?', and ':'.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h5> <a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
<a name="id768514"></a> <a name="id798579"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a> <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a>
</h5> </h5>
<p> <p>
@ -40,7 +40,7 @@
you want a to output literal parenthesis. you want a to output literal parenthesis.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5> <a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5>
<a name="id768531"></a> <a name="id798596"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a> <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
</h5> </h5>
<p> <p>
@ -79,7 +79,7 @@
?{NAME}true-expression:false-expression ?{NAME}true-expression:false-expression
</p> </p>
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5> <a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
<a name="id768584"></a> <a name="id798648"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
Sequences</a> Sequences</a>
</h5> </h5>
@ -319,7 +319,7 @@
as a literal. as a literal.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5> <a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
<a name="id768927"></a> <a name="id798992"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
Sequences</a> Sequences</a>
</h5> </h5>

View File

@ -49,7 +49,7 @@
file before you can use it, instructions for specific platforms are as follows: file before you can use it, instructions for specific platforms are as follows:
</p> </p>
<a name="boost_regex.install.building_with_bjam"></a><h5> <a name="boost_regex.install.building_with_bjam"></a><h5>
<a name="id735989"></a> <a name="id766996"></a>
<a class="link" href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a> <a class="link" href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a>
</h5> </h5>
<p> <p>
@ -58,7 +58,7 @@
started guide</a> for more information. started guide</a> for more information.
</p> </p>
<a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5> <a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5>
<a name="id743782"></a> <a name="id775391"></a>
<a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building <a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building
With Unicode and ICU Support</a> With Unicode and ICU Support</a>
</h5> </h5>
@ -96,11 +96,11 @@
ICU you are using is binary compatible with the toolset you use to build Boost. ICU you are using is binary compatible with the toolset you use to build Boost.
</p> </p>
<a name="boost_regex.install.building_via_makefiles"></a><h5> <a name="boost_regex.install.building_via_makefiles"></a><h5>
<a name="id743901"></a> <a name="id775510"></a>
<a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a> <a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a>
</h5> </h5>
<a name="boost_regex.install.borland_c___builder_"></a><h6> <a name="boost_regex.install.borland_c___builder_"></a><h6>
<a name="id743914"></a> <a name="id775523"></a>
<a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a> <a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
</h6> </h6>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
@ -166,7 +166,7 @@
a lot in compile times! a lot in compile times!
</p> </p>
<a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5> <a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5>
<a name="id744153"></a> <a name="id775762"></a>
<a class="link" href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft <a class="link" href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft
Visual C++ 6, 7, 7.1 and 8</a> Visual C++ 6, 7, 7.1 and 8</a>
</h5> </h5>
@ -253,7 +253,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h6> <a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
<a name="id744352"></a> <a name="id775961"></a>
<a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a> <a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
</h6> </h6>
<p> <p>
@ -302,7 +302,7 @@
see the <a href="../../../../config/index.html" target="_top">config library documentation</a>. see the <a href="../../../../config/index.html" target="_top">config library documentation</a>.
</p> </p>
<a name="boost_regex.install.sun_workshop_6_1"></a><h6> <a name="boost_regex.install.sun_workshop_6_1"></a><h6>
<a name="id744478"></a> <a name="id776087"></a>
<a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a> <a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
</h6> </h6>
<p> <p>
@ -347,7 +347,7 @@
will build v9 variants of the regex library named libboost_regex_v9.a etc. will build v9 variants of the regex library named libboost_regex_v9.a etc.
</p> </p>
<a name="boost_regex.install.makefiles_for_other_compilers"></a><h6> <a name="boost_regex.install.makefiles_for_other_compilers"></a><h6>
<a name="id744622"></a> <a name="id776231"></a>
<a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles <a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
for Other compilers</a> for Other compilers</a>
</h6> </h6>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.bad_expression"></a><a class="link" href="bad_expression.html" title="bad_expression"> bad_expression</a> <a name="boost_regex.ref.bad_expression"></a><a class="link" href="bad_expression.html" title="bad_expression"> bad_expression</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.bad_expression.synopsis"></a><h5> <a name="boost_regex.ref.bad_expression.synopsis"></a><h5>
<a name="id852772"></a> <a name="id883920"></a>
<a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a> <a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a>
</h5> </h5>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -54,7 +54,7 @@
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.bad_expression.description"></a><h5> <a name="boost_regex.ref.bad_expression.description"></a><h5>
<a name="id854229"></a> <a name="id884282"></a>
<a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a> <a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a>
</h5> </h5>
<pre class="programlisting"><span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span> <pre class="programlisting"><span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.basic_regex"></a><a class="link" href="basic_regex.html" title="basic_regex"> basic_regex</a> <a name="boost_regex.ref.basic_regex"></a><a class="link" href="basic_regex.html" title="basic_regex"> basic_regex</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.basic_regex.synopsis"></a><h5> <a name="boost_regex.ref.basic_regex.synopsis"></a><h5>
<a name="id769270"></a> <a name="id799335"></a>
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.synopsis">Synopsis</a> <a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.synopsis">Synopsis</a>
</h5> </h5>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -244,7 +244,7 @@
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.basic_regex.description"></a><h5> <a name="boost_regex.ref.basic_regex.description"></a><h5>
<a name="id774746"></a> <a name="id804810"></a>
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a> <a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a>
</h5> </h5>
<p> <p>
@ -327,7 +327,7 @@
<code class="computeroutput"><span class="identifier">basic_regex</span></code>. <code class="computeroutput"><span class="identifier">basic_regex</span></code>.
</p> </p>
<div class="table"> <div class="table">
<a name="id777749"></a><p class="title"><b>Table<EFBFBD>1.<2E>basic_regex default construction postconditions</b></p> <a name="id806721"></a><p class="title"><b>Table<EFBFBD>1.<2E>basic_regex default construction postconditions</b></p>
<div class="table-contents"><table class="table" summary="basic_regex default construction postconditions"> <div class="table-contents"><table class="table" summary="basic_regex default construction postconditions">
<colgroup> <colgroup>
<col> <col>
@ -407,7 +407,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>. flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id778047"></a><p class="title"><b>Table<EFBFBD>2.<2E>Postconditions for basic_regex construction</b></p> <a name="id807019"></a><p class="title"><b>Table<EFBFBD>2.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -512,7 +512,7 @@
specified in <span class="emphasis"><em>f</em></span>. specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id778460"></a><p class="title"><b>Table<EFBFBD>3.<2E>Postconditions for basic_regex construction</b></p> <a name="id807432"></a><p class="title"><b>Table<EFBFBD>3.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -616,7 +616,7 @@
according the option flags specified in <span class="emphasis"><em>f</em></span>. according the option flags specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id778864"></a><p class="title"><b>Table<EFBFBD>4.<2E>Postconditions for basic_regex construction</b></p> <a name="id807836"></a><p class="title"><b>Table<EFBFBD>4.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -727,7 +727,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>. flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id779344"></a><p class="title"><b>Table<EFBFBD>5.<2E>Postconditions for basic_regex construction</b></p> <a name="id809405"></a><p class="title"><b>Table<EFBFBD>5.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -829,7 +829,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>. flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id779703"></a><p class="title"><b>Table<EFBFBD>6.<2E>Postconditions for basic_regex construction</b></p> <a name="id809764"></a><p class="title"><b>Table<EFBFBD>6.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -1043,7 +1043,7 @@
in <span class="emphasis"><em>f</em></span>. in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id781219"></a><p class="title"><b>Table<EFBFBD>7.<2E>Postconditions for basic_regex::assign</b></p> <a name="id811280"></a><p class="title"><b>Table<EFBFBD>7.<2E>Postconditions for basic_regex::assign</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex::assign"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex::assign">
<colgroup> <colgroup>
<col> <col>

View File

@ -34,7 +34,7 @@
Boost-specific enhanced interface. Boost-specific enhanced interface.
</p> </p>
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5> <a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
<a name="id880315"></a> <a name="id910898"></a>
<a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal
requirements.</a> requirements.</a>
</h5> </h5>
@ -381,7 +381,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5> <a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5>
<a name="id880959"></a> <a name="id911638"></a>
<a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
Optional Requirements</a> Optional Requirements</a>
</h5> </h5>

View File

@ -34,7 +34,7 @@
previous version of Boost.Regex and will not be further updated: previous version of Boost.Regex and will not be further updated:
</p> </p>
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5> <a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5>
<a name="id881481"></a> <a name="id912160"></a>
<a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm <a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
regex_format</a> regex_format</a>
</h5> </h5>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.error_type"></a><a class="link" href="error_type.html" title="error_type"> error_type</a> <a name="boost_regex.ref.error_type"></a><a class="link" href="error_type.html" title="error_type"> error_type</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.error_type.synopsis"></a><h5> <a name="boost_regex.ref.error_type.synopsis"></a><h5>
<a name="id860182"></a> <a name="id891327"></a>
<a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a> <a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
</h5> </h5>
<p> <p>
@ -57,7 +57,7 @@
</span><span class="special">}</span> <span class="comment">// namespace boost </span><span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.error_type.description"></a><h5> <a name="boost_regex.ref.error_type.description"></a><h5>
<a name="id860598"></a> <a name="id891743"></a>
<a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a> <a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -69,7 +69,7 @@
</span><span class="special">}</span> <span class="comment">// namespace boost </span><span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.match_flag_type.description"></a><h5> <a name="boost_regex.ref.match_flag_type.description"></a><h5>
<a name="id858856"></a> <a name="id890001"></a>
<a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a> <a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.match_results"></a><a class="link" href="match_results.html" title="match_results"> match_results</a> <a name="boost_regex.ref.match_results"></a><a class="link" href="match_results.html" title="match_results"> match_results</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.match_results.synopsis"></a><h5> <a name="boost_regex.ref.match_results.synopsis"></a><h5>
<a name="id785597"></a> <a name="id814429"></a>
<a class="link" href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a> <a class="link" href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a>
</h5> </h5>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -167,7 +167,7 @@
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.match_results.description"></a><h5> <a name="boost_regex.ref.match_results.description"></a><h5>
<a name="id789122"></a> <a name="id819044"></a>
<a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a> <a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -43,7 +43,7 @@
on to the "real" algorithm. on to the "real" algorithm.
</p> </p>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5>
<a name="id863476"></a> <a name="id893519"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a> <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
</h5> </h5>
<p> <p>
@ -89,7 +89,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5>
<a name="id863991"></a> <a name="id894034"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a> <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
</h5> </h5>
<p> <p>
@ -128,7 +128,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5>
<a name="id864410"></a> <a name="id894453"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a> <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
</h5> </h5>
<p> <p>

View File

@ -28,7 +28,7 @@
Unicode Aware Regex Iterators</a> Unicode Aware Regex Iterators</a>
</h5></div></div></div> </h5></div></div></div>
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5>
<a name="id864728"></a> <a name="id894771"></a>
<a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a> <a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
</h5> </h5>
<p> <p>
@ -126,7 +126,7 @@
Provided of course that the input is encoded as UTF-8. Provided of course that the input is encoded as UTF-8.
</p> </p>
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5>
<a name="id866088"></a> <a name="id897224"></a>
<a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a> <a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a>
</h5> </h5>
<p> <p>

View File

@ -34,7 +34,7 @@
here they are anyway: here they are anyway:
</p> </p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5>
<a name="id872671"></a> <a name="id902162"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a> <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a>
</h5> </h5>
<p> <p>
@ -82,7 +82,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5>
<a name="id873329"></a> <a name="id903913"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match
(second overload)</a> (second overload)</a>
</h5> </h5>
@ -110,7 +110,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
<a name="id873760"></a> <a name="id904344"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a> <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a>
</h5> </h5>
<p> <p>
@ -149,7 +149,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5>
<a name="id874295"></a> <a name="id904879"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search
(second overload)</a> (second overload)</a>
</h5> </h5>
@ -164,7 +164,7 @@
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5>
<a name="id874586"></a> <a name="id905169"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a> <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a>
</h5> </h5>
<p> <p>

View File

@ -32,7 +32,7 @@
an MFC/ATL string to a <a class="link" href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a class="link" href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>: an MFC/ATL string to a <a class="link" href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a class="link" href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>:
</p> </p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5>
<a name="id876449"></a> <a name="id905940"></a>
<a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator <a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator
creation helper</a> creation helper</a>
</h5> </h5>
@ -68,7 +68,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5>
<a name="id876997"></a> <a name="id906489"></a>
<a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator <a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator
creation helpers</a> creation helpers</a>
</h5> </h5>

View File

@ -165,7 +165,7 @@
<a name="regcomp"></a><p> <a name="regcomp"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regcomp"></a><h5> <a name="boost_regex.ref.posix.regcomp"></a><h5>
<a name="id879136"></a> <a name="id909720"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a> <a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
</h5> </h5>
<p> <p>
@ -379,7 +379,7 @@
<a name="regerror"></a><p> <a name="regerror"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regerror"></a><h5> <a name="boost_regex.ref.posix.regerror"></a><h5>
<a name="id879642"></a> <a name="id910225"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a> <a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
</h5> </h5>
<p> <p>
@ -467,7 +467,7 @@
<a name="regexec"></a><p> <a name="regexec"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regexec"></a><h5> <a name="boost_regex.ref.posix.regexec"></a><h5>
<a name="id879770"></a> <a name="id910353"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a> <a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
</h5> </h5>
<p> <p>
@ -537,7 +537,7 @@
<a name="regfree"></a><p> <a name="regfree"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regfree"></a><h5> <a name="boost_regex.ref.posix.regfree"></a><h5>
<a name="id879882"></a> <a name="id910465"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a> <a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
</h5> </h5>
<p> <p>

View File

@ -78,7 +78,7 @@
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_iterator.description"></a><h5> <a name="boost_regex.ref.regex_iterator.description"></a><h5>
<a name="id837586"></a> <a name="id866482"></a>
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a> <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
</h5> </h5>
<p> <p>
@ -436,7 +436,7 @@
<span class="emphasis"><em>m</em></span>. <span class="emphasis"><em>m</em></span>.
</p> </p>
<a name="boost_regex.ref.regex_iterator.examples"></a><h5> <a name="boost_regex.ref.regex_iterator.examples"></a><h5>
<a name="id841240"></a> <a name="id871245"></a>
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a> <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -80,7 +80,7 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_match.description"></a><h5> <a name="boost_regex.ref.regex_match.description"></a><h5>
<a name="id821846"></a> <a name="id849653"></a>
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.description">Description</a> <a class="link" href="regex_match.html#boost_regex.ref.regex_match.description">Description</a>
</h5> </h5>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
@ -360,7 +360,7 @@
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>. <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_match.examples"></a><h5> <a name="boost_regex.ref.regex_match.examples"></a><h5>
<a name="id824285"></a> <a name="id853116"></a>
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a> <a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -53,7 +53,7 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_replace.description"></a><h5> <a name="boost_regex.ref.regex_replace.description"></a><h5>
<a name="id831812"></a> <a name="id860779"></a>
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a> <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a>
</h5> </h5>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
@ -196,7 +196,7 @@
and then returns <code class="computeroutput"><span class="identifier">result</span></code>. and then returns <code class="computeroutput"><span class="identifier">result</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_replace.examples"></a><h5> <a name="boost_regex.ref.regex_replace.examples"></a><h5>
<a name="id834348"></a> <a name="id862220"></a>
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a> <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -73,7 +73,7 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_search.description"></a><h5> <a name="boost_regex.ref.regex_search.description"></a><h5>
<a name="id825909"></a> <a name="id854740"></a>
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.description">Description</a> <a class="link" href="regex_search.html#boost_regex.ref.regex_search.description">Description</a>
</h5> </h5>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
@ -355,7 +355,7 @@
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>. <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_search.examples"></a><h5> <a name="boost_regex.ref.regex_search.examples"></a><h5>
<a name="id829434"></a> <a name="id857172"></a>
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a> <a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -136,7 +136,7 @@
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_token_iterator.description"></a><h5> <a name="boost_regex.ref.regex_token_iterator.description"></a><h5>
<a name="id847700"></a> <a name="id877688"></a>
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a> <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a>
</h5> </h5>
<a name="boost_regex.regex_token_iterator.construct1"></a><p> <a name="boost_regex.regex_token_iterator.construct1"></a><p>
@ -383,7 +383,7 @@
<span class="emphasis"><em>m</em></span>. <span class="emphasis"><em>m</em></span>.
</p> </p>
<a name="boost_regex.ref.regex_token_iterator.examples"></a><h5> <a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
<a name="id850759"></a> <a name="id880815"></a>
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a> <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -46,7 +46,7 @@
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.regex_traits.description"></a><h5> <a name="boost_regex.ref.regex_traits.description"></a><h5>
<a name="id861138"></a> <a name="id892283"></a>
<a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a> <a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -329,11 +329,11 @@
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.sub_match.description"></a><h5> <a name="boost_regex.ref.sub_match.description"></a><h5>
<a name="id804610"></a> <a name="id834601"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.description">Description</a> <a class="link" href="sub_match.html#boost_regex.ref.sub_match.description">Description</a>
</h5> </h5>
<a name="boost_regex.ref.sub_match.members"></a><h6> <a name="boost_regex.ref.sub_match.members"></a><h6>
<a name="id804623"></a> <a name="id834614"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.members">Members</a> <a class="link" href="sub_match.html#boost_regex.ref.sub_match.members">Members</a>
</h6> </h6>
<a name="boost_regex.sub_match.value_type"></a><p> <a name="boost_regex.sub_match.value_type"></a><p>
@ -473,7 +473,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6> <a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6>
<a name="id807363"></a> <a name="id836262"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.sub_match_non_member_operators">sub_match <a class="link" href="sub_match.html#boost_regex.ref.sub_match.sub_match_non_member_operators">sub_match
non-member operators</a> non-member operators</a>
</h6> </h6>
@ -1008,7 +1008,7 @@
<span class="special">+</span> <span class="identifier">m2</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>. <span class="special">+</span> <span class="identifier">m2</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>.
</p> </p>
<a name="boost_regex.ref.sub_match.stream_inserter"></a><h6> <a name="boost_regex.ref.sub_match.stream_inserter"></a><h6>
<a name="id820448"></a> <a name="id848255"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.stream_inserter">Stream inserter</a> <a class="link" href="sub_match.html#boost_regex.ref.sub_match.stream_inserter">Stream inserter</a>
</h6> </h6>
<a name="boost_regex.sub_match.op_stream"></a><p> <a name="boost_regex.sub_match.op_stream"></a><p>

View File

@ -28,7 +28,7 @@
Expression Syntax</a> Expression Syntax</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.basic_extended.synopsis"></a><h4> <a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
<a name="id757252"></a> <a name="id787153"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
</h4> </h4>
<p> <p>
@ -46,7 +46,7 @@
<a name="boost_regex.posix_extended_syntax"></a><p> <a name="boost_regex.posix_extended_syntax"></a><p>
</p> </p>
<a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4> <a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4>
<a name="id757431"></a> <a name="id787332"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
Extended Syntax</a> Extended Syntax</a>
</h4> </h4>
@ -56,7 +56,7 @@
</p> </p>
<pre class="programlisting">.[{()\*+?|^$</pre> <pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5> <a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5>
<a name="id757452"></a> <a name="id787354"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
</h5> </h5>
<p> <p>
@ -74,7 +74,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.basic_extended.anchors_"></a><h5> <a name="boost_regex.syntax.basic_extended.anchors_"></a><h5>
<a name="id757497"></a> <a name="id787398"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
</h5> </h5>
<p> <p>
@ -86,7 +86,7 @@
of an expression, or the last character of a sub-expression. of an expression, or the last character of a sub-expression.
</p> </p>
<a name="boost_regex.syntax.basic_extended.marked_sub_expressions_"></a><h5> <a name="boost_regex.syntax.basic_extended.marked_sub_expressions_"></a><h5>
<a name="id757520"></a> <a name="id787421"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
sub-expressions:</a> sub-expressions:</a>
</h5> </h5>
@ -98,7 +98,7 @@
to by a back-reference. to by a back-reference.
</p> </p>
<a name="boost_regex.syntax.basic_extended.repeats_"></a><h5> <a name="boost_regex.syntax.basic_extended.repeats_"></a><h5>
<a name="id757553"></a> <a name="id787454"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
</h5> </h5>
<p> <p>
@ -184,7 +184,7 @@ cab
operator to be applied to. operator to be applied to.
</p> </p>
<a name="boost_regex.syntax.basic_extended.back_references_"></a><h5> <a name="boost_regex.syntax.basic_extended.back_references_"></a><h5>
<a name="id757859"></a> <a name="id787760"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
</h5> </h5>
<p> <p>
@ -214,7 +214,7 @@ cab
</p></td></tr> </p></td></tr>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.alternation"></a><h5> <a name="boost_regex.syntax.basic_extended.alternation"></a><h5>
<a name="id757923"></a> <a name="id787824"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
</h5> </h5>
<p> <p>
@ -227,7 +227,7 @@ cab
will match either of "abd" or "abef". will match either of "abd" or "abef".
</p> </p>
<a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5> <a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5>
<a name="id757990"></a> <a name="id787891"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
sets:</a> sets:</a>
</h5> </h5>
@ -240,7 +240,7 @@ cab
A bracket expression may contain any combination of the following: A bracket expression may contain any combination of the following:
</p> </p>
<a name="boost_regex.syntax.basic_extended.single_characters_"></a><h6> <a name="boost_regex.syntax.basic_extended.single_characters_"></a><h6>
<a name="id758010"></a> <a name="id787912"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
characters:</a> characters:</a>
</h6> </h6>
@ -249,7 +249,7 @@ cab
or 'c'. or 'c'.
</p> </p>
<a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6> <a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6>
<a name="id758042"></a> <a name="id787943"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
ranges:</a> ranges:</a>
</h6> </h6>
@ -265,7 +265,7 @@ cab
the code points of the characters only. the code points of the characters only.
</p> </p>
<a name="boost_regex.syntax.basic_extended.negation_"></a><h6> <a name="boost_regex.syntax.basic_extended.negation_"></a><h6>
<a name="id758103"></a> <a name="id788004"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
</h6> </h6>
<p> <p>
@ -274,7 +274,7 @@ cab
range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>. range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6> <a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6>
<a name="id758157"></a> <a name="id788058"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
classes:</a> classes:</a>
</h6> </h6>
@ -284,7 +284,7 @@ cab
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>. <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6> <a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6>
<a name="id758208"></a> <a name="id788110"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
Elements:</a> Elements:</a>
</h6> </h6>
@ -312,7 +312,7 @@ cab
matches a NUL character. matches a NUL character.
</p> </p>
<a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6> <a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6>
<a name="id758310"></a> <a name="id788212"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
classes:</a> classes:</a>
</h6> </h6>
@ -329,7 +329,7 @@ cab
or even all locales on one platform. or even all locales on one platform.
</p> </p>
<a name="boost_regex.syntax.basic_extended.combinations_"></a><h6> <a name="boost_regex.syntax.basic_extended.combinations_"></a><h6>
<a name="id758368"></a> <a name="id788269"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
</h6> </h6>
<p> <p>
@ -337,7 +337,7 @@ cab
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]]</span></code>. <code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]]</span></code>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.escapes"></a><h5> <a name="boost_regex.syntax.basic_extended.escapes"></a><h5>
<a name="id758421"></a> <a name="id788322"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
</h5> </h5>
<p> <p>
@ -363,7 +363,7 @@ cab
extensions are also supported by Boost.Regex: extensions are also supported by Boost.Regex:
</p> </p>
<a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6> <a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6>
<a name="id758464"></a> <a name="id788365"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes
matching a specific character</a> matching a specific character</a>
</h6> </h6>
@ -552,7 +552,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6> <a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6>
<a name="id758823"></a> <a name="id788751"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single
character" character classes:</a> character" character classes:</a>
</h6> </h6>
@ -706,7 +706,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.character_properties"></a><h6> <a name="boost_regex.syntax.basic_extended.character_properties"></a><h6>
<a name="id759312"></a> <a name="id789239"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
Properties</a> Properties</a>
</h6> </h6>
@ -813,7 +813,7 @@ cab
matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>. matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6> <a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6>
<a name="id759619"></a> <a name="id789547"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
</h6> </h6>
<p> <p>
@ -888,7 +888,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6> <a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6>
<a name="id759775"></a> <a name="id789703"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
boundaries</a> boundaries</a>
</h6> </h6>
@ -979,7 +979,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6> <a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6>
<a name="id759960"></a> <a name="id789887"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
Escape</a> Escape</a>
</h6> </h6>
@ -991,7 +991,7 @@ cab
match to start where the last one ended. match to start where the last one ended.
</p> </p>
<a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6> <a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6>
<a name="id759987"></a> <a name="id789915"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
escape</a> escape</a>
</h6> </h6>
@ -1005,7 +1005,7 @@ cab
<span class="special">\*+</span><span class="identifier">aaa</span> <span class="special">\*+</span><span class="identifier">aaa</span>
</pre> </pre>
<a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6> <a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6>
<a name="id760068"></a> <a name="id789995"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
escapes</a> escapes</a>
</h6> </h6>
@ -1056,7 +1056,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6> <a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6>
<a name="id760170"></a> <a name="id790097"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
escape</a> escape</a>
</h6> </h6>
@ -1065,7 +1065,7 @@ cab
\@ matches a literal '@'. \@ matches a literal '@'.
</p> </p>
<a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5> <a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5>
<a name="id760186"></a> <a name="id790114"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
precedence</a> precedence</a>
</h5> </h5>
@ -1101,7 +1101,7 @@ cab
</li> </li>
</ol></div> </ol></div>
<a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5> <a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5>
<a name="id760320"></a> <a name="id790247"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
Gets Matched</a> Gets Matched</a>
</h5> </h5>
@ -1111,11 +1111,11 @@ cab
rule</a>. rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.variations"></a><h4> <a name="boost_regex.syntax.basic_extended.variations"></a><h4>
<a name="id760341"></a> <a name="id790269"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a>
</h4> </h4>
<a name="boost_regex.syntax.basic_extended.egrep"></a><h5> <a name="boost_regex.syntax.basic_extended.egrep"></a><h5>
<a name="id760354"></a> <a name="id790282"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
</h5> </h5>
<p> <p>
@ -1136,7 +1136,7 @@ cab
used with the -E option. used with the -E option.
</p> </p>
<a name="boost_regex.syntax.basic_extended.awk"></a><h5> <a name="boost_regex.syntax.basic_extended.awk"></a><h5>
<a name="id760456"></a> <a name="id790384"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
</h5> </h5>
<p> <p>
@ -1150,7 +1150,7 @@ cab
these by default anyway. these by default anyway.
</p> </p>
<a name="boost_regex.syntax.basic_extended.options"></a><h4> <a name="boost_regex.syntax.basic_extended.options"></a><h4>
<a name="id760482"></a> <a name="id790409"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
</h4> </h4>
<p> <p>
@ -1163,7 +1163,7 @@ cab
modify how the case and locale sensitivity are to be applied. modify how the case and locale sensitivity are to be applied.
</p> </p>
<a name="boost_regex.syntax.basic_extended.references"></a><h4> <a name="boost_regex.syntax.basic_extended.references"></a><h4>
<a name="id760560"></a> <a name="id790487"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
</h4> </h4>
<p> <p>

View File

@ -28,7 +28,7 @@
Expression Syntax</a> Expression Syntax</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4> <a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
<a name="id760609"></a> <a name="id790537"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
</h4> </h4>
<p> <p>
@ -45,7 +45,7 @@
<a name="boost_regex.posix_basic"></a><p> <a name="boost_regex.posix_basic"></a><p>
</p> </p>
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4> <a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
<a name="id761573"></a> <a name="id792730"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
Basic Syntax</a> Basic Syntax</a>
</h4> </h4>
@ -55,7 +55,7 @@
</p> </p>
<pre class="programlisting">.[\*^$</pre> <pre class="programlisting">.[\*^$</pre>
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5> <a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
<a name="id761594"></a> <a name="id792751"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
</h5> </h5>
<p> <p>
@ -73,7 +73,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5> <a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
<a name="id761639"></a> <a name="id792796"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
</h5> </h5>
<p> <p>
@ -85,7 +85,7 @@
of an expression, or the last character of a sub-expression. of an expression, or the last character of a sub-expression.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5> <a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
<a name="id761659"></a> <a name="id792816"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
sub-expressions:</a> sub-expressions:</a>
</h5> </h5>
@ -97,7 +97,7 @@
by a back-reference. by a back-reference.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5> <a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
<a name="id761690"></a> <a name="id792847"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
</h5> </h5>
<p> <p>
@ -155,7 +155,7 @@ aaaa
to. to.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5> <a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
<a name="id761855"></a> <a name="id793012"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
</h5> </h5>
<p> <p>
@ -173,7 +173,7 @@ aaaa
</p> </p>
<pre class="programlisting">aaabba</pre> <pre class="programlisting">aaabba</pre>
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5> <a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
<a name="id761904"></a> <a name="id793061"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
sets:</a> sets:</a>
</h5> </h5>
@ -186,7 +186,7 @@ aaaa
A bracket expression may contain any combination of the following: A bracket expression may contain any combination of the following:
</p> </p>
<a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6> <a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
<a name="id761924"></a> <a name="id793081"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
characters:</a> characters:</a>
</h6> </h6>
@ -195,7 +195,7 @@ aaaa
or 'c'. or 'c'.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6> <a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
<a name="id761956"></a> <a name="id793112"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
ranges:</a> ranges:</a>
</h6> </h6>
@ -211,7 +211,7 @@ aaaa
of the characters only. of the characters only.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h6> <a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
<a name="id762012"></a> <a name="id793169"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
</h6> </h6>
<p> <p>
@ -220,7 +220,7 @@ aaaa
range a-c. range a-c.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6> <a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
<a name="id762050"></a> <a name="id793207"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
classes:</a> classes:</a>
</h6> </h6>
@ -230,7 +230,7 @@ aaaa
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>. <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6> <a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
<a name="id762102"></a> <a name="id793259"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
Elements:</a> Elements:</a>
</h6> </h6>
@ -259,7 +259,7 @@ aaaa
element names</a>. element names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6> <a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
<a name="id762193"></a> <a name="id793350"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
classes:</a> classes:</a>
</h6> </h6>
@ -276,7 +276,7 @@ aaaa
or even all locales on one platform. or even all locales on one platform.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6> <a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
<a name="id762251"></a> <a name="id793408"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
</h6> </h6>
<p> <p>
@ -284,7 +284,7 @@ aaaa
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></code> <code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></code>
</p> </p>
<a name="boost_regex.syntax.basic_syntax.escapes"></a><h5> <a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
<a name="id762304"></a> <a name="id793460"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
</h5> </h5>
<p> <p>
@ -299,7 +299,7 @@ aaaa
will match either a literal '\' or a '^'. will match either a literal '\' or a '^'.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4> <a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
<a name="id762337"></a> <a name="id793494"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
Matched</a> Matched</a>
</h4> </h4>
@ -309,13 +309,13 @@ aaaa
rule</a>. rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4> <a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
<a name="id762359"></a> <a name="id793516"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
</h4> </h4>
<a name="boost_regex.grep_syntax"></a><p> <a name="boost_regex.grep_syntax"></a><p>
</p> </p>
<a name="boost_regex.syntax.basic_syntax.grep"></a><h5> <a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
<a name="id762379"></a> <a name="id793536"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
</h5> </h5>
<p> <p>
@ -333,7 +333,7 @@ aaaa
As its name suggests, this behavior is consistent with the Unix utility grep. As its name suggests, this behavior is consistent with the Unix utility grep.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.emacs"></a><h5> <a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
<a name="id762474"></a> <a name="id793631"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
</h5> </h5>
<p> <p>
@ -613,7 +613,7 @@ aaaa
leftmost-longest rule</a>. leftmost-longest rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.options"></a><h4> <a name="boost_regex.syntax.basic_syntax.options"></a><h4>
<a name="id762892"></a> <a name="id794048"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
</h4> </h4>
<p> <p>
@ -627,7 +627,7 @@ aaaa
options</a> modify how the case and locale sensitivity are to be applied. options</a> modify how the case and locale sensitivity are to be applied.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.references"></a><h4> <a name="boost_regex.syntax.basic_syntax.references"></a><h4>
<a name="id762998"></a> <a name="id794155"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
</h4> </h4>
<p> <p>

View File

@ -28,7 +28,7 @@
Syntax</a> Syntax</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4> <a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4>
<a name="id751340"></a> <a name="id781244"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
</h4> </h4>
<p> <p>
@ -43,7 +43,7 @@
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">perl</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span> </span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">perl</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4> <a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4>
<a name="id751488"></a> <a name="id781392"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
Regular Expression Syntax</a> Regular Expression Syntax</a>
</h4> </h4>
@ -53,7 +53,7 @@
</p> </p>
<pre class="programlisting">.[{()\*+?|^$</pre> <pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5> <a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5>
<a name="id751512"></a> <a name="id781416"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
</h5> </h5>
<p> <p>
@ -73,7 +73,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.perl_syntax.anchors"></a><h5> <a name="boost_regex.syntax.perl_syntax.anchors"></a><h5>
<a name="id751558"></a> <a name="id781463"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
</h5> </h5>
<p> <p>
@ -83,7 +83,7 @@
A '$' character shall match the end of a line. A '$' character shall match the end of a line.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5> <a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5>
<a name="id751580"></a> <a name="id781484"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
sub-expressions</a> sub-expressions</a>
</h5> </h5>
@ -94,7 +94,7 @@
can also repeated, or referred to by a back-reference. can also repeated, or referred to by a back-reference.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5> <a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5>
<a name="id751606"></a> <a name="id781511"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
grouping</a> grouping</a>
</h5> </h5>
@ -107,7 +107,7 @@
without splitting out any separate sub-expressions. without splitting out any separate sub-expressions.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.repeats"></a><h5> <a name="boost_regex.syntax.perl_syntax.repeats"></a><h5>
<a name="id751642"></a> <a name="id781547"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
</h5> </h5>
<p> <p>
@ -188,7 +188,7 @@
to be applied to. to be applied to.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5> <a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5>
<a name="id751879"></a> <a name="id781783"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
repeats</a> repeats</a>
</h5> </h5>
@ -218,7 +218,7 @@
while consuming as little input as possible. while consuming as little input as possible.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.pocessive_repeats"></a><h5> <a name="boost_regex.syntax.perl_syntax.pocessive_repeats"></a><h5>
<a name="id751938"></a> <a name="id781842"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pocessive_repeats">Pocessive <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pocessive_repeats">Pocessive
repeats</a> repeats</a>
</h5> </h5>
@ -250,7 +250,7 @@
while giving nothing back. while giving nothing back.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.back_references"></a><h5> <a name="boost_regex.syntax.perl_syntax.back_references"></a><h5>
<a name="id751996"></a> <a name="id781901"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
</h5> </h5>
<p> <p>
@ -360,7 +360,7 @@
named "two". named "two".
</p> </p>
<a name="boost_regex.syntax.perl_syntax.alternation"></a><h5> <a name="boost_regex.syntax.perl_syntax.alternation"></a><h5>
<a name="id752216"></a> <a name="id782120"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
</h5> </h5>
<p> <p>
@ -387,7 +387,7 @@
<code class="literal">(?:abc)??</code> has exactly the same effect. <code class="literal">(?:abc)??</code> has exactly the same effect.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5> <a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5>
<a name="id752284"></a> <a name="id782189"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
</h5> </h5>
<p> <p>
@ -399,7 +399,7 @@
A bracket expression may contain any combination of the following: A bracket expression may contain any combination of the following:
</p> </p>
<a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6> <a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6>
<a name="id752657"></a> <a name="id783654"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
</h6> </h6>
<p> <p>
@ -407,7 +407,7 @@
'b', or 'c'. 'b', or 'c'.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6> <a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6>
<a name="id752679"></a> <a name="id783676"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
ranges</a> ranges</a>
</h6> </h6>
@ -421,7 +421,7 @@
sensitive. sensitive.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.negation"></a><h6> <a name="boost_regex.syntax.perl_syntax.negation"></a><h6>
<a name="id752711"></a> <a name="id783708"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
</h6> </h6>
<p> <p>
@ -430,7 +430,7 @@
matches any character that is not in the range <code class="literal">a-c</code>. matches any character that is not in the range <code class="literal">a-c</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6> <a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6>
<a name="id752739"></a> <a name="id783736"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
classes</a> classes</a>
</h6> </h6>
@ -441,7 +441,7 @@
class names</a>. class names</a>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6> <a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6>
<a name="id752771"></a> <a name="id783768"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
Elements</a> Elements</a>
</h6> </h6>
@ -463,7 +463,7 @@
matches a <code class="literal">\0</code> character. matches a <code class="literal">\0</code> character.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6> <a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6>
<a name="id752834"></a> <a name="id783831"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
classes</a> classes</a>
</h6> </h6>
@ -480,7 +480,7 @@
or even all locales on one platform. or even all locales on one platform.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6> <a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6>
<a name="id752882"></a> <a name="id783879"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
Characters</a> Characters</a>
</h6> </h6>
@ -492,7 +492,7 @@
is <span class="emphasis"><em>not</em></span> a "word" character. is <span class="emphasis"><em>not</em></span> a "word" character.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.combinations"></a><h6> <a name="boost_regex.syntax.perl_syntax.combinations"></a><h6>
<a name="id752950"></a> <a name="id783947"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
</h6> </h6>
<p> <p>
@ -500,7 +500,7 @@
<code class="literal">[[:digit:]a-c[.NUL.]]</code>. <code class="literal">[[:digit:]a-c[.NUL.]]</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.escapes"></a><h5> <a name="boost_regex.syntax.perl_syntax.escapes"></a><h5>
<a name="id752972"></a> <a name="id783969"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
</h5> </h5>
<p> <p>
@ -692,7 +692,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6> <a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6>
<a name="id753359"></a> <a name="id784356"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single
character" character classes:</a> character" character classes:</a>
</h6> </h6>
@ -894,7 +894,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6> <a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6>
<a name="id753959"></a> <a name="id784956"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
Properties</a> Properties</a>
</h6> </h6>
@ -1002,7 +1002,7 @@
as does <code class="literal">\p{digit}</code>. as does <code class="literal">\p{digit}</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6> <a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6>
<a name="id754249"></a> <a name="id785245"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
</h6> </h6>
<p> <p>
@ -1021,7 +1021,7 @@
<code class="literal">\B</code> Matches only when not at a word boundary. <code class="literal">\B</code> Matches only when not at a word boundary.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6> <a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6>
<a name="id754300"></a> <a name="id785297"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
</h6> </h6>
<p> <p>
@ -1046,7 +1046,7 @@
to the regular expression <code class="literal">\n*\z</code> to the regular expression <code class="literal">\n*\z</code>
</p> </p>
<a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6> <a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6>
<a name="id754341"></a> <a name="id785338"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
Escape</a> Escape</a>
</h6> </h6>
@ -1058,7 +1058,7 @@
one ended. one ended.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6> <a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6>
<a name="id754363"></a> <a name="id785359"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
</h6> </h6>
<p> <p>
@ -1071,7 +1071,7 @@
<span class="special">\*+</span><span class="identifier">aaa</span> <span class="special">\*+</span><span class="identifier">aaa</span>
</pre> </pre>
<a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6> <a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6>
<a name="id754409"></a> <a name="id785406"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
</h6> </h6>
<p> <p>
@ -1081,7 +1081,7 @@
followed by a sequence of zero or more combining characters. followed by a sequence of zero or more combining characters.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.matching_line_endings"></a><h6> <a name="boost_regex.syntax.perl_syntax.matching_line_endings"></a><h6>
<a name="id754436"></a> <a name="id785433"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching
Line Endings</a> Line Endings</a>
</h6> </h6>
@ -1090,7 +1090,7 @@
sequence, specifically it is identical to the expression <code class="literal">(?&gt;\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])</code>. sequence, specifically it is identical to the expression <code class="literal">(?&gt;\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.keeping_back_some_text"></a><h6> <a name="boost_regex.syntax.perl_syntax.keeping_back_some_text"></a><h6>
<a name="id754462"></a> <a name="id785459"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping
back some text</a> back some text</a>
</h6> </h6>
@ -1105,7 +1105,7 @@
This can be used to simulate variable width lookbehind assertions. This can be used to simulate variable width lookbehind assertions.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6> <a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6>
<a name="id754492"></a> <a name="id785489"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
escape</a> escape</a>
</h6> </h6>
@ -1114,7 +1114,7 @@
\@ matches a literal '@'. \@ matches a literal '@'.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5> <a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5>
<a name="id754509"></a> <a name="id785506"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
Extended Patterns</a> Extended Patterns</a>
</h5> </h5>
@ -1123,7 +1123,7 @@
<code class="literal">(?</code>. <code class="literal">(?</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6>
<a name="id754531"></a> <a name="id785527"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named
Subexpressions</a> Subexpressions</a>
</h6> </h6>
@ -1145,14 +1145,14 @@
format string for search and replace operations, or in the <a class="link" href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> member functions. format string for search and replace operations, or in the <a class="link" href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> member functions.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.comments"></a><h6> <a name="boost_regex.syntax.perl_syntax.comments"></a><h6>
<a name="id754625"></a> <a name="id785622"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
</h6> </h6>
<p> <p>
<code class="literal">(?# ... )</code> is treated as a comment, it's contents are ignored. <code class="literal">(?# ... )</code> is treated as a comment, it's contents are ignored.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6> <a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6>
<a name="id754648"></a> <a name="id785645"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
</h6> </h6>
<p> <p>
@ -1166,7 +1166,7 @@
pattern only. pattern only.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6> <a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6>
<a name="id754683"></a> <a name="id785680"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
groups</a> groups</a>
</h6> </h6>
@ -1175,7 +1175,7 @@
an additional sub-expression. an additional sub-expression.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6> <a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6>
<a name="id754705"></a> <a name="id785701"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a>
</h6> </h6>
<p> <p>
@ -1197,7 +1197,7 @@
# 1 2 2 3 2 3 4 # 1 2 2 3 2 3 4
</pre> </pre>
<a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6> <a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6>
<a name="id754742"></a> <a name="id785739"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
</h6> </h6>
<p> <p>
@ -1220,7 +1220,7 @@
could be used to validate the password. could be used to validate the password.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6> <a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6>
<a name="id754816"></a> <a name="id785813"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
</h6> </h6>
<p> <p>
@ -1234,7 +1234,7 @@
(pattern must be of fixed length). (pattern must be of fixed length).
</p> </p>
<a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6>
<a name="id756354"></a> <a name="id786256"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
sub-expressions</a> sub-expressions</a>
</h6> </h6>
@ -1247,7 +1247,7 @@
no match is found at all. no match is found at all.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.recursive_expressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.recursive_expressions"></a><h6>
<a name="id756386"></a> <a name="id786287"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions">Recursive <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions">Recursive
Expressions</a> Expressions</a>
</h6> </h6>
@ -1271,7 +1271,7 @@
to the next sub-expression to be declared. to the next sub-expression to be declared.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6>
<a name="id756483"></a> <a name="id786384"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
Expressions</a> Expressions</a>
</h6> </h6>
@ -1319,7 +1319,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5> <a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5>
<a name="id756624"></a> <a name="id786526"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
precedence</a> precedence</a>
</h5> </h5>
@ -1354,7 +1354,7 @@
</li> </li>
</ol></div> </ol></div>
<a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4> <a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4>
<a name="id756714"></a> <a name="id786616"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
matched</a> matched</a>
</h4> </h4>
@ -1529,7 +1529,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.perl_syntax.variations"></a><h4> <a name="boost_regex.syntax.perl_syntax.variations"></a><h4>
<a name="id757072"></a> <a name="id786973"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
</h4> </h4>
<p> <p>
@ -1538,7 +1538,7 @@
and <code class="literal">JScript</code></a> are all synonyms for <code class="literal">perl</code>. and <code class="literal">JScript</code></a> are all synonyms for <code class="literal">perl</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.options"></a><h4> <a name="boost_regex.syntax.perl_syntax.options"></a><h4>
<a name="id757119"></a> <a name="id787020"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
</h4> </h4>
<p> <p>
@ -1550,7 +1550,7 @@
are to be applied. are to be applied.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4> <a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4>
<a name="id757167"></a> <a name="id787068"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
Modifiers</a> Modifiers</a>
</h4> </h4>
@ -1562,7 +1562,7 @@
and <code class="literal">no_mod_s</code></a>. and <code class="literal">no_mod_s</code></a>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.references"></a><h4> <a name="boost_regex.syntax.perl_syntax.references"></a><h4>
<a name="id757220"></a> <a name="id787121"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
</h4> </h4>
<p> <p>

View File

@ -30,7 +30,7 @@
There are two ways to use Boost.Regex with Unicode strings: There are two ways to use Boost.Regex with Unicode strings:
</p> </p>
<a name="boost_regex.unicode.rely_on_wchar_t"></a><h5> <a name="boost_regex.unicode.rely_on_wchar_t"></a><h5>
<a name="id745786"></a> <a name="id777395"></a>
<a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a> <a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
</h5> </h5>
<p> <p>
@ -56,7 +56,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5> <a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
<a name="id745903"></a> <a name="id777513"></a>
<a class="link" href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use <a class="link" href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use
a Unicode Aware Regular Expression Type.</a> a Unicode Aware Regular Expression Type.</a>
</h5> </h5>

View File

@ -28,7 +28,7 @@
</h3></div></div></div> </h3></div></div></div>
<div><p class="copyright">Copyright <20> 1998 -2007 John Maddock</p></div> <div><p class="copyright">Copyright <20> 1998 -2007 John Maddock</p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="id735475"></a><p> <a name="id766481"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p> </p>
@ -196,7 +196,7 @@
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: October 30, 2009 at 18:27:08 GMT</small></p></td> <td align="left"><p><small>Last revised: November 06, 2009 at 18:12:56 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -67,6 +67,8 @@ public:
what[5].first - base; what[5].first - base;
return true; return true;
} }
private:
IndexClassesPred& operator=(const IndexClassesPred&);
}; };
void IndexClasses(map_type& m, const std::string& file) void IndexClasses(map_type& m, const std::string& file)

View File

@ -55,11 +55,11 @@ int process_ftp(const char* response, std::string* msg)
istream& getline(istream& is, std::string& s) istream& getline(istream& is, std::string& s)
{ {
s.erase(); s.erase();
char c = is.get(); char c = static_cast<char>(is.get());
while(c != '\n') while(c != '\n')
{ {
s.append(1, c); s.append(1, c);
c = is.get(); c = static_cast<char>(is.get());
} }
return is; return is;
} }

View File

@ -86,8 +86,8 @@ int main(int argc, const char** argv)
return 0; return 0;
} }
extern const char* pre_expression = "(<)|(>)|\\r"; const char* pre_expression = "(<)|(>)|\\r";
extern const char* pre_format = "(?1&lt;)(?2&gt;)"; const char* pre_format = "(?1&lt;)(?2&gt;)";
const char* expression_text = // preprocessor directives: index 1 const char* expression_text = // preprocessor directives: index 1

View File

@ -86,8 +86,8 @@ int main(int argc, const char** argv)
return 0; return 0;
} }
extern const char* pre_expression = "(<)|(>)|(&)|\\r"; const char* pre_expression = "(<)|(>)|(&)|\\r";
extern const char* pre_format = "(?1&lt;)(?2&gt;)(?3&amp;)"; const char* pre_format = "(?1&lt;)(?2&gt;)(?3&amp;)";
const char* expression_text = // preprocessor directives: index 1 const char* expression_text = // preprocessor directives: index 1

View File

@ -36,11 +36,11 @@ using namespace std;
istream& getline(istream& is, std::string& s) istream& getline(istream& is, std::string& s)
{ {
s.erase(); s.erase();
char c = is.get(); char c = static_cast<char>(is.get());
while(c != '\n') while(c != '\n')
{ {
s.append(1, c); s.append(1, c);
c = is.get(); c = static_cast<char>(is.get());
} }
return is; return is;
} }

View File

@ -29,11 +29,11 @@ using namespace std;
istream& getline(istream& is, std::string& s) istream& getline(istream& is, std::string& s)
{ {
s.erase(); s.erase();
char c = is.get(); char c = static_cast<char>(is.get());
while(c != '\n') while(c != '\n')
{ {
s.append(1, c); s.append(1, c);
c = is.get(); c = static_cast<char>(is.get());
} }
return is; return is;
} }

View File

@ -9,6 +9,10 @@
* *
*/ */
#ifdef _MSC_VER
#pragma warning(disable: 4996 4127)
#endif
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <deque> #include <deque>
@ -54,7 +58,7 @@ ostream& operator << (ostream& os, const std::wstring& s)
j = s.end(); j = s.end();
while(i != j) while(i != j)
{ {
os.put(*i); os.put(static_cast<char>(*i));
++i; ++i;
} }
return os; return os;
@ -96,15 +100,15 @@ namespace boost{
istream& getline(istream& is, std::string& s) istream& getline(istream& is, std::string& s)
{ {
s.erase(); s.erase();
char c = is.get(); char c = static_cast<char>(is.get());
while(c != '\n') while(c != '\n')
{ {
s.append(1, c); s.append(1, c);
c = is.get(); c = static_cast<char>(is.get());
} }
return is; return is;
} }
#elif defined(__CYGWIN__) #else
istream& getline(istream& is, std::string& s) istream& getline(istream& is, std::string& s)
{ {
std::getline(is, s); std::getline(is, s);
@ -112,8 +116,6 @@ istream& getline(istream& is, std::string& s)
s.erase(s.size() - 1); s.erase(s.size() - 1);
return is; return is;
} }
#else
using std::getline;
#endif #endif
} }
@ -148,8 +150,8 @@ int main(int argc, char**argv)
std::size_t nsubs; std::size_t nsubs;
boost::timer t; boost::timer t;
double tim; double tim;
bool result; int result = 0;
int iters = 100; unsigned iters = 100;
double wait_time = (std::min)(t.elapsed_min() * 1000, 1.0); double wait_time = (std::min)(t.elapsed_min() * 1000, 1.0);
while(true) while(true)
@ -202,7 +204,7 @@ int main(int argc, char**argv)
ds.erase(ds.begin(), ds.end()); ds.erase(ds.begin(), ds.end());
std::copy(s2.begin(), s2.end(), std::back_inserter(ds)); std::copy(s2.begin(), s2.end(), std::back_inserter(ds));
int i; unsigned i;
iters = 10; iters = 10;
tim = 1.1; tim = 1.1;
@ -217,7 +219,7 @@ int main(int argc, char**argv)
// measure time interval for basic_regex<char> // measure time interval for basic_regex<char>
do{ do{
iters *= (tim > 0.001) ? (1.1/tim) : 100; iters *= static_cast<unsigned>((tim > 0.001) ? (1.1/tim) : 100);
t.restart(); t.restart();
for(i =0; i < iters; ++i) for(i =0; i < iters; ++i)
{ {
@ -251,7 +253,7 @@ int main(int argc, char**argv)
// cache load: // cache load:
regex_search(ws2, wsm, wex); regex_search(ws2, wsm, wex);
do{ do{
iters *= (tim > 0.001) ? (1.1/tim) : 100; iters *= static_cast<unsigned>((tim > 0.001) ? (1.1/tim) : 100);
t.restart(); t.restart();
for(i = 0; i < iters; ++i) for(i = 0; i < iters; ++i)
{ {
@ -289,7 +291,7 @@ int main(int argc, char**argv)
// cache load: // cache load:
regex_search(ds.begin(), ds.end(), dm, ex); regex_search(ds.begin(), ds.end(), dm, ex);
do{ do{
iters *= (tim > 0.001) ? (1.1/tim) : 100; iters *= static_cast<unsigned>((tim > 0.001) ? (1.1/tim) : 100);
t.restart(); t.restart();
for(i = 0; i < iters; ++i) for(i = 0; i < iters; ++i)
{ {
@ -326,7 +328,7 @@ int main(int argc, char**argv)
// cache load: // cache load:
regexecA(&r, s2.c_str(), nsubs, matches.get(), 0); regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
do{ do{
iters *= (tim > 0.001) ? (1.1/tim) : 100; iters *= static_cast<unsigned>((tim > 0.001) ? (1.1/tim) : 100);
t.restart(); t.restart();
for(i = 0; i < iters; ++i) for(i = 0; i < iters; ++i)
{ {
@ -357,7 +359,7 @@ int main(int argc, char**argv)
ts.erase(); ts.erase();
ts.assign(s2.begin() + matches[0].rm_eo, s2.end()); ts.assign(s2.begin() + matches[0].rm_eo, s2.end());
cout << ts; cout << ts;
cout << "\" (matched=" << (matches[0].rm_eo != s2.size()) << ")" << endl << endl; cout << "\" (matched=" << (matches[0].rm_eo != (int)s2.size()) << ")" << endl << endl;
} }
} }
regfreeA(&r); regfreeA(&r);

View File

@ -752,7 +752,7 @@ template <class M>
struct functor1 struct functor1
{ {
typedef typename M::char_type char_type; typedef typename M::char_type char_type;
const char_type* operator()(const M& m) const char_type* operator()(const M&)
{ {
static const char_type c = static_cast<char_type>(0); static const char_type c = static_cast<char_type>(0);
return &c; return &c;
@ -762,7 +762,7 @@ template <class M>
struct functor1b struct functor1b
{ {
typedef typename M::char_type char_type; typedef typename M::char_type char_type;
std::vector<char_type> operator()(const M& m) std::vector<char_type> operator()(const M&)
{ {
static const std::vector<char_type> c; static const std::vector<char_type> c;
return c; return c;

View File

@ -73,7 +73,9 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz
// for now just throw, but we should never really get here... // for now just throw, but we should never really get here...
// //
::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock")); ::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock"));
#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
return boost::shared_ptr<Object>(); return boost::shared_ptr<Object>();
#endif
#else #else
return do_get(k, max_cache_size); return do_get(k, max_cache_size);
#endif #endif

View File

@ -787,7 +787,7 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
// //
if(0 == (this->flags() & regex_constants::no_except)) if(0 == (this->flags() & regex_constants::no_except))
{ {
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern); std::string message = "Encountered a forward reference to a marked sub-expression that does not exist.";
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
e.raise(); e.raise();
} }
@ -828,7 +828,7 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
// //
if(0 == (this->flags() & regex_constants::no_except)) if(0 == (this->flags() & regex_constants::no_except))
{ {
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern); std::string message = "Encountered a forward reference to a recursive sub-expression that does not exist.";
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
e.raise(); e.raise();
} }
@ -893,7 +893,7 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
// //
if(0 == (this->flags() & regex_constants::no_except)) if(0 == (this->flags() & regex_constants::no_except))
{ {
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern); std::string message = "Invalid lookbehind assertion encountered in the regular expression.";
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
e.raise(); e.raise();
} }

View File

@ -45,6 +45,11 @@ public:
basic_regex_parser(regex_data<charT, traits>* data); basic_regex_parser(regex_data<charT, traits>* data);
void parse(const charT* p1, const charT* p2, unsigned flags); void parse(const charT* p1, const charT* p2, unsigned flags);
void fail(regex_constants::error_type error_code, std::ptrdiff_t position); void fail(regex_constants::error_type error_code, std::ptrdiff_t position);
void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos);
void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message)
{
fail(error_code, position, message, position);
}
bool parse_all(); bool parse_all();
bool parse_basic(); bool parse_basic();
@ -144,7 +149,7 @@ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2,
default: default:
// Ooops, someone has managed to set more than one of the main option flags, // Ooops, someone has managed to set more than one of the main option flags,
// so this must be an error: // so this must be an error:
fail(regex_constants::error_unknown, 0); fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used.");
return; return;
} }
@ -160,7 +165,7 @@ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2,
// have had an unexpected ')' : // have had an unexpected ')' :
if(!result) if(!result)
{ {
fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_position)); fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_position), "Found a closing ) with no corresponding openening parenthesis.");
return; return;
} }
// if an error has been set then give up now: // if an error has been set then give up now:
@ -173,13 +178,40 @@ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2,
template <class charT, class traits> template <class charT, class traits>
void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position) void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position)
{
// get the error message:
std::string message = this->m_pdata->m_ptraits->error_string(error_code);
fail(error_code, position, message);
}
template <class charT, class traits>
void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos)
{ {
if(0 == this->m_pdata->m_status) // update the error code if not already set if(0 == this->m_pdata->m_status) // update the error code if not already set
this->m_pdata->m_status = error_code; this->m_pdata->m_status = error_code;
m_position = m_end; // don't bother parsing anything else m_position = m_end; // don't bother parsing anything else
// get the error message:
std::string message = this->m_pdata->m_ptraits->error_string(error_code); //
// and raise the exception, this will do nothing if exceptions are disabled: // Augment error message with the regular expression text:
//
if(start_pos == position)
start_pos = (std::max)(static_cast<std::ptrdiff_t>(0), position - 10);
std::ptrdiff_t end_pos = (std::min)(position + 10, m_end - m_base);
if(error_code != regex_constants::error_empty)
{
if((start_pos != 0) || (end_pos != (m_end - m_base)))
message += " The error occured while parsing the regular expression fragment: '";
else
message += " The error occured while parsing the regular expression: '";
if(start_pos != end_pos)
{
message += std::string(m_base + start_pos, m_base + position);
message += ">>>HERE>>>";
message += std::string(m_base + position, m_base + end_pos);
}
message += "'.";
}
#ifndef BOOST_NO_EXCEPTIONS #ifndef BOOST_NO_EXCEPTIONS
if(0 == (this->flags() & regex_constants::no_except)) if(0 == (this->flags() & regex_constants::no_except))
{ {
@ -287,7 +319,7 @@ bool basic_regex_parser<charT, traits>::parse_extended()
case regex_constants::syntax_star: case regex_constants::syntax_star:
if(m_position == this->m_base) if(m_position == this->m_base)
{ {
fail(regex_constants::error_badrepeat, 0); fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression.");
return false; return false;
} }
++m_position; ++m_position;
@ -295,7 +327,7 @@ bool basic_regex_parser<charT, traits>::parse_extended()
case regex_constants::syntax_question: case regex_constants::syntax_question:
if(m_position == this->m_base) if(m_position == this->m_base)
{ {
fail(regex_constants::error_badrepeat, 0); fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression.");
return false; return false;
} }
++m_position; ++m_position;
@ -303,7 +335,7 @@ bool basic_regex_parser<charT, traits>::parse_extended()
case regex_constants::syntax_plus: case regex_constants::syntax_plus:
if(m_position == this->m_base) if(m_position == this->m_base)
{ {
fail(regex_constants::error_badrepeat, 0); fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression.");
return false; return false;
} }
++m_position; ++m_position;
@ -312,7 +344,7 @@ bool basic_regex_parser<charT, traits>::parse_extended()
++m_position; ++m_position;
return parse_repeat_range(false); return parse_repeat_range(false);
case regex_constants::syntax_close_brace: case regex_constants::syntax_close_brace:
fail(regex_constants::error_brace, this->m_position - this->m_end); fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
return false; return false;
case regex_constants::syntax_or: case regex_constants::syntax_or:
return parse_alt(); return parse_alt();
@ -517,7 +549,7 @@ bool basic_regex_parser<charT, traits>::parse_basic_escape()
case regex_constants::syntax_close_brace: case regex_constants::syntax_close_brace:
if(this->flags() & regbase::no_intervals) if(this->flags() & regbase::no_intervals)
return parse_literal(); return parse_literal();
fail(regex_constants::error_brace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
return false; return false;
case regex_constants::syntax_or: case regex_constants::syntax_or:
if(this->flags() & regbase::bk_vbar) if(this->flags() & regbase::bk_vbar)
@ -612,7 +644,7 @@ bool basic_regex_parser<charT, traits>::parse_basic_escape()
case 'c': case 'c':
case 'C': case 'C':
// not supported yet: // not supported yet:
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, "The \\c and \\C escape sequences are not supported by POSIX basic regular expressions: try the Perl syntax instead.");
return false; return false;
default: default:
break; break;
@ -710,7 +742,7 @@ escape_type_class_jump:
char_class_type m; char_class_type m;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found.");
return false; return false;
} }
// maybe have \p{ddd} // maybe have \p{ddd}
@ -722,7 +754,7 @@ escape_type_class_jump:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence.");
return false; return false;
} }
m = this->m_traits.lookup_classname(++base, m_position++); m = this->m_traits.lookup_classname(++base, m_position++);
@ -745,7 +777,7 @@ escape_type_class_jump:
} }
return true; return true;
} }
fail(regex_constants::error_ctype, m_position - m_base); fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name.");
return false; return false;
} }
case regex_constants::escape_type_reset_start_mark: case regex_constants::escape_type_reset_start_mark:
@ -781,9 +813,10 @@ escape_type_class_jump:
{ {
bool have_brace = false; bool have_brace = false;
bool negative = false; bool negative = false;
static const char* incomplete_message = "Incomplete \\g escape found.";
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
return false; return false;
} }
// maybe have \g{ddd} // maybe have \g{ddd}
@ -791,7 +824,7 @@ escape_type_class_jump:
{ {
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
return false; return false;
} }
have_brace = true; have_brace = true;
@ -799,7 +832,7 @@ escape_type_class_jump:
negative = (*m_position == static_cast<charT>('-')); negative = (*m_position == static_cast<charT>('-'));
if((negative) && (++m_position == m_end)) if((negative) && (++m_position == m_end))
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
return false; return false;
} }
const charT* pc = m_position; const charT* pc = m_position;
@ -824,7 +857,7 @@ escape_type_class_jump:
} }
else else
{ {
fail(regex_constants::error_backref, m_position - m_end); fail(regex_constants::error_backref, m_position - m_base);
return false; return false;
} }
m_position = pc; m_position = pc;
@ -832,7 +865,7 @@ escape_type_class_jump:
{ {
if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
return false; return false;
} }
++m_position; ++m_position;
@ -899,7 +932,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
} }
if(0 == this->m_last_state) if(0 == this->m_last_state)
{ {
fail(regex_constants::error_badrepeat, ::boost::re_detail::distance(m_base, m_position)); fail(regex_constants::error_badrepeat, ::boost::re_detail::distance(m_base, m_position), "Nothing to repeat.");
return false; return false;
} }
if(this->m_last_state->type == syntax_element_endmark) if(this->m_last_state->type == syntax_element_endmark)
@ -986,6 +1019,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
template <class charT, class traits> template <class charT, class traits>
bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic) bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
{ {
static const char* incomplete_message = "Missing } in quantified repetition.";
// //
// parse a repeat-range: // parse a repeat-range:
// //
@ -997,7 +1031,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
// fail if at end: // fail if at end:
if(this->m_position == this->m_end) if(this->m_position == this->m_end)
{ {
fail(regex_constants::error_brace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
// get min: // get min:
@ -1012,7 +1046,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
} }
else if(this->m_position == this->m_end) else if(this->m_position == this->m_end)
{ {
fail(regex_constants::error_brace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
min = v; min = v;
@ -1026,7 +1060,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
++m_position; ++m_position;
if(this->m_position == this->m_end) if(this->m_position == this->m_end)
{ {
fail(regex_constants::error_brace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
// get the value if any: // get the value if any:
@ -1044,7 +1078,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
// OK now check trailing }: // OK now check trailing }:
if(this->m_position == this->m_end) if(this->m_position == this->m_end)
{ {
fail(regex_constants::error_brace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
if(isbasic) if(isbasic)
@ -1054,13 +1088,13 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
++m_position; ++m_position;
if(this->m_position == this->m_end) if(this->m_position == this->m_end)
{ {
fail(regex_constants::error_brace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
} }
else else
{ {
fail(regex_constants::error_badbrace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
} }
@ -1068,7 +1102,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
++m_position; ++m_position;
else else
{ {
fail(regex_constants::error_badbrace, this->m_position - this->m_base); fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
return false; return false;
} }
// //
@ -1076,7 +1110,11 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
// //
if(min > max) if(min > max)
{ {
fail(regex_constants::error_badbrace, this->m_position - this->m_base); // Backtrack to error location:
m_position -= 2;
while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position;
++m_position;
fail(regex_constants::error_badbrace, m_position - m_base);
return false; return false;
} }
return parse_repeat(min, max); return parse_repeat(min, max);
@ -1099,7 +1137,7 @@ bool basic_regex_parser<charT, traits>::parse_alt()
) )
) )
{ {
fail(regex_constants::error_empty, this->m_position - this->m_base); fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression can start with the alternation operator |.");
return false; return false;
} }
// //
@ -1151,10 +1189,11 @@ bool basic_regex_parser<charT, traits>::parse_alt()
template <class charT, class traits> template <class charT, class traits>
bool basic_regex_parser<charT, traits>::parse_set() bool basic_regex_parser<charT, traits>::parse_set()
{ {
static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
basic_char_set<charT, traits> char_set; basic_char_set<charT, traits> char_set;
@ -1187,7 +1226,7 @@ bool basic_regex_parser<charT, traits>::parse_set()
++m_position; ++m_position;
if(0 == this->append_set(char_set)) if(0 == this->append_set(char_set))
{ {
fail(regex_constants::error_range, m_position - m_base); fail(regex_constants::error_ctype, m_position - m_base);
return false; return false;
} }
} }
@ -1242,6 +1281,7 @@ bool basic_regex_parser<charT, traits>::parse_set()
template <class charT, class traits> template <class charT, class traits>
bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set) bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set)
{ {
static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
// //
// we have either a character class [:name:] // we have either a character class [:name:]
// a collating element [.name.] // a collating element [.name.]
@ -1249,7 +1289,7 @@ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, tr
// //
if(m_end == ++m_position) if(m_end == ++m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
switch(this->m_traits.syntax_type(*m_position)) switch(this->m_traits.syntax_type(*m_position))
@ -1274,14 +1314,14 @@ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, tr
// skip the ':' // skip the ':'
if(m_end == ++m_position) if(m_end == ++m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
const charT* name_first = m_position; const charT* name_first = m_position;
// skip at least one character, then find the matching ':]' // skip at least one character, then find the matching ':]'
if(m_end == ++m_position) if(m_end == ++m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
while((m_position != m_end) while((m_position != m_end)
@ -1290,13 +1330,13 @@ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, tr
const charT* name_last = m_position; const charT* name_last = m_position;
if(m_end == m_position) if(m_end == m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
if((m_end == ++m_position) if((m_end == ++m_position)
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
// //
@ -1351,14 +1391,14 @@ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, tr
// skip the '=' // skip the '='
if(m_end == ++m_position) if(m_end == ++m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
const charT* name_first = m_position; const charT* name_first = m_position;
// skip at least one character, then find the matching '=]' // skip at least one character, then find the matching '=]'
if(m_end == ++m_position) if(m_end == ++m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
while((m_position != m_end) while((m_position != m_end)
@ -1367,13 +1407,13 @@ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, tr
const charT* name_last = m_position; const charT* name_last = m_position;
if(m_end == m_position) if(m_end == m_position)
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
if((m_end == ++m_position) if((m_end == ++m_position)
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
{ {
fail(regex_constants::error_brack, m_position - m_base); fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
return false; return false;
} }
string_type m = this->m_traits.lookup_collatename(name_first, name_last); string_type m = this->m_traits.lookup_collatename(name_first, name_last);
@ -1563,7 +1603,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
charT result(0); charT result(0);
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely.");
return false; return false;
} }
switch(this->m_traits.escape_syntax_type(*m_position)) switch(this->m_traits.escape_syntax_type(*m_position))
@ -1596,24 +1636,22 @@ charT basic_regex_parser<charT, traits>::unescape_character()
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely.");
return result; return result;
} }
/*
if((*m_position < charT('@'))
|| (*m_position > charT(125)) )
{
fail(regex_constants::error_escape, m_position - m_base);
return result;
}
*/
result = static_cast<charT>(*m_position % 32); result = static_cast<charT>(*m_position % 32);
break; break;
case regex_constants::escape_type_hex: case regex_constants::escape_type_hex:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely.");
return result; return result;
} }
// maybe have \x{ddd} // maybe have \x{ddd}
@ -1622,7 +1660,10 @@ charT basic_regex_parser<charT, traits>::unescape_character()
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_escape, m_position - m_base); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence.");
return result; return result;
} }
int i = this->m_traits.toi(m_position, m_end, 16); int i = this->m_traits.toi(m_position, m_end, 16);
@ -1631,7 +1672,10 @@ charT basic_regex_parser<charT, traits>::unescape_character()
|| ((std::numeric_limits<charT>::is_specialized) && (i > (int)(std::numeric_limits<charT>::max)())) || ((std::numeric_limits<charT>::is_specialized) && (i > (int)(std::numeric_limits<charT>::max)()))
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
{ {
fail(regex_constants::error_badbrace, m_position - m_base); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid.");
return result; return result;
} }
++m_position; ++m_position;
@ -1644,7 +1688,10 @@ charT basic_regex_parser<charT, traits>::unescape_character()
if((i < 0) if((i < 0)
|| !valid_value(charT(0), i)) || !valid_value(charT(0), i))
{ {
fail(regex_constants::error_escape, m_position - m_base); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character.");
return result; return result;
} }
result = charT(i); result = charT(i);
@ -1659,14 +1706,20 @@ charT basic_regex_parser<charT, traits>::unescape_character()
int val = this->m_traits.toi(bp, bp + 1, 8); int val = this->m_traits.toi(bp, bp + 1, 8);
if(val != 0) if(val != 0)
{ {
// Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
// Oops not an octal escape after all: // Oops not an octal escape after all:
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence.");
return result; return result;
} }
val = this->m_traits.toi(m_position, m_position + len, 8); val = this->m_traits.toi(m_position, m_position + len, 8);
if(val < 0) if(val < 0)
{ {
fail(regex_constants::error_escape, m_position - m_base); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid.");
return result; return result;
} }
return static_cast<charT>(val); return static_cast<charT>(val);
@ -1676,6 +1729,9 @@ charT basic_regex_parser<charT, traits>::unescape_character()
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
// Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base);
return false; return false;
} }
@ -1688,12 +1744,18 @@ charT basic_regex_parser<charT, traits>::unescape_character()
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
// Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base);
return false; return false;
} }
string_type s = this->m_traits.lookup_collatename(++base, m_position++); string_type s = this->m_traits.lookup_collatename(++base, m_position++);
if(s.empty()) if(s.empty())
{ {
// Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_collate, m_position - m_base); fail(regex_constants::error_collate, m_position - m_base);
return false; return false;
} }
@ -1703,6 +1765,9 @@ charT basic_regex_parser<charT, traits>::unescape_character()
} }
} }
// fall through is a failure: // fall through is a failure:
// Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base);
return false; return false;
} }
@ -1738,7 +1803,10 @@ bool basic_regex_parser<charT, traits>::parse_backref()
} }
else else
{ {
fail(regex_constants::error_backref, m_position - m_end); // Rewind to start of escape:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_backref, m_position - m_base);
return false; return false;
} }
return true; return true;
@ -1770,7 +1838,7 @@ bool basic_regex_parser<charT, traits>::parse_QE()
} }
if(++m_position == m_end) // skip the escape if(++m_position == m_end) // skip the escape
{ {
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence.");
return false; return false;
} }
// check to see if it's a \E: // check to see if it's a \E:
@ -1801,7 +1869,10 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
{ {
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
// //
@ -1860,7 +1931,10 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
v = this->m_traits.toi(m_position, m_end, 10); v = this->m_traits.toi(m_position, m_end, 10);
if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated.");
return false; return false;
} }
insert_recursion: insert_recursion:
@ -1879,7 +1953,10 @@ insert_recursion:
v = this->m_traits.toi(m_position, m_end, 10); v = this->m_traits.toi(m_position, m_end, 10);
if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
return false; return false;
} }
v += m_mark_count; v += m_mark_count;
@ -1899,7 +1976,10 @@ insert_recursion:
v = m_mark_count + 1 - v; v = m_mark_count + 1 - v;
if(v <= 0) if(v <= 0)
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
return false; return false;
} }
goto insert_recursion; goto insert_recursion;
@ -1922,7 +2002,10 @@ insert_recursion:
// a lookbehind assertion: // a lookbehind assertion:
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position); regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position);
@ -1960,7 +2043,10 @@ insert_recursion:
pb->index = markid = -4; pb->index = markid = -4;
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
int v = this->m_traits.toi(m_position, m_end, 10); int v = this->m_traits.toi(m_position, m_end, 10);
@ -1968,7 +2054,10 @@ insert_recursion:
{ {
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(*m_position == charT('&')) if(*m_position == charT('&'))
@ -1978,7 +2067,10 @@ insert_recursion:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
v = -static_cast<int>(hash_value_from_capture_name(base, m_position)); v = -static_cast<int>(hash_value_from_capture_name(base, m_position));
@ -1991,12 +2083,18 @@ insert_recursion:
br->index = v < 0 ? (v - 1) : 0; br->index = v < 0 ? (v - 1) : 0;
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
} }
@ -2007,7 +2105,10 @@ insert_recursion:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
v = static_cast<int>(hash_value_from_capture_name(base, m_position)); v = static_cast<int>(hash_value_from_capture_name(base, m_position));
@ -2015,17 +2116,26 @@ insert_recursion:
br->index = v; br->index = v;
if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end)) if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end))
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture.");
return false; return false;
} }
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
} }
@ -2036,19 +2146,28 @@ insert_recursion:
++m_position, ++def; ++m_position, ++def;
if((m_position == m_end) || *def) if((m_position == m_end) || *def)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
br->index = 9999; // special magic value! br->index = 9999; // special magic value!
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
} }
@ -2058,12 +2177,18 @@ insert_recursion:
br->index = v; br->index = v;
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
} }
@ -2072,25 +2197,37 @@ insert_recursion:
// verify that we have a lookahead or lookbehind assert: // verify that we have a lookahead or lookbehind assert:
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question) if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word) if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word)
{ {
if(++m_position == m_end) if(++m_position == m_end)
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
&& (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
m_position -= 3; m_position -= 3;
@ -2100,7 +2237,10 @@ insert_recursion:
if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
&& (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
{ {
fail(regex_constants::error_paren, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
m_position -= 2; m_position -= 2;
@ -2109,7 +2249,10 @@ insert_recursion:
break; break;
} }
case regex_constants::syntax_close_mark: case regex_constants::syntax_close_mark:
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
case regex_constants::escape_type_end_buffer: case regex_constants::escape_type_end_buffer:
{ {
@ -2131,14 +2274,20 @@ named_capture_jump:
const charT* base = ++m_position; const charT* base = ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_paren, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
while((m_position != m_end) && (*m_position != name_delim)) while((m_position != m_end) && (*m_position != name_delim))
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_paren, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
this->m_pdata->set_name(base, m_position, markid); this->m_pdata->set_name(base, m_position, markid);
@ -2152,7 +2301,10 @@ named_capture_jump:
v = 0; v = 0;
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
goto insert_recursion; goto insert_recursion;
@ -2165,7 +2317,10 @@ named_capture_jump:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
v = static_cast<int>(hash_value_from_capture_name(base, m_position)); v = static_cast<int>(hash_value_from_capture_name(base, m_position));
@ -2176,7 +2331,10 @@ named_capture_jump:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
if(*m_position == charT('>')) if(*m_position == charT('>'))
@ -2187,7 +2345,10 @@ named_capture_jump:
++m_position; ++m_position;
if(m_position == m_end) if(m_position == m_end)
{ {
fail(regex_constants::error_backref, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
v = static_cast<int>(hash_value_from_capture_name(base, m_position)); v = static_cast<int>(hash_value_from_capture_name(base, m_position));
@ -2200,7 +2361,13 @@ named_capture_jump:
option_group_jump: option_group_jump:
regex_constants::syntax_option_type opts = parse_options(); regex_constants::syntax_option_type opts = parse_options();
if(m_position == m_end) if(m_position == m_end)
{
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
}
// make a note of whether we have a case change: // make a note of whether we have a case change:
m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase)); m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase));
pb->index = markid = 0; pb->index = markid = 0;
@ -2219,7 +2386,10 @@ option_group_jump:
} }
else else
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base);
return false; return false;
} }
@ -2241,12 +2411,21 @@ option_group_jump:
// Unwind alternatives: // Unwind alternatives:
// //
if(0 == unwind_alts(last_paren_start)) if(0 == unwind_alts(last_paren_start))
{
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block.");
return false; return false;
}
// //
// we either have a ')' or we have run out of characters prematurely: // we either have a ')' or we have run out of characters prematurely:
// //
if(m_position == m_end) if(m_position == m_end)
{ {
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
this->fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_end)); this->fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_end));
return false; return false;
} }
@ -2277,7 +2456,10 @@ option_group_jump:
if(this->m_last_state == jmp) if(this->m_last_state == jmp)
{ {
// Oops... we didn't have anything inside the assertion: // Oops... we didn't have anything inside the assertion:
fail(regex_constants::error_empty, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion.");
return false; return false;
} }
} }
@ -2297,7 +2479,10 @@ option_group_jump:
else if(this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt) else if(this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
{ {
// Can't have seen more than one alternative: // Can't have seen more than one alternative:
fail(regex_constants::error_bad_pattern, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression.");
return false; return false;
} }
else else
@ -2306,7 +2491,10 @@ option_group_jump:
b = this->getaddress(b->next.i, b); b = this->getaddress(b->next.i, b);
if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999)) if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999))
{ {
fail(regex_constants::error_bad_pattern, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block.");
return false; return false;
} }
} }
@ -2316,7 +2504,10 @@ option_group_jump:
if((b->type != syntax_element_assert_backref) if((b->type != syntax_element_assert_backref)
&& (b->type != syntax_element_startmark)) && (b->type != syntax_element_startmark))
{ {
fail(regex_constants::error_badrepeat, m_position - m_base); // Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion.");
return false; return false;
} }
} }
@ -2371,6 +2562,9 @@ bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
// //
if(++m_position == m_end) if(++m_position == m_end)
{ {
// Rewind to start of sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
fail(regex_constants::error_escape, m_position - m_base); fail(regex_constants::error_escape, m_position - m_base);
return false; return false;
} }
@ -2471,6 +2665,9 @@ regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_opt
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_paren, m_position - m_base); fail(regex_constants::error_paren, m_position - m_base);
return false; return false;
} }
@ -2481,6 +2678,9 @@ regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_opt
{ {
if(++m_position == m_end) if(++m_position == m_end)
{ {
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_paren, m_position - m_base); fail(regex_constants::error_paren, m_position - m_base);
return false; return false;
} }
@ -2507,6 +2707,9 @@ regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_opt
} }
if(++m_position == m_end) if(++m_position == m_end)
{ {
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
fail(regex_constants::error_paren, m_position - m_base); fail(regex_constants::error_paren, m_position - m_base);
return false; return false;
} }
@ -2533,7 +2736,7 @@ bool basic_regex_parser<charT, traits>::unwind_alts(std::ptrdiff_t last_paren_st
) )
) )
{ {
fail(regex_constants::error_empty, this->m_position - this->m_base); fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |.");
return false; return false;
} }
// //

View File

@ -124,11 +124,11 @@ typedef enum{
REG_STARTEND = 00004 REG_STARTEND = 00004
} reg_exec_flags; } reg_exec_flags;
// /*
// POSIX error codes: * POSIX error codes:
// */
typedef unsigned reg_error_t; typedef unsigned reg_error_t;
typedef reg_error_t reg_errcode_t; // backwards compatibility typedef reg_error_t reg_errcode_t; /* backwards compatibility */
static const reg_error_t REG_NOERROR = 0; /* Success. */ static const reg_error_t REG_NOERROR = 0; /* Success. */
static const reg_error_t REG_NOMATCH = 1; /* Didn't find a match (for regexec). */ static const reg_error_t REG_NOMATCH = 1; /* Didn't find a match (for regexec). */
@ -154,8 +154,9 @@ static const reg_error_t REG_EMPTY = 17; /* empty expression */
static const reg_error_t REG_E_MEMORY = 15; /* = REG_ESIZE : out of memory */ static const reg_error_t REG_E_MEMORY = 15; /* = REG_ESIZE : out of memory */
static const reg_error_t REG_ECOMPLEXITY = 18; /* complexity too high */ static const reg_error_t REG_ECOMPLEXITY = 18; /* complexity too high */
static const reg_error_t REG_ESTACK = 19; /* out of stack space */ static const reg_error_t REG_ESTACK = 19; /* out of stack space */
static const reg_error_t REG_E_UNKNOWN = 20; /* unknown error */ static const reg_error_t REG_E_PERL = 20; /* Perl (?...) error */
static const reg_error_t REG_ENOSYS = 20; /* = REG_E_UNKNOWN : Reserved. */ static const reg_error_t REG_E_UNKNOWN = 21; /* unknown error */
static const reg_error_t REG_ENOSYS = 21; /* = REG_E_UNKNOWN : Reserved. */
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int); BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t); BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
@ -195,14 +196,14 @@ BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } /* extern "C" */
} // namespace } /* namespace */
#endif #endif
//
// C++ high level wrapper goes here:
//
#if defined(__cplusplus) #if defined(__cplusplus)
/*
* C++ high level wrapper goes here:
*/
#include <string> #include <string>
#include <vector> #include <vector>
namespace boost{ namespace boost{
@ -228,7 +229,7 @@ struct pred2;
struct pred3; struct pred3;
struct pred4; struct pred4;
} // namespace re_detail } /* namespace re_detail */
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32) #if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32)
typedef bool (__cdecl *GrepCallback)(const RegEx& expression); typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
@ -257,9 +258,9 @@ public:
unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); } unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
std::string Expression()const; std::string Expression()const;
unsigned int error_code()const; unsigned int error_code()const;
// /*
// now matching operators: * now matching operators:
// */
bool Match(const char* p, match_flag_type flags = match_default); bool Match(const char* p, match_flag_type flags = match_default);
bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); } bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); }
bool Search(const char* p, match_flag_type flags = match_default); bool Search(const char* p, match_flag_type flags = match_default);
@ -283,9 +284,9 @@ public:
bool copy = true, match_flag_type flags = match_default); bool copy = true, match_flag_type flags = match_default);
std::size_t Split(std::vector<std::string>& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0); std::size_t Split(std::vector<std::string>& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0);
// /*
// now operators for returning what matched in more detail: * now operators for returning what matched in more detail:
// */
std::size_t Position(int i = 0)const; std::size_t Position(int i = 0)const;
std::size_t Length(int i = 0)const; std::size_t Length(int i = 0)const;
bool Matched(int i = 0)const; bool Matched(int i = 0)const;
@ -312,11 +313,11 @@ public:
#pragma warning(pop) #pragma warning(pop)
#endif #endif
} // namespace boost } /* namespace boost */
#endif #endif /* __cplusplus */
#endif // include guard #endif /* include guard */

View File

@ -28,8 +28,8 @@ namespace regex_constants{
enum error_type{ enum error_type{
error_ok = 0, // not used error_ok = 0, /* not used */
error_no_match = 1, // not used error_no_match = 1, /* not used */
error_bad_pattern = 2, error_bad_pattern = 2,
error_collate = 3, error_collate = 3,
error_ctype = 4, error_ctype = 4,
@ -42,17 +42,18 @@ enum error_type{
error_range = 11, error_range = 11,
error_space = 12, error_space = 12,
error_badrepeat = 13, error_badrepeat = 13,
error_end = 14, // not used error_end = 14, /* not used */
error_size = 15, error_size = 15,
error_right_paren = 16, // not used error_right_paren = 16, /* not used */
error_empty = 17, error_empty = 17,
error_complexity = 18, error_complexity = 18,
error_stack = 19, error_stack = 19,
error_unknown = 20 error_perl_extension = 20,
error_unknown = 21
}; };
} }
} }
#endif // __cplusplus #endif /* __cplusplus */
#endif #endif

View File

@ -31,43 +31,43 @@ namespace boost{
typedef enum _match_flags typedef enum _match_flags
{ {
match_default = 0, match_default = 0,
match_not_bol = 1, // first is not start of line match_not_bol = 1, /* first is not start of line */
match_not_eol = match_not_bol << 1, // last is not end of line match_not_eol = match_not_bol << 1, /* last is not end of line */
match_not_bob = match_not_eol << 1, // first is not start of buffer match_not_bob = match_not_eol << 1, /* first is not start of buffer */
match_not_eob = match_not_bob << 1, // last is not end of buffer match_not_eob = match_not_bob << 1, /* last is not end of buffer */
match_not_bow = match_not_eob << 1, // first is not start of word match_not_bow = match_not_eob << 1, /* first is not start of word */
match_not_eow = match_not_bow << 1, // last is not end of word match_not_eow = match_not_bow << 1, /* last is not end of word */
match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.' match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */
match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.' match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */
match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */
match_init = match_prev_avail << 1, // internal use match_init = match_prev_avail << 1, /* internal use */
match_any = match_init << 1, // don't care what we match match_any = match_init << 1, /* don't care what we match */
match_not_null = match_any << 1, // string can't be null match_not_null = match_any << 1, /* string can't be null */
match_continuous = match_not_null << 1, // each grep match must continue from match_continuous = match_not_null << 1, /* each grep match must continue from */
// uninterupted from the previous one /* uninterupted from the previous one */
match_partial = match_continuous << 1, // find partial matches match_partial = match_continuous << 1, /* find partial matches */
match_stop = match_partial << 1, // stop after first match (grep) V3 only match_stop = match_partial << 1, /* stop after first match (grep) V3 only */
match_not_initial_null = match_stop, // don't match initial null, V4 only match_not_initial_null = match_stop, /* don't match initial null, V4 only */
match_all = match_stop << 1, // must find the whole of input even if match_any is set match_all = match_stop << 1, /* must find the whole of input even if match_any is set */
match_perl = match_all << 1, // Use perl matching rules match_perl = match_all << 1, /* Use perl matching rules */
match_posix = match_perl << 1, // Use POSIX matching rules match_posix = match_perl << 1, /* Use POSIX matching rules */
match_nosubs = match_posix << 1, // don't trap marked subs match_nosubs = match_posix << 1, /* don't trap marked subs */
match_extra = match_nosubs << 1, // include full capture information for repeated captures match_extra = match_nosubs << 1, /* include full capture information for repeated captures */
match_single_line = match_extra << 1, // treat text as single line and ignor any \n's when matching ^ and $. match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $. */
match_unused1 = match_single_line << 1, // unused match_unused1 = match_single_line << 1, /* unused */
match_unused2 = match_unused1 << 1, // unused match_unused2 = match_unused1 << 1, /* unused */
match_unused3 = match_unused2 << 1, // unused match_unused3 = match_unused2 << 1, /* unused */
match_max = match_unused3, match_max = match_unused3,
format_perl = 0, // perl style replacement format_perl = 0, /* perl style replacement */
format_default = 0, // ditto. format_default = 0, /* ditto. */
format_sed = match_max << 1, // sed style replacement. format_sed = match_max << 1, /* sed style replacement. */
format_all = format_sed << 1, // enable all extentions to sytax. format_all = format_sed << 1, /* enable all extentions to sytax. */
format_no_copy = format_all << 1, // don't copy non-matching segments. format_no_copy = format_all << 1, /* don't copy non-matching segments. */
format_first_only = format_no_copy << 1, // Only replace first occurance. format_first_only = format_no_copy << 1, /* Only replace first occurance. */
format_is_if = format_first_only << 1, // internal use only. format_is_if = format_first_only << 1, /* internal use only. */
format_literal = format_is_if << 1 // treat string as a literal format_literal = format_is_if << 1 /* treat string as a literal */
} match_flags; } match_flags;
@ -96,10 +96,10 @@ inline match_flags& operator^=(match_flags& m1, match_flags m2)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} // namespace regex_constants } /* namespace regex_constants */
// /*
// import names into boost for backwards compatiblity: * import names into boost for backwards compatiblity:
// */
using regex_constants::match_flag_type; using regex_constants::match_flag_type;
using regex_constants::match_default; using regex_constants::match_default;
using regex_constants::match_not_bol; using regex_constants::match_not_bol;
@ -111,28 +111,28 @@ using regex_constants::match_not_eow;
using regex_constants::match_not_dot_newline; using regex_constants::match_not_dot_newline;
using regex_constants::match_not_dot_null; using regex_constants::match_not_dot_null;
using regex_constants::match_prev_avail; using regex_constants::match_prev_avail;
//using regex_constants::match_init; /* using regex_constants::match_init; */
using regex_constants::match_any; using regex_constants::match_any;
using regex_constants::match_not_null; using regex_constants::match_not_null;
using regex_constants::match_continuous; using regex_constants::match_continuous;
using regex_constants::match_partial; using regex_constants::match_partial;
//using regex_constants::match_stop; /*using regex_constants::match_stop; */
using regex_constants::match_all; using regex_constants::match_all;
using regex_constants::match_perl; using regex_constants::match_perl;
using regex_constants::match_posix; using regex_constants::match_posix;
using regex_constants::match_nosubs; using regex_constants::match_nosubs;
using regex_constants::match_extra; using regex_constants::match_extra;
using regex_constants::match_single_line; using regex_constants::match_single_line;
//using regex_constants::match_max; /*using regex_constants::match_max; */
using regex_constants::format_all; using regex_constants::format_all;
using regex_constants::format_sed; using regex_constants::format_sed;
using regex_constants::format_perl; using regex_constants::format_perl;
using regex_constants::format_default; using regex_constants::format_default;
using regex_constants::format_no_copy; using regex_constants::format_no_copy;
using regex_constants::format_first_only; using regex_constants::format_first_only;
//using regex_constants::format_is_if; /*using regex_constants::format_is_if;*/
} // namespace boost } /* namespace boost */
#endif // __cplusplus #endif /* __cplusplus */
#endif // include guard #endif /* include guard */

View File

@ -188,7 +188,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
if(!(this->*proc)()) if(!(this->*proc)())
{ {
if(state_count > max_state_count) if(state_count > max_state_count)
raise_error(traits_inst, regex_constants::error_space); raise_error(traits_inst, regex_constants::error_complexity);
if((m_match_flags & match_partial) && (position == last) && (position != search_base)) if((m_match_flags & match_partial) && (position == last) && (position != search_base))
m_has_partial_match = true; m_has_partial_match = true;
bool successful_unwind = unwind(false); bool successful_unwind = unwind(false);
@ -219,7 +219,7 @@ void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
m_backup_state = block; m_backup_state = block;
} }
else else
raise_error(traits_inst, regex_constants::error_size); raise_error(traits_inst, regex_constants::error_stack);
} }
template <class BidiIterator, class Allocator, class traits> template <class BidiIterator, class Allocator, class traits>

View File

@ -99,7 +99,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
}; };
if(state_count > max_state_count) if(state_count > max_state_count)
raise_error(traits_inst, regex_constants::error_space); raise_error(traits_inst, regex_constants::error_complexity);
while(pstate) while(pstate)
{ {
matcher_proc_type proc = s_match_vtable[pstate->type]; matcher_proc_type proc = s_match_vtable[pstate->type];

View File

@ -831,7 +831,7 @@ OutputIterator regex_format_imp(OutputIterator out,
#ifndef BOOST_NO_SFINAE #ifndef BOOST_NO_SFINAE
BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator); BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
struct any_type { any_type(...); }; struct any_type { any_type(...); };
typedef char no_type; typedef char no_type;
@ -972,6 +972,8 @@ struct format_functor3
} }
private: private:
Base func; Base func;
format_functor3(const format_functor3&);
format_functor3& operator=(const format_functor3&);
}; };
template <class Base, class Match> template <class Base, class Match>
@ -990,6 +992,8 @@ struct format_functor2
} }
private: private:
Base func; Base func;
format_functor2(const format_functor2&);
format_functor2& operator=(const format_functor2&);
}; };
template <class Base, class Match> template <class Base, class Match>
@ -1025,6 +1029,8 @@ struct format_functor1
} }
private: private:
Base func; Base func;
format_functor1(const format_functor1&);
format_functor1& operator=(const format_functor1&);
}; };
template <class charT, class Match, class Traits> template <class charT, class Match, class Traits>
@ -1042,6 +1048,8 @@ struct format_functor_c_string
} }
private: private:
const charT* func; const charT* func;
format_functor_c_string(const format_functor_c_string&);
format_functor_c_string& operator=(const format_functor_c_string&);
}; };
template <class Container, class Match, class Traits> template <class Container, class Match, class Traits>
@ -1057,6 +1065,8 @@ struct format_functor_container
} }
private: private:
const Container& func; const Container& func;
format_functor_container(const format_functor_container&);
format_functor_container& operator=(const format_functor_container&);
}; };
template <class Func, class Match, class OutputIterator, class Traits = re_detail::trivial_format_traits<typename Match::char_type> > template <class Func, class Match, class OutputIterator, class Traits = re_detail::trivial_format_traits<typename Match::char_type> >

View File

@ -322,7 +322,7 @@ inline const charT* get_escape_R_string()
{ {
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
# pragma warning(push) # pragma warning(push)
# pragma warning(disable:4309) # pragma warning(disable:4309 4245)
#endif #endif
static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',
'|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}', '|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}',

View File

@ -563,11 +563,7 @@ std::string RegEx::What(int i)const
return result; return result;
} }
#ifdef BOOST_HAS_LONG_LONG const std::size_t RegEx::npos = ~static_cast<std::size_t>(0);
const std::size_t RegEx::npos = static_cast<std::size_t>(~0ULL);
#else
const std::size_t RegEx::npos = static_cast<std::size_t>(~0UL);
#endif
} // namespace boost } // namespace boost

View File

@ -58,6 +58,7 @@ const char* names[] = {
"REG_EMPTY", "REG_EMPTY",
"REG_ECOMPLEXITY", "REG_ECOMPLEXITY",
"REG_ESTACK", "REG_ESTACK",
"REG_E_PERL",
"REG_E_UNKNOWN", "REG_E_UNKNOWN",
}; };
} // namespace } // namespace

View File

@ -111,30 +111,31 @@ BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants
BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n) BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n)
{ {
static const char* const s_default_error_messages[] = { static const char* const s_default_error_messages[] = {
"Success", /* REG_NOERROR */ "Success", /* REG_NOERROR 0 error_ok */
"No match", /* REG_NOMATCH */ "No match", /* REG_NOMATCH 1 error_no_match */
"Invalid regular expression", /* REG_BADPAT */ "Invalid regular expression.", /* REG_BADPAT 2 error_bad_pattern */
"Invalid collation character", /* REG_ECOLLATE */ "Invalid collation character.", /* REG_ECOLLATE 3 error_collate */
"Invalid character class name", /* REG_ECTYPE */ "Invalid character class name, collating name, or character range.", /* REG_ECTYPE 4 error_ctype */
"Invalid or trailing backslash", /* REG_EESCAPE */ "Invalid or unterminated escape sequence.", /* REG_EESCAPE 5 error_escape */
"Invalid back reference", /* REG_ESUBREG */ "Invalid back reference: specified capturing group does not exist.", /* REG_ESUBREG 6 error_backref */
"Unmatched [ or [^", /* REG_EBRACK */ "Unmatched [ or [^ in character class declaration.", /* REG_EBRACK 7 error_brack */
"Unmatched ( or \\(", /* REG_EPAREN */ "Unmatched marking parenthesis ( or \\(.", /* REG_EPAREN 8 error_paren */
"Unmatched { or \\{", /* REG_EBRACE */ "Unmatched quantified repeat operator { or \\{.", /* REG_EBRACE 9 error_brace */
"Invalid content of repeat range", /* REG_BADBR */ "Invalid content of repeat range.", /* REG_BADBR 10 error_badbrace */
"Invalid range end", /* REG_ERANGE */ "Invalid range end in character class", /* REG_ERANGE 11 error_range */
"Memory exhausted", /* REG_ESPACE */ "Out of memory.", /* REG_ESPACE 12 error_space NOT USED */
"Invalid preceding regular expression", /* REG_BADRPT */ "Invalid preceding regular expression prior to repetition operator.", /* REG_BADRPT 13 error_badrepeat */
"Premature end of regular expression", /* REG_EEND */ "Premature end of regular expression", /* REG_EEND 14 error_end NOT USED */
"Regular expression too big", /* REG_ESIZE */ "Regular expression is too large.", /* REG_ESIZE 15 error_size NOT USED */
"Unmatched ) or \\)", /* REG_ERPAREN */ "Unmatched ) or \\)", /* REG_ERPAREN 16 error_right_paren NOT USED */
"Empty expression", /* REG_EMPTY */ "Empty regular expression.", /* REG_EMPTY 17 error_empty */
"Complexity requirements exceeded", /* REG_ECOMPLEXITY */ "The complexity of matching the regular expression exceeded predefined bounds. "
"Out of stack space", /* REG_ESTACK */ "Try refactoring the regular expression to make each choice made by the state machine unambiguous. "
"Unknown error", /* REG_E_UNKNOWN */ "This exception is thrown to prevent \"eternal\" matches that take an "
"", "indefinite period time to locate.", /* REG_ECOMPLEXITY 18 error_complexity */
"", "Ran out of stack space trying to match the regular expression.", /* REG_ESTACK 19 error_stack */
"", "Invalid or unterminated Perl (?...) sequence.", /* REG_E_PERL 20 error_perl */
"Unknown error.", /* REG_E_UNKNOWN 21 error_unknown */
}; };
return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[ ::boost::regex_constants::error_unknown] : s_default_error_messages[n]; return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[ ::boost::regex_constants::error_unknown] : s_default_error_messages[n];

View File

@ -65,6 +65,7 @@ const wchar_t* wnames[] = {
L"REG_EMPTY", L"REG_EMPTY",
L"REG_ECOMPLEXITY", L"REG_ECOMPLEXITY",
L"REG_ESTACK", L"REG_ESTACK",
L"REG_E_PERL",
L"REG_E_UNKNOWN", L"REG_E_UNKNOWN",
}; };
} }

View File

@ -34,13 +34,13 @@ int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
int main() int main()
{ {
regex_tA re; regex_tA re;
int result; unsigned int result;
result = regcompA(&re, expression, REG_AWK); result = regcompA(&re, expression, REG_AWK);
if(result > REG_NOERROR) if(result > REG_NOERROR)
{ {
char buf[256]; char buf[256];
regerrorA(result, &re, buf, sizeof(buf)); regerrorA(result, &re, buf, sizeof(buf));
printf(buf); printf("%s", buf);
return result; return result;
} }
BOOST_TEST(re.re_nsub == 0); BOOST_TEST(re.re_nsub == 0);
@ -51,11 +51,11 @@ int main()
{ {
char buf[256]; char buf[256];
regerrorA(result, &re, buf, sizeof(buf)); regerrorA(result, &re, buf, sizeof(buf));
printf(buf); printf("%s", buf);
regfreeA(&re); regfreeA(&re);
return result; return result;
} }
BOOST_TEST(matches[0].rm_so == matches[0].rm_eo == 1); BOOST_TEST(matches[0].rm_so == matches[0].rm_eo);
regfreeA(&re); regfreeA(&re);
printf("no errors found\n"); printf("no errors found\n");
return boost::report_errors(); return boost::report_errors();

View File

@ -40,7 +40,7 @@ int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
int main() int main()
{ {
regex_t re; regex_t re;
int result; unsigned result;
result = regcomp(&re, expression, REG_AWK); result = regcomp(&re, expression, REG_AWK);
if(result > REG_NOERROR) if(result > REG_NOERROR)
{ {
@ -48,8 +48,8 @@ int main()
regerror(result, &re, buf, sizeof(buf)); regerror(result, &re, buf, sizeof(buf));
char nbuf[256]; char nbuf[256];
for(int i = 0; i < 256; ++i) for(int i = 0; i < 256; ++i)
nbuf[i] = buf[i]; nbuf[i] = static_cast<char>(buf[i]);
printf(nbuf); printf("%s", nbuf);
return result; return result;
} }
if(re.re_nsub != 0) if(re.re_nsub != 0)
@ -66,8 +66,8 @@ int main()
regerror(result, &re, buf, sizeof(buf)); regerror(result, &re, buf, sizeof(buf));
char nbuf[256]; char nbuf[256];
for(int i = 0; i < 256; ++i) for(int i = 0; i < 256; ++i)
nbuf[i] = buf[i]; nbuf[i] = static_cast<char>(buf[i]);
printf(nbuf); printf("%s", nbuf);
regfree(&re); regfree(&re);
return result; return result;
} }
@ -77,7 +77,7 @@ int main()
exit(-1); exit(-1);
} }
regfree(&re); regfree(&re);
printf("no errors found\n"); printf("%s", "no errors found\n");
return 0; return 0;
} }

View File

@ -137,7 +137,7 @@ void test_deprecated(const char&, const test_regex_search_tag&)
if(test_info<char>::syntax_options() & ~boost::regex::icase) if(test_info<char>::syntax_options() & ~boost::regex::icase)
return; return;
try{ try{
boost::RegEx e(expression, test_info<char>::syntax_options() & boost::regex::icase); boost::RegEx e(expression, (test_info<char>::syntax_options() & boost::regex::icase) != 0);
if(e.error_code()) if(e.error_code())
{ {
BOOST_REGEX_TEST_ERROR("Expression did not compile when it should have done, error code = " << e.error_code(), char); BOOST_REGEX_TEST_ERROR("Expression did not compile when it should have done, error code = " << e.error_code(), char);
@ -303,7 +303,7 @@ void test_deprecated(const char&, const test_invalid_regex_tag&)
return; return;
bool have_catch = false; bool have_catch = false;
try{ try{
boost::RegEx e(expression, test_info<char>::syntax_options() & boost::regex::icase); boost::RegEx e(expression, (test_info<char>::syntax_options() & boost::regex::icase) != 0);
if(e.error_code()) if(e.error_code())
have_catch = true; have_catch = true;
} }

View File

@ -12,7 +12,7 @@
#include "test.hpp" #include "test.hpp"
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#pragma warning(disable:4127) #pragma warning(disable:4127 4428)
#endif #endif
void test_character_escapes() void test_character_escapes()

View File

@ -172,6 +172,7 @@ void test_simple_repeats()
TEST_REGEX_SEARCH("^a{0,1}?$", perl, "aaaaa", match_default, make_array(-2, -2)); TEST_REGEX_SEARCH("^a{0,1}?$", perl, "aaaaa", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("^(?:a){0,1}?$", perl, "aaaaa", match_default, make_array(-2, -2)); TEST_REGEX_SEARCH("^(?:a){0,1}?$", perl, "aaaaa", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("^a(?:bc)?", perl, "abcbc", match_any|match_all, make_array(-2, -2)); TEST_REGEX_SEARCH("^a(?:bc)?", perl, "abcbc", match_any|match_all, make_array(-2, -2));
test_simple_repeats2();
} }
void test_simple_repeats2() void test_simple_repeats2()

View File

@ -161,7 +161,7 @@ startup1 up1;
int main() int main()
{ {
BOOST_TEST(0 != &up1); (void)up1;
std::list<boost::shared_ptr<boost::thread> > threads; std::list<boost::shared_ptr<boost::thread> > threads;
for(int i = 0; i < 2; ++i) for(int i = 0; i < 2; ++i)