[boost-doc-zh commit] r230 - 转换至1.38.0,第12次,全部完成,包含以下库:

  • From: codesite-noreply@xxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Tue, 31 Mar 2009 10:05:31 +0000

Author: alai04
Date: Tue Mar 31 01:07:16 2009
New Revision: 230

Added:
   trunk/libs/spirit/example/
   trunk/libs/spirit/example/qi/
   trunk/libs/spirit/example/qi/mini_xml_samples/
   trunk/libs/spirit/example/qi/mini_xml_samples/1.toyxml
   trunk/libs/spirit/example/qi/mini_xml_samples/2.toyxml
   trunk/libs/spirit/example/qi/mini_xml_samples/3.toyxml
   trunk/libs/spirit/example/qi/mini_xml_samples/4.toyxml
Modified:
   trunk/libs/libraries.htm
   trunk/libs/regex/doc/html/boost_regex/background_information/history.html
   trunk/libs/regex/doc/html/boost_regex/format/perl_format.html
trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
   trunk/libs/regex/doc/html/index.html
   trunk/libs/serialization/doc/release.html
   trunk/libs/spirit/classic/change_log.html
   trunk/libs/spirit/classic/doc/acknowledgments.html
   trunk/libs/spirit/classic/doc/character_sets.html
   trunk/libs/spirit/classic/doc/closures.html
   trunk/libs/spirit/classic/doc/confix.html
   trunk/libs/spirit/classic/doc/debugging.html
   trunk/libs/spirit/classic/doc/directives.html
   trunk/libs/spirit/classic/doc/distinct.html
   trunk/libs/spirit/classic/doc/dynamic_parsers.html
   trunk/libs/spirit/classic/doc/epsilon.html
   trunk/libs/spirit/classic/doc/error_handling.html
   trunk/libs/spirit/classic/doc/escape_char_parser.html
   trunk/libs/spirit/classic/doc/faq.html
   trunk/libs/spirit/classic/doc/file_iterator.html
   trunk/libs/spirit/classic/doc/functional.html
   trunk/libs/spirit/classic/doc/functor_parser.html
   trunk/libs/spirit/classic/doc/grammar.html
   trunk/libs/spirit/classic/doc/includes.html
   trunk/libs/spirit/classic/doc/indepth_the_parser.html
   trunk/libs/spirit/classic/doc/indepth_the_parser_context.html
   trunk/libs/spirit/classic/doc/indepth_the_scanner.html
   trunk/libs/spirit/classic/doc/list_parsers.html
   trunk/libs/spirit/classic/doc/loops.html
   trunk/libs/spirit/classic/doc/multi_pass.html
   trunk/libs/spirit/classic/doc/numerics.html
   trunk/libs/spirit/classic/doc/operators.html
   trunk/libs/spirit/classic/doc/parametric_parsers.html
   trunk/libs/spirit/classic/doc/phoenix.html
   trunk/libs/spirit/classic/doc/portability.html
   trunk/libs/spirit/classic/doc/position_iterator.html
   trunk/libs/spirit/classic/doc/predefined_actors.html
   trunk/libs/spirit/classic/doc/quickref.html
   trunk/libs/spirit/classic/doc/rationale.html
   trunk/libs/spirit/classic/doc/refactoring.html
   trunk/libs/spirit/classic/doc/references.html
   trunk/libs/spirit/classic/doc/regular_expression_parser.html
   trunk/libs/spirit/classic/doc/rule.html
   trunk/libs/spirit/classic/doc/scanner.html
   trunk/libs/spirit/classic/doc/scoped_lock.html
   trunk/libs/spirit/classic/doc/select_parser.html
   trunk/libs/spirit/classic/doc/semantic_actions.html
   trunk/libs/spirit/classic/doc/stored_rule.html
   trunk/libs/spirit/classic/doc/style_guide.html
   trunk/libs/spirit/classic/doc/subrules.html
   trunk/libs/spirit/classic/doc/switch_parser.html
   trunk/libs/spirit/classic/doc/symbols.html
   trunk/libs/spirit/classic/doc/techniques.html
   trunk/libs/spirit/classic/doc/the_lazy_parser.html
   trunk/libs/spirit/classic/doc/theme/style.css
   trunk/libs/spirit/classic/doc/trees.html
   trunk/libs/spirit/classic/example/intermediate/simple_xml/actions.hpp
   trunk/libs/spirit/classic/example/intermediate/simple_xml/driver.cpp
   trunk/libs/spirit/classic/example/intermediate/simple_xml/tag.cpp
   trunk/libs/spirit/classic/example/intermediate/simple_xml/tag.hpp
   trunk/libs/spirit/classic/example/intermediate/simple_xml/xml_g.hpp
   trunk/libs/spirit/classic/phoenix/doc/actors.html
   trunk/libs/spirit/classic/phoenix/doc/actors_revisited.html
   trunk/libs/spirit/classic/phoenix/doc/adaptable_closures.html
   trunk/libs/spirit/classic/phoenix/doc/architecture.html
   trunk/libs/spirit/classic/phoenix/doc/arguments.html
   trunk/libs/spirit/classic/phoenix/doc/basic_concepts.html
   trunk/libs/spirit/classic/phoenix/doc/binders.html
   trunk/libs/spirit/classic/phoenix/doc/composites.html
   trunk/libs/spirit/classic/phoenix/doc/composites_revisited.html
   trunk/libs/spirit/classic/phoenix/doc/efficiency.html
   trunk/libs/spirit/classic/phoenix/doc/functions.html
   trunk/libs/spirit/classic/phoenix/doc/inside_phoenix.html
   trunk/libs/spirit/classic/phoenix/doc/interfacing.html
   trunk/libs/spirit/classic/phoenix/doc/introduction.html
   trunk/libs/spirit/classic/phoenix/doc/lazy_construction.html
   trunk/libs/spirit/classic/phoenix/doc/lazy_functions.html
   trunk/libs/spirit/classic/phoenix/doc/operators.html
   trunk/libs/spirit/classic/phoenix/doc/operators_revisited.html
   trunk/libs/spirit/classic/phoenix/doc/organization.html
   trunk/libs/spirit/classic/phoenix/doc/place_holders.html
   trunk/libs/spirit/classic/phoenix/doc/polymorphic_functions.html
   trunk/libs/spirit/classic/phoenix/doc/preface.html
   trunk/libs/spirit/classic/phoenix/doc/primitives.html
   trunk/libs/spirit/classic/phoenix/doc/quick_start.html
   trunk/libs/spirit/classic/phoenix/doc/references.html
   trunk/libs/spirit/classic/phoenix/doc/statements.html
   trunk/libs/spirit/classic/phoenix/doc/theme/style.css
   trunk/libs/spirit/classic/phoenix/doc/tuples.html
   trunk/libs/spirit/classic/phoenix/doc/values.html
   trunk/libs/spirit/classic/phoenix/doc/variables.html
   trunk/libs/spirit/classic/phoenix/doc/wrap_up.html
   trunk/libs/spirit/classic/phoenix/index.html
   trunk/libs/spirit/doc/html/index.html
   trunk/libs/spirit/doc/html/spirit/acknowledgments.html
   trunk/libs/spirit/doc/html/spirit/faq.html
   trunk/libs/spirit/doc/html/spirit/introduction.html
   trunk/libs/spirit/doc/html/spirit/lex.html
   trunk/libs/spirit/doc/html/spirit/lex/abstracts.html
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_attributes.html
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_parsing.html
trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_semantic_actions.html
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_states.html
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_static_model.html
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_tokenizing.html
   trunk/libs/spirit/doc/html/spirit/lex/quick_reference.html
   trunk/libs/spirit/doc/html/spirit/lex/reference.html
   trunk/libs/spirit/doc/html/spirit/lex/reference/lexer_class.html
   trunk/libs/spirit/doc/html/spirit/lex/reference/token_class.html
   trunk/libs/spirit/doc/html/spirit/lex/reference/tokendef_class.html
   trunk/libs/spirit/doc/html/spirit/lex/reference/tokenset_class.html
   trunk/libs/spirit/doc/html/spirit/lex/tutorials.html
   trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart1.html
   trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart2.html
   trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart3.html
   trunk/libs/spirit/doc/html/spirit/notes.html
   trunk/libs/spirit/doc/html/spirit/notes/porting_from_spirit_1_8_x.html
   trunk/libs/spirit/doc/html/spirit/notes/style_guide.html
   trunk/libs/spirit/doc/html/spirit/notes/techniques.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/attributes.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/debugging.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/directives.html
trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/error_handling.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/grammars.html
trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/mini_xml___error_handling.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/operators.html
trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/parse_trees_and_asts.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/parsing.html
trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/parsing_and_generating.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/primitives.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/rules.html
trunk/libs/spirit/doc/html/spirit/qi_and_karma/abstracts/semantic_actions.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/quick_reference.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/action.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/auxiliary.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/binary.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/char.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/debug.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/directive.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/nonterminal.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/numeric.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/operators.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/stream.html
   trunk/libs/spirit/doc/html/spirit/qi_and_karma/reference/string.html
   trunk/libs/spirit/doc/html/spirit/rationale.html
   trunk/libs/spirit/doc/html/spirit/references.html
   trunk/libs/spirit/doc/html/spirit/what_s_new.html
   trunk/libs/spirit/index.html
   trunk/libs/spirit/phoenix/doc/html/index.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/acknowledgement.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/actors.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/algorithm.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/basics.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/composite.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/container.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/inside_phoenix.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/introduction.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/organization.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/primitives.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/references.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/starter_kit.html
   trunk/libs/spirit/phoenix/doc/html/phoenix/wrap_up.html
   trunk/libs/spirit/phoenix/index.html
   trunk/libs/statechart/doc/future_and_history.html
   trunk/libs/type_traits/doc/html/index.html
   trunk/libs/utility/value_init.htm

Log:
转换至1.38.0,第12次,全部完成,包含以下库:
numeric/conversion
operators
optional
parameter
pointer_container
pool
preprocessor
property_map
python
random
range
rational
regex
serialization
smart_ptr
spirit
statechart
system
test
timer
tokenizer
tuple
type_traits
uBLAS
utility
value_initialized
wave

Modified: trunk/libs/libraries.htm
==============================================================================
--- trunk/libs/libraries.htm    (original)
+++ trunk/libs/libraries.htm    Tue Mar 31 01:07:16 2009
@@ -631,7 +631,7 @@
 <p>Distributed under the Boost Software License, Version 1.0.
 (See file <a href="../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or <a href="http://www.boost.org/LICENSE_1_0.txt";>www.boost.org/LICENSE_1_0.txt</a>)</p> -<p>本译文更新于 2008年11月29日,由 alai04, fatalerror99, felurkinda, farproc, +<p>本译文更新于 2009年3月31日,由 alai04, fatalerror99, felurkinda, farproc,
 hzjboost, blackjazz07, xuwaters, jinq0123,
totti, jANA_cOVA, pterosaur, xiaq,&nbsp;zhaohongchao, leo, sidle, luckycat06, lixin, evy.wang, 元维&nbsp;等人翻译,各人贡献了以下译文:</p> <p>alai04:<a href="accumulators/index.html">accumulators</a>, <a href="any/index.html">any</a>, <a href="assign/index.html">assign</a>, <a href="bimap/index.html">bimap</a>,&nbsp;<a href="utility/call_traits.htm">call_traits</a>, <a href="circular_buffer/index.html">circular_buffer</a>,

Modified: trunk/libs/regex/doc/html/boost_regex/background_information/history.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/background_information/history.html (original) +++ trunk/libs/regex/doc/html/boost_regex/background_information/history.html Tue Mar 31 01:07:16 2009
@@ -1,22 +1,21 @@
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>History</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+
+<title>History</title><link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
 <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information">
-<link rel="prev" href="acknowledgements.html" title="Acknowledgements">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<link rel="prev" href="acknowledgements.html" title="Acknowledgements"></head> +<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
+<table cellpadding="2" width="100%"><tbody><tr>
+<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
@@ -25,7 +24,19 @@
 <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.history"></a><a href="history.html" title="History"> History</a>
 </h3></div></div></div>
-<a name="boost_regex.background_information.history.boost_1_34"></a><h5>
+<h5><a name="id688173"></a><a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
+1.38</a> </h5>
+<div class="itemizedlist">
+<ul type="disc"><li><span class="bold"><strong>Breaking change</strong></span>: empty expressions, +and empty alternatives are now allowed when using the Perl regular expression +syntax. This change has been added for Perl compatibility, when the new <a class="link" title="syntax_option_type" href="../ref/syntax_option_type.html"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a><span class="emphasis"><em>no_empty_expressions</em></span> is set then the old
+behaviour is preserved and empty expressions are prohibited.
+</li><li>Added support for Perl style ${n} expressions in format strings (issue <a href="https://svn.boost.org/trac/boost/ticket/2556"; target="_top">#2556</a>). +</li><li>Added support for accessing the location of sub-expressions within the +regular expression string (issue <a href="https://svn.boost.org/trac/boost/ticket/2269"; target="_top">#2269</a>). +</li><li>Fixed compiler compatibility issues <a href="https://svn.boost.org/trac/boost/ticket/2244"; target="_top">#2244</a>, <a href="https://svn.boost.org/trac/boost/ticket/2514"; target="_top">#2514</a>, and +<a href="https://svn.boost.org/trac/boost/ticket/2244"; target="_top">#2458</a>. +</li></ul></div><a name="boost_regex.background_information.history.boost_1_34"></a><h5>
 <a name="id659744"></a>
<a href="history.html#boost_regex.background_information.history.boost_1_34">Boost
         1.34</a>
@@ -218,17 +229,16 @@
         </li>
 </ul></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%"><tbody><tr>
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright 1998 -2007 John Maddock<p> 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>)
       </p>
 </div></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
 </div>
-</body>
-</html>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/regex/doc/html/boost_regex/format/perl_format.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/format/perl_format.html       
(original)
+++ trunk/libs/regex/doc/html/boost_regex/format/perl_format.html Tue Mar 31 01:07:16 2009
@@ -1,23 +1,22 @@
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Perl Format String Syntax</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+
+<title>Perl Format String Syntax</title><link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
 <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
 <link rel="prev" href="sed_format.html" title="Sed Format String Syntax">
-<link rel="next" href="boost_format_syntax.html" title="Boost-Extended Format String Syntax">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<link rel="next" href="boost_format_syntax.html" title="Boost-Extended Format String Syntax"></head> +<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
+<table cellpadding="2" width="100%"><tbody><tr>
+<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="sed_format.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../format.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="boost_format_syntax.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
@@ -29,20 +28,17 @@
 <p>
Perl-style format strings treat all characters as literals except '$' and
         '\' which start placeholder and escape sequences respectively.
-        <br />
+        <br>
Perl风格格式化字符串将所有字符当作字面符号,除了'$'和'\',分别为占 位符和转义序列的开始。
       </p>
 <p>
Placeholder sequences specify that some part of what matched the regular
         expression should be sent to output as follows:
-        <br />
+        <br>
         占位符序列指明了正则表达式匹配的哪部分被送到输出中:
       </p>
 <div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
+<colgroup><col><col></colgroup>
 <thead><tr>
 <th>
               <p>
@@ -65,7 +61,7 @@
 <td>
               <p>
                 Outputs what matched the whole expression.
-                <br />
+                <br>
                 输出整个表达式的匹配。
               </p>
               </td>
@@ -81,7 +77,7 @@
Outputs the text between the end of the last match found (or the start of the text if no previous match was found), and the start
                 of the current match.
-                <br />
+                <br>
输出上次匹配结束(如果没有上次匹配则为文本的开始),到当前匹 配开始之间的文本。
               </p>
               </td>
@@ -95,7 +91,7 @@
 <td>
               <p>
Outputs all the text following the end of the current match.
-                <br />
+                <br>
                 输出当前匹配结束之后的所有文本。
               </p>
               </td>
@@ -109,7 +105,7 @@
 <td>
               <p>
                 Outputs a literal '$'
-                <br />
+                <br>
                 输出字面字符'$'
               </p>
               </td>
@@ -123,30 +119,30 @@
 <td>
               <p>
                 Outputs what matched the n'th sub-expression.
-                <br />
+                <br>
                 输出第n个子表达式的匹配。
               </p>
               </td>
-</tr>
+</tr><tr><td>
+<p>${n} </p></td>
+<td>
+<p>Outputs what matched the n'th sub-expression.&nbsp;<br>输出第n个子表达式 的匹配。</p></td></tr>
 </tbody>
 </table></div>
 <p>
Any $-placeholder sequence not listed above, results in '$' being treated
         as a literal.
-        <br />
+        <br>
         任何不在上面列出的$-placeholder序列,将'$'当作字面符号。
       </p>
 <p>
An escape character followed by any character x, outputs that character unless
         x is one of the escape sequences shown below.
-        <br />
+        <br>
一个转义字符后跟任意字符x,如果x不是下面列出的转义序列之一,则输出 字符x。
       </p>
 <div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
+<colgroup><col><col></colgroup>
 <thead><tr>
 <th>
               <p>
@@ -169,7 +165,7 @@
 <td>
               <p>
                 Outputs the bell character: '\a'.
-                <br />
+                <br>
                 输出铃响字符:'\a'。
               </p>
               </td>
@@ -183,7 +179,7 @@
 <td>
               <p>
                 Outputs the ANSI escape character (code point 27).
-                <br />
+                <br>
                 输出ANSI转义字符(码点为27)。
               </p>
               </td>
@@ -197,7 +193,7 @@
 <td>
               <p>
                 Outputs a form feed character: '\f'
-                <br />
+                <br>
                 输出换页字符:'\f'。
               </p>
               </td>
@@ -211,7 +207,7 @@
 <td>
               <p>
                 Outputs a newline character: '\n'.
-                <br />
+                <br>
                 输出换行字符:'\n'。
               </p>
               </td>
@@ -225,7 +221,7 @@
 <td>
               <p>
                 Outputs a carriage return character: '\r'.
-                <br />
+                <br>
                 输出回车字符:'\r'。
               </p>
               </td>
@@ -239,7 +235,7 @@
 <td>
               <p>
                 Outputs a tab character: '\t'.
-                <br />
+                <br>
                 输出制表符:'\t'。
               </p>
               </td>
@@ -253,7 +249,7 @@
 <td>
               <p>
                 Outputs a vertical tab character: '\v'.
-                <br />
+                <br>
                 输出垂直制表符:'\v'。
               </p>
               </td>
@@ -267,7 +263,7 @@
 <td>
               <p>
                 Outputs the character whose hexadecimal code point is 0xDD
-                <br />
+                <br>
                 输出码点为0xDD的十六进制字符
               </p>
               </td>
@@ -281,7 +277,7 @@
 <td>
               <p>
Outputs the character whose hexadecimal code point is 0xDDDDD
-                <br />
+                <br>
                 输出码点为0xDDDD的十六进制字符
               </p>
               </td>
@@ -295,7 +291,7 @@
 <td>
               <p>
                 Outputs the ANSI escape sequence "escape-X".
-                <br />
+                <br>
                 输出ANSI转义序列"escape-X"。
               </p>
               </td>
@@ -310,7 +306,7 @@
               <p>
If D is a decimal digit in the range 1-9, then outputs the text that
                 matched sub-expression D.
-                <br />
+                <br>
                 如果D是1-9范围内的数字,则输出子表达式D匹配的文本。
               </p>
               </td>
@@ -325,7 +321,7 @@
               <p>
Causes the next character to be outputted, to be output in lower
                 case.
-                <br />
+                <br>
                 使下一个被输出的字符输出为小写。
               </p>
               </td>
@@ -340,7 +336,7 @@
               <p>
Causes the next character to be outputted, to be output in upper
                 case.
-                <br />
+                <br>
                 使下一个被输出的字符输出为大写。
               </p>
               </td>
@@ -355,7 +351,7 @@
               <p>
Causes all subsequent characters to be output in lower case, until
                 a \E is found.
-                <br />
+                <br>
                 使后面所有的字符都输出为小写,直到碰到\E。
               </p>
               </td>
@@ -370,7 +366,7 @@
               <p>
Causes all subsequent characters to be output in upper case, until
                 a \E is found.
-                <br />
+                <br>
                 使后面所有的字符都输出为大写,直到碰到\E。
               </p>
               </td>
@@ -384,7 +380,7 @@
 <td>
               <p>
                 Terminates a \L or \U sequence.
-                <br />
+                <br>
                 结束\L或\U的序列。
               </p>
               </td>
@@ -392,17 +388,16 @@
 </tbody>
 </table></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%"><tbody><tr>
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright (c) 1998 -2007 John Maddock<p> 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>)
       </p>
 </div></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="sed_format.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../format.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="boost_format_syntax.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body>
