Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55178 - in trunk/libs/spirit/repository: doc/html doc/html/spirit_repository doc/html/spirit_repository/karma_components/karma_generator_directives doc/html/spirit_repository/qi_components/qi_parser_directives doc/html/spirit_repository/qi_components/qi_parser_primitives doc/qi example/qi test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2009-07-30 14:42:28


Author: hkaiser
Date: 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
New Revision: 55178
URL: http://svn.boost.org/trac/boost/changeset/55178

Log:
Spirit: doc updates
Text files modified:
   trunk/libs/spirit/repository/doc/html/index.html | 4
   trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/karma_generator_directives/karma_confix_generator.html | 18 ++++----
   trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html | 8 +-
   trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_directives/qi_distinct_parser.html | 86 ++++++++++++++++++---------------------
   trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_primitives/qi_flush_multi_pass_parser.html | 16 +++---
   trunk/libs/spirit/repository/doc/qi/distinct.qbk | 45 ++++++++++----------
   trunk/libs/spirit/repository/example/qi/distinct.cpp | 18 ++++----
   trunk/libs/spirit/repository/test/qi/distinct.cpp | 35 ++++++---------
   8 files changed, 107 insertions(+), 123 deletions(-)

Modified: trunk/libs/spirit/repository/doc/html/index.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/index.html (original)
+++ trunk/libs/spirit/repository/doc/html/index.html 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -34,7 +34,7 @@
 <div><p class="copyright">Copyright © 2001-2009 Joel
       de Guzman, Hartmut Kaiser</p></div>
 <div><div class="legalnotice" title="Legal Notice">
-<a name="id1009891"></a><p>
+<a name="id964454"></a><p>
         Distributed under 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)
       </p>
@@ -68,7 +68,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 26, 2009 at 03:33:36 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 26, 2009 at 16:54:46 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/karma_generator_directives/karma_confix_generator.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/karma_generator_directives/karma_confix_generator.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/karma_generator_directives/karma_confix_generator.html 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -27,7 +27,7 @@
         Confix Generator</a>
 </h4></div></div></div>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.description"></a><h6>
-<a name="id1017098"></a>
+<a name="id972668"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.description">Description</a>
         </h6>
 <p>