-</html>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html (original) +++ trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html Tue Mar 31 01:07:16 2009
@@ -1,23 +1,22 @@
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Options for POSIX Extended Regular Expressions</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+
+<title>Options for POSIX Extended Regular Expressions</title><link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
 <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type"> <link rel="prev" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions"> -<link rel="next" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<link rel="next" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"></head> +<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
+<table cellpadding="2" width="100%"><tbody><tr>
+<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../../boost.png" height="86" width="277"></td>
 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="syntax_option_type_perl.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_basic.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
@@ -30,15 +29,11 @@
 <p>
Exactly one of the following must always be set for <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
           extended regular expressions</a>:
-          <br />
+          <br>
对于<a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX扩展正则表达式</a>,下面标签中必须 设置一个:
         </p>
 <div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
+<colgroup><col><col><col></colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -75,7 +70,7 @@
in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions and Headers, Section 9, Regular Expressions
                   (FWD.1).
-                  <br />
+                  <br>
                   指定正则表达式识别的语法同POSIX扩展正则表达式语法一样。
                 </p>
                 <p>
@@ -87,7 +82,7 @@
                   POSIX standard specifies that only "special" characters
may be escaped, all other escape sequences result in undefined
                   behavior).
-                  <br />
+                  <br>
一些perl风格的转义序列同样被支持(POSIX标准指定只有"特 殊"字符可以被转义,其他的转义序列会导致未定义行为)。
                 </p>
                 </td>
@@ -110,14 +105,14 @@
the -E option in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Shells and Utilities, Section 4, Utilities,
                   grep (FWD.1).
-                  <br />
+                  <br>
指定正则表达式引擎识别同POSIX工具grep使用-E选项时使用的语 法。
                 </p>
                 <p>
That is to say, the same as <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX extended syntax</a>, but with the newline character acting as
                   an alternation character in addition to "|".
-                  <br />
+                  <br>
也就是说,同<a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX扩展语法</a>相同,但将 换行符和选项字符"|"相同对待。
                 </p>
                 </td>
@@ -139,14 +134,14 @@
engine is the same as that used by POSIX utility awk in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Shells
                   and Utilities, Section 4, awk (FWD.1).
-                  <br />
+                  <br>
                   指定正则表达式引擎识别同POSIX工具awk相同的语法。
                 </p>
                 <p>
That is to say: the same as <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX extended syntax</a>, but with escape sequences in character
                   classes permitted.
-                  <br />
+                  <br>
也就是说:和<a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX扩展语法</a>相同,但在 字符类内不允许转义序列。
                 </p>
                 <p>
@@ -155,7 +150,7 @@
all other Perl-style escape sequences invoke undefined behavior according to the POSIX standard, but are in fact recognised by
                   Boost.Regex).
-                  <br />
+                  <br>
一些perl风格的转义序列额外被支持(实际上awk语法只要求\a \b \t \v \f \n和\r被识别,在POSIX标准中其他perl风格转义序列将引起未定义行 为,但这些序列被Boost.Regex识别)。
                 </p>
                 </td>
@@ -165,15 +160,11 @@
 <p>
The following options may also be set when using POSIX extended regular
           expressions:
-          <br />
+          <br>
           使用POSIX扩展正则表达式时下面选项可以被设置:
         </p>
 <div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
+<colgroup><col><col><col></colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -207,7 +198,7 @@
                 <p>
Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case.
-                  <br />
+                  <br>
                   指定正则表达式匹配字符容器序列时忽略大小写。
                 </p>
                 </td>
@@ -228,7 +219,7 @@
Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
-                  <br />
+                  <br>
指定正则表达式匹配字符容器序列时,子表达式匹配不存储在提 供的<a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>结构内。
                 </p>
                 </td>
@@ -251,7 +242,7 @@
to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. This
                   currently has no effect for Boost.Regex.
-                  <br />
+                  <br>
指定正则表达式引擎更关注匹配速度,而不是正则表达式对象的 构造速度。 否则在程序输出中将不会有可探测到的速度。在Boost.Regex中这 还没有用。
                 </p>
@@ -274,7 +265,7 @@
should be locale sensitive. This bit is on by default for POSIX-Extended regular expressions, but can be unset to force ranges to be compared
                   by code point only.
-                  <br />
+                  <br>
指定<code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>形式的字符范围是区域敏感(locale sensitive)的。 这一位是POSIX扩展正则表达式默认的,但可以通过取消设置来强 迫只比较码点。
                 </p>
@@ -296,7 +287,7 @@
Specifies that the \n character has the same effect as the alternation operator |. Allows newline separated lists to be used as a list
                   of alternatives.
-                  <br />
+                  <br>
                   指定 \n 字符有同选择操作符 | 相同的作用。
                   允许以换行分割的列集以选择的方式被应用。
                 </p>
@@ -319,7 +310,7 @@
so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'. This bit is on by default for POSIX-Extended regular expressions, but can be unset to force escapes to be recognised inside lists.
-                  <br />
+                  <br>
设置这个选项可以使得列集内的转义字符普通,这样<code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code>可以匹 配'\'或'b'。 POSIX扩展正则表达式默认设置这一位,但可以通过取消设置强迫 列集内的转义字符转义。
                 </p>
@@ -341,7 +332,7 @@
When set then backreferences are disabled. This bit is on by default for POSIX-Extended regular expressions, but can be unset to support
                   for backreferences on.
-                  <br />
+                  <br>
设置这个选项时会禁用后向引用。POSIX扩展正则表达式默认设置 这位,但可以通过取消设置支持后向引用。
                 </p>
                 </td>
@@ -361,25 +352,30 @@
                 <p>
Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
                   an exception when an invalid expression is encountered.
-                  <br />
+                  <br>
阻止<a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>在遇到非法表达式时扔出异常。
                 </p>
                 </td>
-</tr>
+</tr><tr><td>
+<p>save_subexpression_location </p></td>
+<td>
+<p>No </p></td>
+<td>
+<p>When set then the locations of individual sub-expressions within the <span class="emphasis"><em>original regular expression string</em></span> can be +accessed via the <a class="link" href="../basic_regex.html#boost_regex.basic_regex.subexpression"><code class="computeroutput"><span class="identifier">subexpression</span><span class="special">()</span></code></a> member function of <code class="computeroutput"><span class="identifier">basic_regex</span></code>.&nbsp;<br>置位时,<span class="emphasis"><em>原始正规表达式串</em></span> 内部的独立子表达式可以通过 &nbsp;<code class="computeroutput"><span class="identifier">basic_regex</span></code> 的成员函数 <a class="link" href="../basic_regex.html#boost_regex.basic_regex.subexpression"><code class="computeroutput"><span class="identifier">subexpression</span><span class="special">()</span></code></a> 来访问。</p></td></tr>
 </tbody>
 </table></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%"><tbody><tr>
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright (c) 1998 -2007 John Maddock<p> 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>)
       </p>
 </div></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="syntax_option_type_perl.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_basic.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body>
-</html>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html (original) +++ trunk/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html Tue Mar 31 01:07:16 2009
@@ -1,23 +1,22 @@
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Options for Perl Regular Expressions</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+
+<title>Options for Perl Regular Expressions</title><link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
 <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type"> <link rel="prev" href="syntax_option_type_overview.html" title="Overview of syntax_option_type"> -<link rel="next" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<link rel="next" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions"></head> +<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
+<table cellpadding="2" width="100%"><tbody><tr>
+<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../../boost.png" height="86" width="277"></td>
 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="syntax_option_type_overview.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_extended.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
@@ -29,15 +28,11 @@
 </h4></div></div></div>
 <p>
One of the following must always be set for perl regular expressions:
-          <br />
+          <br>
           对于perl正则表达式,下面之一必须被设置:
         </p>
 <div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
+<colgroup><col><col><col></colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -73,18 +68,18 @@
engine uses its normal semantics: that is the same as that given in the ECMA-262, ECMAScript Language Specification, Chapter 15
                   part 10, RegExp (Regular Expression) Objects (FWD.1).
-                  <br />
- 指定正则表达式引擎识别的语法使用其常规语义:同ECMA-262、 ECMAScript Language Specification, Chapter 15 part 10、RegExp (Regular Expression) Objects (FWD.1)相同。
-                </p>
+                  <br>
+指定正则表达式引擎识别的语法使用其常规语义:同ECMA-262、ECMAScript Language Specification,
+Chapter 15 part 10、RegExp (Regular Expression) Objects (FWD.1)相同。 </p>
                 <p>
This is functionally identical to the <a href="../../syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl
                   regular expression syntax</a>.
-                  <br />
+                  <br>
同<a href="../../syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl regular expression syntax</a>相同。
                 </p>
                 <p>
Boost.Regex also recognizes all of the perl-compatible <code class="computeroutput"><span class="special">(?...)</span></code> extensions in this mode.
-                  <br />
+                  <br>
Boost.Regex在这种模式下同样识别所有与perl兼容<code class="computeroutput"><span class="special">(?...)</span></code>的扩展。
                 </p>
                 </td>
@@ -161,15 +156,11 @@
 </table></div>
 <p>
The following options may also be set when using perl-style regular expressions:
-          <br />
+          <br>
           使用perl风格正则表达式时下面选项同样可以被设置:
         </p>
 <div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
+<colgroup><col><col><col></colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -203,7 +194,7 @@
                 <p>
Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case.
-                  <br />
+                  <br>
                   指定正则表达式和字符容器序列的比较忽略大小写。
                 </p>
                 </td>
@@ -224,7 +215,7 @@
Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
-                  <br />
+                  <br>
指定正则表达式和字符容器序列比较时,子表达式匹配不被存储 在提供的<a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>结构中。
                 </p>
                 </td>
@@ -247,7 +238,7 @@
to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. This
                   currently has no effect for Boost.Regex.
-                  <br />
+                  <br>
指定正则表达式引擎更关注匹配的速度,而不是正则表达式对象 构造的速度。 否则在程序输出中没有可察觉的效果。在Boost.Regex来说现在还 没有作用。
                 </p>
@@ -268,7 +259,7 @@
                 <p>
Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
                   should be locale sensitive.
-                  <br />
+                  <br>
指定<code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>形式的字符范围区域相关(locale sensitive)。
                 </p>
                 </td>
@@ -289,7 +280,7 @@
Specifies that the \n character has the same effect as the alternation operator |. Allows newline separated lists to be used as a list
                   of alternatives.
-                  <br />
+                  <br>
指定字符 \n 和选择操作符 | 有相同的作用。允许换行分割的列 集和选择的列集有相同的作用。
                 </p>
                 </td>
@@ -309,7 +300,7 @@
                 <p>
Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
                   an exception when an invalid expression is encountered.
-                  <br />
+                  <br>
当遇到无效表达式时阻止<a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>异常被抛出。
                 </p>
                 </td>
@@ -331,7 +322,7 @@
the assertions ^ and $ match after and before embedded newlines respectively, setting this flags is equivalent to prefixing the
                   expression with (?-m).
-                  <br />
+                  <br>
通常Boost.Regex假设Perl的m-modifer开启:^和$断言分别匹配 嵌入换行的后面和前面,
                   设置本标签就相当于在表达式前缀(?-m)。
                 </p>
@@ -355,7 +346,7 @@
this flag is equivalent to prefixing the expression with <code class="computeroutput"><span class="special">(?-</span><span class="identifier">s</span><span class="special">)</span></code> and therefore causes "." not to match a newline character regardless of whether <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code> is set
                   in the match flags.
-                  <br />
+                  <br>
通常Boost.Regex中"."是否匹配换行符是由匹配标签<code class="computeroutput"><span class="identifier">match_dot_not_newline</span></code>决定的。 指定这个标签等价于表达式前缀<code class="computeroutput"><span class="special">(?-</span><span class="identifier">s</span><span class="special">)</span></code>, 这样无论<code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code>设置与否,"."都不会匹 配换行符。
@@ -380,7 +371,7 @@
this flag is equivalent to prefixing the expression with <code class="computeroutput"><span class="special">(?</span><span class="identifier">s</span><span class="special">)</span></code> and therefore causes "." to match a newline character regardless of whether <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code> is set
                   in the match flags.
-                  <br />
+                  <br>
通常Boost.Regex中"."是否匹配换行符是由匹配标签<code class="computeroutput"><span class="identifier">match_dot_not_newline</span></code>决定的。 指定这个标签等价于表达式前缀<code class="computeroutput"><span class="special">(?</span><span class="identifier">s</span><span class="special">)</span></code>, 这样无论<code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code>设置与否,"."都会匹配 换行符。
@@ -402,25 +393,35 @@
                 <p>
Turns on the perl x-modifier: causes unescaped whitespace in the
                   expression to be ignored.
-                  <br />
+                  <br>
打开perl的x-modifier修饰符:忽略表达式中未被转义的空白字 符。
                 </p>
                 </td>
-</tr>
+</tr><tr><td>
+<p>no_empty_expressions </p></td>
+<td>
+<p>No </p></td>
+<td>
+<p>When set then empty expressions/alternatives are prohibited.<br>置位时禁 止空表达式/选择式。 </p></td></tr><tr><td>
+<p>save_subexpression_location </p></td>
+<td>
+<p>No </p></td>
+<td>
+<p>When set then the locations of individual sub-expressions within the <span class="emphasis"><em>original regular expression string</em></span> can be +accessed via the <a class="link" href="../basic_regex.html#boost_regex.basic_regex.subexpression"><code class="computeroutput"><span class="identifier">subexpression</span><span class="special">()</span></code></a> member function of <code class="computeroutput"><span class="identifier">basic_regex</span></code>.<br>置位时,<span class="emphasis"><em>原始正规表达式串</em></span> 内部的独立子表达式可以通过 &nbsp;<code class="computeroutput"><span class="identifier">basic_regex</span></code> 的成员函数 <a class="link" href="../basic_regex.html#boost_regex.basic_regex.subexpression"><code class="computeroutput"><span class="identifier">subexpression</span><span class="special">()</span></code></a> 来访问。 </p></td></tr>
 </tbody>
 </table></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%"><tbody><tr>
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright (c) 1998 -2007 John Maddock<p> 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>)
       </p>
 </div></td>
-</tr></table>
+</tr></tbody></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="syntax_option_type_overview.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_extended.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body>
-</html>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/regex/doc/html/index.html
==============================================================================
--- trunk/libs/regex/doc/html/index.html        (original)
+++ trunk/libs/regex/doc/html/index.html        Tue Mar 31 01:07:16 2009
@@ -195,7 +195,7 @@
   </p>
 </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tbody><tr> -<td align="left"><p><small>Last revised: October 23, 2008 at 14:48:47 GMT</small></p></td> +<td align="left"><p><small>Last revised: December 23, 2008 at 17:35:37 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></tbody></table>
 <hr>

Modified: trunk/libs/serialization/doc/release.html
==============================================================================
--- trunk/libs/serialization/doc/release.html   (original)
+++ trunk/libs/serialization/doc/release.html   Tue Mar 31 01:07:16 2009
@@ -89,7 +89,7 @@
 </li><li>修正了多个 bug。</li></ul>

 <h2><a name="todo"></a>遗留问题</h2>
-<ul><li>目前还不能通过指针序列化一个类的对象,如果该类实现了它自己的 <code style="white-space: normal;">new/delete</code> 操作符。 +<ul><li>指针的指针目前还不能进行序列化。 </li><li>目前还不能通过指针序列化 一个类的对象,如果该类实现了它自己的 <code style="white-space: normal;">new/delete</code> 操作符。 </li><li>包含特殊字符如 '\0' 的 <code style="white-space: normal;">std::string</code> 和 <code style="white-space: normal;">std::wstring</code> 不能序列化为 XML,如果没有一个转义机制。目前还没有实现这样的转义机制。<code style="white-space: normal;"></code> </li><li>在这个版本中,修正了实现 <code style="white-space: normal;">std::map</code>

Modified: trunk/libs/spirit/classic/change_log.html
==============================================================================
--- trunk/libs/spirit/classic/change_log.html   (original)
+++ trunk/libs/spirit/classic/change_log.html   Tue Mar 31 01:07:16 2009
@@ -1,255 +1,255 @@
-<html>
-<head>
-<title>Spirit Change Log</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="doc/theme/style.css" type="text/css">
-</head>
-
-<body>
-
-<h2>Spirit Change Log</h2>
-<h2>1.8.7</h2>
-<ul>
- <li>Integrated the Spirit V1.8.x code base with Spirit V2. Spirit V1.8.x is
-      now called
-    <strong>Spirit Classic.</strong> Even if the directory
-      structure has changed (the
-    <strong>Spirit Classic</strong> headers are now moved to the
- '$BOOST_ROOT/boost/spirit/home/classic' directory), we created forwarding
-      headers allowing to compile existing applications without any change.
-      These forwarding headers are deprecated, though, which will result in
- corresponding warnings generated for each of the headers. The forwarding
-      headers are expected to be removed in the future.
-    <br />
-      The recommended way of using Spirit Classic is now to include header
- files from the directory '$BOOST_ROOT/boost/spirit/include'. All files of
-      <strong>Spirit Classic</strong>
-      have now a 'classic_' prefixed to their name. For example the include
-    <br/>
- <br><code>&nbsp;&nbsp;#include &lt;boost/spirit/core/core.hpp&gt;</code><br/>
-    <br/>
-    now should be written as:
-    <br/>
- <br/><code>&nbsp;&nbsp;#include &lt;boost/spirit/include/classic_core.hpp&gt;</code><br/>
-    <br/>
- To avoid namespace conflicts with the new Spirit V2 library we moved <strong>Spirit - Classic</strong> into the <tt>namespace boost::spirit::classic</tt>. This change will be automatically&nbsp;deactivated whenever the deprecated include files are - being used. This ensures full backwards compatibility for existing applications.
-    <br />
- For more details about this change please consult the documentation.</li>
-</ul>
-<h2>1.8.6</h2>
-<ul>
- <li>Fixed a integer overflow bug preventing to fail parsing on certain large integers. This bug was reported and fixed by Michael Andersen Nex </li>
-</ul>
-<h2>1.8.5</h2>
-<ul>
- <li>For performance reasons, leaf_node_d/token_node_d have been changed to implicit lexems that create leaf nodes in one shot. The old token_node_d is still available and called reduced_node_d, now.</li>
-  <li>It's now possible to phoenix::bind (version 1) symbols::add.</li>
-</ul>
-<h2>1.8.4</h2>
-<ul>
-  <li>Fixed no_actions bug where no_action is applied recursively.</li>
-  <li>Fixed the regex_p parser for Boost &gt;= V1.33.0 </li>
- <li>Implemented a workaround for namespace issues VC++ has with Spirit's file_iterators</li> - <li>Fixed bug in tree match policies that prevented using gen_pt/ast_node_d, - <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/9013";>reported
-    by Jascha Wetzel</a>.</li>
-  <li>Made position_iterator usable with wchar_t based strings. </li>
-</ul>
-<h2>1.8.3</h2>
-<ul>
-  <li>Config correction for Sun C++ by
-
-
- Steve Clamage (see <a href="https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1220782&group_id=7586";>this link</a>). </li> - <li>Fixed multi_pass_iterator for 64 platforms, where sizeof(int) != sizeof(ptr_type).Fixed bug that prevents the use of closures with grammars with multiple entry points, <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/8868";>reported by David Pierre</a></li> - <li>Fixed bug that prevented embedding of grammars with multiple entry points, <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/8860";>reported by David Pierre</a></li> - <li>Added '\0' to the set of valid escaped characters for escape_ch_p.</li> - <li>Fixed a switch_p bug when used with a phoenix::actor as the conditional expression.</li> - <li>__LINE__ macro now gets expanded in BOOST_SPIRIT_ASSERT_EXCEPTION</li> - <li>Fixed a bug in the intersection parser <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/8544";>reported by Yusaku Sugai</a></li> - <li>The symbol parser uses the null character internally. Checks were added so that:
-  <ul>
-    <li>tst.add asserts if string contains the null character</li>
-    <li>tst.find doesn't match null characters in the input</li>
-  </ul></li>
- <li>Fixed match_attr_traits.ipp to allow non-POD to pass through. The previous version taking in the ellipsis &quot;...&quot; does not allow PODs to pass through.</li>
-  <li>Allow evaluation to int as condition to if_p parser.</li>
- <li>Applied performance improvement changes to the PT/AST code as suggested by Stefan Slapeta. </li> - <li>Fixed several problems with AST tree node directives (inner_node_d[], discard_first_node[], discard_last_node[] and infix_node_d[]). </li>
-</ul>
-<h2>1.8.2</h2>
-<p>Maintenance release (almost the same as 1.8.1 plus a few fixes here and there)</p>
-<ul>
- <li>Added specializations to str_p and ch_p to allow str_p('c') and ch_p("c") thus fixing some non-bugs</li>
-  <li>Fixed bug where a match&lt;T&gt; is a variant.</li>
-  <li>added Jamfile/Jamrules from CVS to spirit-1.8.1/</li>
-  <li>added boost-build.jam from boost to spirit-1.8.1/</li>
-  <li>disabled template multi-threading in libs/spirit/test/Jamfile</li>
- <li>added a boost-header-include rule (from spirit-header-include) pointing to miniboost in libs/spirit/test/Jamfile</li>
-  <li>Fixed if_p inconsistency</li>
-</ul>
-<h2>1.6.2</h2>
-<p>The Spirit 1.6.2 release is a bug-fix release only, no new features were introduced.</p>
-<ul>
-  <li>wchar_t friendly implementation of graph_p</li>
- <li>Modified escape_char_parser::parse() to use a static parser instead of a rule. This will make it more friendly to use in trees. It should also be a little more efficient.</li>
-  <li>Moved to
-
-
- Boost Software license 1.0. </li>
- <li> workaround for Error 322 name lookup in base class specialization finds type</li>
-  <li> fixed limit_d bug</li>
-  <li> [numerics] Workaround for aC++</li>
-  <li> Fixed a bug in the switch_p parser.</li>
-  <li> Fixed a EOI problem in multi_pass</li>
-  <li>added Jamfile/Jamrules from CVS to spirit-1.6.1/</li>
-  <li>added boost-build.jam from boost to spirit-1.6.1/</li>
-  <li>disabled template multi-threading in libs/spirit/test/Jamfile</li>
- <li>added a boost-header-include rule (from spirit-header-include) pointing to miniboost in libs/spirit/test/Jamfile</li>
-</ul>
-<h2>1.8.1 (Released with Boost 1.32.0)</h2>
-<p>The Spirit 1.8.1 release is a bug-fix release only, no new features were introduced.</p>
-<ul>
-  <li>Spirit now requires at least Boost 1.32.0 to compile correctly</li>
-  <li>Removed the support for the older iterator adaptor library and </li>
-  <li>Moved to use the new MPL library</li>
-  <li>Spirit was moved to use the Boost Software License 1.0.</li>
-  <li>Fixed several parsers to support post-skips more correctly.</li>
-  <li>Fixed a no_node_d[] bug.</li>
-  <li>Fixed a bug in shortest_d[].</li>
-  <li>Fixed a bug in limit_d[].</li>
-  <li>Fixed parser traversal meta code.</li>
-  <li>Fixed several bugs in switch_p.</li>
- <li>Fixed AST generating problems, in particular with the loops related parsers.</li>
-  <li>Fixed several bugs in the multi_pass iterator.
-      <ul>
- <li>Fixed a problem, when the used base iterator returned a value_type and not a reference from its dereferencing operator.</li>
-        <li>Fixed iterator_traits problem</li>
-        <li>Fixed an EOI problem</li>
-        <li>Fixed a bug, when used with std::cin</li>
-      </ul>
-  </li>
- <li>Found a bug in grammar.ipp when BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE is defined</li> - <li>Rewritten safe_bool to use CRTP - now works also on MWCW, fixed several bugs with the implementation.</li> - <li>Fixed and extended the debug diagnostics printed by the parse tree code.</li>
-</ul>
-<h2>1.8.0 (Released with Boost 1.31.0; Includes unreleased 1.7.1)</h2>
-<ul>
-  <li>Fixed a wchar_t problem in the regex_p parser.</li>
- <li>removed code and workarounds for old compilers (VC6/7 and Borland)</li>
-  <li> Changed license to the new boost license.</li>
- <li> Modified escape_char_parser::parse() to use a static parser instead of a rule. This will make it more friendly to use in trees. It should also be a little more efficient.</li>
-</ul>
-<h2>1.7.1 (Unreleased; becomes 1.8.0)</h2>
-<ul>
-  <li>Added a full suite of predefined actors.</li>
- <li>Moved rule_alias and stored_rule from core/non-terminal to dynamic.<br>
-    Made as_parser a public API in meta/as_parser.hpp</li>
-  <li>Separated Core.Meta into its own module</li>
-  <li>Refactored Utility module<br>
-    Moved some files into Utility.Parsers</li>
-</ul>
-<blockquote>
-  <ul>
-    <li>utilities
-      <ul>
-        <li>parsers
-          <ul>
-            <li>chset, regex, escape_char<br>
-              confix, list, distinct<br>
-              functor_parser</li>
-          </ul>
-        </li>
-      </ul>
-    </li>
-    <li> support
-      <ul>
-        <li>scoped_lock<br>
-          flush_multi_pass<br>
-          grammar_def</li>
-      </ul>
-    </li>
-    <li> actors
-      <ul>
-        <li>assign</li>
-      </ul>
-    </li>
-  </ul>
-</blockquote>
-<ul>
-  <li>Stored rules</li>
-  <li>Added the switch_p and select_p dynamic parsers.</li>
-  <li>Multiple scanner support for rules.</li>
- <li>The Rule's Scanner, Context and Tag template parameters can be specified in any order now. If a template parameter is missing, it will assume the defaults. See test/rule_tests.cpp.</li> - <li>Introduced the possibility to specify more than one start rule from a grammar.</li> - <li>Added an implementation of the file_iterator iterator based on the new Boost iterator_adaptors (submitted originally by Thomas Witt).</li>
-</ul>
-<p><em> [The transition to the new iterator_adaptors should be complete now.]</em></p>
-<ul>
- <li>Added an implementation of the fixed_size_queue iterator based on the new Boost iterator_adaptors.</li>
-  <li> wchar_t friendly implementation of graph_p</li>
- <li>made the copy-constructor and assignment-operator of parser_error_base public to clear VC7.1 C4673 warning. Added copy-constructor and assignment operator to parser_error for clarity of intent.</li>
-</ul>
-<h2>1.7.0</h2>
-<ul>
-  <li> assign(string) semantic action now works in VC6</li>
-  <li>parsers need not be default constructible </li>
- <li>simplified aggregation of binary and unary parsers (more compiler friendly)</li>
-  <li>epsilon workarounds for VC++</li>
-  <li>match's attribute now uses boost.optional</li>
-  <li>subrules can now have closures</li>
-  <li>project wide 64 bit compatibility</li>
-  <li>dynamic_parser_tag, reissue of rule.set_id(id);</li>
- <li>numerous primitives improvements and workarounds for problematic compilers</li> - <li>proper complement (~) of single char parser primitives and chsets</li>
-  <li>intuitive handling of lexeme_d </li>
-  <li>wide_phrase_scanner_t typedef</li>
-  <li>dynamic parser improvements (better support for more compilers)</li>
- <li>complete rewrite of the file_iterator (using boost.iterator_adapters). Supports
-    memory maps wherever available</li>
- <li>multi_pass updates (compatibility with more compilers (e.g VC7) and more)</li>
-  <li>position_iterator improvements</li>
-  <li>better phoenix support for more compilers</li>
-  <li>phoenix new_(...) construct</li>
-  <li>new lazy_p parser</li>
-  <li>utility.distinct parser (undocumented)</li>
-  <li>chset operators improvements </li>
-  <li>confix_p streamlining and improvements</li>
-  <li>numerous Boost integration improvements</li>
-</ul>
-<h2>Bug fixes (1.7.0 and 1.6.0)</h2>
-<ul>
- <li> Fixed. Using MSVC++6 (SP5), calling the assign action with a string value
-    on parsers using the file_iterator will not work. </li>
- <li> Fixed: using assign semantic action in a grammar with a multi_pass iterator - adaptor applied to an std::istream_iterator resulted in a failure to compile
-    under msvc 7.0. </li>
- <li> Fixed: There is a bug in the &quot;range_run&lt;CharT&gt;::set (range&lt;CharT&gt; - const&amp; r)&quot; function in the &quot;boost\spirit\utility\impl\chset\range_run.ipp&quot;.
-  </li>
- <li> Fixed: handling of trailing whitespace bug (ast_parse/pt_parse related)</li>
-  <li> Fixed: comment_p and end of data bug</li>
- <li> Fixed: <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/4029";>Most
-    trailing space bug</a>:</li>
-  <li> Fixed:<br>
-    chset&lt;&gt;::operator~(range&lt;&gt;) bug<br>
-    operator&amp;(chset&lt;&gt;, range&lt;&gt;) bug<br>
-    operator&amp;(range&lt;&gt;, chset&lt;&gt;) bug</li>
- <li> Fixed: <a href="http://sourceforge.net/mailarchive/forum.php?thread_id=2008510&forum_id=25901";>impl::detach_clear
-    bug</a></li>
- <li> Fixed: <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/3678";>mismatch
-    closure return type bug</a></li>
- <li> Fixed: <a href="http://sf.net/mailarchive/forum.php?thread_id=1963157&forum_id=1595";>access_node_d[]</a> - and <a href="http://sf.net/mailarchive/forum.php?thread_id=1966224&forum_id=1595";>access_match_d[]</a>
-    iterator bugs</li>
-  <li> Fixed a bug regarding threadsafety of Phoenix/Spirit closures.</li>
-  <li> Added missing include files to miniboost</li>
-</ul>
-<p> <font size="2" color="#666666">Copyright &copy; 1998-2005 Joel de Guzman, Hartmut Kaiser</font><br> -<font size="2"><font color="#666666">Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) </font> </font></p>
-<p>&nbsp;</p>
-
-</body>
-</html>
+<html>
+<head>
+<title>Spirit Change Log</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="doc/theme/style.css" type="text/css">
+</head>
+
+<body>
+
+<h2>Spirit Change Log</h2>
+<h2>1.8.7</h2>
+<ul>
+ <li>Integrated the Spirit V1.8.x code base with Spirit V2. Spirit V1.8.x is
+      now called
+    <strong>Spirit Classic.</strong> Even if the directory
+      structure has changed (the
+    <strong>Spirit Classic</strong> headers are now moved to the
+ '$BOOST_ROOT/boost/spirit/home/classic' directory), we created forwarding
+      headers allowing to compile existing applications without any change.
+      These forwarding headers are deprecated, though, which will result in
+ corresponding warnings generated for each of the headers. The forwarding
+      headers are expected to be removed in the future.
+    <br />
+      The recommended way of using Spirit Classic is now to include header
+ files from the directory '$BOOST_ROOT/boost/spirit/include'. All files of
+      <strong>Spirit Classic</strong>
+      have now a 'classic_' prefixed to their name. For example the include
+    <br/>
+ <br><code>&nbsp;&nbsp;#include &lt;boost/spirit/core/core.hpp&gt;</code><br/>
+    <br/>
+    now should be written as:
+    <br/>
+ <br/><code>&nbsp;&nbsp;#include &lt;boost/spirit/include/classic_core.hpp&gt;</code><br/>
+    <br/>
+ To avoid namespace conflicts with the new Spirit V2 library we moved <strong>Spirit + Classic</strong> into the <tt>namespace boost::spirit::classic</tt>. This change will be automatically&nbsp;deactivated whenever the deprecated include files are + being used. This ensures full backwards compatibility for existing applications.
+    <br />
+ For more details about this change please consult the documentation.</li>
+</ul>
+<h2>1.8.6</h2>
+<ul>
+ <li>Fixed a integer overflow bug preventing to fail parsing on certain large integers. This bug was reported and fixed by Michael Andersen Nex </li>
+</ul>
+<h2>1.8.5</h2>
+<ul>
+ <li>For performance reasons, leaf_node_d/token_node_d have been changed to implicit lexems that create leaf nodes in one shot. The old token_node_d is still available and called reduced_node_d, now.</li>
+  <li>It's now possible to phoenix::bind (version 1) symbols::add.</li>
+</ul>
+<h2>1.8.4</h2>
+<ul>
+  <li>Fixed no_actions bug where no_action is applied recursively.</li>
+  <li>Fixed the regex_p parser for Boost &gt;= V1.33.0 </li>
+ <li>Implemented a workaround for namespace issues VC++ has with Spirit's file_iterators</li> + <li>Fixed bug in tree match policies that prevented using gen_pt/ast_node_d, + <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/9013";>reported
+    by Jascha Wetzel</a>.</li>
+  <li>Made position_iterator usable with wchar_t based strings. </li>
+</ul>
+<h2>1.8.3</h2>
+<ul>
+  <li>Config correction for Sun C++ by
+
+
+ Steve Clamage (see <a href="https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1220782&group_id=7586";>this link</a>). </li> + <li>Fixed multi_pass_iterator for 64 platforms, where sizeof(int) != sizeof(ptr_type).Fixed bug that prevents the use of closures with grammars with multiple entry points, <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/8868";>reported by David Pierre</a></li> + <li>Fixed bug that prevented embedding of grammars with multiple entry points, <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/8860";>reported by David Pierre</a></li> + <li>Added '\0' to the set of valid escaped characters for escape_ch_p.</li> + <li>Fixed a switch_p bug when used with a phoenix::actor as the conditional expression.</li> + <li>__LINE__ macro now gets expanded in BOOST_SPIRIT_ASSERT_EXCEPTION</li> + <li>Fixed a bug in the intersection parser <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/8544";>reported by Yusaku Sugai</a></li> + <li>The symbol parser uses the null character internally. Checks were added so that:
+  <ul>
+    <li>tst.add asserts if string contains the null character</li>
+    <li>tst.find doesn't match null characters in the input</li>
+  </ul></li>
+ <li>Fixed match_attr_traits.ipp to allow non-POD to pass through. The previous version taking in the ellipsis &quot;...&quot; does not allow PODs to pass through.</li>
+  <li>Allow evaluation to int as condition to if_p parser.</li>
+ <li>Applied performance improvement changes to the PT/AST code as suggested by Stefan Slapeta. </li> + <li>Fixed several problems with AST tree node directives (inner_node_d[], discard_first_node[], discard_last_node[] and infix_node_d[]). </li>
+</ul>
+<h2>1.8.2</h2>
+<p>Maintenance release (almost the same as 1.8.1 plus a few fixes here and there)</p>
+<ul>
+ <li>Added specializations to str_p and ch_p to allow str_p('c') and ch_p("c") thus fixing some non-bugs</li>
+  <li>Fixed bug where a match&lt;T&gt; is a variant.</li>
+  <li>added Jamfile/Jamrules from CVS to spirit-1.8.1/</li>
+  <li>added boost-build.jam from boost to spirit-1.8.1/</li>
+  <li>disabled template multi-threading in libs/spirit/test/Jamfile</li>
+ <li>added a boost-header-include rule (from spirit-header-include) pointing to miniboost in libs/spirit/test/Jamfile</li>
+  <li>Fixed if_p inconsistency</li>
+</ul>
+<h2>1.6.2</h2>
+<p>The Spirit 1.6.2 release is a bug-fix release only, no new features were introduced.</p>
+<ul>
+  <li>wchar_t friendly implementation of graph_p</li>
+ <li>Modified escape_char_parser::parse() to use a static parser instead of a rule. This will make it more friendly to use in trees. It should also be a little more efficient.</li>
+  <li>Moved to
+
+
+ Boost Software license 1.0. </li>
+ <li> workaround for Error 322 name lookup in base class specialization finds type</li>
+  <li> fixed limit_d bug</li>
+  <li> [numerics] Workaround for aC++</li>
+  <li> Fixed a bug in the switch_p parser.</li>
+  <li> Fixed a EOI problem in multi_pass</li>
+  <li>added Jamfile/Jamrules from CVS to spirit-1.6.1/</li>
+  <li>added boost-build.jam from boost to spirit-1.6.1/</li>
+  <li>disabled template multi-threading in libs/spirit/test/Jamfile</li>
+ <li>added a boost-header-include rule (from spirit-header-include) pointing to miniboost in libs/spirit/test/Jamfile</li>
+</ul>
+<h2>1.8.1 (Released with Boost 1.32.0)</h2>
+<p>The Spirit 1.8.1 release is a bug-fix release only, no new features were introduced.</p>
+<ul>
+  <li>Spirit now requires at least Boost 1.32.0 to compile correctly</li>
+  <li>Removed the support for the older iterator adaptor library and </li>
+  <li>Moved to use the new MPL library</li>
+  <li>Spirit was moved to use the Boost Software License 1.0.</li>
+  <li>Fixed several parsers to support post-skips more correctly.</li>
+  <li>Fixed a no_node_d[] bug.</li>
+  <li>Fixed a bug in shortest_d[].</li>
+  <li>Fixed a bug in limit_d[].</li>
+  <li>Fixed parser traversal meta code.</li>
+  <li>Fixed several bugs in switch_p.</li>
+ <li>Fixed AST generating problems, in particular with the loops related parsers.</li>
+  <li>Fixed several bugs in the multi_pass iterator.
+      <ul>
+ <li>Fixed a problem, when the used base iterator returned a value_type and not a reference from its dereferencing operator.</li>
+        <li>Fixed iterator_traits problem</li>
+        <li>Fixed an EOI problem</li>
+        <li>Fixed a bug, when used with std::cin</li>
+      </ul>
+  </li>
+ <li>Found a bug in grammar.ipp when BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE is defined</li> + <li>Rewritten safe_bool to use CRTP - now works also on MWCW, fixed several bugs with the implementation.</li> + <li>Fixed and extended the debug diagnostics printed by the parse tree code.</li>
+</ul>
+<h2>1.8.0 (Released with Boost 1.31.0; Includes unreleased 1.7.1)</h2>
+<ul>
+  <li>Fixed a wchar_t problem in the regex_p parser.</li>
+ <li>removed code and workarounds for old compilers (VC6/7 and Borland)</li>
+  <li> Changed license to the new boost license.</li>
+ <li> Modified escape_char_parser::parse() to use a static parser instead of a rule. This will make it more friendly to use in trees. It should also be a little more efficient.</li>
+</ul>
+<h2>1.7.1 (Unreleased; becomes 1.8.0)</h2>
+<ul>
+  <li>Added a full suite of predefined actors.</li>
+ <li>Moved rule_alias and stored_rule from core/non-terminal to dynamic.<br>
+    Made as_parser a public API in meta/as_parser.hpp</li>
+  <li>Separated Core.Meta into its own module</li>
+  <li>Refactored Utility module<br>
+    Moved some files into Utility.Parsers</li>
+</ul>
+<blockquote>
+  <ul>
+    <li>utilities
+      <ul>
+        <li>parsers
+          <ul>
+            <li>chset, regex, escape_char<br>
+              confix, list, distinct<br>
+              functor_parser</li>
+          </ul>
+        </li>
+      </ul>
+    </li>
+    <li> support
+      <ul>
+        <li>scoped_lock<br>
+          flush_multi_pass<br>
+          grammar_def</li>
+      </ul>
+    </li>
+    <li> actors
+      <ul>
+        <li>assign</li>
+      </ul>
+    </li>
+  </ul>
+</blockquote>
+<ul>
+  <li>Stored rules</li>
+  <li>Added the switch_p and select_p dynamic parsers.</li>
+  <li>Multiple scanner support for rules.</li>
+ <li>The Rule's Scanner, Context and Tag template parameters can be specified in any order now. If a template parameter is missing, it will assume the defaults. See test/rule_tests.cpp.</li> + <li>Introduced the possibility to specify more than one start rule from a grammar.</li> + <li>Added an implementation of the file_iterator iterator based on the new Boost iterator_adaptors (submitted originally by Thomas Witt).</li>
+</ul>
+<p><em> [The transition to the new iterator_adaptors should be complete now.]</em></p>
+<ul>
+ <li>Added an implementation of the fixed_size_queue iterator based on the new Boost iterator_adaptors.</li>
+  <li> wchar_t friendly implementation of graph_p</li>
+ <li>made the copy-constructor and assignment-operator of parser_error_base public to clear VC7.1 C4673 warning. Added copy-constructor and assignment operator to parser_error for clarity of intent.</li>
+</ul>
+<h2>1.7.0</h2>
+<ul>
+  <li> assign(string) semantic action now works in VC6</li>
+  <li>parsers need not be default constructible </li>
+ <li>simplified aggregation of binary and unary parsers (more compiler friendly)</li>
+  <li>epsilon workarounds for VC++</li>
+  <li>match's attribute now uses boost.optional</li>
+  <li>subrules can now have closures</li>
+  <li>project wide 64 bit compatibility</li>
+  <li>dynamic_parser_tag, reissue of rule.set_id(id);</li>
+ <li>numerous primitives improvements and workarounds for problematic compilers</li> + <li>proper complement (~) of single char parser primitives and chsets</li>
+  <li>intuitive handling of lexeme_d </li>
+  <li>wide_phrase_scanner_t typedef</li>
+  <li>dynamic parser improvements (better support for more compilers)</li>
+ <li>complete rewrite of the file_iterator (using boost.iterator_adapters). Supports
+    memory maps wherever available</li>
+ <li>multi_pass updates (compatibility with more compilers (e.g VC7) and more)</li>
+  <li>position_iterator improvements</li>
+  <li>better phoenix support for more compilers</li>
+  <li>phoenix new_(...) construct</li>
+  <li>new lazy_p parser</li>
+  <li>utility.distinct parser (undocumented)</li>
+  <li>chset operators improvements </li>
+  <li>confix_p streamlining and improvements</li>
+  <li>numerous Boost integration improvements</li>
+</ul>
+<h2>Bug fixes (1.7.0 and 1.6.0)</h2>
+<ul>
+ <li> Fixed. Using MSVC++6 (SP5), calling the assign action with a string value
+    on parsers using the file_iterator will not work. </li>
+ <li> Fixed: using assign semantic action in a grammar with a multi_pass iterator + adaptor applied to an std::istream_iterator resulted in a failure to compile
+    under msvc 7.0. </li>
+ <li> Fixed: There is a bug in the &quot;range_run&lt;CharT&gt;::set (range&lt;CharT&gt; + const&amp; r)&quot; function in the &quot;boost\spirit\utility\impl\chset\range_run.ipp&quot;.
+  </li>
+ <li> Fixed: handling of trailing whitespace bug (ast_parse/pt_parse related)</li>
+  <li> Fixed: comment_p and end of data bug</li>
+ <li> Fixed: <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/4029";>Most
+    trailing space bug</a>:</li>
+  <li> Fixed:<br>
+    chset&lt;&gt;::operator~(range&lt;&gt;) bug<br>
+    operator&amp;(chset&lt;&gt;, range&lt;&gt;) bug<br>
+    operator&amp;(range&lt;&gt;, chset&lt;&gt;) bug</li>
+ <li> Fixed: <a href="http://sourceforge.net/mailarchive/forum.php?thread_id=2008510&forum_id=25901";>impl::detach_clear
+    bug</a></li>
+ <li> Fixed: <a href="http://article.gmane.org/gmane.comp.parsers.spirit.general/3678";>mismatch
+    closure return type bug</a></li>
+ <li> Fixed: <a href="http://sf.net/mailarchive/forum.php?thread_id=1963157&forum_id=1595";>access_node_d[]</a> + and <a href="http://sf.net/mailarchive/forum.php?thread_id=1966224&forum_id=1595";>access_match_d[]</a>
+    iterator bugs</li>
+  <li> Fixed a bug regarding threadsafety of Phoenix/Spirit closures.</li>
+  <li> Added missing include files to miniboost</li>
+</ul>
+<p> <font size="2" color="#666666">Copyright &copy; 1998-2005 Joel de Guzman, Hartmut Kaiser</font><br> +<font size="2"><font color="#666666">Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) </font> </font></p>
+<p>&nbsp;</p>
+
+</body>
+</html>

Modified: trunk/libs/spirit/classic/doc/acknowledgments.html
==============================================================================
--- trunk/libs/spirit/classic/doc/acknowledgments.html  (original)
+++ trunk/libs/spirit/classic/doc/acknowledgments.html Tue Mar 31 01:07:16 2009
@@ -1,146 +1,146 @@
-<html>
-<head>
-<title>Acknowledgments</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="theme/style.css" type="text/css">
-</head>
-
-<body>
-<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
-  <tr>
-    <td width="10">
-    </td>
-    <td width="85%">
- <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b><b>Acknowledgments</b></b></font>
-    </td>
- <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="rationale.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="references.html"><img src="theme/r_arr.gif" border="0"></a></td>
-  </tr>
-</table>
-<p>Special thanks to </p>
-<p><b>Dan Nuffer</b> for his work on lexers, parse trees, ASTs, XML parsers, the - multi-pass iterator as well as administering Spirit's site, editing, maintaining - the CVS and doing the releases plus a zillion of other chores that were almost
-  taken for granted. </p>
-<p><b>Hartmut Kaiser</b> for his work on the C parser, the work on the C/C++ preprocessor, - utility parsers, the original port to Intel 5.0, various work on Phoenix, porting - to v1.5, the meta-parsers, the grouping-parsers, extensive testing and painstaking
-  attention to details.</p>
-<p><b>Martin Wille</b> who improved grammar multi thread safety, contributed the - eol_p parser, the dynamic parsers, documentation and for taking an active role - in almost every aspect from brainstorming and design to coding. And, as always, helps keep the regression tests for g++ on Linux as green as ever :-). </p> -<p><b>Martijn W. Van Der Lee</b> our Web site administrator and for contributing
-  the RFC821 parser<b>.</b></p>
-<p><b>Giovanni Bajo</b> for last minute tweaks of Spirit 1.8.0 for CodeWarrior - 8.3. Actually, I'm ashamed Giovanni was not in this list already. He's done - a lot since Spirit 1.5, the first Boost.Spirit release. He's instrumental in - the porting of the Spirit iterators stuff to the new Boost Iterators Library - (version 2). He also did various bug fixes and wrote some tests here and there.
-</p>
-<p><b>Juan Carlos Arevalo-Baeza (JCAB) </b>for his work on the C++ parser, the - position iterator, ports to v1.5 and keeping the mailing list discussions alive
-  and kicking.</p>
-<p><strong>Vaclav Vesely, </strong>lots of stuff, the no_actions directive, various patches fixes, the distinct parsers, the lazy parser, some phoenix tweaks and add-ons (e.g. <tt>new_</tt>). Also, <strong>Stefan&nbsp;Slapeta</strong> and <strong>wife</strong> for editing Vaclav's distinct parser doc. </p> -<p><b>Raghavendra Satish </b>for doing the original v1.3 port to VC++ and his
-    work on Phoenix.</p>
-<p><b>Noah Stein</b> for following up and helping Ragav on the VC++ ports.</p>
-<p><b>Hakki Dogusan</b>, for his original v1.0 Pascal parser.</p>
-<p><b>John (EBo) David</b> for his work on the VM and watching over my shoulder
-  as I code giving the impression of distance eXtreme programming.</p>
-<p><b>Chris Uzdavinis</b> for feeding in comments and valuable suggestions as
-  well as editing the documentation.</p>
-<p><b>Carsten Stoll</b>, for his work on dynamic parsers.</p>
-<p><b>Andy Elvey</b> and his conifer parser.</p>
-<p><b>Bruce Florman</b>, who did the original v1.0 port to VC++.</p>
-<p><b>Jeff Westfahl </b>for porting the loop parsers to v1.5 and contributing
-  the file iterator.</p>
-<p><b>Peter Simons</b> for the RFC date parser example and tutorial plus helping
-  out with some nitty gritty details.</p>
-<p><b>Markus Sch&ouml;pflin</b> for suggesting the end_p parser and lots of other
-  nifty things and his active presence in the mailing list.</p>
-<p><b>Doug Gregor</b> for mentoring and his ability to see things that others
-  don't. </p>
-<p><strong>David Abrahams</strong> for giving me a job that allows me to still - work on Spirit, plus countless advice and help on C++ and specifically template
-  metaprogramming.</p>
-<p><strong>Aleksey Gurtovoy</strong> for his MPL library from which I stole many - metaprogramming tricks especially for less conforming compilers such as Borland
-  and VC6/7.</p>
-<p><strong>Gustavo Guerra</strong> for his last minute review of Spirit and constant - feedback, plus patches here and there (e.g. proposing the new dot behavior of
-  the real numerics parsers).</p>
-<p><strong>Nicola Musatti, Paul Snively, Alisdair Meredith </strong>and<strong>
-  Hugo Duncan </strong> for testing and sending in various patches.</p>
-<p><strong>Steve Rowe</strong> for his splendid work on the TSTs that will soon
-  be taken into Spirit.</p>
-<p><strong>Jonathan de Halleux</strong> for his work on actors.</p>
-<p><strong>Angus Leeming</strong> for last minute editing work on the 1.8.0 release documentation, his work on Phoenix and his active presence in the Spirit mailing list.</p> -<p> <strong>Joao Abecasis</strong> for his active presence in the Spirit mailing list, providing user support, participating in the discussions and so on. </p> -<p> <strong>Guillaume Melquiond</strong> for a last minute patch to <tt>multi_pass</tt> for 1.8.1. </p> -<p> <strong>Peder Holt</strong> for his porting work on Phoenix, Fusion and Spirit to VC6. </p>
-<p>To my wife <b>Mariel</b> who did the graphics in this document.</p>
-<p>My, there's a lot in this list! And it's a continuing list. I add people to this list everytime. I hope I did not forget anyone. If I missed<br>
-someone you know who has helped in any way, please inform me.</p>
-<p> Special thanks also to people who gave feedback and valuable comments, particularly - members of Boost and Spirit mailing lists. This includes all those who participated
-  in the review:<br>
-  <br>
-  <strong>John Maddock</strong>, our review manager<br>
-  <strong>Aleksey Gurtovoy<br>
-  Andre Hentz<br>
-  Beman Dawes<br>
-  Carl Daniel<br>
-  Christopher Currie<br>
-  Dan Gohman<br>
-  Dan Nuffer<br>
-  Daryle Walker<br>
-  David Abrahams<br>
-  David B. Held<br>
-  Dirk Gerrits<br>
-  Douglas Gregor<br>
-  Hartmut Kaiser<br>
-  Iain K.Hanson<br>
-  Juan Carlos Arevalo-Baeza<br>
-  Larry Evans<br>
-  Martin Wille<br>
-  Mattias Flodin<br>
-  Noah Stein<br>
-  Nuno Lucas<br>
-  Peter Dimov<br>
-  Peter Simons<br>
-  Petr Kocmid<br>
-  Ross Smith<br>
-  Scott Kirkwood<br>
-  Steve Cleary<br>
-  Thorsten Ottosen<br>
-  Tom Wenisch<br>
-  Vladimir Prus</strong></p>
-<p>Finally thanks to <a href="http://sourceforge.net";>SourceForge</a> for hosting - the Spirit project and <a href="http://www.boost.org/";>Boost</a>: a C++ community - comprised of extremely talented library authors who participate in the discussion
-  and peer review of well crafted C++ libraries.</p>
-<table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="rationale.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="references.html"><img src="theme/r_arr.gif" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<hr size="1">
-<p class="copyright">Copyright &copy; 1998-2003 Joel de Guzman<br>
-  <br>
- <font size="2">Use, modification and distribution is subject to the Boost Software - License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-  </font> </p>
-</body>
-</html>
+<html>
+<head>
+<title>Acknowledgments</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="theme/style.css" type="text/css">
+</head>
+
+<body>
+<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
+  <tr>
+    <td width="10">
+    </td>
+    <td width="85%">
+ <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b><b>Acknowledgments</b></b></font>
+    </td>
+ <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
+  </tr>
+</table>
+<br>
+<table border="0">
+  <tr>
+    <td width="10"></td>
+ <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> + <td width="30"><a href="rationale.html"><img src="theme/l_arr.gif" border="0"></a></td> + <td width="30"><a href="references.html"><img src="theme/r_arr.gif" border="0"></a></td>
+  </tr>
+</table>
+<p>Special thanks to </p>
+<p><b>Dan Nuffer</b> for his work on lexers, parse trees, ASTs, XML parsers, the + multi-pass iterator as well as administering Spirit's site, editing, maintaining + the CVS and doing the releases plus a zillion of other chores that were almost
+  taken for granted. </p>
+<p><b>Hartmut Kaiser</b> for his work on the C parser, the work on the C/C++ preprocessor, + utility parsers, the original port to Intel 5.0, various work on Phoenix, porting + to v1.5, the meta-parsers, the grouping-parsers, extensive testing and painstaking
+  attention to details.</p>
+<p><b>Martin Wille</b> who improved grammar multi thread safety, contributed the + eol_p parser, the dynamic parsers, documentation and for taking an active role + in almost every aspect from brainstorming and design to coding. And, as always, helps keep the regression tests for g++ on Linux as green as ever :-). </p> +<p><b>Martijn W. Van Der Lee</b> our Web site administrator and for contributing
+  the RFC821 parser<b>.</b></p>
+<p><b>Giovanni Bajo</b> for last minute tweaks of Spirit 1.8.0 for CodeWarrior + 8.3. Actually, I'm ashamed Giovanni was not in this list already. He's done + a lot since Spirit 1.5, the first Boost.Spirit release. He's instrumental in + the porting of the Spirit iterators stuff to the new Boost Iterators Library + (version 2). He also did various bug fixes and wrote some tests here and there.
+</p>
+<p><b>Juan Carlos Arevalo-Baeza (JCAB) </b>for his work on the C++ parser, the + position iterator, ports to v1.5 and keeping the mailing list discussions alive
+  and kicking.</p>
+<p><strong>Vaclav Vesely, </strong>lots of stuff, the no_actions directive, various patches fixes, the distinct parsers, the lazy parser, some phoenix tweaks and add-ons (e.g. <tt>new_</tt>). Also, <strong>Stefan&nbsp;Slapeta</strong> and <strong>wife</strong> for editing Vaclav's distinct parser doc. </p> +<p><b>Raghavendra Satish </b>for doing the original v1.3 port to VC++ and his
+    work on Phoenix.</p>
+<p><b>Noah Stein</b> for following up and helping Ragav on the VC++ ports.</p>
+<p><b>Hakki Dogusan</b>, for his original v1.0 Pascal parser.</p>
+<p><b>John (EBo) David</b> for his work on the VM and watching over my shoulder
+  as I code giving the impression of distance eXtreme programming.</p>
+<p><b>Chris Uzdavinis</b> for feeding in comments and valuable suggestions as
+  well as editing the documentation.</p>
+<p><b>Carsten Stoll</b>, for his work on dynamic parsers.</p>
+<p><b>Andy Elvey</b> and his conifer parser.</p>
+<p><b>Bruce Florman</b>, who did the original v1.0 port to VC++.</p>
+<p><b>Jeff Westfahl </b>for porting the loop parsers to v1.5 and contributing
+  the file iterator.</p>
+<p><b>Peter Simons</b> for the RFC date parser example and tutorial plus helping
+  out with some nitty gritty details.</p>
+<p><b>Markus Sch&ouml;pflin</b> for suggesting the end_p parser and lots of other
+  nifty things and his active presence in the mailing list.</p>
+<p><b>Doug Gregor</b> for mentoring and his ability to see things that others
+  don't. </p>
+<p><strong>David Abrahams</strong> for giving me a job that allows me to still + work on Spirit, plus countless advice and help on C++ and specifically template
+  metaprogramming.</p>
+<p><strong>Aleksey Gurtovoy</strong> for his MPL library from which I stole many + metaprogramming tricks especially for less conforming compilers such as Borland
+  and VC6/7.</p>
+<p><strong>Gustavo Guerra</strong> for his last minute review of Spirit and constant + feedback, plus patches here and there (e.g. proposing the new dot behavior of
+  the real numerics parsers).</p>
+<p><strong>Nicola Musatti, Paul Snively, Alisdair Meredith </strong>and<strong>
+  Hugo Duncan </strong> for testing and sending in various patches.</p>
+<p><strong>Steve Rowe</strong> for his splendid work on the TSTs that will soon
+  be taken into Spirit.</p>
+<p><strong>Jonathan de Halleux</strong> for his work on actors.</p>
+<p><strong>Angus Leeming</strong> for last minute editing work on the 1.8.0 release documentation, his work on Phoenix and his active presence in the Spirit mailing list.</p> +<p> <strong>Joao Abecasis</strong> for his active presence in the Spirit mailing list, providing user support, participating in the discussions and so on. </p> +<p> <strong>Guillaume Melquiond</strong> for a last minute patch to <tt>multi_pass</tt> for 1.8.1. </p> +<p> <strong>Peder Holt</strong> for his porting work on Phoenix, Fusion and Spirit to VC6. </p>
+<p>To my wife <b>Mariel</b> who did the graphics in this document.</p>
+<p>My, there's a lot in this list! And it's a continuing list. I add people to this list everytime. I hope I did not forget anyone. If I missed<br>
+someone you know who has helped in any way, please inform me.</p>
+<p> Special thanks also to people who gave feedback and valuable comments, particularly + members of Boost and Spirit mailing lists. This includes all those who participated
+  in the review:<br>
+  <br>
+  <strong>John Maddock</strong>, our review manager<br>
+  <strong>Aleksey Gurtovoy<br>
+  Andre Hentz<br>
+  Beman Dawes<br>
+  Carl Daniel<br>
+  Christopher Currie<br>
+  Dan Gohman<br>
+  Dan Nuffer<br>
+  Daryle Walker<br>
+  David Abrahams<br>
+  David B. Held<br>
+  Dirk Gerrits<br>
+  Douglas Gregor<br>
+  Hartmut Kaiser<br>
+  Iain K.Hanson<br>
+  Juan Carlos Arevalo-Baeza<br>
+  Larry Evans<br>
+  Martin Wille<br>
+  Mattias Flodin<br>
+  Noah Stein<br>
+  Nuno Lucas<br>
+  Peter Dimov<br>
+  Peter Simons<br>
+  Petr Kocmid<br>
+  Ross Smith<br>
+  Scott Kirkwood<br>
+  Steve Cleary<br>
+  Thorsten Ottosen<br>
+  Tom Wenisch<br>
+  Vladimir Prus</strong></p>
+<p>Finally thanks to <a href="http://sourceforge.net";>SourceForge</a> for hosting + the Spirit project and <a href="http://www.boost.org/";>Boost</a>: a C++ community + comprised of extremely talented library authors who participate in the discussion
+  and peer review of well crafted C++ libraries.</p>
+<table border="0">
+  <tr>
+    <td width="10"></td>
+ <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> + <td width="30"><a href="rationale.html"><img src="theme/l_arr.gif" border="0"></a></td> + <td width="30"><a href="references.html"><img src="theme/r_arr.gif" border="0"></a></td>
+  </tr>
+</table>
+<br>
+<hr size="1">
+<p class="copyright">Copyright &copy; 1998-2003 Joel de Guzman<br>
+  <br>
+ <font size="2">Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+  </font> </p>
+</body>
+</html>

Modified: trunk/libs/spirit/classic/doc/character_sets.html
==============================================================================
--- trunk/libs/spirit/classic/doc/character_sets.html   (original)
+++ trunk/libs/spirit/classic/doc/character_sets.html Tue Mar 31 01:07:16 2009
@@ -1,158 +1,158 @@
-<html>
-<head>
-<title>Character Sets</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="theme/style.css" type="text/css">
-</head>
-
-<body>
-<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
-  <tr>
-    <td width="10">
-    </td>
-    <td width="85%">
- <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Character Sets</b></font>
-    </td>
- <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="loops.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="confix.html"><img src="theme/r_arr.gif" border="0"></a></td>
-   </tr>
-</table>
-<p>The character set <tt>chset</tt> matches a set of characters over a finite - range bounded by the limits of its template parameter <tt>CharT</tt>. This class - is an optimization of a parser that acts on a set of single characters. The - template class is parameterized by the character type <tt>CharT</tt> and can
-  work efficiently with 8, 16 and 32 and even 64 bit characters.</p>
-<pre><span class=identifier> </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>typename </span><span class=identifier>CharT </span><span class=special>= </span><span class=keyword>char</span><span class=special>&gt; - </span><span class=keyword>class </span><span class=identifier>chset</span><span class=special>;</span></pre> -<p>The <tt>chset</tt> is constructed from literals (e.g. <tt>'x'</tt>), <tt>ch_p</tt> - or <tt>chlit&lt;&gt;</tt>, <tt>range_p</tt> or <tt>range&lt;&gt;</tt>, <tt>anychar_p</tt> - and <tt>nothing_p</tt> (see <a href="primitives.html">primitives</a>) or copy-constructed - from another <tt>chset</tt>. The <tt>chset</tt> class uses a copy-on-write scheme
-  that enables instances to be passed along easily by value.</p>
-<table width="80%" border="0" align="center">
-  <tr>
- <td class="note_box"><img src="theme/lens.gif" width="15" height="16"> <b>Sparse
-      bit vectors</b><br>
-      <br>
-      To accomodate 16/32 and 64 bit characters, the <tt>chset</tt> class
- statically switches from a <tt>std::bitset</tt> implementation when the - character type is not greater than 8 bits, to a sparse bit/boolean set which - uses a sorted vector of disjoint ranges (<tt>range_run</tt>). The set is - constructed from ranges such that adjacent or overlapping ranges are coalesced.<br>
-      <br>
- range_runs are very space-economical in situations where there are lots - of ranges and a few individual disjoint values. Searching is O(log n) where
-      n is the number of ranges.</td>
-  </tr>
-</table>
-<p> Examples:<br>
-</p>
-<pre><span class=identifier> </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s1</span><span class=special>(</span><span class=literal>'x'</span><span class=special>); - </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s2</span><span class=special>(</span><span class=identifier>anychar_p </span><span class=special>- </span><span class=identifier>s1</span><span class=special>);</span></pre> -<p>Optionally, character sets may also be constructed using a definition string - following a syntax that resembles posix style regular expression character sets, - except that double quotes delimit the set elements instead of square brackets
-  and there is no special negation <tt>^</tt> character.</p>
-<pre> <span class=identifier>range </span><span class=special>= </span><span class=identifier>anychar_p </span><span class=special>&gt;&gt; </span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>anychar_p</span><span class=special>; - </span><span class=identifier>set </span><span class=special>= *(</span><span class=identifier>range_p </span><span class=special>| </span><span class=identifier>anychar_p</span><span class=special>);</span></pre> -<p>Since we are defining the set using a C string, the usual C/C++ literal string
-  syntax rules apply. Examples:<br>
-</p>
-<pre> <span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s1</span><span class=special>(</span><span class=string>&quot;a-zA-Z&quot;</span><span class=special>); </span><span class=comment>// alphabetic characters - </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s2</span><span class=special>(</span><span class=string>&quot;0-9a-fA-F&quot;</span><span class=special>); </span><span class=comment>// hexadecimal characters - </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s3</span><span class=special>(</span><span class=string>&quot;actgACTG&quot;</span><span class=special>); </span><span class=comment>// DNA identifiers - </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s4</span><span class=special>(</span><span class=string>&quot;\x7f\x7e&quot;</span><span class=special>); </span><span class=comment>// Hexadecimal 0x7F and 0x7E</span></pre> -<p>The standard Spirit set operators apply (see <a href="operators.html">operators</a>) - plus an additional character-set-specific inverse (negation <tt>~</tt>) operator:<span class=comment></span></p>
-
-<table width="90%" border="0" align="center">
-  <tr>
-    <td class="table_title" colspan="2">Character set operators</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>~a</b></td>
-    <td class="table_cells" width="72%">Set inverse</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>a | b</b></td>
-    <td class="table_cells" width="72%">Set union</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>a &amp; </b></td>
-    <td class="table_cells" width="72%">Set intersection</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>a - b</b></td>
-    <td class="table_cells" width="72%">Set difference</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>a ^ b</b></td>
-    <td class="table_cells" width="72%">Set xor</td>
-  </tr>
-</table>
-<p></p>
-<p></p>
-<p></p>
-<p></p>
-<p></p>
-<p></p>
-<p></p>
-<p></p>
-<p>where operands a and b are both <tt>chsets</tt> or one of the operand is either - a literal character, <tt>ch_p</tt> or <tt>chlit</tt>, <tt>range_p</tt> or <tt>range</tt>, - <tt>anychar_p</tt> or <tt>nothing_p</tt>. Special optimized overloads are provided - for <tt>anychar_p</tt> and <tt>nothing_p</tt> operands. A <tt>nothing_p</tt> - operand is converted to an empty set, while an <tt>anychar_p</tt> operand is - converted to a set having elements of the full range of the character type used
-  (e.g. 0-255 for unsigned 8 bit chars).</p>
-<p>A special case is <tt>~anychar_p</tt> which yields <tt>nothing_p</tt>, but - <tt>~nothing_p</tt> is illegal. Inversion of <tt>anychar_p</tt> is asymmetrical, - a one-way trip comparable to converting <tt>T*</tt> to a <tt>void*.</tt></p>
-<table width="90%" border="0" align="center">
-  <tr>
-    <td class="table_title" colspan="2">Special conversions</td>
-  </tr>
-  <tr>
- <td class="table_cells" width="28%"><b>chset&lt;CharT&gt;(nothing_p)</b></td>
-    <td class="table_cells" width="72%">empty set</td>
-  </tr>
-  <tr>
- <td class="table_cells" width="28%"><b>chset&lt;CharT&gt;(anychar_p)</b></td> - <td class="table_cells" width="72%">full range of CharT (e.g. 0-255 for unsigned
-      8 bit chars)</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>~anychar_p</b></td>
-    <td class="table_cells" width="72%">nothing_p</td>
-  </tr>
-  <tr>
-    <td class="table_cells" width="28%"><b>~nothing_p</b></td>
-    <td class="table_cells" width="72%">illegal</td>
-  </tr>
-</table>
-
-<p></p><table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="loops.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="confix.html"><img src="theme/r_arr.gif" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<hr size="1">
-<p class="copyright">Copyright &copy; 1998-2003 Joel de Guzman<br>
-  <br>
-<font size="2">Use, modification and distribution is subject to the Boost Software
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt) </font> </p>
-</body>
-</html>
+<html>
+<head>
+<title>Character Sets</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="theme/style.css" type="text/css">
+</head>
+
+<body>
+<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
+  <tr>
+    <td width="10">
+    </td>
+    <td width="85%">
+ <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Character Sets</b></font>
+    </td>
+ <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
+  </tr>
+</table>
+<br>
+<table border="0">
+  <tr>
+    <td width="10"></td>
+ <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> + <td width="30"><a href="loops.html"><img src="theme/l_arr.gif" border="0"></a></td> + <td width="30"><a href="confix.html"><img src="theme/r_arr.gif" border="0"></a></td>
+   </tr>
+</table>
+<p>The character set <tt>chset</tt> matches a set of characters over a finite + range bounded by the limits of its template parameter <tt>CharT</tt>. This class + is an optimization of a parser that acts on a set of single characters. The + template class is parameterized by the character type <tt>CharT</tt> and can
+  work efficiently with 8, 16 and 32 and even 64 bit characters.</p>
+<pre><span class=identifier> </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>typename </span><span class=identifier>CharT </span><span class=special>= </span><span class=keyword>char</span><span class=special>&gt; + </span><span class=keyword>class </span><span class=identifier>chset</span><span class=special>;</span></pre> +<p>The <tt>chset</tt> is constructed from literals (e.g. <tt>'x'</tt>), <tt>ch_p</tt> + or <tt>chlit&lt;&gt;</tt>, <tt>range_p</tt> or <tt>range&lt;&gt;</tt>, <tt>anychar_p</tt> + and <tt>nothing_p</tt> (see <a href="primitives.html">primitives</a>) or copy-constructed + from another <tt>chset</tt>. The <tt>chset</tt> class uses a copy-on-write scheme
+  that enables instances to be passed along easily by value.</p>
+<table width="80%" border="0" align="center">
+  <tr>
+ <td class="note_box"><img src="theme/lens.gif" width="15" height="16"> <b>Sparse
+      bit vectors</b><br>
+      <br>
+      To accomodate 16/32 and 64 bit characters, the <tt>chset</tt> class
+ statically switches from a <tt>std::bitset</tt> implementation when the + character type is not greater than 8 bits, to a sparse bit/boolean set which + uses a sorted vector of disjoint ranges (<tt>range_run</tt>). The set is + constructed from ranges such that adjacent or overlapping ranges are coalesced.<br>
+      <br>
+ range_runs are very space-economical in situations where there are lots + of ranges and a few individual disjoint values. Searching is O(log n) where
+      n is the number of ranges.</td>
+  </tr>
+</table>
+<p> Examples:<br>
+</p>
+<pre><span class=identifier> </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s1</span><span class=special>(</span><span class=literal>'x'</span><span class=special>); + </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s2</span><span class=special>(</span><span class=identifier>anychar_p </span><span class=special>- </span><span class=identifier>s1</span><span class=special>);</span></pre> +<p>Optionally, character sets may also be constructed using a definition string + following a syntax that resembles posix style regular expression character sets, + except that double quotes delimit the set elements instead of square brackets
+  and there is no special negation <tt>^</tt> character.</p>
+<pre> <span class=identifier>range </span><span class=special>= </span><span class=identifier>anychar_p </span><span class=special>&gt;&gt; </span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>anychar_p</span><span class=special>; + </span><span class=identifier>set </span><span class=special>= *(</span><span class=identifier>range_p </span><span class=special>| </span><span class=identifier>anychar_p</span><span class=special>);</span></pre> +<p>Since we are defining the set using a C string, the usual C/C++ literal string
+  syntax rules apply. Examples:<br>
+</p>
+<pre> <span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s1</span><span class=special>(</span><span class=string>&quot;a-zA-Z&quot;</span><span class=special>); </span><span class=comment>// alphabetic characters + </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s2</span><span class=special>(</span><span class=string>&quot;0-9a-fA-F&quot;</span><span class=special>); </span><span class=comment>// hexadecimal characters + </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s3</span><span class=special>(</span><span class=string>&quot;actgACTG&quot;</span><span class=special>); </span><span class=comment>// DNA identifiers + </span><span class=identifier>chset</span><span class=special>&lt;&gt; </span><span class=identifier>s4</span><span class=special>(</span><span class=string>&quot;\x7f\x7e&quot;</span><span class=special>); </span><span class=comment>// Hexadecimal 0x7F and 0x7E</span></pre> +<p>The standard Spirit set operators apply (see <a href="operators.html">operators</a>) + plus an additional character-set-specific inverse (negation <tt>~</tt>) operator:<span class=comment></span></p>
+
+<table width="90%" border="0" align="center">
+  <tr>
+    <td class="table_title" colspan="2">Character set operators</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>~a</b></td>
+    <td class="table_cells" width="72%">Set inverse</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>a | b</b></td>
+    <td class="table_cells" width="72%">Set union</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>a &amp; </b></td>
+    <td class="table_cells" width="72%">Set intersection</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>a - b</b></td>
+    <td class="table_cells" width="72%">Set difference</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>a ^ b</b></td>
+    <td class="table_cells" width="72%">Set xor</td>
+  </tr>
+</table>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p>where operands a and b are both <tt>chsets</tt> or one of the operand is either + a literal character, <tt>ch_p</tt> or <tt>chlit</tt>, <tt>range_p</tt> or <tt>range</tt>, + <tt>anychar_p</tt> or <tt>nothing_p</tt>. Special optimized overloads are provided + for <tt>anychar_p</tt> and <tt>nothing_p</tt> operands. A <tt>nothing_p</tt> + operand is converted to an empty set, while an <tt>anychar_p</tt> operand is + converted to a set having elements of the full range of the character type used
+  (e.g. 0-255 for unsigned 8 bit chars).</p>
+<p>A special case is <tt>~anychar_p</tt> which yields <tt>nothing_p</tt>, but + <tt>~nothing_p</tt> is illegal. Inversion of <tt>anychar_p</tt> is asymmetrical, + a one-way trip comparable to converting <tt>T*</tt> to a <tt>void*.</tt></p>
+<table width="90%" border="0" align="center">
+  <tr>
+    <td class="table_title" colspan="2">Special conversions</td>
+  </tr>
+  <tr>
+ <td class="table_cells" width="28%"><b>chset&lt;CharT&gt;(nothing_p)</b></td>
+    <td class="table_cells" width="72%">empty set</td>
+  </tr>
+  <tr>
+ <td class="table_cells" width="28%"><b>chset&lt;CharT&gt;(anychar_p)</b></td> + <td class="table_cells" width="72%">full range of CharT (e.g. 0-255 for unsigned
+      8 bit chars)</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>~anychar_p</b></td>
+    <td class="table_cells" width="72%">nothing_p</td>
+  </tr>
+  <tr>
+    <td class="table_cells" width="28%"><b>~nothing_p</b></td>
+    <td class="table_cells" width="72%">illegal</td>
+  </tr>
+</table>
+
+<p></p><table border="0">
+  <tr>
+    <td width="10"></td>
+ <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> + <td width="30"><a href="loops.html"><img src="theme/l_arr.gif" border="0"></a></td> + <td width="30"><a href="confix.html"><img src="theme/r_arr.gif" border="0"></a></td>
+  </tr>
+</table>
+<br>
+<hr size="1">
+<p class="copyright">Copyright &copy; 1998-2003 Joel de Guzman<br>
+  <br>
+<font size="2">Use, modification and distribution is subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt) </font> </p>
+</body>
+</html>

Modified: trunk/libs/spirit/classic/doc/closures.html
==============================================================================
--- trunk/libs/spirit/classic/doc/closures.html (original)
+++ trunk/libs/spirit/classic/doc/closures.html Tue Mar 31 01:07:16 2009
@@ -1,338 +1,338 @@
-<html>
-<head>
-<title>Closures</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="theme/style.css" type="text/css">
-<style type="text/css">
-<!--
-.style1 {font-family: "Courier New", Courier, mono}
--->
-</style>
-</head>
-
-<body>
-<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
-  <tr>
-    <td width="10">
-    </td>
-    <td width="85%">
- <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Closures</b></font>
-    </td>
- <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="phoenix.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="dynamic_parsers.html"><img src="theme/r_arr.gif" border="0"></a></td>
-  </tr>
-</table>
-<h2>Overview</h2>
-<p>Using phoenix, in the previous chapter, we've seen how we can get data from our parsers using <tt>var</tt>:</p> -<pre><code><font color="#000000"><span class=special> </span><span class=keyword>int </span><span class=identifier>i</span><span class=special>; -</span><span class=identifier> integer </span><span class=special>= </span><span class=identifier>int_p</span><span class=special>[</span><span class="identifier">var</span><span class=special>(</span><span class=identifier>i</span><span class=special>) = </span><span class="identifier">arg1</span><span class=special>];</span></font></code></pre> -<p>Nifty! Our rule <tt>integer</tt>, if successful, passes the parsed integer - to the variable <tt>i</tt>. Everytime we need to parse an integer, we can call - our rule <tt>integer</tt> and simply extract the parsed number from the variable - <tt>i</tt>. There's something you should be aware of though. In the viewpoint - of the grammar, the variable <tt>i</tt> is global. When the grammar gets more - complex, it's hard to keep track of the current state of <tt>i</tt>. And, with
-  recursive rules, global variables simply won't be adequate. </p>
-<p>Closures are needed if you need your rules (or grammars) to be reentrant. For example, a rule (or grammar) might be called recursively indirectly or directly by itself. The calculator is a good example. The expression rule recursively calls itself indirectly when it invokes the factor rule. </p> -<p>Closures provide named (lazy) variables associated with each parse rule invocation. A closure variable is addressed using member syntax:</p> -<pre><code><font color="#000000"><span class=identifier> </span>rulename<span class="special">.</span>varname</font></code></pre> -<p>A closure variable <tt>R.x</tt> may be addressed in the semantic action of any other rule invoked by <tt>R</tt>; it refers to the innermost enclosing invocation of <tt>R</tt>. If no such invocation exists, an assertion occurs at runtime. </p>
-<p>Closures provide an environment, a stack frame, for local variables.
- Most importantly, the closure variables are accessible from the EBNF grammar - specification and can be used to pass parser information upstream or downstream - from the topmost rule down to the terminals in a top-down recursive descent.
-  Closures facilitate dynamic scoping in C++.
- Spirit's closure implementation is based on <em>Todd Veldhuizen</em>'s <strong>Dynamic - scoping in C++</strong> technique that he presented in his paper <a href="ftp://ftp.cs.indiana.edu/pub/techreports/TR542.pdf";>Techniques
-  for Scientic C++</a>. </p>
-<p>When a rule is given a closure, the closure's local variables are created prior - to entering the parse function and destructed after exiting the parse function. - These local variables are true local variables that exist on the hardware stack.</p>
-<table width="80%" border="0" align="center">
-  <tr>
- <td class="note_box"><img src="theme/alert.gif" width="16" height="16"> <strong>Closures</strong>
-      <strong>and Phoenix</strong><br> <br>
- Spirit v1.8 closure support requires <a href="../phoenix/index.html">Phoenix</a>. - In the future, Spirit will fully support <a href="../../../../libs/lambda/index.html">BLL</a>. - Currently, work is underway to merge the features of both libraries.</td>
-  </tr>
-</table>
-<h2>Example</h2>
-<p>Let's go back to the calculator grammar introduced in the <a href="functional.html">Functional</a> chapter. Here's the full grammar again, plus the closure declarations:</p> -<pre><span class=special> </span><span class=keyword>struct </span><span class=identifier>calc_closure </span><span class=special>: </span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>calc_closure</span><span class=special>, </span><span class=keyword>double</span><span class=special>&gt;
-    </span><span class=special>{
- </span><span class=identifier>member1 </span><span class=identifier>val</span><span class=special>;
-    </span><span class=special>};
-
- </span><span class=keyword>struct </span><span class=identifier>calculator </span><span class=special>: </span><span class=keyword>public </span><span class=identifier>grammar</span><span class=special>&lt;</span><span class=identifier>calculator</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt;
-    </span><span class=special>{
- </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>typename </span><span class=identifier>ScannerT</span><span class=special>&gt; - </span><span class=keyword>struct </span><span class=identifier>definition
-        </span><span class=special>{
- </span><span class=identifier>definition</span><span class=special>(</span><span class=identifier>calculator </span><span class=keyword>const</span><span class=special>&amp; </span><span class=identifier>self</span><span class=special>)
-            </span><span class=special>{
- </span><span class=identifier>top </span><span class=special>= </span><span class=identifier>expression</span><span class=special>[</span><span class=identifier>self</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>];
-
-                </span><span class=identifier>expression
- </span><span class=special>= </span><span class=identifier>term</span><span class=special>[</span><span class=identifier>expression</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] - </span><span class=special>&gt;&gt; </span><span class=special>*( </span><span class=special>(</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>term</span><span class=special>[</span><span class=identifier>expression</span><span class=special>.</span><span class=identifier>val </span><span class=special>+= </span><span class=identifier>arg1</span><span class=special>]) - </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>term</span><span class=special>[</span><span class=identifier>expression</span><span class=special>.</span><span class=identifier>val </span><span class=special>-= </span><span class=identifier>arg1</span><span class=special>])
-                            </span><span class=special>)
-                    </span><span class=special>;
-
-                </span><span class=identifier>term
- </span><span class=special>= </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>term</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] - </span><span class=special>&gt;&gt; </span><span class=special>*( </span><span class=special>(</span><span class=literal>'*' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>term</span><span class=special>.</span><span class=identifier>val </span><span class=special>*= </span><span class=identifier>arg1</span><span class=special>]) - </span><span class=special>| </span><span class=special>(</span><span class=literal>'/' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>term</span><span class=special>.</span><span class=identifier>val </span><span class=special>/= </span><span class=identifier>arg1</span><span class=special>])
-                            </span><span class=special>)
-                    </span><span class=special>;
-
-                </span><span class=identifier>factor
- </span><span class=special>= </span><span class=identifier>ureal_p</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] - </span><span class=special>| </span><span class=literal>'(' </span><span class=special>&gt;&gt; </span><span class=identifier>expression</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] </span><span class=special>&gt;&gt; </span><span class=literal>')' - </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=special>-</span><span class=identifier>arg1</span><span class=special>]) - </span><span class=special>| </span><span class=special>(</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>])
-                    </span><span class=special>;
-            </span><span class=special>}
-
- </span><span class=keyword>typedef </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=identifier>rule_t</span><span class=special>; - </span><span class=identifier>rule_t </span><span class=identifier>expression</span><span class=special>, </span><span class=identifier>term</span><span class=special>, </span><span class=identifier>factor</span><span class=special>; - </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>&gt; </span><span class=identifier>top</span><span class=special>;
-
- </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>&gt; </span><span class=keyword>const</span><span class=special>&amp; - </span><span class=identifier>start</span><span class=special>() </span><span class=keyword>const </span><span class=special>{ </span><span class=keyword>return </span><span class=identifier>top</span><span class=special>; </span><span class=special>}
-        </span><span class=special>};
-    </span><span class=special>};</span></pre>
-<p> <img height="16" width="15" src="theme/lens.gif"> The full source code can be <a href="../example/fundamental/phoenix_calc.cpp">viewed here</a>. This is part of the Spirit distribution.</p> -<p>Surely, we've come a long way from the original version of this calculator. With inline <a href="phoenix.html#lambda">lambda expressions</a>, we were able to write self contained grammars complete with semantic actions. </p> -<p>The first thing to notice is the declaration of <tt>calc_closure</tt>. </p>
-<p> <strong>Declaring closures</strong></p>
-<p> The general closure declaration syntax is:</p>
-<pre><code> <span class=keyword>struct </span><span class=identifier>name</span><span class=special></span> <span class=special>: </span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>name</span><span class=special>, </span><span class=keyword>type1, type2, type3,... typeN</span><span class=special>&gt;
-    {
- </span><span class=identifier>member1 m_name1</span><span class=special>; - </span><span class=identifier>member2 m_name2</span><span class=special>; - </span><span class=identifier>member3 m_name3</span><span class=special>;
-        ...
- </span><span class=identifier>memberN m_nameN</span><span class=special>;
-    };</span></code></pre>
-<p> <tt>member1</tt>... <tt>memberN</tt> are indirect links to the actual closure variables. Their indirect types correspond to <code><tt>type1</tt></code>... <code><tt>typeN</tt></code>. In our example, we declared <tt>calc_closure</tt>:</p> -<pre><span class=number> </span><span class=keyword>struct </span><span class=identifier>calc_closure </span><span class=special>: </span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>calc_closure</span><span class=special>, </span><span class=keyword>double</span><span class=special>&gt;
-    </span><span class=special>{
- </span><span class=identifier>member1 </span><span class=identifier>val</span><span class=special>;
-    </span><span class=special>};</span></pre>
-<p><tt>calc_closure</tt> has a single variable <tt>val</tt> of type <span class=keyword>double</span><span class=special></span>.</p>
-<table width="80%" border="0" align="center">
-  <tr>
- <td class="note_box"><p><img src="theme/alert.gif" width="16" height="16"> <tt>BOOST_SPIRIT_CLOSURE_LIMIT</tt><br>
-        <br>
- Spirit predefined maximum closure limit. This limit defines the maximum number of elements a closure can hold. This number defaults to 3. The actual maximum is rounded up in multiples of 3. Thus, if this value is 4, the actual limit is 6. The ultimate maximum limit in this implementation is 15. It should <strong>NOT</strong> be greater than <tt>PHOENIX_LIMIT</tt> (see <a href="../phoenix/index.html">phoenix</a>). Example:<br>
-      <br>
- <span class="comment style1">// Define these before including anything else <br> - </span><span class="preprocessor style1">#define</span><span class="style1"> PHOENIX_LIMIT 10<br> - </span><span class="preprocessor">#define</span><span class="style1"> BOOST_SPIRIT_CLOSURE_LIMIT 10</span></p> </td>
-  </tr>
-</table>
-<p><strong>Attaching closures</strong></p>
-<p>Closures can be applied to rules, subrules and grammars (non-terminals). The closure has a - special <a href="indepth_the_parser_context.html">parser context</a> that can be used with these non-terminals. The closure's - context is its means to hook into the non-terminal. The context of the closure <tt>C</tt> is <tt>C::context_t</tt>. </p> -<p>We can see in the example that we attached <tt>calc_closure</tt> to the <tt>expression</tt>, <tt>term</tt> and <tt>factor</tt> rules in our grammar:</p> -<pre><span class=special> </span><span class=keyword>typedef </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=identifier>rule_t</span><span class=special>; - </span><span class=identifier>rule_t </span><span class=identifier>expression</span><span class=special>, </span><span class=identifier>term</span><span class=special>, </span><span class=identifier>factor</span><span class=special>;</span> </pre>
-<p>as well as the grammar itself:</p>
-<pre><span class=special> </span><span class=keyword>struct </span><span class=identifier>calculator </span><span class=special>: </span><span class=keyword>public </span><span class=identifier>grammar</span><span class=special>&lt;</span><span class=identifier>calculator</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt;</span></pre>
-<p><strong>Closure return value</strong></p>
-<p>The closure <tt>member1</tt> is the closure's return value. This return value, like the one returned by <tt>anychar_p</tt>, for example, can be used to propagate data up the parser hierarchy or passed to semantic actions. Thus, <tt>expression</tt>, <tt>term</tt> and <tt>factor</tt>, as well as the <tt>calculator</tt> grammar itself, all return a <tt>double</tt>. </p>
-<p><strong>Accessing closure variables</strong></p>
-<p>Closure variables can be accessed from within semantic actions just like you - would struct members: by qualifying the member name with its owner rule, subrule - or grammar. In our example above, notice how we referred to the closure member val. Example:</p> -<pre class="identifier"><code> expression<span class=special>.</span>val <span class="comment">// refer to expression's closure member val</span></code></pre>
-<p><strong>Initializing closure variables </strong></p>
-<p>We didn't use this feature in the example, yet, for completeness... </p>
-<p>Sometimes, we need to initialize our closure variables upon entering a non-terminal (rule, subrule or grammar). Closure enabled non-terminals, by default, default-construct variables upon entering the parse member function. - If this is not desirable, we can pass constructor arguments to the non-terminal. The syntax mimics a
-  function call. </p>
-<p>For (<em>a contrived</em>) example, if you wish to construct <tt>calc_closure</tt>'s variables - to <tt>3.6</tt>, when we invoke the rule <tt>expression</tt>, we write:</p> -<pre class="identifier"><code> expression<span class="special">(</span><span class="keyword">3.6</span><span class="special">) </span><span class="comment">// invoke rule expression and set its closure variable to 3.6</span></code></pre> -<p>The constructor arguments are actually Phoenix lambda expressions, so you can - use arbitrarily complex expressions. Here's another <em>contrived example<strong>: </strong></em></p> -<pre class="identifier"><code> <span class="comment">// call rule factor and set its closure variable to (expression.x / 8) * factor.y -</span> <code>factor</code><span class="special">((</span>expression<span class="special">.</span>x<span class="keyword"> </span><span class="special">/</span><span class="keyword"> 8</span><span class="special">) *</span><span class="keyword"> </span>term<span class="special">.</span>y<span class="special">)</span></code></pre> -<p><img src="theme/lens.gif" width="15" height="16"> We can pass less arguments than the actual number of variables in the closure. - The variables at the right with no corresponding constructor arguments are default - constructed. Passing more arguments than there are closure variables is an error.</p> -<p><img src="theme/lens.gif" width="15" height="16"> See <a href="../example/intermediate/parameters.cpp">parameters.cpp</a> for a compilable example. This is part of the Spirit distribution.</p>
-<h2>Closures and Dynamic parsing</h2>
-<p>Let's write a very simple parser for an XML/HTML like language with arbitrarily nested tags. The typical approach to this type of nested tag parsing is to delegate the actual tag matching to semantic actions, perhaps using a symbol table. For example, the semantic actions are responsible for ensuring that the tags are nested (e.g. this code: <tt>&lt;p&gt;&lt;table&gt;&lt;/p&gt;&lt;/table&gt;</tt> is erroneous).</p> -<p>Spirit allows us to dynamically modify the parser at runtime. The ability to guide parser behavior through semantic actions makes it possible to ensure the nesting of tags directly in the parser. We shall see how this is possible. here's the grammar in its simplest form:</p> -<pre><span class=identifier> element </span><span class=special>= </span><span class=identifier>start_tag </span><span class=special>&gt;&gt; </span><span class=special>*</span><span class=identifier>element </span><span class=special>&gt;&gt; </span><span class=identifier>end_tag</span><span class=special>;</span>
-</pre>
-<p>An element is a <tt>start_tag</tt> (e.g. <tt>&lt;font&gt;</tt>) folowed by zero or more elements, and ended by an <tt>end_tag</tt> (e.g. <tt>&lt;/font&gt;</tt>). Now, here's a first shot at our <tt>start_tag</tt>:</p> -<pre><span class=special> </span><span class=identifier>start_tag </span><span class=special>= </span><span class=literal>'&lt;' </span><span class=special>&gt;&gt; </span><span class=identifier>lexeme_d</span><span class=special>[</span><span class=special>(+</span><span class=identifier>alpha_p</span><span class=special>)</span><span class=special>] </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;</span></pre> -<p>Notice that the <tt>end_tag</tt> is just the same as <tt>start_tag</tt> with the addition of a slash:</p> -<pre><span class=special> </span><span class=identifier>end_tag </span><span class=special>= </span><span class=literal>&quot;&lt;/&quot; </span><span class=special>&gt;&gt; </span>what_we_got_in_the_start_tag <span class=special></span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;</span>
-</pre>
-<p>What we need to do is to temporarily store what we got in our <tt>start_tag</tt> and use that later to parse our <tt>end_tag</tt>. Nifty, we can use the <a href="parametric_parsers.html">parametric parser</a> primitives to parse our <tt>end_tag</tt>: </p> -<pre><span class=special> </span><span class=identifier>end_tag </span><span class=special>= </span><span class=string>&quot;&lt;/&quot; </span><span class=special>&gt;&gt; </span><span class=identifier>f_str_p</span><span class=special>(</span>tag<span class=special>) </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;</span></pre>
-<p>where we parameterize <tt>f_str_p</tt> with what we stored (tag). </p>
-<p>Be reminded though that our grammar is recursive. The element rule calls itself. Hence, we can't just use a variable and use <tt>phoenix::var</tt> or <tt>boost::ref</tt>. Nested recursion will simply gobble up the variable. Each invocation of element must have a closure variable <tt>tag</tt>. Here now is the complete grammar:</p> -<pre><span class=number> </span><span class=keyword>struct </span><span class=identifier>tags_closure </span><span class=special>: </span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>tags_closure</span><span class=special>, </span><span class=identifier>string</span><span class=special>&gt; </span><span class=special>
-    {
- </span><span class=identifier>member1 </span><span class=identifier>tag</span><span class=special>;
-    </span><span class=special>};
-
- </span><span class=keyword>struct </span><span class=identifier>tags </span><span class=special>: </span><span class=keyword>public </span><span class=identifier>grammar</span><span class=special>&lt;</span><span class=identifier>tags</span><span class=special>&gt;
-    </span><span class=special>{
- </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>typename </span><span class=identifier>ScannerT</span><span class=special>&gt; - </span><span class=keyword>struct </span><span class=identifier>definition </span><span class=special>{
-
- </span><span class=identifier>definition</span><span class=special>(</span><span class=identifier>tags </span><span class=keyword>const</span><span class=special>&amp; </span><span class=comment>/*self*/</span><span class=special>)
-            </span><span class=special>{
- </span><span class=identifier>element </span><span class=special>= </span><span class=identifier>start_tag </span><span class=special>&gt;&gt; </span><span class=special>*</span><span class=identifier>element </span><span class=special>&gt;&gt; </span><span class=identifier>end_tag</span><span class=special>;
-
- </span><span class=identifier>start_tag </span><span class=special>=
-                        </span><span class=literal>'&lt;'
- </span><span class=special>&gt;&gt; </span><span class=identifier>lexeme_d
-                        </span><span class=special>[
- </span><span class=special>(+</span><span class=identifier>alpha_p</span><span class=special>)
-                            </span><span class=special>[
- </span><span class=comment>// construct string from arg1 and arg2 lazily - </span><span class=comment>// and assign to element.tag
-
- </span><span class=identifier>element</span><span class=special>.</span><span class=identifier>tag </span><span class=special>= </span><span class=identifier>construct_</span><span class=special>&lt;</span><span class=identifier>string</span><span class=special>&gt;(</span><span class=identifier>arg1</span><span class=special>, </span><span class=identifier>arg2</span><span class=special>)
-                            </span><span class=special>]
-                        </span><span class=special>]
- </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;
-
- </span><span class=identifier>end_tag </span><span class=special>= </span><span class=string>&quot;&lt;/&quot; </span><span class=special>&gt;&gt; </span><span class=identifier>f_str_p</span><span class=special>(</span><span class=identifier>element</span><span class=special>.</span><span class=identifier>tag</span><span class=special>) </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;
-            </span><span class=special>}
-
- </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>tags_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=identifier>element</span><span class=special>; - </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>&gt; </span><span class=identifier>start_tag</span><span class=special>, </span><span class=identifier>end_tag</span><span class=special>;
-
- </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>tags_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=keyword>const</span><span class=special>&amp; - </span><span class=identifier>start</span><span class=special>() </span><span class=keyword>const </span><span class=special>{ </span><span class=keyword>return </span><span class=identifier>element</span><span class=special>; </span><span class=special>}
-        </span><span class=special>};
-    </span><span class=special>};</span></pre>
-<p>We attached a semantic action to the <tt>(+alpha_p)</tt> part of the start_tag. There, we stored the parsed tag in the <tt>element</tt>'s closure variable <tt>tag</tt>. Later, in the <tt>end_tag</tt>, we simply used the <tt>element</tt>'s closure variable <tt>tag</tt> to parameterize our <tt>f_str_p</tt> parser. Simple and elegant. If some of the details begin to look like greek (e.g. what is <tt>construct_</tt>?), please consult the <a href="phoenix.html">Phoenix</a> chapter. </p> -<p><img height="16" width="15" src="theme/lens.gif"> The full source code can be <a href="../example/fundamental/matching_tags.cpp">viewed here</a>. This is part of the Spirit distribution.</p> -<h2><img src="theme/lens.gif" width="15" height="16"> Closures in-depth</h2>
-<p><strong>What are Closures?</strong></p>
-<p>The closure is an object that <span class="quotes">&quot;closes&quot;</span> - over the local variables of a function making them visible and accessible outside - the function. What is more interesting is that the closure actually packages - a local context (stack frame where some variables reside) and makes it available - outside the scope in which they actually exist. The information is essentially - <span class="quotes">&quot;captured&quot;</span> by the closure allowing it - to be referred to anywhere and anytime, even prior to the actual creation of
-  the variables. </p>
-<p>The following diagram depicts the situation where a function <tt>A</tt> (or - rule) exposes its closure and another function <tt>B</tt> references <tt>A</tt>'s
-  variables through its closure.</p>
-<table width="40%" border="0" align="center">
-  <tr>
-    <td><img src="theme/closure1.png"></td>
-  </tr>
-  <tr>
- <td> <div align="center"><b><font face="Geneva, Arial, Helvetica, san-serif" size="+1" color="#003399">The - closure as an object that <i>&quot;closes&quot;</i> over the local variables - of a function making them visible and accessible outside the function</font></b></div></td>
-  </tr>
-</table>
-<p>Of course, function <tt>A</tt> should be active when <tt>A.x</tt> is referenced. - What this means is that function <tt>B</tt> is reliant on function <tt>A</tt> - (If <tt>B</tt> is a nested function of <tt>A</tt>, this will always be the case). - The free form nature of Spirit rules allows access to a closure variable anytime, - anywhere. Accessing <tt>A.x</tt> is equivalent to referring to the topmost stack - variable <tt>x</tt> of function <tt>A</tt>. If function <tt>A</tt> is not active
-  when <tt>A.x</tt> is referenced, a runtime exception will be thrown.</p>
-<p><strong>Nested Functions</strong></p>
-<p>To fully understand the importance of closures, it is best to look at a language - such as Pascal which allows nested functions. Since we are dealing with C++, - lets us assume for the moment that C++ allows nested functions. Consider the
-  following <b><i>pseudo</i></b> C++ code:</p>
-<pre><span class=identifier> </span><span class=keyword>void </span><span class=identifier>a</span><span class=special>()
-    </span><span class=special>{
- </span><span class=keyword>int </span><span class=identifier>va</span><span class=special>; - </span><span class=keyword>void </span><span class=identifier>b</span><span class=special>()
-        </span><span class=special>{
- </span><span class=keyword>int </span><span class=identifier>vb</span><span class=special>; -</span> <span class=keyword>void </span><span class=identifier>c</span><span class=special>()
-            </span><span class=special>{
- </span><span class=keyword>int </span><span class=identifier>vc</span><span class=special>;
-            </span><span class=special>}
-
- </span><span class=identifier>c</span><span class=special>()</span><span class=special>;
-        </span><span class=special>}
-
-        </span><span class=identifier>b</span><span class=special>();
-    </span><span class=special>}</span></pre>
-<p>We have three functions <tt>a</tt>, <tt>b</tt> and <tt>c</tt> where <tt>c</tt> - is nested in <tt>b</tt> and <tt>b</tt> is nested in <tt>a</tt>. We also have - three variables <tt>va</tt>, <tt>vb</tt> and <tt>vc</tt>. The lifetime of each - of these local variables starts when the function where it is declared is entered - and ends when the function exits. The scope of a local variable spans all nested - functions inside the enclosing function where the variable is declared.</p> -<p>Going downstream from function <tt>a</tt> to function <tt>c</tt>, when function - a is entered, the variable <tt>va</tt> will be created in the stack. When function - <tt>b</tt> is entered (called by <tt>a</tt>), <tt>va</tt> is very well in scope - and is visble in <tt>b</tt>. At which point a fresh variable, <tt>vb</tt>, is - created on the stack. When function <tt>c</tt> is entered, both <tt>va</tt> - and <tt>vb</tt> are visibly in scope, and a fresh local variable <tt>vc</tt>
-  is created. </p>
-<p>Going upstream, <tt>vc</tt> is not and cannot be visible outside the function - <tt>c</tt>. <tt>vc</tt>'s life has already expired once <tt>c</tt> exits. The - same is true with <tt>vb</tt>; vb is accessible in function <tt>c</tt> but not
-  in function <tt>a</tt>. </p>
-<strong>Nested Mutually Recursive Rules</strong>
-<p>Now consider that <tt>a</tt>, <tt>b</tt> and <tt>c</tt> are rules:</p>
-<pre><span class=identifier> </span><span class=identifier>a </span><span class=special>= </span><span class=identifier>b </span><span class=special>&gt;&gt; </span><span class=special>*((</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>b</span><span class=special>) </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>b</span><span class=special>)); - </span><span class=identifier>b </span><span class=special>= </span><span class=identifier>c </span><span class=special>&gt;&gt; </span><span class=special>*((</span><span class=literal>'*' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>) </span><span class=special>| </span><span class=special>(</span><span class=literal>'/' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>)); - </span><span class=identifier>c </span><span class=special>= </span><span class=identifier>int_p </span><span class=special>| </span><span class=literal>'(' </span><span class=special>&gt;&gt; </span><span class=identifier>a </span><span class=special>&gt;&gt; </span><span class=literal>')' </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>) </span><span class=special>| </span><span class=special>(</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>);</span></pre> -<p>We can visualize <tt>a</tt>, <tt>b</tt> and <tt>c</tt> as mutually recursive - functions where <tt>a</tt> calls <tt>b</tt>, <tt>b</tt> calls <tt>c</tt> and - <tt>c</tt> recursively calls <tt>a</tt>. Now, imagine if <tt>a</tt>, <tt>b</tt> - and <tt>c</tt> each has a local variable named <tt>value</tt> that can be referred
-  to in our grammar by explicit qualification:</p>
-<pre><span class=special> </span><span class=identifier>a</span><span class=special>.</span><span class=identifier>value </span><span class=comment>// refer to a's value local variable - </span><span class=identifier>b</span><span class=special>.</span><span class=identifier>value </span><span class=comment>// refer to b's value local variable - </span><span class=identifier>c</span><span class=special>.</span><span class=identifier>value </span><span class=comment>// refer to c's value local variable</span>
-</pre>
-<p>Like above, when <tt>a</tt> is entered, a local variable <tt>value</tt> is - created on the stack. This variable can be referred to by both <tt>b</tt> and - <tt>c</tt>. Again, when <tt>b</tt> is called by <tt>a</tt>, <tt>b</tt> creates - a local variable <tt>value</tt>. This variable is accessible by <tt>c</tt> but
-  not by <tt>a</tt>. </p>
-<p>Here now is where the analogy with nested functions end: when <tt>c</tt> is - called, a fresh variable <tt>value</tt> is created which, as usual, lasts the - whole lifetime of <tt>c</tt>. Pay close attention however that <tt>c</tt> may - call <tt>a</tt> recursively. When this happens, <tt>a</tt> may now refer to - the local variable of <tt>c</tt><code><span class=special>.</span></code></p>
-<table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="phoenix.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="dynamic_parsers.html"><img src="theme/r_arr.gif" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<hr size="1">
-<p class="copyright">Copyright &copy; 1998-2003 Joel de Guzman<br>
-  <br>
-<font size="2">Use, modification and distribution is subject to the Boost Software
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt) </font> </p>
-</body>
-</html>
+<html>
+<head>
+<title>Closures</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="theme/style.css" type="text/css">
+<style type="text/css">
+<!--
+.style1 {font-family: "Courier New", Courier, mono}
+-->
+</style>
+</head>
+
+<body>
+<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
+  <tr>
+    <td width="10">
+    </td>
+    <td width="85%">
+ <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Closures</b></font>
+    </td>
+ <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
+  </tr>
+</table>
+<br>
+<table border="0">
+  <tr>
+    <td width="10"></td>
+ <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> + <td width="30"><a href="phoenix.html"><img src="theme/l_arr.gif" border="0"></a></td> + <td width="30"><a href="dynamic_parsers.html"><img src="theme/r_arr.gif" border="0"></a></td>
+  </tr>
+</table>
+<h2>Overview</h2>
+<p>Using phoenix, in the previous chapter, we've seen how we can get data from our parsers using <tt>var</tt>:</p> +<pre><code><font color="#000000"><span class=special> </span><span class=keyword>int </span><span class=identifier>i</span><span class=special>; +</span><span class=identifier> integer </span><span class=special>= </span><span class=identifier>int_p</span><span class=special>[</span><span class="identifier">var</span><span class=special>(</span><span class=identifier>i</span><span class=special>) = </span><span class="identifier">arg1</span><span class=special>];</span></font></code></pre> +<p>Nifty! Our rule <tt>integer</tt>, if successful, passes the parsed integer + to the variable <tt>i</tt>. Everytime we need to parse an integer, we can call + our rule <tt>integer</tt> and simply extract the parsed number from the variable + <tt>i</tt>. There's something you should be aware of though. In the viewpoint + of the grammar, the variable <tt>i</tt> is global. When the grammar gets more + complex, it's hard to keep track of the current state of <tt>i</tt>. And, with
+  recursive rules, global variables simply won't be adequate. </p>
+<p>Closures are needed if you need your rules (or grammars) to be reentrant. For example, a rule (or grammar) might be called recursively indirectly or directly by itself. The calculator is a good example. The expression rule recursively calls itself indirectly when it invokes the factor rule. </p> +<p>Closures provide named (lazy) variables associated with each parse rule invocation. A closure variable is addressed using member syntax:</p> +<pre><code><font color="#000000"><span class=identifier> </span>rulename<span class="special">.</span>varname</font></code></pre> +<p>A closure variable <tt>R.x</tt> may be addressed in the semantic action of any other rule invoked by <tt>R</tt>; it refers to the innermost enclosing invocation of <tt>R</tt>. If no such invocation exists, an assertion occurs at runtime. </p>
+<p>Closures provide an environment, a stack frame, for local variables.
+ Most importantly, the closure variables are accessible from the EBNF grammar + specification and can be used to pass parser information upstream or downstream + from the topmost rule down to the terminals in a top-down recursive descent.
+  Closures facilitate dynamic scoping in C++.
+ Spirit's closure implementation is based on <em>Todd Veldhuizen</em>'s <strong>Dynamic + scoping in C++</strong> technique that he presented in his paper <a href="ftp://ftp.cs.indiana.edu/pub/techreports/TR542.pdf";>Techniques
+  for Scientic C++</a>. </p>
+<p>When a rule is given a closure, the closure's local variables are created prior + to entering the parse function and destructed after exiting the parse function. + These local variables are true local variables that exist on the hardware stack.</p>
+<table width="80%" border="0" align="center">
+  <tr>
+ <td class="note_box"><img src="theme/alert.gif" width="16" height="16"> <strong>Closures</strong>
+      <strong>and Phoenix</strong><br> <br>
+ Spirit v1.8 closure support requires <a href="../phoenix/index.html">Phoenix</a>. + In the future, Spirit will fully support <a href="../../../../libs/lambda/index.html">BLL</a>. + Currently, work is underway to merge the features of both libraries.</td>
+  </tr>
+</table>
+<h2>Example</h2>
+<p>Let's go back to the calculator grammar introduced in the <a href="functional.html">Functional</a> chapter. Here's the full grammar again, plus the closure declarations:</p> +<pre><span class=special> </span><span class=keyword>struct </span><span class=identifier>calc_closure </span><span class=special>: </span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>calc_closure</span><span class=special>, </span><span class=keyword>double</span><span class=special>&gt;
+    </span><span class=special>{
+ </span><span class=identifier>member1 </span><span class=identifier>val</span><span class=special>;
+    </span><span class=special>};
+
+ </span><span class=keyword>struct </span><span class=identifier>calculator </span><span class=special>: </span><span class=keyword>public </span><span class=identifier>grammar</span><span class=special>&lt;</span><span class=identifier>calculator</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt;
+    </span><span class=special>{
+ </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>typename </span><span class=identifier>ScannerT</span><span class=special>&gt; + </span><span class=keyword>struct </span><span class=identifier>definition
+        </span><span class=special>{
+ </span><span class=identifier>definition</span><span class=special>(</span><span class=identifier>calculator </span><span class=keyword>const</span><span class=special>&amp; </span><span class=identifier>self</span><span class=special>)
+            </span><span class=special>{
+ </span><span class=identifier>top </span><span class=special>= </span><span class=identifier>expression</span><span class=special>[</span><span class=identifier>self</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>];
+
+                </span><span class=identifier>expression
+ </span><span class=special>= </span><span class=identifier>term</span><span class=special>[</span><span class=identifier>expression</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] + </span><span class=special>&gt;&gt; </span><span class=special>*( </span><span class=special>(</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>term</span><span class=special>[</span><span class=identifier>expression</span><span class=special>.</span><span class=identifier>val </span><span class=special>+= </span><span class=identifier>arg1</span><span class=special>]) + </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>term</span><span class=special>[</span><span class=identifier>expression</span><span class=special>.</span><span class=identifier>val </span><span class=special>-= </span><span class=identifier>arg1</span><span class=special>])
+                            </span><span class=special>)
+                    </span><span class=special>;
+
+                </span><span class=identifier>term
+ </span><span class=special>= </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>term</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] + </span><span class=special>&gt;&gt; </span><span class=special>*( </span><span class=special>(</span><span class=literal>'*' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>term</span><span class=special>.</span><span class=identifier>val </span><span class=special>*= </span><span class=identifier>arg1</span><span class=special>]) + </span><span class=special>| </span><span class=special>(</span><span class=literal>'/' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>term</span><span class=special>.</span><span class=identifier>val </span><span class=special>/= </span><span class=identifier>arg1</span><span class=special>])
+                            </span><span class=special>)
+                    </span><span class=special>;
+
+                </span><span class=identifier>factor
+ </span><span class=special>= </span><span class=identifier>ureal_p</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] + </span><span class=special>| </span><span class=literal>'(' </span><span class=special>&gt;&gt; </span><span class=identifier>expression</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>] </span><span class=special>&gt;&gt; </span><span class=literal>')' + </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=special>-</span><span class=identifier>arg1</span><span class=special>]) + </span><span class=special>| </span><span class=special>(</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>factor</span><span class=special>[</span><span class=identifier>factor</span><span class=special>.</span><span class=identifier>val </span><span class=special>= </span><span class=identifier>arg1</span><span class=special>])
+                    </span><span class=special>;
+            </span><span class=special>}
+
+ </span><span class=keyword>typedef </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=identifier>rule_t</span><span class=special>; + </span><span class=identifier>rule_t </span><span class=identifier>expression</span><span class=special>, </span><span class=identifier>term</span><span class=special>, </span><span class=identifier>factor</span><span class=special>; + </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>&gt; </span><span class=identifier>top</span><span class=special>;
+
+ </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>&gt; </span><span class=keyword>const</span><span class=special>&amp; + </span><span class=identifier>start</span><span class=special>() </span><span class=keyword>const </span><span class=special>{ </span><span class=keyword>return </span><span class=identifier>top</span><span class=special>; </span><span class=special>}
+        </span><span class=special>};
+    </span><span class=special>};</span></pre>
+<p> <img height="16" width="15" src="theme/lens.gif"> The full source code can be <a href="../example/fundamental/phoenix_calc.cpp">viewed here</a>. This is part of the Spirit distribution.</p> +<p>Surely, we've come a long way from the original version of this calculator. With inline <a href="phoenix.html#lambda">lambda expressions</a>, we were able to write self contained grammars complete with semantic actions. </p> +<p>The first thing to notice is the declaration of <tt>calc_closure</tt>. </p>
+<p> <strong>Declaring closures</strong></p>
+<p> The general closure declaration syntax is:</p>
+<pre><code> <span class=keyword>struct </span><span class=identifier>name</span><span class=special></span> <span class=special>: </span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>name</span><span class=special>, </span><span class=keyword>type1, type2, type3,... typeN</span><span class=special>&gt;
+    {
+ </span><span class=identifier>member1 m_name1</span><span class=special>; + </span><span class=identifier>member2 m_name2</span><span class=special>; + </span><span class=identifier>member3 m_name3</span><span class=special>;
+        ...
+ </span><span class=identifier>memberN m_nameN</span><span class=special>;
+    };</span></code></pre>
+<p> <tt>member1</tt>... <tt>memberN</tt> are indirect links to the actual closure variables. Their indirect types correspond to <code><tt>type1</tt></code>... <code><tt>typeN</tt></code>. In our example, we declared <tt>calc_closure</tt>:</p> +<pre><span class=number> </span><span class=keyword>struct </span><span class=identifier>calc_closure </span><span class=special>: </span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>calc_closure</span><span class=special>, </span><span class=keyword>double</span><span class=special>&gt;
+    </span><span class=special>{
+ </span><span class=identifier>member1 </span><span class=identifier>val</span><span class=special>;
+    </span><span class=special>};</span></pre>
+<p><tt>calc_closure</tt> has a single variable <tt>val</tt> of type <span class=keyword>double</span><span class=special></span>.</p>
+<table width="80%" border="0" align="center">
+  <tr>
+ <td class="note_box"><p><img src="theme/alert.gif" width="16" height="16"> <tt>BOOST_SPIRIT_CLOSURE_LIMIT</tt><br>
+        <br>
+ Spirit predefined maximum closure limit. This limit defines the maximum number of elements a closure can hold. This number defaults to 3. The actual maximum is rounded up in multiples of 3. Thus, if this value is 4, the actual limit is 6. The ultimate maximum limit in this implementation is 15. It should <strong>NOT</strong> be greater than <tt>PHOENIX_LIMIT</tt> (see <a href="../phoenix/index.html">phoenix</a>). Example:<br>
+      <br>
+ <span class="comment style1">// Define these before including anything else <br> + </span><span class="preprocessor style1">#define</span><span class="style1"> PHOENIX_LIMIT 10<br> + </span><span class="preprocessor">#define</span><span class="style1"> BOOST_SPIRIT_CLOSURE_LIMIT 10</span></p> </td>
+  </tr>
+</table>
+<p><strong>Attaching closures</strong></p>
+<p>Closures can be applied to rules, subrules and grammars (non-terminals). The closure has a + special <a href="indepth_the_parser_context.html">parser context</a> that can be used with these non-terminals. The closure's + context is its means to hook into the non-terminal. The context of the closure <tt>C</tt> is <tt>C::context_t</tt>. </p> +<p>We can see in the example that we attached <tt>calc_closure</tt> to the <tt>expression</tt>, <tt>term</tt> and <tt>factor</tt> rules in our grammar:</p> +<pre><span class=special> </span><span class=keyword>typedef </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=identifier>rule_t</span><span class=special>; + </span><span class=identifier>rule_t </span><span class=identifier>expression</span><span class=special>, </span><span class=identifier>term</span><span class=special>, </span><span class=identifier>factor</span><span class=special>;</span> </pre>
+<p>as well as the grammar itself:</p>
+<pre><span class=special> </span><span class=keyword>struct </span><span class=identifier>calculator </span><span class=special>: </span><span class=keyword>public </span><span class=identifier>grammar</span><span class=special>&lt;</span><span class=identifier>calculator</span><span class=special>, </span><span class=identifier>calc_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt;</span></pre>
+<p><strong>Closure return value</strong></p>
+<p>The closure <tt>member1</tt> is the closure's return value. This return value, like the one returned by <tt>anychar_p</tt>, for example, can be used to propagate data up the parser hierarchy or passed to semantic actions. Thus, <tt>expression</tt>, <tt>term</tt> and <tt>factor</tt>, as well as the <tt>calculator</tt> grammar itself, all return a <tt>double</tt>. </p>
+<p><strong>Accessing closure variables</strong></p>
+<p>Closure variables can be accessed from within semantic actions just like you + would struct members: by qualifying the member name with its owner rule, subrule + or grammar. In our example above, notice how we referred to the closure member val. Example:</p> +<pre class="identifier"><code> expression<span class=special>.</span>val <span class="comment">// refer to expression's closure member val</span></code></pre>
+<p><strong>Initializing closure variables </strong></p>
+<p>We didn't use this feature in the example, yet, for completeness... </p>
+<p>Sometimes, we need to initialize our closure variables upon entering a non-terminal (rule, subrule or grammar). Closure enabled non-terminals, by default, default-construct variables upon entering the parse member function. + If this is not desirable, we can pass constructor arguments to the non-terminal. The syntax mimics a
+  function call. </p>
+<p>For (<em>a contrived</em>) example, if you wish to construct <tt>calc_closure</tt>'s variables + to <tt>3.6</tt>, when we invoke the rule <tt>expression</tt>, we write:</p> +<pre class="identifier"><code> expression<span class="special">(</span><span class="keyword">3.6</span><span class="special">) </span><span class="comment">// invoke rule expression and set its closure variable to 3.6</span></code></pre> +<p>The constructor arguments are actually Phoenix lambda expressions, so you can + use arbitrarily complex expressions. Here's another <em>contrived example<strong>: </strong></em></p> +<pre class="identifier"><code> <span class="comment">// call rule factor and set its closure variable to (expression.x / 8) * factor.y +</span> <code>factor</code><span class="special">((</span>expression<span class="special">.</span>x<span class="keyword"> </span><span class="special">/</span><span class="keyword"> 8</span><span class="special">) *</span><span class="keyword"> </span>term<span class="special">.</span>y<span class="special">)</span></code></pre> +<p><img src="theme/lens.gif" width="15" height="16"> We can pass less arguments than the actual number of variables in the closure. + The variables at the right with no corresponding constructor arguments are default + constructed. Passing more arguments than there are closure variables is an error.</p> +<p><img src="theme/lens.gif" width="15" height="16"> See <a href="../example/intermediate/parameters.cpp">parameters.cpp</a> for a compilable example. This is part of the Spirit distribution.</p>
+<h2>Closures and Dynamic parsing</h2>
+<p>Let's write a very simple parser for an XML/HTML like language with arbitrarily nested tags. The typical approach to this type of nested tag parsing is to delegate the actual tag matching to semantic actions, perhaps using a symbol table. For example, the semantic actions are responsible for ensuring that the tags are nested (e.g. this code: <tt>&lt;p&gt;&lt;table&gt;&lt;/p&gt;&lt;/table&gt;</tt> is erroneous).</p> +<p>Spirit allows us to dynamically modify the parser at runtime. The ability to guide parser behavior through semantic actions makes it possible to ensure the nesting of tags directly in the parser. We shall see how this is possible. here's the grammar in its simplest form:</p> +<pre><span class=identifier> element </span><span class=special>= </span><span class=identifier>start_tag </span><span class=special>&gt;&gt; </span><span class=special>*</span><span class=identifier>element </span><span class=special>&gt;&gt; </span><span class=identifier>end_tag</span><span class=special>;</span>
+</pre>
+<p>An element is a <tt>start_tag</tt> (e.g. <tt>&lt;font&gt;</tt>) folowed by zero or more elements, and ended by an <tt>end_tag</tt> (e.g. <tt>&lt;/font&gt;</tt>). Now, here's a first shot at our <tt>start_tag</tt>:</p> +<pre><span class=special> </span><span class=identifier>start_tag </span><span class=special>= </span><span class=literal>'&lt;' </span><span class=special>&gt;&gt; </span><span class=identifier>lexeme_d</span><span class=special>[</span><span class=special>(+</span><span class=identifier>alpha_p</span><span class=special>)</span><span class=special>] </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;</span></pre> +<p>Notice that the <tt>end_tag</tt> is just the same as <tt>start_tag</tt> with the addition of a slash:</p> +<pre><span class=special> </span><span class=identifier>end_tag </span><span class=special>= </span><span class=literal>&quot;&lt;/&quot; </span><span class=special>&gt;&gt; </span>what_we_got_in_the_start_tag <span class=special></span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;</span>
+</pre>
+<p>What we need to do is to temporarily store what we got in our <tt>start_tag</tt> and use that later to parse our <tt>end_tag</tt>. Nifty, we can use the <a href="parametric_parsers.html">parametric parser</a> primitives to parse our <tt>end_tag</tt>: </p> +<pre><span class=special> </span><span class=identifier>end_tag </span><span class=special>= </span><span class=string>&quot;&lt;/&quot; </span><span class=special>&gt;&gt; </span><span class=identifier>f_str_p</span><span class=special>(</span>tag<span class=special>) </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;</span></pre>
+<p>where we parameterize <tt>f_str_p</tt> with what we stored (tag). </p>
+<p>Be reminded though that our grammar is recursive. The element rule calls itself. Hence, we can't just use a variable and use <tt>phoenix::var</tt> or <tt>boost::ref</tt>. Nested recursion will simply gobble up the variable. Each invocation of element must have a closure variable <tt>tag</tt>. Here now is the complete grammar:</p> +<pre><span class=number> </span><span class=keyword>struct </span><span class=identifier>tags_closure </span><span class=special>: </span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>spirit</span><span class=special>::</span><span class=identifier>closure</span><span class=special>&lt;</span><span class=identifier>tags_closure</span><span class=special>, </span><span class=identifier>string</span><span class=special>&gt; </span><span class=special>
+    {
+ </span><span class=identifier>member1 </span><span class=identifier>tag</span><span class=special>;
+    </span><span class=special>};
+
+ </span><span class=keyword>struct </span><span class=identifier>tags </span><span class=special>: </span><span class=keyword>public </span><span class=identifier>grammar</span><span class=special>&lt;</span><span class=identifier>tags</span><span class=special>&gt;
+    </span><span class=special>{
+ </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>typename </span><span class=identifier>ScannerT</span><span class=special>&gt; + </span><span class=keyword>struct </span><span class=identifier>definition </span><span class=special>{
+
+ </span><span class=identifier>definition</span><span class=special>(</span><span class=identifier>tags </span><span class=keyword>const</span><span class=special>&amp; </span><span class=comment>/*self*/</span><span class=special>)
+            </span><span class=special>{
+ </span><span class=identifier>element </span><span class=special>= </span><span class=identifier>start_tag </span><span class=special>&gt;&gt; </span><span class=special>*</span><span class=identifier>element </span><span class=special>&gt;&gt; </span><span class=identifier>end_tag</span><span class=special>;
+
+ </span><span class=identifier>start_tag </span><span class=special>=
+                        </span><span class=literal>'&lt;'
+ </span><span class=special>&gt;&gt; </span><span class=identifier>lexeme_d
+                        </span><span class=special>[
+ </span><span class=special>(+</span><span class=identifier>alpha_p</span><span class=special>)
+                            </span><span class=special>[
+ </span><span class=comment>// construct string from arg1 and arg2 lazily + </span><span class=comment>// and assign to element.tag
+
+ </span><span class=identifier>element</span><span class=special>.</span><span class=identifier>tag </span><span class=special>= </span><span class=identifier>construct_</span><span class=special>&lt;</span><span class=identifier>string</span><span class=special>&gt;(</span><span class=identifier>arg1</span><span class=special>, </span><span class=identifier>arg2</span><span class=special>)
+                            </span><span class=special>]
+                        </span><span class=special>]
+ </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;
+
+ </span><span class=identifier>end_tag </span><span class=special>= </span><span class=string>&quot;&lt;/&quot; </span><span class=special>&gt;&gt; </span><span class=identifier>f_str_p</span><span class=special>(</span><span class=identifier>element</span><span class=special>.</span><span class=identifier>tag</span><span class=special>) </span><span class=special>&gt;&gt; </span><span class=literal>'&gt;'</span><span class=special>;
+            </span><span class=special>}
+
+ </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>tags_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=identifier>element</span><span class=special>; + </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>&gt; </span><span class=identifier>start_tag</span><span class=special>, </span><span class=identifier>end_tag</span><span class=special>;
+
+ </span><span class=identifier>rule</span><span class=special>&lt;</span><span class=identifier>ScannerT</span><span class=special>, </span><span class=identifier>tags_closure</span><span class=special>::</span><span class=identifier>context_t</span><span class=special>&gt; </span><span class=keyword>const</span><span class=special>&amp; + </span><span class=identifier>start</span><span class=special>() </span><span class=keyword>const </span><span class=special>{ </span><span class=keyword>return </span><span class=identifier>element</span><span class=special>; </span><span class=special>}
+        </span><span class=special>};
+    </span><span class=special>};</span></pre>
+<p>We attached a semantic action to the <tt>(+alpha_p)</tt> part of the start_tag. There, we stored the parsed tag in the <tt>element</tt>'s closure variable <tt>tag</tt>. Later, in the <tt>end_tag</tt>, we simply used the <tt>element</tt>'s closure variable <tt>tag</tt> to parameterize our <tt>f_str_p</tt> parser. Simple and elegant. If some of the details begin to look like greek (e.g. what is <tt>construct_</tt>?), please consult the <a href="phoenix.html">Phoenix</a> chapter. </p> +<p><img height="16" width="15" src="theme/lens.gif"> The full source code can be <a href="../example/fundamental/matching_tags.cpp">viewed here</a>. This is part of the Spirit distribution.</p> +<h2><img src="theme/lens.gif" width="15" height="16"> Closures in-depth</h2>
+<p><strong>What are Closures?</strong></p>
+<p>The closure is an object that <span class="quotes">&quot;closes&quot;</span> + over the local variables of a function making them visible and accessible outside + the function. What is more interesting is that the closure actually packages + a local context (stack frame where some variables reside) and makes it available + outside the scope in which they actually exist. The information is essentially + <span class="quotes">&quot;captured&quot;</span> by the closure allowing it + to be referred to anywhere and anytime, even prior to the actual creation of
+  the variables. </p>
+<p>The following diagram depicts the situation where a function <tt>A</tt> (or + rule) exposes its closure and another function <tt>B</tt> references <tt>A</tt>'s
+  variables through its closure.</p>
+<table width="40%" border="0" align="center">
+  <tr>
+    <td><img src="theme/closure1.png"></td>
+  </tr>
+  <tr>
+ <td> <div align="center"><b><font face="Geneva, Arial, Helvetica, san-serif" size="+1" color="#003399">The + closure as an object that <i>&quot;closes&quot;</i> over the local variables + of a function making them visible and accessible outside the function</font></b></div></td>
+  </tr>
+</table>
+<p>Of course, function <tt>A</tt> should be active when <tt>A.x</tt> is referenced. + What this means is that function <tt>B</tt> is reliant on function <tt>A</tt> + (If <tt>B</tt> is a nested function of <tt>A</tt>, this will always be the case). + The free form nature of Spirit rules allows access to a closure variable anytime, + anywhere. Accessing <tt>A.x</tt> is equivalent to referring to the topmost stack + variable <tt>x</tt> of function <tt>A</tt>. If function <tt>A</tt> is not active
+  when <tt>A.x</tt> is referenced, a runtime exception will be thrown.</p>
+<p><strong>Nested Functions</strong></p>
+<p>To fully understand the importance of closures, it is best to look at a language + such as Pascal which allows nested functions. Since we are dealing with C++, + lets us assume for the moment that C++ allows nested functions. Consider the
+  following <b><i>pseudo</i></b> C++ code:</p>
+<pre><span class=identifier> </span><span class=keyword>void </span><span class=identifier>a</span><span class=special>()
+    </span><span class=special>{
+ </span><span class=keyword>int </span><span class=identifier>va</span><span class=special>; + </span><span class=keyword>void </span><span class=identifier>b</span><span class=special>()
+        </span><span class=special>{
+ </span><span class=keyword>int </span><span class=identifier>vb</span><span class=special>; +</span> <span class=keyword>void </span><span class=identifier>c</span><span class=special>()
+            </span><span class=special>{
+ </span><span class=keyword>int </span><span class=identifier>vc</span><span class=special>;
+            </span><span class=special>}
+
+ </span><span class=identifier>c</span><span class=special>()</span><span class=special>;
+        </span><span class=special>}
+
+        </span><span class=identifier>b</span><span class=special>();
+    </span><span class=special>}</span></pre>
+<p>We have three functions <tt>a</tt>, <tt>b</tt> and <tt>c</tt> where <tt>c</tt> + is nested in <tt>b</tt> and <tt>b</tt> is nested in <tt>a</tt>. We also have + three variables <tt>va</tt>, <tt>vb</tt> and <tt>vc</tt>. The lifetime of each + of these local variables starts when the function where it is declared is entered + and ends when the function exits. The scope of a local variable spans all nested + functions inside the enclosing function where the variable is declared.</p> +<p>Going downstream from function <tt>a</tt> to function <tt>c</tt>, when function + a is entered, the variable <tt>va</tt> will be created in the stack. When function + <tt>b</tt> is entered (called by <tt>a</tt>), <tt>va</tt> is very well in scope + and is visble in <tt>b</tt>. At which point a fresh variable, <tt>vb</tt>, is + created on the stack. When function <tt>c</tt> is entered, both <tt>va</tt> + and <tt>vb</tt> are visibly in scope, and a fresh local variable <tt>vc</tt>
+  is created. </p>
+<p>Going upstream, <tt>vc</tt> is not and cannot be visible outside the function + <tt>c</tt>. <tt>vc</tt>'s life has already expired once <tt>c</tt> exits. The + same is true with <tt>vb</tt>; vb is accessible in function <tt>c</tt> but not
+  in function <tt>a</tt>. </p>
+<strong>Nested Mutually Recursive Rules</strong>
+<p>Now consider that <tt>a</tt>, <tt>b</tt> and <tt>c</tt> are rules:</p>
+<pre><span class=identifier> </span><span class=identifier>a </span><span class=special>= </span><span class=identifier>b </span><span class=special>&gt;&gt; </span><span class=special>*((</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>b</span><span class=special>) </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>b</span><span class=special>)); + </span><span class=identifier>b </span><span class=special>= </span><span class=identifier>c </span><span class=special>&gt;&gt; </span><span class=special>*((</span><span class=literal>'*' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>) </span><span class=special>| </span><span class=special>(</span><span class=literal>'/' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>)); + </span><span class=identifier>c </span><span class=special>= </span><span class=identifier>int_p </span><span class=special>| </span><span class=literal>'(' </span><span class=special>&gt;&gt; </span><span class=identifier>a </span><span class=special>&gt;&gt; </span><span class=literal>')' </span><span class=special>| </span><span class=special>(</span><span class=literal>'-' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>) </span><span class=special>| </span><span class=special>(</span><span class=literal>'+' </span><span class=special>&gt;&gt; </span><span class=identifier>c</span><span class=special>);</span></pre> +<p>We can visualize <tt>a</tt>, <tt>b</tt> and <tt>c</tt> as mutually recursive + functions where <tt>a</tt> calls <tt>b</tt>, <tt>b</tt> calls <tt>c</tt> and + <tt>c</tt> recursively calls <tt>a</tt>. Now, imagine if <tt>a</tt>, <tt>b</tt> + and <tt>c</tt> each has a local variable named <tt>value</tt> that can be referred
+  to in our grammar by explicit qualification:</p>
+<pre><span class=special> </span><span class=identifier>a</span><span class=special>.</span><span class=identifier>value </span><span class=comment>// refer to a's value local variable + </span><span class=identifier>b</span><span class=special>.</span><span class=identifier>value </span><span class=comment>// refer to b's value local variable + </span><span class=identifier>c</span><span class=special>.</span><span class=identifier>value </span><span class=comment>// refer to c's value local variable</span>
+</pre>
+<p>Like above, when <tt>a</tt> is entered, a local variable <tt>value</tt> is + created on the stack. This variable can be referred to by both <tt>b</tt> and + <tt>c</tt>. Again, when <tt>b</tt> is called by <tt>a</tt>, <tt>b</tt> creates + a local variable <tt>value</tt>. This variable is accessible by <tt>c</tt> but
+  not by <tt>a</tt>. </p>
+<p>Here now is where the analogy with nested functions end: when <tt>c</tt> is + called, a fresh variable <tt>value</tt> is created which, as usual, lasts the + whole lifetime of <tt>c</tt>. Pay close attention however that <tt>c</tt> may + call <tt>a</tt> recursively. When this happens, <tt>a</tt> may now refer to + the local variable of <tt>c</tt><code><span class=special>.</span></code></p>
+<table border="0">
+  <tr>
+    <td width="10"></td>
+ <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> + <td width="30"><a href="phoenix.html"><img src="theme/l_arr.gif" border="0"></a></td> + <td width="30"><a href="dynamic_parsers.html"><img src="theme/r_arr.gif" border="0"></a></td>
+  </tr>
+</table>
+<br>
+<hr size="1">
+<p class="copyright">Copyright &copy; 1998-2003 Joel de Guzman<br>
+  <br>
+<font size="2">Use, modification and distribution is subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt) </font> </p>
+</body>
+</html>

Modified: trunk/libs/spirit/classic/doc/confix.html
==============================================================================
--- trunk/libs/spirit/classic/doc/confix.html   (original)
+++ trunk/libs/spirit/classic/doc/confix.html   Tue Mar 31 01:07:16 2009
@@ -1,185 +1,185 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Confix Parsers</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="theme/style.css" type="text/css">
-</head>
-
-<body>
-<table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
-  <tr>
- <td width="10"> <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>&nbsp;</b></font></td> - <td width="85%"> <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Confix Parsers</b></font></td> - <td width="112"><a href="http://spirit.sf.net";><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
-  </tr>
-</table>
-<br>
-<table border="0">
-  <tr>
-    <td width="10"></td>
- <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> - <td width="30"><a href="character_sets.html"><img src="theme/l_arr.gif" border="0"></a></td> - <td width="30"><a href="list_parsers.html"><img src="theme/r_arr.gif" border="0"></a></td>
-  </tr>
-</table>
-<p><a name="confix_parser"></a><b>Confix Parsers</b></p>
-<p>Confix Parsers recognize a sequence out of three independent elements: an
-       opening, an expression and a closing. A simple example is a C comment:
-</p>
-<pre><code class="comment">    /* This is a C comment */</code></pre>
-<p>which could be parsed through the following rule definition:<code><font color="#000000">
-  </font></code> </p>
-<pre><span class=identifier> </span><span class=identifier>rule</span><span class=special>&lt;&gt; </span><span class=identifier>c_comment_rule - </span><span class=special>= </span><span class=identifier>confix_p</span><span class=special>(</span><span class=literal>"/*"</span><span class=special>, </span><span class=special>*</span><span class=identifier>anychar_p</span><span class=special>, </span><span class=literal>"*/"</span><span class=special>)
-        </span><span class=special>;</span></pre>
-<p>The <tt>confix_p</tt> parser generator
-  should be used for generating the required Confix Parser. The
-  three parameters to <tt>confix_p</tt> can be single
- characters (as above), strings or, if more complex parsing logic is required, - auxiliary parsers, each of which is automatically converted to the corresponding
-  parser type needed for successful parsing.</p>
-<p>The generated parser is equivalent to the following rule: </p>
-<pre><code> <span class=identifier>open </span><span class=special>&gt;&gt; (</span><span class=identifier>expr </span><span class=special>- </span><span class=identifier>close</span><span class=special>) &gt;&gt; </span><span class=identifier>close</span></code></pre> -<p>If the expr parser is an <tt>action_parser_category</tt> type parser (a parser - with an attached semantic action) we have to do something special. This happens,
-  if the user wrote something like:</p>
-<pre><code><span class=identifier> confix_p</span><span class=special>(</span><span class=identifier>open</span><span class=special>, </span><span class=identifier>expr</span><span class=special>[</span><span class=identifier>func</span><span class=special>], </span><span class=identifier>close</span><span class=special>)</span></code></pre> -<p>where <code>expr</code> is the parser matching the expr of the confix sequence - and <code>func</code> is a functor to be called after matching the <code>expr</code>. - If we would do nothing, the resulting code would parse the sequence as follows:</p> -<pre><code> <span class=identifier>open </span><span class=special>&gt;&gt; (</span><span class=identifier>expr</span><span class=special>[</span><span class=identifier>func</span><span class=special>] - </span><span class=identifier>close</span><span class=special>) &gt;&gt; </span><span class=identifier>close</span></code></pre> -<p>which in most cases is not what the user expects. (If this <u>is</u> what you've
-  expected, then please use the <tt>confix_p</tt> generator
- function <tt>direct()</tt>, which will inhibit the parser refactoring). To make
-  the confix parser behave as expected:</p>
-<pre><code><span class=identifier> open </span><span class=special>&gt;&gt; (</span><span class=identifier>expr </span><span class=special>- </span><span class=identifier>close</span><span class=special>)[</span><span class=identifier>func</span><span class=special>] &gt;&gt; </span><span class=identifier>close</span></code></pre> -<p>the actor attached to the <code>expr</code> parser has to be re-attached to - the <code>(expr - close)</code> parser construct, which will make the resulting - confix parser 'do the right thing'. This refactoring is done by the help of - the <a href="refactoring.html">Refactoring Parsers</a>. Additionally special - care must be taken, if the expr parser is a <tt>unary_parser_category</tt> type
-  parser as </p>
-<pre><code><span class=identifier> confix_p</span><span class=special>(</span><span class=identifier>open</span><span class=special>, *</span><span class=identifier>any

==============================================================================
Diff truncated at 200k characters

Other related posts:

  • » [boost-doc-zh commit] r230 - 转换至1.38.0,第12次,全部完成,包含以下库: - codesite-noreply