@@ -94,20 +94,20 @@
           tag using a simple: <code class="computeroutput"><span class="identifier">ol</span><span class="special">[</span><span class="string">"Some text"</span><span class="special">]</span></code> (which results in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">ol</span><span class="special">&gt;</span><span class="identifier">Some</span> <span class="identifier">text</span><span class="special">&lt;/</span><span class="identifier">ol</span><span class="special">&gt;</span></code>).
         </p>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.header"></a><h6>
-<a name="id1018022"></a>
+<a name="id973592"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/karma/confix.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.synopsis"></a><h6>
-<a name="id1018096"></a>
+<a name="id973665"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
 </pre>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.parameters"></a><h6>
-<a name="id1018144"></a>
+<a name="id973713"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.parameters">Parameters</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -176,7 +176,7 @@
           All three parameters can be arbitrary complex generators themselves.
         </p>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.attribute"></a><h6>
-<a name="id1018302"></a>
+<a name="id973871"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.attribute">Attribute</a>
         </h6>
 <p>
@@ -203,7 +203,7 @@
           </p></td></tr>
 </table></div>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.example"></a><h6>
-<a name="id1018477"></a>
+<a name="id974046"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.example">Example</a>
         </h6>
 <p>
@@ -212,7 +212,7 @@
           styles and a function prototype (for the full example code see here: confix.cpp)
         </p>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.prerequisites"></a><h6>
-<a name="id1018507"></a>
+<a name="id974076"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -250,7 +250,7 @@
 <p>
         </p>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.generating_different_comment_styles"></a><h6>
-<a name="id1018751"></a>
+<a name="id974321"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.generating_different_comment_styles">Generating
           Different Comment Styles</a>
         </h6>
@@ -302,7 +302,7 @@
           */</span> </code>.
         </p>
 <a name="spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.generating_a_function_prototype"></a><h6>
-<a name="id1019052"></a>
+<a name="id974622"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.karma_generator_directives.karma_confix_generator.generating_a_function_prototype">Generating
           a Function Prototype</a>
         </h6>

Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -27,7 +27,7 @@
 <a name="spirit_repository.preface"></a><a class="link" href="preface.html" title="Preface">Preface</a>
 </h2></div></div></div>
 <a name="spirit_repository.preface.the_spirit_repository"></a><h4>
-<a name="id1009921"></a>
+<a name="id964484"></a>
       <a class="link" href="preface.html#spirit_repository.preface.the_spirit_repository">The Spirit
       Repository</a>
     </h4>
@@ -40,7 +40,7 @@
       General List</a>.
     </p>
 <a name="spirit_repository.preface.how_to_use_this_manual"></a><h4>
-<a name="id1009956"></a>
+<a name="id964519"></a>
       <a class="link" href="preface.html#spirit_repository.preface.how_to_use_this_manual">How to use
       this manual</a>
     </h4>
@@ -49,7 +49,7 @@
       icons precede some text to indicate:
     </p>
 <div class="table">
-<a name="id1009969"></a><p class="title"><b>Table 1. Icons</b></p>
+<a name="id964532"></a><p class="title"><b>Table 1. Icons</b></p>
 <div class="table-contents"><table class="table" summary="Icons">
 <colgroup>
 <col>
@@ -170,7 +170,7 @@
       Tools</a>.
     </p>
 <a name="spirit_repository.preface.support"></a><h4>
-<a name="id1010210"></a>
+<a name="id964773"></a>
       <a class="link" href="preface.html#spirit_repository.preface.support">Support</a>
     </h4>
 <p>

Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_directives/qi_distinct_parser.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_directives/qi_distinct_parser.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_directives/qi_distinct_parser.html 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -28,50 +28,48 @@
         Distinct Parser</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.description"></a><h6>
-<a name="id1011512"></a>
+<a name="id968811"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.description">Description</a>
         </h6>
 <p>
           The <span class="emphasis"><em>Spirit.Qi</em></span> <code class="computeroutput"><span class="identifier">distinct</span></code>
           parser is a directive component allowing to avoid partial matches while
           parsing using a skipper. A simple example is the common task of matching
- a C identifier. Consider:
+ a C keyword. Consider:
         </p>
-<pre class="programlisting"><span class="string">"declare"</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
+<pre class="programlisting"><span class="string">"description"</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
 </pre>
 <p>
           intending to match a variable declaration rule in some imaginary language.
           Let's assume further, that this rule is used with a <code class="computeroutput"><span class="identifier">space</span></code>
           skipper and that we have the following strings in the input:
         </p>
-<pre class="programlisting"><span class="string">"declare: ident\n"</span>
-<span class="string">"declare ident\n"</span>
-<span class="string">"declareident\n"</span>
+<pre class="programlisting"><span class="string">"description: ident\n"</span>
+<span class="string">"description ident\n"</span>
+<span class="string">"descriptionident\n"</span>
 </pre>
 <p>
           It might seem unexpected, but the parser above matches all three inputs
           just fine, even if the third input should not match at all! In order to
- avoid the unwanted match we are forced to make our rule more complicated,
- intermixing the intended syntactic analysis with semantic verification:
+ avoid the unwanted match we are forced to make our rule more complicated:
         </p>
-<pre class="programlisting"><span class="identifier">lexeme</span><span class="special">[</span><span class="string">"declare"</span> <span class="special">&gt;&gt;</span> <span class="special">&amp;</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z_0-9"</span><span class="special">)]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">lexeme</span><span class="special">[</span><span class="string">"description"</span> <span class="special">&gt;&gt;</span> <span class="special">!</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z_0-9"</span><span class="special">)]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
 </pre>
 <p>
- (the rule reads as: match <code class="computeroutput"><span class="string">"declare"</span></code>
+ (the rule reads as: match <code class="computeroutput"><span class="string">"description"</span></code>
           as long as it's not <span class="emphasis"><em>directly</em></span> followed by a valid identifier).
         </p>
 <p>
           The <code class="computeroutput"><span class="identifier">distinct</span><span class="special">[]</span></code>
- directive can be used to simplify the rule above, allowing at the same
- time to avoid the semantic verification at parse time:
+ directive is meant to simplify the rule above:
         </p>
-<pre class="programlisting"><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z_0-9"</span><span class="special">))[</span><span class="string">"declare"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z_0-9"</span><span class="special">))[</span><span class="string">"description"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
 </pre>
 <p>
           Using the <code class="computeroutput"><span class="identifier">distinct</span><span class="special">[]</span></code>
           component instead of the explicit sequence has the advantage of being able
- to encapsulate the tail as a separate parser construct. The following code
- snippet illustrates the idea (for the full code of this example please
+ to encapsulate the tail (i.e the <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z_0-9"</span><span class="special">)</span></code>) as a separate parser construct. The following
+ code snippet illustrates the idea (for the full code of this example please
           see distinct.cpp):
         </p>
 <p>
@@ -91,21 +89,14 @@
 </span> <span class="comment">// construct
 </span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Tail</span><span class="special">&gt;</span>
     <span class="keyword">struct</span> <span class="identifier">distinct_spec</span>
- <span class="special">{</span>
- <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">spirit</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">terminal</span><span class="special">&lt;</span>
- <span class="identifier">repository</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">Tail</span><span class="special">)</span>
- <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span>
- <span class="special">};</span>
+ <span class="special">:</span> <span class="identifier">spirit</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">terminal</span><span class="special">&lt;</span><span class="identifier">repository</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">Tail</span><span class="special">)&gt;</span>
+ <span class="special">{};</span>
 
     <span class="comment">// Metafunction allowing to get the type of any ascii::char_(...) construct
 </span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">String</span><span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">char__spec</span>
- <span class="special">{</span>
- <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">spirit</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">terminal</span><span class="special">&lt;</span>
- <span class="identifier">spirit</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">String</span><span class="special">)</span>
- <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span>
- <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">char_spec</span>
+ <span class="special">:</span> <span class="identifier">spirit</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">terminal</span><span class="special">&lt;</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">String</span><span class="special">)&gt;</span>
+ <span class="special">{};</span>
 <span class="special">};</span>
 
 <span class="comment">// Define a helper function allowing to create a distinct() construct from
@@ -120,21 +111,21 @@
 <span class="comment">// Define a helper function allowing to create a ascii::char_() construct
 </span><span class="comment">// from an arbitrary string representation
 </span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">String</span><span class="special">&gt;</span>
-<span class="keyword">inline</span> <span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">char__spec</span><span class="special">&lt;</span><span class="identifier">String</span><span class="special">&gt;::</span><span class="identifier">type</span>
-<span class="identifier">char__spec</span><span class="special">(</span><span class="identifier">String</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">str</span><span class="special">)</span>
+<span class="keyword">inline</span> <span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">char_spec</span><span class="special">&lt;</span><span class="identifier">String</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">char_spec</span><span class="special">(</span><span class="identifier">String</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">str</span><span class="special">)</span>
 <span class="special">{</span>
     <span class="keyword">return</span> <span class="identifier">ascii</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">str</span><span class="special">);</span>
 <span class="special">}</span>
 
 <span class="comment">// the following constructs the type of a distinct_spec holding a
 </span><span class="comment">// charset("0-9a-zA-Z_") as its tail parser
-</span><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">char__spec</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">charset_tag_type</span><span class="special">;</span>
+</span><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">char_spec</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">charset_tag_type</span><span class="special">;</span>
 <span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">distinct_spec</span><span class="special">&lt;</span><span class="identifier">charset_tag_type</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">keyword_tag_type</span><span class="special">;</span>
 
 <span class="comment">// Define a new Qi 'keyword' directive usable as a shortcut for a
 </span><span class="comment">// repository::distinct(char_(std::string("0-9a-zA-Z_")))
 </span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span> <span class="identifier">keyword_spec</span><span class="special">(</span><span class="string">"0-9a-zA-Z_"</span><span class="special">);</span>
-<span class="identifier">keyword_tag_type</span> <span class="keyword">const</span> <span class="identifier">keyword</span> <span class="special">=</span> <span class="identifier">distinct_spec</span><span class="special">(</span><span class="identifier">char__spec</span><span class="special">(</span><span class="identifier">keyword_spec</span><span class="special">));</span>
+<span class="identifier">keyword_tag_type</span> <span class="keyword">const</span> <span class="identifier">keyword</span> <span class="special">=</span> <span class="identifier">distinct_spec</span><span class="special">(</span><span class="identifier">char_spec</span><span class="special">(</span><span class="identifier">keyword_spec</span><span class="special">));</span>
 </pre>
 <p>
           </p>
@@ -144,7 +135,7 @@
           These definitions define a new Qi parser recognizing keywords! This allows
           to rewrite our declaration parser expression as:
         </p>
-<pre class="programlisting"><span class="identifier">keyword</span><span class="special">[</span><span class="string">"declare"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">keyword</span><span class="special">[</span><span class="string">"description"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">":"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)</span>
 </pre>
 <p>
           which is much more readable and concise if compared to the original parser
@@ -153,20 +144,20 @@
           above.
         </p>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.header"></a><h6>
-<a name="id1015563"></a>
+<a name="id970044"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/distinct.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_distinct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.synopsis"></a><h6>
-<a name="id1015636"></a>
+<a name="id970117"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">tail</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
 </pre>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.parameters"></a><h6>
-<a name="id1015676"></a>
+<a name="id970156"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.parameters">Parameters</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -219,7 +210,7 @@
           All two parameters can be arbitrary complex parsers themselves.
         </p>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.attribute"></a><h6>
-<a name="id1015774"></a>
+<a name="id970255"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.attribute">Attribute</a>
         </h6>
 <p>
@@ -233,7 +224,7 @@
 <pre class="programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--&gt;</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">b</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
 </pre>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.example"></a><h6>
-<a name="id1015887"></a>
+<a name="id970368"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.example">Example</a>
         </h6>
 <p>
@@ -241,7 +232,7 @@
           parser. distinct.cpp)
         </p>
 <a name="spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.prerequisites"></a><h6>
-<a name="id1015917"></a>
+<a name="id970398"></a>
           <a class="link" href="qi_distinct_parser.html#spirit_repository.qi_components.qi_parser_directives.qi_distinct_parser.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -280,8 +271,9 @@
 <p>
           We show several examples of how the <code class="computeroutput"><span class="identifier">distinct</span><span class="special">[]</span></code> directive can be used to force correct
           behavior while matching keywords. The first two code snippets show the
- correct matching of the declare keyword (in this hypothetical example we
- allow keywords to be directly followed by an optional <code class="computeroutput"><span class="string">"--"</span></code>):
+ correct matching of the <code class="computeroutput"><span class="identifier">description</span></code>
+ keyword (in this hypothetical example we allow keywords to be directly
+ followed by an optional <code class="computeroutput"><span class="string">"--"</span></code>):
         </p>
 <p>
           </p>
@@ -289,10 +281,10 @@
             
 </p>
 <pre class="programlisting"><span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"declare ident"</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"description ident"</span><span class="special">);</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">(</span><span class="identifier">str</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
     <span class="keyword">bool</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">qi</span><span class="special">::</span><span class="identifier">phrase_parse</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span>
- <span class="special">,</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)[</span><span class="string">"declare"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">"--"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">+(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)[</span><span class="string">"description"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">"--"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">+(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)</span>
       <span class="special">,</span> <span class="identifier">space</span><span class="special">);</span>
     <span class="identifier">BOOST_ASSERT</span><span class="special">(</span><span class="identifier">r</span> <span class="special">&amp;&amp;</span> <span class="identifier">first</span> <span class="special">==</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
 <span class="special">}</span>
@@ -305,10 +297,10 @@
             
 </p>
 <pre class="programlisting"><span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"declare--ident"</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"description--ident"</span><span class="special">);</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">(</span><span class="identifier">str</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
     <span class="keyword">bool</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">qi</span><span class="special">::</span><span class="identifier">phrase_parse</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span>
- <span class="special">,</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)[</span><span class="string">"declare"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">"--"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">+(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)[</span><span class="string">"description"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">"--"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">+(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)</span>
       <span class="special">,</span> <span class="identifier">space</span><span class="special">);</span>
     <span class="identifier">BOOST_ASSERT</span><span class="special">(</span><span class="identifier">r</span> <span class="special">&amp;&amp;</span> <span class="identifier">first</span> <span class="special">==</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
 <span class="special">}</span>
@@ -319,7 +311,7 @@
         </p>
 <p>
           The last example shows that the <code class="computeroutput"><span class="identifier">distinct</span><span class="special">[]</span></code> parser component correctly refuses to
- match "declare-ident":
+ match "description-ident":
         </p>
 <p>
           </p>
@@ -327,10 +319,10 @@
             
 </p>
 <pre class="programlisting"><span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"declare-ident"</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"description-ident"</span><span class="special">);</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">(</span><span class="identifier">str</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
     <span class="keyword">bool</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">qi</span><span class="special">::</span><span class="identifier">phrase_parse</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span>
- <span class="special">,</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)[</span><span class="string">"declare"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">"--"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">+(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)[</span><span class="string">"description"</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="special">-</span><span class="identifier">lit</span><span class="special">(</span><span class="string">"--"</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="special">+(</span><span class="identifier">alnum</span> <span class="special">|</span> <span class="char">'_'</span><span class="special">)</span>
       <span class="special">,</span> <span class="identifier">space</span><span class="special">);</span>
     <span class="identifier">BOOST_ASSERT</span><span class="special">(!</span><span class="identifier">r</span> <span class="special">&amp;&amp;</span> <span class="identifier">first</span> <span class="special">==</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
 <span class="special">}</span>

Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_primitives/qi_flush_multi_pass_parser.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_primitives/qi_flush_multi_pass_parser.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/qi_parser_primitives/qi_flush_multi_pass_parser.html 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -28,7 +28,7 @@
         flush_multi_pass parser</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.description"></a><h6>
-<a name="id1010282"></a>
+<a name="id964845"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.description">Description</a>
         </h6>
 <p>
@@ -53,20 +53,20 @@
           <code class="computeroutput"><span class="identifier">eps</span></code>).
         </p>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.header"></a><h6>
-<a name="id1010390"></a>
+<a name="id964953"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/flush_multi_pass.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_flush_multi_pass</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.synopsis"></a><h6>
-<a name="id1010463"></a>
+<a name="id965026"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">flush_multi_pass</span>
 </pre>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.parameters"></a><h6>
-<a name="id1010485"></a>
+<a name="id965048"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.parameters">Parameters</a>
         </h6>
 <p>
@@ -74,7 +74,7 @@
           not require any parameters.
         </p>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.attribute"></a><h6>
-<a name="id1010509"></a>
+<a name="id965072"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.attribute">Attribute</a>
         </h6>
 <p>
@@ -84,7 +84,7 @@
 <pre class="programlisting"><span class="identifier">flush_multi_pass</span> <span class="special">--&gt;</span> <span class="identifier">unused</span>
 </pre>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.example"></a><h6>
-<a name="id1010558"></a>
+<a name="id965121"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.example">Example</a>
         </h6>
 <p>
@@ -96,7 +96,7 @@
           a function prototype (for the full example code see here: flush_multi_pass.cpp)
         </p>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.prerequisites"></a><h6>
-<a name="id1010590"></a>
+<a name="id965153"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -133,7 +133,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.clearing_the_internal_buffer"></a><h6>
-<a name="id1010806"></a>
+<a name="id965369"></a>
           <a class="link" href="qi_flush_multi_pass_parser.html#spirit_repository.qi_components.qi_parser_primitives.qi_flush_multi_pass_parser.clearing_the_internal_buffer">Clearing
           the internal buffer</a>
         </h6>

Modified: trunk/libs/spirit/repository/doc/qi/distinct.qbk
==============================================================================
--- trunk/libs/spirit/repository/doc/qi/distinct.qbk (original)
+++ trunk/libs/spirit/repository/doc/qi/distinct.qbk 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -12,37 +12,36 @@
 
 The __qi__ `distinct` parser is a directive component allowing to avoid partial
 matches while parsing using a skipper. A simple example is the common task of
-matching a C identifier. Consider:
+matching a C keyword. Consider:
 
- "declare" >> -lit(":") >> *(char_ - eol)
+ "description" >> -lit(":") >> *(char_ - eol)
 
 intending to match a variable declaration rule in some imaginary language. Let's
 assume further, that this rule is used with a `space` skipper and that we have
 the following strings in the input:
 
- "declare: ident\n"
- "declare ident\n"
- "declareident\n"
+ "description: ident\n"
+ "description ident\n"
+ "descriptionident\n"
 
 It might seem unexpected, but the parser above matches all three inputs just
 fine, even if the third input should not match at all! In order to avoid the
-unwanted match we are forced to make our rule more complicated, intermixing
-the intended syntactic analysis with semantic verification:
+unwanted match we are forced to make our rule more complicated:
 
- lexeme["declare" >> &char_("a-zA-Z_0-9")] >> -lit(":") >> *(char_ - eol)
+ lexeme["description" >> !char_("a-zA-Z_0-9")] >> -lit(":") >> *(char_ - eol)
 
-(the rule reads as: match `"declare"` as long as it's not /directly/ followed
-by a valid identifier).
+(the rule reads as: match `"description"` as long as it's not /directly/
+followed by a valid identifier).
 
-The `distinct[]` directive can be used to simplify the rule above, allowing at
-the same time to avoid the semantic verification at parse time:
+The `distinct[]` directive is meant to simplify the rule above:
 
- distinct(char_("a-zA-Z_0-9"))["declare"] >> -lit(":") >> *(char_ - eol)
+ distinct(char_("a-zA-Z_0-9"))["description"] >> -lit(":") >> *(char_ - eol)
 
 Using the `distinct[]` component instead of the explicit sequence has the
-advantage of being able to encapsulate the tail as a separate parser construct.
-The following code snippet illustrates the idea (for the full code of this
-example please see [@../../test/qi/distinct.cpp distinct.cpp]):
+advantage of being able to encapsulate the tail (i.e the `char_("a-zA-Z_0-9")`)
+as a separate parser construct. The following code snippet illustrates the idea
+(for the full code of this example please see
+[@../../test/qi/distinct.cpp distinct.cpp]):
 
 [import ../test/qi/distinct.cpp]
 [qi_distinct_encapsulation]
@@ -50,7 +49,7 @@
 These definitions define a new Qi parser recognizing keywords! This allows to
 rewrite our declaration parser expression as:
 
- keyword["declare"] >> -lit(":") >> *(char_ - eol)
+ keyword["description"] >> -lit(":") >> *(char_ - eol)
 
 which is much more readable and concise if compared to the original parser
 expression. In addition the new `keyword[]` directive has the advantage to be
@@ -109,15 +108,15 @@
 
 We show several examples of how the `distinct[]` directive can be used to force
 correct behavior while matching keywords. The first two code snippets show
-the correct matching of the declare keyword (in this hypothetical example we
-allow keywords to be directly followed by an optional `"--"`):
+the correct matching of the `description` keyword (in this hypothetical example
+we allow keywords to be directly followed by an optional `"--"`):
 
-[qi_distinct_declare_ident]
-[qi_distinct_declare__ident]
+[qi_distinct_description_ident]
+[qi_distinct_description__ident]
 
 The last example shows that the `distinct[]` parser component correctly refuses
-to match "declare-ident":
+to match "description-ident":
 
-[qi_distinct_declare_ident_error]
+[qi_distinct_description_ident_error]
 
 [endsect]

Modified: trunk/libs/spirit/repository/example/qi/distinct.cpp
==============================================================================
--- trunk/libs/spirit/repository/example/qi/distinct.cpp (original)
+++ trunk/libs/spirit/repository/example/qi/distinct.cpp 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -23,34 +23,34 @@
 
 int main()
 {
- //[qi_distinct_declare_ident
+ //[qi_distinct_description_ident
     {
- std::string str("declare ident");
+ std::string str("description ident");
         std::string::iterator first(str.begin());
         bool r = qi::phrase_parse(first, str.end()
- , distinct(alnum | '_')["declare"] >> -lit("--") >> +(alnum | '_')
+ , distinct(alnum | '_')["description"] >> -lit("--") >> +(alnum | '_')
           , space);
         BOOST_ASSERT(r && first == str.end());
     }
     //]
 
- //[qi_distinct_declare__ident
+ //[qi_distinct_description__ident
     {
- std::string str("declare--ident");
+ std::string str("description--ident");
         std::string::iterator first(str.begin());
         bool r = qi::phrase_parse(first, str.end()
- , distinct(alnum | '_')["declare"] >> -lit("--") >> +(alnum | '_')
+ , distinct(alnum | '_')["description"] >> -lit("--") >> +(alnum | '_')
           , space);
         BOOST_ASSERT(r && first == str.end());
     }
     //]
 
- //[qi_distinct_declare_ident_error
+ //[qi_distinct_description_ident_error
     {
- std::string str("declare-ident");
+ std::string str("description-ident");
         std::string::iterator first(str.begin());
         bool r = qi::phrase_parse(first, str.end()
- , distinct(alnum | '_')["declare"] >> -lit("--") >> +(alnum | '_')
+ , distinct(alnum | '_')["description"] >> -lit("--") >> +(alnum | '_')
           , space);
         BOOST_ASSERT(!r && first == str.begin());
     }

Modified: trunk/libs/spirit/repository/test/qi/distinct.cpp
==============================================================================
--- trunk/libs/spirit/repository/test/qi/distinct.cpp (original)
+++ trunk/libs/spirit/repository/test/qi/distinct.cpp 2009-07-26 12:55:35 EDT (Sun, 26 Jul 2009)
@@ -38,21 +38,14 @@
         // construct
         template <typename Tail>
         struct distinct_spec
- {
- using namespace boost::spirit;
- typedef typename spirit::result_of::terminal<
- repository::tag::distinct(Tail)
- >::type type;
- };
+ : spirit::result_of::terminal<repository::tag::distinct(Tail)>
+ {};
 
         // Metafunction allowing to get the type of any ascii::char_(...) construct
         template <typename String>
- struct char__spec
- {
- typedef typename spirit::result_of::terminal<
- spirit::tag::ascii::char_(String)
- >::type type;
- };
+ struct char_spec
+ : spirit::result_of::terminal<spirit::tag::ascii::char_(String)>
+ {};
     };
 
     // Define a helper function allowing to create a distinct() construct from
@@ -67,21 +60,21 @@
     // Define a helper function allowing to create a ascii::char_() construct
     // from an arbitrary string representation
     template <typename String>
- inline typename traits::char__spec<String>::type
- char__spec(String const& str)
+ inline typename traits::char_spec<String>::type
+ char_spec(String const& str)
     {
         return ascii::char_(str);
     }
 
     // the following constructs the type of a distinct_spec holding a
     // charset("0-9a-zA-Z_") as its tail parser
- typedef traits::char__spec<std::string>::type charset_tag_type;
+ typedef traits::char_spec<std::string>::type charset_tag_type;
     typedef traits::distinct_spec<charset_tag_type>::type keyword_tag_type;
 
     // Define a new Qi 'keyword' directive usable as a shortcut for a
     // repository::distinct(char_(std::string("0-9a-zA-Z_")))
     std::string const keyword_spec("0-9a-zA-Z_");
- keyword_tag_type const keyword = distinct_spec(char__spec(keyword_spec));
+ keyword_tag_type const keyword = distinct_spec(char_spec(keyword_spec));
     //]
 }
 
@@ -95,12 +88,12 @@
         using namespace boost::spirit::ascii;
 
         qi::rule<char const*, space_type> r;
- r = distinct::keyword["declare"] >> -lit(':') >> distinct::keyword["ident"];
+ r = distinct::keyword["description"] >> -lit(':') >> distinct::keyword["ident"];
 
- BOOST_TEST(test("declare ident", r, space));
- BOOST_TEST(test("declare:ident", r, space));
- BOOST_TEST(test("declare: ident", r, space));
- BOOST_TEST(!test("declareident", r, space));
+ BOOST_TEST(test("description ident", r, space));
+ BOOST_TEST(test("description:ident", r, space));
+ BOOST_TEST(test("description: ident", r, space));
+ BOOST_TEST(!test("descriptionident", r, space));
     }
 
     return boost::report_errors();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk